2 dnl $Id: acinclude.m4,v 1.332.2.14.2.26 2007/08/20 14:28:45 jani Exp $
4 dnl This file contains local autoconf functions.
7 dnl -------------------------------------------------------------------------
8 dnl Output stylize macros for configure (help/runtime)
9 dnl -------------------------------------------------------------------------
12 dnl PHP_HELP_SEPARATOR(title)
14 dnl Adds separator title into the configure --help display.
16 AC_DEFUN([PHP_HELP_SEPARATOR],[
23 dnl PHP_CONFIGURE_PART(title)
25 dnl Adds separator title configure output (idea borrowed from mm)
27 AC_DEFUN([PHP_CONFIGURE_PART],[
29 AC_MSG_RESULT([${T_MD}$1${T_ME}])
32 dnl -------------------------------------------------------------------------
33 dnl Build system helper macros
34 dnl -------------------------------------------------------------------------
37 dnl PHP_DEF_HAVE(what)
39 dnl Generates 'AC_DEFINE(HAVE_WHAT, 1, [ ])'
41 AC_DEFUN([PHP_DEF_HAVE],[AC_DEFINE([HAVE_]translit($1,a-z_.-,A-Z___), 1, [ ])])
44 dnl PHP_RUN_ONCE(namespace, variable, code)
46 dnl execute code, if variable is not set in namespace
48 AC_DEFUN([PHP_RUN_ONCE],[
50 unique=`echo $2|$SED 's/[^a-zA-Z0-9]/_/g'`
52 cmd="echo $ac_n \"\$$1$unique$ac_c\""
53 if test -n "$unique" && test "`eval $cmd`" = "" ; then
60 dnl PHP_EXPAND_PATH(path, variable)
62 dnl expands path to an absolute path and assigns it to variable
64 AC_DEFUN([PHP_EXPAND_PATH],[
65 if test -z "$1" || echo "$1" | grep '^/' >/dev/null ; then
69 ep_dir="`echo $1|$SED 's%/*[^/][^/]*/*$%%'`"
71 ep_realdir="`(cd \"$ep_dir\" && pwd)`"
72 $2="$ep_realdir/`basename \"$1\"`"
77 dnl PHP_DEFINE(WHAT [, value[, directory]])
79 dnl Creates builddir/include/what.h and in there #define WHAT value
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]
86 dnl PHP_SUBST(varname)
88 dnl Adds variable with it's value into Makefile, e.g.:
91 AC_DEFUN([PHP_SUBST],[
92 PHP_VAR_SUBST="$PHP_VAR_SUBST $1"
96 dnl PHP_SUBST_OLD(varname)
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],[
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
131 if test -z "$host_alias"; then
132 AC_MSG_ERROR([host_alias is not set!])
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
144 dnl We need to play tricks here to avoid matching the grep line itself
146 $EGREP $pattern'.*include/php' $srcdir/configure|$SED 's/.*>//'|xargs touch 2>/dev/null
150 dnl PHP_GEN_GLOBAL_MAKEFILE
152 dnl Generates the global makefile.
154 AC_DEFUN([PHP_GEN_GLOBAL_MAKEFILE],[
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
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,cli,PHP_CLI_OBJS,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],[
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
213 b_cxx_pre=$php_cxx_pre
215 b_cxx_meta=$php_cxx_meta
217 b_cxx_post=$php_cxx_post
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.
231 AC_DEFUN([PHP_ADD_SOURCES_X],[
232 dnl relative to source- or build-directory?
233 dnl ac_srcdir/ac_bdir include trailing slash
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" ;;
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
247 dnl remove the suffix
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
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" ;;
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
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"
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,[
305 LIBS="-R /usr/$PHP_LIBDIR $LIBS"
306 AC_TRY_LINK([], [], php_cv_cc_dashr=yes, php_cv_cc_dashr=no)
308 AC_MSG_RESULT([$php_cv_cc_dashr])
309 if test $php_cv_cc_dashr = "yes"; then
312 AC_MSG_CHECKING([if compiler supports -Wl,-rpath,])
313 AC_CACHE_VAL(php_cv_cc_rpath,[
315 LIBS="-Wl,-rpath,/usr/$PHP_LIBDIR $LIBS"
316 AC_TRY_LINK([], [], php_cv_cc_rpath=yes, php_cv_cc_rpath=no)
318 AC_MSG_RESULT([$php_cv_cc_rpath])
319 if test $php_cv_cc_rpath = "yes"; then
320 ld_runpath_switch=-Wl,-rpath,
322 dnl something innocuous
326 if test "$PHP_RPATH" = "no"; then
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
344 eval $gcc_arg_name=$ac_result
347 if eval test "\$$gcc_arg_name" = "yes"; then
356 dnl PHP_LIBGCC_LIBPATH(gcc)
358 dnl Stores the location of libgcc in libgcc_libpath
360 AC_DEFUN([PHP_LIBGCC_LIBPATH],[
362 libgcc_libpath=`$1 --print-libgcc-file-name|$SED 's%/*[^/][^/]*$%%'`
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],[
379 -L/usr/$PHP_LIBDIR|-L/usr/$PHP_LIBDIR/[)] ;;
380 *[)] ac_new_flags="[$]ac_new_flags [$]i" ;;
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
393 AC_DEFUN([PHP_EVAL_LIBLINE],[
397 if test "$ext_shared" = "yes"; then
400 PHP_RUN_ONCE(EXTRA_LDFLAGS, [$ac_i], [EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ac_i"])
404 ac_ii=`echo $ac_i|cut -c 3-`
405 PHP_ADD_LIBRARY($ac_ii,1,$2)
408 ac_ii=`echo $ac_i|cut -c 3-`
409 PHP_ADD_LIBPATH($ac_ii,$2)
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],[
425 ac_ii=`echo $ac_i|cut -c 3-`
426 PHP_ADD_INCLUDE($ac_ii)
432 dnl internal, don't use
433 AC_DEFUN([_PHP_ADD_LIBPATH_GLOBAL],[
434 PHP_RUN_ONCE(LIBPATH, $1, [
435 test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS $ld_runpath_switch$1"
436 LDFLAGS="$LDFLAGS -L$1"
437 PHP_RPATHS="$PHP_RPATHS $1"
442 dnl PHP_ADD_LIBPATH(path [, SHARED-LIBADD])
444 dnl Adds a path to linkpath/runpath (LDFLAGS)
446 AC_DEFUN([PHP_ADD_LIBPATH],[
447 if test "$1" != "/usr/$PHP_LIBDIR" && test "$1" != "/usr/lib" && test "$1" != "/usr/lib64"; then
448 PHP_EXPAND_PATH($1, ai_p)
450 _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
452 if test "$ext_shared" = "yes"; then
454 test -n "$ld_runpath_switch" && $2="$ld_runpath_switch$ai_p [$]$2"
456 _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
463 dnl PHP_UTILIZE_RPATHS()
465 dnl builds RPATHS/LDFLAGS from PHP_RPATHS
467 AC_DEFUN([PHP_UTILIZE_RPATHS],[
468 OLD_RPATHS=$PHP_RPATHS
471 for i in $OLD_RPATHS; do
472 dnl Can be passed to native cc/libtool
473 PHP_LDFLAGS="$PHP_LDFLAGS -L$i"
475 PHP_RPATHS="$PHP_RPATHS -R $i"
477 NATIVE_RPATHS="$NATIVE_RPATHS $ld_runpath_switch$i"
480 if test "$PHP_RPATH" = "no"; then
487 dnl PHP_ADD_INCLUDE(path [,before])
489 dnl add an include path.
490 dnl if before is 1, add in the beginning of INCLUDES.
492 AC_DEFUN([PHP_ADD_INCLUDE],[
493 if test "$1" != "/usr/include"; then
494 PHP_EXPAND_PATH($1, ai_p)
495 PHP_RUN_ONCE(INCLUDEPATH, $ai_p, [
497 INCLUDES="-I$ai_p $INCLUDES"
499 INCLUDES="$INCLUDES -I$ai_p"
505 dnl internal, don't use
506 AC_DEFUN([_PHP_X_ADD_LIBRARY],[dnl
507 ifelse([$2],,$3="-l$1 [$]$3", $3="[$]$3 -l$1") dnl
510 dnl internal, don't use
511 AC_DEFUN([_PHP_ADD_LIBRARY_SKELETON],[
515 _PHP_X_ADD_LIBRARY($1,$2,$5)
517 if test "$ext_shared" = "yes"; then
518 _PHP_X_ADD_LIBRARY($1,$2,$3)
527 dnl PHP_ADD_LIBRARY(library[, append[, shared-libadd]])
529 dnl add a library to the link line
531 AC_DEFUN([PHP_ADD_LIBRARY],[
532 _PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY],[LIBS])
536 dnl PHP_ADD_LIBRARY_DEFER(library[, append[, shared-libadd]])
538 dnl add a library to the link line (deferred, not used during configure)
540 AC_DEFUN([PHP_ADD_LIBRARY_DEFER],[
541 _PHP_ADD_LIBRARY_SKELETON([$1],[$2],[$3],[PHP_ADD_LIBRARY_DEFER],[DLIBS])
545 dnl PHP_ADD_LIBRARY_WITH_PATH(library, path[, shared-libadd])
547 dnl add a library to the link line and path to linkpath/runpath.
548 dnl if shared-libadd is not empty and $ext_shared is yes,
549 dnl shared-libadd will be assigned the library information
551 AC_DEFUN([PHP_ADD_LIBRARY_WITH_PATH],[
553 if test -n "$2"; then
558 if test "$ext_shared" = "yes"; then
560 if test -n "$2"; then
561 PHP_ADD_LIBPATH($2,$3)
564 PHP_ADD_LIBRARY_WITH_PATH($1,$2)
570 dnl PHP_ADD_LIBRARY_DEFER_WITH_PATH(library, path[, shared-libadd])
572 dnl add a library to the link line (deferred)
573 dnl and path to linkpath/runpath (not deferred)
574 dnl if shared-libadd is not empty and $ext_shared is yes,
575 dnl shared-libadd will be assigned the library information
577 AC_DEFUN([PHP_ADD_LIBRARY_DEFER_WITH_PATH],[
579 if test -n "$2"; then
582 PHP_ADD_LIBRARY_DEFER($1)
584 if test "$ext_shared" = "yes"; then
586 if test -n "$2"; then
587 PHP_ADD_LIBPATH($2,$3)
590 PHP_ADD_LIBRARY_DEFER_WITH_PATH($1,$2)
596 dnl PHP_ADD_FRAMEWORK(framework [,before])
598 dnl add a (Darwin / Mac OS X) framework to the link
599 dnl line. if before is 1, the framework is added
600 dnl to the beginning of the line.
602 AC_DEFUN([PHP_ADD_FRAMEWORK], [
603 PHP_RUN_ONCE(FRAMEWORKS, $1, [
605 PHP_FRAMEWORKS="-framework $1 $PHP_FRAMEWORKS"
607 PHP_FRAMEWORKS="$PHP_FRAMEWORKS -framework $1"
613 dnl PHP_ADD_FRAMEWORKPATH(path [,before])
615 dnl add a (Darwin / Mac OS X) framework path to the link
616 dnl and include lines. default paths include (but are
617 dnl not limited to) /Local/Library/Frameworks and
618 dnl /System/Library/Frameworks, so these don't need
619 dnl to be specifically added. if before is 1, the
620 dnl framework path is added to the beginning of the
623 AC_DEFUN([PHP_ADD_FRAMEWORKPATH], [
624 PHP_EXPAND_PATH($1, ai_p)
625 PHP_RUN_ONCE(FRAMEWORKPATH, $ai_p, [
627 PHP_FRAMEWORKPATH="-F$ai_p $PHP_FRAMEWORKPATH"
629 PHP_FRAMEWORKPATH="$PHP_FRAMEWORKPATH -F$ai_p"
635 dnl PHP_ADD_FRAMEWORK_WITH_PATH(framework, path)
637 dnl Adds a (Darwin / Mac OS X) framework path and the
638 dnl framework itself to the link and include lines.
640 AC_DEFUN([PHP_ADD_FRAMEWORK_WITH_PATH], [
641 PHP_ADD_FRAMEWORKPATH($2)
642 PHP_ADD_FRAMEWORK($1)
646 dnl PHP_SET_LIBTOOL_VARIABLE(var)
648 dnl Set libtool variable
650 AC_DEFUN([PHP_SET_LIBTOOL_VARIABLE],[
651 if test -z "$LIBTOOL"; then
652 LIBTOOL='$(SHELL) $(top_builddir)/libtool $1'
654 LIBTOOL="$LIBTOOL $1"
658 dnl -------------------------------------------------------------------------
659 dnl Wrapper macros for AC_ARG_WITH / AC_ARG_ENABLE
660 dnl -------------------------------------------------------------------------
662 dnl PHP_ARG_ANALYZE_EX
664 AC_DEFUN([PHP_ARG_ANALYZE_EX],[
665 ext_output="yes, shared"
669 $1=`echo "[$]$1"|$SED 's/^shared,//'`
684 PHP_ALWAYS_SHARED([$1])
689 AC_DEFUN([PHP_ARG_ANALYZE],[
690 ifelse([$3],yes,[PHP_ARG_ANALYZE_EX([$1])],[ext_output=ifelse([$]$1,,no,[$]$1)])
691 ifelse([$2],,,[AC_MSG_RESULT([$ext_output])])
695 dnl PHP_ARG_WITH(arg-name, check message, help text[, default-val[, extension-or-not]])
696 dnl Sets PHP_ARG_NAME either to the user value or to the default value.
697 dnl default-val defaults to no. This will also set the variable ext_shared,
698 dnl and will overwrite any previous variable of that name.
699 dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run
700 dnl the PHP_ARG_ANALYZE_EX.
702 AC_DEFUN([PHP_ARG_WITH],[
703 php_with_[]translit($1,A-Z0-9-,a-z0-9_)=ifelse($4,,no,$4)
704 PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_),[ifelse($5,,yes,$5)])
707 dnl PHP_REAL_ARG_WITH
709 AC_DEFUN([PHP_REAL_ARG_WITH],[
710 ifelse([$2],,,[AC_MSG_CHECKING([$2])])
711 AC_ARG_WITH($1,[$3],$5=[$]withval,
715 if test "$PHP_ENABLE_ALL" && test "$6" = "yes"; then
719 PHP_ARG_ANALYZE($5,[$2],$6)
723 dnl PHP_ARG_ENABLE(arg-name, check message, help text[, default-val[, extension-or-not]])
724 dnl Sets PHP_ARG_NAME either to the user value or to the default value.
725 dnl default-val defaults to no. This will also set the variable ext_shared,
726 dnl and will overwrite any previous variable of that name.
727 dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run
728 dnl the PHP_ARG_ANALYZE_EX.
730 AC_DEFUN([PHP_ARG_ENABLE],[
731 php_enable_[]translit($1,A-Z0-9-,a-z0-9_)=ifelse($4,,no,$4)
732 PHP_REAL_ARG_ENABLE([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_),[ifelse($5,,yes,$5)])
735 dnl PHP_REAL_ARG_ENABLE
737 AC_DEFUN([PHP_REAL_ARG_ENABLE],[
738 ifelse([$2],,,[AC_MSG_CHECKING([$2])])
739 AC_ARG_ENABLE($1,[$3],$5=[$]enableval,
743 if test "$PHP_ENABLE_ALL" && test "$6" = "yes"; then
747 PHP_ARG_ANALYZE($5,[$2],$6)
750 dnl -------------------------------------------------------------------------
752 dnl -------------------------------------------------------------------------
755 dnl PHP_BUILD_THREAD_SAFE
757 AC_DEFUN([PHP_BUILD_THREAD_SAFE],[
758 enable_maintainer_zts=yes
759 if test "$pthreads_working" != "yes"; then
760 AC_MSG_ERROR([ZTS currently requires working POSIX threads. We were unable to verify that your system supports Pthreads.])
767 AC_DEFUN([PHP_REQUIRE_CXX],[
768 if test -z "$php_cxx_done"; then
778 AC_DEFUN([PHP_BUILD_SHARED],[
780 OVERALL_TARGET=libphp[]$PHP_MAJOR_VERSION[.la]
781 php_build_target=shared
783 php_c_pre=$shared_c_pre
784 php_c_meta=$shared_c_meta
785 php_c_post=$shared_c_post
786 php_cxx_pre=$shared_cxx_pre
787 php_cxx_meta=$shared_cxx_meta
788 php_cxx_post=$shared_cxx_post
795 AC_DEFUN([PHP_BUILD_STATIC],[
797 OVERALL_TARGET=libphp[]$PHP_MAJOR_VERSION[.la]
798 php_build_target=static
804 AC_DEFUN([PHP_BUILD_BUNDLE],[
806 OVERALL_TARGET=libs/libphp[]$PHP_MAJOR_VERSION[.bundle]
807 php_build_target=static
811 dnl PHP_BUILD_PROGRAM
813 AC_DEFUN([PHP_BUILD_PROGRAM],[
814 OVERALL_TARGET=[]ifelse($1,,php,$1)
815 php_c_pre='$(LIBTOOL) --mode=compile $(CC)'
816 php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
818 php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
819 php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
824 yes) pic_setting='-prefer-pic';;
825 no) pic_setting='-prefer-non-pic';;
828 shared_c_pre='$(LIBTOOL) --mode=compile $(CC)'
829 shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
831 shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
832 shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
836 php_build_target=program
840 dnl PHP_SHARED_MODULE(module-name, object-var, build-dir, cxx)
842 dnl Basically sets up the link-stage for building module-name
843 dnl from object_var in build-dir.
845 AC_DEFUN([PHP_SHARED_MODULE],[
846 install_modules="install-modules"
851 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'
855 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)'
859 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)'
863 PHP_MODULES="$PHP_MODULES \$(phplibdir)/$1.$suffix"
865 cat >>Makefile.objects<<EOF
866 \$(phplibdir)/$1.$suffix: $3/$1.$suffix
867 \$(LIBTOOL) --mode=install cp $3/$1.$suffix \$(phplibdir)
869 $3/$1.$suffix: \$($2) \$(translit($1,a-z_-,A-Z__)_SHARED_DEPENDENCIES)
876 dnl PHP_SELECT_SAPI(name, type[, sources [, extra-cflags [, build-target]]])
878 dnl Selects the SAPI name and type (static, shared, programm)
879 dnl and optionally also the source-files for the SAPI-specific
882 AC_DEFUN([PHP_SELECT_SAPI],[
886 static[)] PHP_BUILD_STATIC;;
887 shared[)] PHP_BUILD_SHARED;;
888 bundle[)] PHP_BUILD_BUNDLE;;
889 program[)] PHP_BUILD_PROGRAM($5);;
892 ifelse($3,,,[PHP_ADD_SOURCES([sapi/$1],[$3],[$4],[sapi])])
896 AC_DEFUN([PHP_EXTENSION],[
897 sources=`$AWK -f $abs_srcdir/build/scan_makefile_in.awk < []PHP_EXT_SRCDIR($1)[]/Makefile.in`
899 PHP_NEW_EXTENSION($1, $sources, $2, $3)
901 if test -r "$ext_srcdir/Makefile.frag"; then
902 PHP_ADD_MAKEFILE_FRAGMENT
906 AC_DEFUN([PHP_ADD_BUILD_DIR],[
908 BUILD_DIR="$BUILD_DIR $1"
910 $php_shtool mkdir -p $1
914 AC_DEFUN([PHP_GEN_BUILD_DIRS],[
915 $php_shtool mkdir -p $BUILD_DIR
919 dnl PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags[, cxx]]]])
921 dnl Includes an extension in the build.
923 dnl "extname" is the name of the ext/ subdir where the extension resides.
924 dnl "sources" is a list of files relative to the subdir which are used
925 dnl to build the extension.
926 dnl "shared" can be set to "shared" or "yes" to build the extension as
927 dnl a dynamically loadable library. Optional parameter "sapi_class" can
928 dnl be set to "cli" to mark extension build only with CLI or CGI sapi's.
929 dnl "extra-cflags" are passed to the compiler, with
930 dnl @ext_srcdir@ and @ext_builddir@ being substituted.
931 AC_DEFUN([PHP_NEW_EXTENSION],[
932 ext_builddir=[]PHP_EXT_BUILDDIR($1)
933 ext_srcdir=[]PHP_EXT_SRCDIR($1)
935 ifelse($5,,ac_extra=,[ac_extra=`echo "$5"|$SED s#@ext_srcdir@#$ext_srcdir#g|$SED s#@ext_builddir@#$ext_builddir#g`])
937 if test "$3" != "shared" && test "$3" != "yes" && test "$4" != "cli"; then
938 dnl ---------------------------------------------- Static module
939 [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
940 PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
941 EXT_STATIC="$EXT_STATIC $1"
942 if test "$3" != "nocli"; then
943 EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
946 if test "$3" = "shared" || test "$3" = "yes"; then
947 dnl ---------------------------------------------- Shared module
948 [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=yes
949 PHP_ADD_SOURCES_X(PHP_EXT_DIR($1),$2,$ac_extra,shared_objects_$1,yes)
952 PHP_SHARED_MODULE(php$1,shared_objects_$1, $ext_builddir, $6)
955 PHP_SHARED_MODULE($1,shared_objects_$1, $ext_builddir, $6)
958 AC_DEFINE_UNQUOTED([COMPILE_DL_]translit($1,a-z_-,A-Z__), 1, Whether to build $1 as dynamic module)
962 if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then
963 dnl ---------------------------------------------- CLI static module
964 [PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
965 if test "$PHP_SAPI" = "cgi"; then
966 PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
967 EXT_STATIC="$EXT_STATIC $1"
969 PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli)
971 EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
973 PHP_ADD_BUILD_DIR($ext_builddir)
975 dnl Set for phpize builds only
976 dnl ---------------------------
977 if test "$ext_builddir" = "."; then
978 PHP_PECL_EXTENSION=$1
979 PHP_SUBST(PHP_PECL_EXTENSION)
986 dnl Checks whether $withval is "shared" or starts with "shared,XXX"
987 dnl and sets $shared to "yes" or "no", and removes "shared,?" stuff
990 AC_DEFUN([PHP_WITH_SHARED],[
991 PHP_ARG_ANALYZE_EX(withval)
993 unset ext_shared ext_output
997 dnl PHP_ADD_EXTENSION_DEP(extname, depends [, depconf])
999 dnl This macro is scanned by genif.sh when it builds the internal functions
1000 dnl list, so that modules can be init'd in the correct order
1001 dnl $1 = name of extension, $2 = extension upon which it depends
1002 dnl $3 = optional: if true, it's ok for $2 to have not been configured
1003 dnl default is false and should halt the build.
1004 dnl To be effective, this macro must be invoked *after* PHP_NEW_EXTENSION.
1005 dnl The extension on which it depends must also have been configured.
1006 dnl See ADD_EXTENSION_DEP in win32 build
1008 AC_DEFUN([PHP_ADD_EXTENSION_DEP], [
1009 am_i_shared=$[PHP_]translit($1,a-z_-,A-Z__)[_SHARED]
1010 is_it_shared=$[PHP_]translit($2,a-z_-,A-Z__)[_SHARED]
1011 is_it_enabled=$[PHP_]translit($2,a-z_-,A-Z__)
1012 if test "$am_i_shared" = "no" && test "$is_it_shared" = "yes" ; then
1014 You've configured extension $1 to build statically, but it
1015 depends on extension $2, which you've configured to build shared.
1016 You either need to build $1 shared or build $2 statically for the
1017 build to be successful.
1020 if test "x$is_it_enabled" = "xno" && test "x$3" != "xtrue"; then
1022 You've configured extension $1, which depends on extension $2,
1023 but you've either not enabled $2, or have disabled it.
1026 dnl Some systems require that we link $2 to $1 when building
1029 dnl -------------------------------------------------------------------------
1030 dnl Checks for structures, typedefs, broken functions, etc.
1031 dnl -------------------------------------------------------------------------
1033 dnl Internal helper macros
1035 dnl _PHP_DEF_HAVE_FILE(what, filename)
1036 AC_DEFUN([_PHP_DEF_HAVE_FILE], [
1037 php_def_have_what=HAVE_[]`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_' `
1038 echo "#define $php_def_have_what 1" >> $2
1041 dnl _PHP_CHECK_SIZEOF(type, cross-value, extra-headers [, found-action [, not-found-action]])
1043 AC_DEFUN([_PHP_CHECK_SIZEOF], [
1044 php_cache_value=php_cv_sizeof_[]$1
1045 AC_CACHE_VAL(php_cv_sizeof_[]$1, [
1048 old_LDFLAGS=$LDFLAGS
1050 AC_TRY_RUN([#include <stdio.h>
1055 #ifdef HAVE_INTTYPES_H
1056 #include <inttypes.h>
1058 #ifdef HAVE_UNISTD_H
1065 FILE *fp = fopen("conftestval", "w");
1067 fprintf(fp, "%d\n", sizeof($1));
1071 eval $php_cache_value=`cat conftestval`
1073 eval $php_cache_value=0
1075 ifelse([$2],,[eval $php_cache_value=0], [eval $php_cache_value=$2])
1077 LDFLAGS=$old_LDFLAGS
1080 if eval test "\$$php_cache_value" != "0"; then
1081 ifelse([$4],[],:,[$4])
1082 ifelse([$5],[],,[else $5])
1087 dnl PHP_CHECK_SIZEOF(type, cross-value, extra-headers)
1089 AC_DEFUN(PHP_CHECK_SIZEOF, [
1090 AC_MSG_CHECKING([size of $1])
1091 _PHP_CHECK_SIZEOF($1, $2, $3, [
1092 AC_DEFINE_UNQUOTED([SIZEOF_]translit($1,a-z,A-Z_), [$]php_cv_sizeof_[]$1, [Size of $1])
1093 AC_DEFINE_UNQUOTED([HAVE_]translit($1,a-z,A-Z_), 1, [Whether $1 is available])
1095 AC_MSG_RESULT([[$][php_cv_sizeof_]translit($1, ,_)])
1099 dnl PHP_CHECK_TYPES(type-list, include-file [, extra-headers])
1101 AC_DEFUN([PHP_CHECK_TYPES], [
1102 for php_typename in $1; do
1103 AC_MSG_CHECKING([whether $php_typename exists])
1104 _PHP_CHECK_SIZEOF($php_typename, 0, $3, [
1105 _PHP_DEF_HAVE_FILE($php_typename, $2)
1106 AC_MSG_RESULT([yes])
1114 dnl PHP_CHECK_IN_ADDR_T
1116 AC_DEFUN([PHP_CHECK_IN_ADDR_T], [
1117 dnl AIX keeps in_addr_t in /usr/include/netinet/in.h
1118 AC_MSG_CHECKING([for in_addr_t])
1119 AC_CACHE_VAL(ac_cv_type_in_addr_t,
1121 changequote(<<,>>)dnl
1122 <<in_addr_t[^a-zA-Z_0-9]>>dnl
1123 changequote([,]), [#include <sys/types.h>
1128 #ifdef HAVE_NETINET_IN_H
1129 #include <netinet/in.h>
1130 #endif], ac_cv_type_in_addr_t=yes, ac_cv_type_in_addr_t=no)])dnl
1131 AC_MSG_RESULT([$ac_cv_type_in_addr_t])
1132 if test $ac_cv_type_in_addr_t = no; then
1133 AC_DEFINE(in_addr_t, u_int, [ ])
1140 dnl Check type of reentrant time-related functions
1141 dnl Type can be: irix, hpux or POSIX
1143 AC_DEFUN([PHP_TIME_R_TYPE],[
1144 AC_CACHE_CHECK(for type of reentrant time-related functions, ac_cv_time_r_type,[
1154 s = gmtime_r(&old, &t);
1155 r = (int) asctime_r(&t, buf, 26);
1156 if (r == s && s == 0) return (0);
1160 ac_cv_time_r_type=hpux
1169 s = gmtime_r(&old, &t);
1170 p = asctime_r(&t, buf, 26);
1171 if (p == buf && s == &t) return (0);
1175 ac_cv_time_r_type=irix
1177 ac_cv_time_r_type=POSIX
1179 ac_cv_time_r_type=POSIX
1182 ac_cv_time_r_type=POSIX
1185 case $ac_cv_time_r_type in
1186 hpux[)] AC_DEFINE(PHP_HPUX_TIME_R,1,[Whether you have HP-UX 10.x]) ;;
1187 irix[)] AC_DEFINE(PHP_IRIX_TIME_R,1,[Whether you have IRIX-style functions]) ;;
1192 dnl PHP_DOES_PWRITE_WORK
1194 AC_DEFUN([PHP_DOES_PWRITE_WORK],[
1196 #include <sys/types.h>
1197 #include <sys/stat.h>
1203 int fd = open("conftest_in", O_WRONLY|O_CREAT, 0600);
1205 if (fd < 0) exit(1);
1206 if (pwrite(fd, "text", 4, 0) != 4) exit(1);
1207 /* Linux glibc breakage until 2.2.5 */
1208 if (pwrite(fd, "text", 4, -1) != -1 || errno != EINVAL) exit(1);
1221 dnl PHP_DOES_PREAD_WORK
1223 AC_DEFUN([PHP_DOES_PREAD_WORK],[
1224 echo test > conftest_in
1226 #include <sys/types.h>
1227 #include <sys/stat.h>
1234 int fd = open("conftest_in", O_RDONLY);
1235 if (fd < 0) exit(1);
1236 if (pread(fd, buf, 2, 0) != 2) exit(1);
1237 /* Linux glibc breakage until 2.2.5 */
1238 if (pread(fd, buf, 2, -1) != -1 || errno != EINVAL) exit(1);
1254 AC_DEFUN([PHP_PWRITE_TEST],[
1255 AC_CACHE_CHECK(whether pwrite works,ac_cv_pwrite,[
1256 PHP_DOES_PWRITE_WORK
1257 if test "$ac_cv_pwrite" = "no"; then
1258 PHP_DOES_PWRITE_WORK([ssize_t pwrite(int, void *, size_t, off64_t);])
1259 if test "$ac_cv_pwrite" = "yes"; then
1265 if test "$ac_cv_pwrite" != "no"; then
1266 AC_DEFINE(HAVE_PWRITE, 1, [ ])
1267 if test "$ac_cv_pwrite" = "64"; then
1268 AC_DEFINE(PHP_PWRITE_64, 1, [whether pwrite64 is default])
1276 AC_DEFUN([PHP_PREAD_TEST],[
1277 AC_CACHE_CHECK(whether pread works,ac_cv_pread,[
1279 if test "$ac_cv_pread" = "no"; then
1280 PHP_DOES_PREAD_WORK([ssize_t pread(int, void *, size_t, off64_t);])
1281 if test "$ac_cv_pread" = "yes"; then
1287 if test "$ac_cv_pread" != "no"; then
1288 AC_DEFINE(HAVE_PREAD, 1, [ ])
1289 if test "$ac_cv_pread" = "64"; then
1290 AC_DEFINE(PHP_PREAD_64, 1, [whether pread64 is default])
1296 dnl PHP_MISSING_TIME_R_DECL
1298 AC_DEFUN([PHP_MISSING_TIME_R_DECL],[
1299 AC_MSG_CHECKING([for missing declarations of reentrant functions])
1300 AC_TRY_COMPILE([#include <time.h>],[struct tm *(*func)() = localtime_r],[
1303 AC_DEFINE(MISSING_LOCALTIME_R_DECL,1,[Whether localtime_r is declared])
1305 AC_TRY_COMPILE([#include <time.h>],[struct tm *(*func)() = gmtime_r],[
1308 AC_DEFINE(MISSING_GMTIME_R_DECL,1,[Whether gmtime_r is declared])
1310 AC_TRY_COMPILE([#include <time.h>],[char *(*func)() = asctime_r],[
1313 AC_DEFINE(MISSING_ASCTIME_R_DECL,1,[Whether asctime_r is declared])
1315 AC_TRY_COMPILE([#include <time.h>],[char *(*func)() = ctime_r],[
1318 AC_DEFINE(MISSING_CTIME_R_DECL,1,[Whether ctime_r is declared])
1320 AC_TRY_COMPILE([#include <string.h>],[char *(*func)() = strtok_r],[
1323 AC_DEFINE(MISSING_STRTOK_R_DECL,1,[Whether strtok_r is declared])
1325 AC_MSG_RESULT([done])
1329 dnl PHP_READDIR_R_TYPE
1331 AC_DEFUN([PHP_READDIR_R_TYPE],[
1332 dnl HAVE_READDIR_R is also defined by libmysql
1333 AC_CHECK_FUNC(readdir_r,ac_cv_func_readdir_r=yes,ac_cv_func_readdir=no)
1334 if test "$ac_cv_func_readdir_r" = "yes"; then
1335 AC_CACHE_CHECK(for type of readdir_r, ac_cv_what_readdir_r,[
1338 #include <sys/types.h>
1342 #define PATH_MAX 1024
1347 char entry[sizeof(struct dirent)+PATH_MAX];
1348 struct dirent *pentry = (struct dirent *) &entry;
1353 if (readdir_r(dir, (struct dirent *) entry, &pentry) == 0)
1358 ac_cv_what_readdir_r=POSIX
1362 #include <sys/types.h>
1364 int readdir_r(DIR *, struct dirent *);
1366 ac_cv_what_readdir_r=old-style
1368 ac_cv_what_readdir_r=none
1371 ac_cv_what_readdir_r=none
1374 case $ac_cv_what_readdir_r in
1376 AC_DEFINE(HAVE_POSIX_READDIR_R,1,[whether you have POSIX readdir_r]);;
1378 AC_DEFINE(HAVE_OLD_READDIR_R,1,[whether you have old-style readdir_r]);;
1386 AC_DEFUN([PHP_TM_GMTOFF],[
1387 AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
1388 [AC_TRY_COMPILE([#include <sys/types.h>
1389 #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;],
1390 ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)])
1392 if test "$ac_cv_struct_tm_gmtoff" = yes; then
1393 AC_DEFINE(HAVE_TM_GMTOFF,1,[whether you have tm_gmtoff in struct tm])
1398 dnl PHP_STRUCT_FLOCK
1400 AC_DEFUN([PHP_STRUCT_FLOCK],[
1401 AC_CACHE_CHECK(for struct flock,ac_cv_struct_flock,
1408 ac_cv_struct_flock=yes
1410 ac_cv_struct_flock=no
1413 if test "$ac_cv_struct_flock" = "yes" ; then
1414 AC_DEFINE(HAVE_STRUCT_FLOCK, 1,[whether you have struct flock])
1421 AC_DEFUN([PHP_SOCKLEN_T],[
1422 AC_CACHE_CHECK(for socklen_t,ac_cv_socklen_t,
1424 #include <sys/types.h>
1425 #include <sys/socket.h>
1433 if test "$ac_cv_socklen_t" = "yes"; then
1434 AC_DEFINE(HAVE_SOCKLEN_T, 1, [Whether you have socklen_t])
1439 dnl PHP_MISSING_FCLOSE_DECL
1441 dnl See if we have broken header files like SunOS has.
1443 AC_DEFUN([PHP_MISSING_FCLOSE_DECL],[
1444 AC_MSG_CHECKING([for fclose declaration])
1445 AC_TRY_COMPILE([#include <stdio.h>],[int (*func)() = fclose],[
1446 AC_DEFINE(MISSING_FCLOSE_DECL,0,[ ])
1449 AC_DEFINE(MISSING_FCLOSE_DECL,1,[ ])
1450 AC_MSG_RESULT([missing])
1455 dnl PHP_AC_BROKEN_SPRINTF
1457 dnl Check for broken sprintf(), C99 conformance
1459 AC_DEFUN([PHP_AC_BROKEN_SPRINTF],[
1460 AC_CACHE_CHECK(whether sprintf is broken, ac_cv_broken_sprintf,[
1461 AC_TRY_RUN([main() {char buf[20];exit(sprintf(buf,"testing 123")!=11); }],[
1462 ac_cv_broken_sprintf=no
1464 ac_cv_broken_sprintf=yes
1466 ac_cv_broken_sprintf=no
1469 if test "$ac_cv_broken_sprintf" = "yes"; then
1470 AC_DEFINE(PHP_BROKEN_SPRINTF, 1, [Whether sprintf is C99 conform])
1472 AC_DEFINE(PHP_BROKEN_SPRINTF, 0, [Whether sprintf is C99 conform])
1477 dnl PHP_AC_BROKEN_SNPRINTF
1479 dnl Check for broken snprintf(), C99 conformance
1481 AC_DEFUN([PHP_AC_BROKEN_SNPRINTF],[
1482 AC_CACHE_CHECK(whether snprintf is broken, ac_cv_broken_snprintf,[
1488 res = res || (snprintf(buf, 2, "marcus") != 6);
1489 res = res || (buf[1] != '\0');
1490 /* Implementations may consider this as an encoding error */
1491 snprintf(buf, 0, "boerger");
1492 /* However, they MUST ignore the pointer */
1493 res = res || (buf[0] != 'm');
1494 res = res || (snprintf(NULL, 0, "boerger") != 7);
1495 res = res || (snprintf(buf, sizeof(buf), "%f", 0.12345678) != 8);
1499 ac_cv_broken_snprintf=no
1501 ac_cv_broken_snprintf=yes
1503 ac_cv_broken_snprintf=no
1506 if test "$ac_cv_broken_snprintf" = "yes"; then
1507 AC_DEFINE(PHP_BROKEN_SNPRINTF, 1, [Whether snprintf is C99 conform])
1509 AC_DEFINE(PHP_BROKEN_SNPRINTF, 0, [Whether snprintf is C99 conform])
1514 dnl PHP_SOLARIS_PIC_WEIRDNESS
1516 dnl Solaris requires main code to be position independent in order
1517 dnl to let shared objects find symbols. Weird. Ugly.
1519 dnl Must be run after all --with-NN options that let the user
1520 dnl choose dynamic extensions, and after the gcc test.
1522 AC_DEFUN([PHP_SOLARIS_PIC_WEIRDNESS],[
1523 AC_MSG_CHECKING([whether -fPIC is required])
1524 if test -n "$EXT_SHARED"; then
1525 os=`uname -sr 2>/dev/null`
1527 "SunOS 5.6"|"SunOS 5.7"[)]
1530 CFLAGS="$CFLAGS -fPIC";;
1532 CFLAGS="$CFLAGS -fpic";;
1534 AC_MSG_RESULT([yes]);;
1536 AC_MSG_RESULT([no]);;
1546 dnl The problem is that the default compilation flags in Solaris 2.6 won't
1547 dnl let programs access large files; you need to tell the compiler that
1548 dnl you actually want your programs to work on large files. For more
1549 dnl details about this brain damage please see:
1550 dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
1552 dnl Written by Paul Eggert <eggert@twinsun.com>.
1554 AC_DEFUN([PHP_SYS_LFS],
1556 # If available, prefer support for large files unless the user specified
1557 # one of the CPPFLAGS, LDFLAGS, or LIBS variables.
1558 AC_MSG_CHECKING([whether large file support needs explicit enabling])
1562 ac_shellvars='CPPFLAGS LDFLAGS LIBS'
1563 for ac_shellvar in $ac_shellvars; do
1564 case $ac_shellvar in
1565 CPPFLAGS[)] ac_lfsvar=LFS_CFLAGS ;;
1566 *[)] ac_lfsvar=LFS_$ac_shellvar ;;
1568 eval test '"${'$ac_shellvar'+set}"' = set && ac_set=$ac_shellvar
1569 (getconf $ac_lfsvar) >/dev/null 2>&1 || { ac_result=no; break; }
1570 ac_getconf=`getconf $ac_lfsvar`
1571 ac_getconfs=$ac_getconfs$ac_getconf
1572 eval ac_test_$ac_shellvar=\$ac_getconf
1574 case "$ac_result$ac_getconfs" in
1575 yes[)] ac_result=no ;;
1577 case "$ac_result$ac_set" in
1578 yes?*[)] ac_result="yes, but $ac_set is already set, so use its settings"
1580 AC_MSG_RESULT([$ac_result])
1583 for ac_shellvar in $ac_shellvars; do
1584 eval $ac_shellvar=\$ac_test_$ac_shellvar
1590 dnl PHP_SOCKADDR_CHECKS
1592 AC_DEFUN([PHP_SOCKADDR_CHECKS], [
1593 dnl Check for struct sockaddr_storage exists
1594 AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_sockaddr_storage,
1595 [AC_TRY_COMPILE([#include <sys/types.h>
1596 #include <sys/socket.h>],
1597 [struct sockaddr_storage s; s],
1598 [ac_cv_sockaddr_storage=yes], [ac_cv_sockaddr_storage=no])
1600 if test "$ac_cv_sockaddr_storage" = "yes"; then
1601 AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [Whether you have struct sockaddr_storage])
1603 dnl Check if field sa_len exists in struct sockaddr
1604 AC_CACHE_CHECK([for field sa_len in struct sockaddr],ac_cv_sockaddr_sa_len,[
1605 AC_TRY_COMPILE([#include <sys/types.h>
1606 #include <sys/socket.h>],
1607 [static struct sockaddr sa; int n = (int) sa.sa_len; return n;],
1608 [ac_cv_sockaddr_sa_len=yes], [ac_cv_sockaddr_sa_len=no])
1610 if test "$ac_cv_sockaddr_sa_len" = "yes"; then
1611 AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Whether struct sockaddr has field sa_len])
1616 dnl PHP_DECLARED_TIMEZONE
1618 AC_DEFUN([PHP_DECLARED_TIMEZONE],[
1619 AC_CACHE_CHECK(for declared timezone, ac_cv_declared_timezone,[
1621 #include <sys/types.h>
1623 #ifdef HAVE_SYS_TIME_H
1624 #include <sys/time.h>
1627 time_t foo = (time_t) timezone;
1629 ac_cv_declared_timezone=yes
1631 ac_cv_declared_timezone=no
1633 if test "$ac_cv_declared_timezone" = "yes"; then
1634 AC_DEFINE(HAVE_DECLARED_TIMEZONE, 1, [Whether system headers declare timezone])
1641 AC_DEFUN([PHP_EBCDIC], [
1642 AC_CACHE_CHECK([whether system uses EBCDIC],ac_cv_ebcdic,[
1645 return (unsigned char)'A' != (unsigned char)0xC1;
1654 if test "$ac_cv_ebcdic" = "yes"; then
1655 AC_DEFINE(CHARSET_EBCDIC,1, [Define if system uses EBCDIC])
1660 dnl PHP_BROKEN_GETCWD
1662 dnl Some systems, notably Solaris, cause getcwd() or realpath to fail if a
1663 dnl component of the path has execute but not read permissions
1665 AC_DEFUN([PHP_BROKEN_GETCWD],[
1666 AC_MSG_CHECKING([for broken getcwd])
1667 os=`uname -sr 2>/dev/null`
1670 AC_DEFINE(HAVE_BROKEN_GETCWD,1, [Define if system has broken getcwd])
1671 AC_MSG_RESULT([yes]);;
1673 AC_MSG_RESULT([no]);;
1678 dnl PHP_BROKEN_GLIBC_FOPEN_APPEND
1680 AC_DEFUN([PHP_BROKEN_GLIBC_FOPEN_APPEND], [
1681 AC_MSG_CHECKING([for broken libc stdio])
1682 AC_CACHE_VAL(have_broken_glibc_fopen_append,[
1685 int main(int argc, char *argv[])
1689 char *filename = "/tmp/phpglibccheck";
1691 fp = fopen(filename, "w");
1696 fputs("foobar", fp);
1699 fp = fopen(filename, "a+");
1700 position = ftell(fp);
1708 [have_broken_glibc_fopen_append=no],
1709 [have_broken_glibc_fopen_append=yes ],
1711 #include <features.h>
1713 #if !__GLIBC_PREREQ(2,2)
1717 [have_broken_glibc_fopen_append=yes],
1718 [have_broken_glibc_fopen_append=no ])
1721 if test "$have_broken_glibc_fopen_append" = "yes"; then
1723 AC_DEFINE(HAVE_BROKEN_GLIBC_FOPEN_APPEND,1, [Define if your glibc borks on fopen with mode a+])
1732 AC_DEFUN([PHP_FOPENCOOKIE], [
1733 AC_CHECK_FUNC(fopencookie, [have_glibc_fopencookie=yes])
1735 if test "$have_glibc_fopencookie" = "yes"; then
1736 dnl this comes in two flavors:
1737 dnl newer glibcs (since 2.1.2 ? )
1738 dnl have a type called cookie_io_functions_t
1742 ], [cookie_io_functions_t cookie;], [have_cookie_io_functions_t=yes], [])
1744 if test "$have_cookie_io_functions_t" = "yes"; then
1745 cookie_io_functions_t=cookie_io_functions_t
1746 have_fopen_cookie=yes
1748 dnl even newer glibcs have a different seeker definition...
1757 __ssize_t reader(void *cookie, char *buffer, size_t size)
1759 __ssize_t writer(void *cookie, const char *buffer, size_t size)
1761 int closer(void *cookie)
1763 int seeker(void *cookie, __off64_t *position, int whence)
1764 { ((struct cookiedata*)cookie)->pos = *position; return 0; }
1766 cookie_io_functions_t funcs = {reader, writer, seeker, closer};
1769 struct cookiedata g = { 0 };
1770 FILE *fp = fopencookie(&g, "r", funcs);
1772 if (fp && fseek(fp, 8192, SEEK_SET) == 0 && g.pos == 8192)
1778 cookie_io_functions_use_off64_t=yes
1780 cookie_io_functions_use_off64_t=no
1782 cookie_io_functions_use_off64_t=no
1787 dnl older glibc versions (up to 2.1.2 ?)
1788 dnl call it _IO_cookie_io_functions_t
1792 ], [ _IO_cookie_io_functions_t cookie; ], [have_IO_cookie_io_functions_t=yes], [])
1793 if test "$have_cookie_io_functions_t" = "yes" ; then
1794 cookie_io_functions_t=_IO_cookie_io_functions_t
1795 have_fopen_cookie=yes
1799 if test "$have_fopen_cookie" = "yes" ; then
1800 AC_DEFINE(HAVE_FOPENCOOKIE, 1, [ ])
1801 AC_DEFINE_UNQUOTED(COOKIE_IO_FUNCTIONS_T, $cookie_io_functions_t, [ ])
1802 if test "$cookie_io_functions_use_off64_t" = "yes" ; then
1803 AC_DEFINE(COOKIE_SEEKER_USES_OFF64_T, 1, [ ])
1809 dnl -------------------------------------------------------------------------
1810 dnl Library/function existance and build sanity checks
1811 dnl -------------------------------------------------------------------------
1814 dnl PHP_CHECK_LIBRARY(library, function [, action-found [, action-not-found [, extra-libs]]])
1816 dnl Wrapper for AC_CHECK_LIB
1818 AC_DEFUN([PHP_CHECK_LIBRARY], [
1819 save_old_LDFLAGS=$LDFLAGS
1822 save_ext_shared=$ext_shared
1824 PHP_EVAL_LIBLINE([$]ac_stuff, LDFLAGS)
1825 AC_CHECK_LIB([$1],[$2],[
1826 LDFLAGS=$save_old_LDFLAGS
1827 ext_shared=$save_ext_shared
1830 LDFLAGS=$save_old_LDFLAGS
1831 ext_shared=$save_ext_shared
1832 unset ac_cv_lib_$1[]_$2
1838 dnl PHP_CHECK_FRAMEWORK(framework, function [, action-found [, action-not-found ]])
1840 dnl El cheapo wrapper for AC_CHECK_LIB
1842 AC_DEFUN([PHP_CHECK_FRAMEWORK], [
1843 save_old_LDFLAGS=$LDFLAGS
1844 LDFLAGS="-framework $1 $LDFLAGS"
1845 dnl supplying "c" to AC_CHECK_LIB is technically cheating, but
1846 dnl rewriting AC_CHECK_LIB is overkill and this only affects
1847 dnl the "checking.." output anyway.
1848 AC_CHECK_LIB(c,[$2],[
1849 LDFLAGS=$save_old_LDFLAGS
1852 LDFLAGS=$save_old_LDFLAGS
1858 dnl PHP_CHECK_FUNC_LIB(func, libs)
1860 dnl This macro checks whether 'func' or '__func' exists
1861 dnl in the specified library.
1862 dnl Defines HAVE_func and HAVE_library if found and adds the library to LIBS.
1863 dnl This should be called in the ACTION-IF-NOT-FOUND part of PHP_CHECK_FUNC
1866 dnl autoconf undefines the builtin "shift" :-(
1867 dnl If possible, we use the builtin shift anyway, otherwise we use
1868 dnl the ubercool definition I have tested so far with FreeBSD/GNU m4
1869 ifdef([builtin],[builtin(define, phpshift, [builtin(shift, $@)])],[
1870 define([phpshift],[ifelse(index([$@],[,]),-1,,[substr([$@],incr(index([$@],[,])))])])
1873 AC_DEFUN([PHP_CHECK_FUNC_LIB],[
1875 unset ac_cv_lib_$2[]_$1
1876 unset ac_cv_lib_$2[]___$1
1878 AC_CHECK_LIB($2, $1, [found=yes], [
1879 AC_CHECK_LIB($2, __$1, [found=yes], [found=no])
1882 if test "$found" = "yes"; then
1885 AC_TRY_RUN([main() { return (0); }],[found=yes],[found=no],[found=no])
1889 if test "$found" = "yes"; then
1895 PHP_CHECK_FUNC_LIB($1,phpshift(phpshift($@)))
1901 dnl PHP_CHECK_FUNC(func, ...)
1903 dnl This macro checks whether 'func' or '__func' exists
1904 dnl in the default libraries and as a fall back in the specified library.
1905 dnl Defines HAVE_func and HAVE_library if found and adds the library to LIBS.
1907 AC_DEFUN([PHP_CHECK_FUNC],[
1909 unset ac_cv_func___$1
1912 AC_CHECK_FUNC($1, [found=yes],[ AC_CHECK_FUNC(__$1,[found=yes],[found=no]) ])
1920 *[)] PHP_CHECK_FUNC_LIB($@) ;;
1926 dnl PHP_TEST_BUILD(function, action-if-ok, action-if-not-ok [, extra-libs [, extra-source]])
1928 dnl This macro checks whether build works and given function exists.
1930 AC_DEFUN([PHP_TEST_BUILD], [
1951 dnl -------------------------------------------------------------------------
1952 dnl Platform characteristics checks
1953 dnl -------------------------------------------------------------------------
1956 dnl PHP_SHLIB_SUFFIX_NAMES
1958 dnl Determines link library suffix SHLIB_SUFFIX_NAME
1959 dnl which can be: .so, .sl or .dylib
1961 dnl Determines shared library suffix SHLIB_DL_SUFFIX_NAME
1962 dnl suffix can be: .so or .sl
1964 AC_DEFUN([PHP_SHLIB_SUFFIX_NAMES],[
1965 AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl
1966 PHP_SUBST_OLD(SHLIB_SUFFIX_NAME)
1967 PHP_SUBST_OLD(SHLIB_DL_SUFFIX_NAME)
1968 SHLIB_SUFFIX_NAME=so
1969 SHLIB_DL_SUFFIX_NAME=$SHLIB_SUFFIX_NAME
1972 SHLIB_SUFFIX_NAME=sl
1973 SHLIB_DL_SUFFIX_NAME=sl
1976 SHLIB_SUFFIX_NAME=dylib
1977 SHLIB_DL_SUFFIX_NAME=so
1983 dnl PHP_CHECK_64BIT([do if 32], [do if 64])
1985 dnl This macro is used to detect if we're at 64-bit platform or not.
1986 dnl It could be useful for those external libs, that have different precompiled
1987 dnl versions in different directories.
1989 AC_DEFUN([PHP_CHECK_64BIT],[
1990 AC_CHECK_SIZEOF(long int, 4)
1991 AC_MSG_CHECKING([checking if we're at 64-bit platform])
1992 if test "$ac_cv_sizeof_long_int" = "4" ; then
1996 AC_MSG_RESULT([yes])
2004 dnl Replacement macro for AC_C_BIGENDIAN
2006 AC_DEFUN([PHP_C_BIGENDIAN],
2007 [AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian_php,
2009 ac_cv_c_bigendian_php=unknown
2015 char *cp = (char *)&one;
2023 ], [ac_cv_c_bigendian_php=yes], [ac_cv_c_bigendian_php=no], [ac_cv_c_bigendian_php=unknown])
2025 if test $ac_cv_c_bigendian_php = yes; then
2026 AC_DEFINE(WORDS_BIGENDIAN, [], [Define if processor uses big-endian word])
2030 dnl -------------------------------------------------------------------------
2031 dnl Checks for programs: PHP_PROG_<program>
2032 dnl -------------------------------------------------------------------------
2035 dnl PHP_PROG_SENDMAIL
2037 dnl Search for the sendmail binary
2039 AC_DEFUN([PHP_PROG_SENDMAIL], [
2040 PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib:/usr/lib64
2041 AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH)
2042 PHP_SUBST(PROG_SENDMAIL)
2048 dnl Some vendors force mawk before gawk; mawk is broken so we don't like that
2050 AC_DEFUN([PHP_PROG_AWK], [
2051 AC_CHECK_PROGS(AWK, gawk nawk awk mawk, bork, /usr/xpg4/bin/:$PATH)
2054 AC_MSG_WARN([mawk is known to have problems on some systems. You should install GNU awk])
2059 AC_MSG_ERROR([Could not find awk; Install GNU awk])
2062 AC_MSG_CHECKING([if $AWK is broken])
2063 if ! $AWK 'function foo() {}' >/dev/null 2>&1 ; then
2064 AC_MSG_RESULT([yes])
2065 AC_MSG_ERROR([You should install GNU awk])
2077 dnl Search for bison and check it's version
2079 AC_DEFUN([PHP_PROG_BISON], [
2088 dnl Search for (f)lex and check it's version
2090 AC_DEFUN([PHP_PROG_LEX], [
2091 dnl we only support certain flex versions
2092 flex_version_list="2.5.4"
2095 if test "$LEX" = "flex"; then
2096 dnl AC_DECL_YYTEXT is obsolete since autoconf 2.50 and merged into AC_PROG_LEX
2097 dnl this is what causes that annoying "PHP_PROG_LEX is expanded from" warning with autoconf 2.50+
2098 dnl it should be removed once we drop support of autoconf 2.13 (if ever)
2102 dnl ## Make flex scanners use const if they can, even if __STDC__ is not
2103 dnl ## true, for compilers like Sun's that only set __STDC__ true in
2104 dnl ## "limit-to-ANSI-standard" mode, not in "ANSI-compatible" mode
2106 if test "$ac_cv_c_const" = "yes" ; then
2107 LEX_CFLAGS="-DYY_USE_CONST"
2110 if test "$LEX" = "flex"; then
2111 AC_CACHE_CHECK([for flex version], php_cv_flex_version, [
2112 flex_version=`$LEX -V -v --version 2>/dev/null | $SED -e 's/^.* //'`
2113 php_cv_flex_version=invalid
2114 for flex_check_version in $flex_version_list; do
2115 if test "$flex_version" = "$flex_check_version"; then
2116 php_cv_flex_version="$flex_check_version (ok)"
2124 case $php_cv_flex_version in
2126 if test -f "$abs_srcdir/Zend/zend_language_scanner.c" && test -f "$abs_srcdir/Zend/zend_ini_scanner.c"; then
2127 AC_MSG_WARN([flex versions supported for regeneration of the Zend/PHP parsers: $flex_version_list (found: $flex_version)])
2129 flex_msg="Supported flex versions are: $flex_version_list"
2130 if test "$flex_version" = "none"; then
2131 flex_msg="flex not found. flex is required to generate the Zend/PHP parsers! $flex_msg"
2133 flex_msg="Found invalid flex version: $flex_version. $flex_msg"
2135 AC_MSG_ERROR([$flex_msg])
2146 dnl Search for the re2c binary and check the version
2148 AC_DEFUN([PHP_PROG_RE2C],[
2149 AC_CHECK_PROG(RE2C, re2c, re2c)
2150 if test -n "$RE2C"; then
2151 AC_CACHE_CHECK([for re2c version], php_cv_re2c_version, [
2152 re2c_vernum=`re2c --vernum 2>/dev/null`
2153 if test -z "$re2c_vernum" || test "$re2c_vernum" -lt "1200"; then
2154 php_cv_re2c_version=invalid
2156 php_cv_re2c_version="`re2c --version | cut -d ' ' -f 2 2>/dev/null` (ok)"
2160 case $php_cv_re2c_version in
2162 AC_MSG_WARN([You will need re2c 0.12.0 or later if you want to regenerate PHP parsers.])
2169 dnl -------------------------------------------------------------------------
2170 dnl Common setup macros: PHP_SETUP_<what>
2171 dnl -------------------------------------------------------------------------
2174 dnl PHP_SETUP_ICU([shared-add])
2176 dnl Common setup macro for ICU
2178 AC_DEFUN([PHP_SETUP_ICU],[
2179 PHP_ARG_WITH(icu-dir,,
2180 [ --with-icu-dir=DIR Specify where ICU libraries and headers can be found], DEFAULT, no)
2182 if test "$PHP_ICU_DIR" = "no"; then
2186 if test "$PHP_ICU_DIR" = "DEFAULT"; then
2187 dnl Try to find icu-config
2188 AC_PATH_PROG(ICU_CONFIG, icu-config, no, [$PATH:/usr/local/bin])
2190 ICU_CONFIG="$PHP_ICU_DIR/bin/icu-config"
2193 AC_MSG_CHECKING([for location of ICU headers and libraries])
2195 dnl Trust icu-config to know better what the install prefix is..
2196 icu_install_prefix=`$ICU_CONFIG --prefix 2> /dev/null`
2197 if test "$?" != "0" || test -z "$icu_install_prefix"; then
2198 AC_MSG_RESULT([not found])
2199 AC_MSG_ERROR([Unable to detect ICU prefix or $ICU_CONFIG failed. Please verify ICU install prefix and make sure icu-config works.])
2201 AC_MSG_RESULT([$icu_install_prefix])
2203 dnl Check ICU version
2204 AC_MSG_CHECKING([for ICU 3.4 or greater])
2205 icu_version_full=`$ICU_CONFIG --version`
2208 set $icu_version_full
2210 icu_version=`expr [$]1 \* 1000 + [$]2`
2211 AC_MSG_RESULT([found $icu_version_full])
2213 if test "$icu_version" -lt "3004"; then
2214 AC_MSG_ERROR([ICU version 3.4 or later is required])
2217 ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
2218 ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
2219 PHP_EVAL_INCLINE($ICU_INCS)
2220 PHP_EVAL_LIBLINE($ICU_LIBS, $1)
2225 dnl PHP_SETUP_KERBEROS(shared-add [, action-found [, action-not-found]])
2227 dnl Common setup macro for kerberos
2229 AC_DEFUN([PHP_SETUP_KERBEROS],[
2231 unset KERBEROS_CFLAGS
2234 dnl First try to find krb5-config
2235 if test -z "$KRB5_CONFIG"; then
2236 AC_PATH_PROG(KRB5_CONFIG, krb5-config, no, [$PATH:/usr/kerberos/bin:/usr/local/bin])
2239 dnl If krb5-config is found try using it
2240 if test "$PHP_KERBEROS" = "yes" && test -x "$KRB5_CONFIG"; then
2241 KERBEROS_LIBS=`$KRB5_CONFIG --libs gssapi`
2242 KERBEROS_CFLAGS=`$KRB5_CONFIG --cflags gssapi`
2244 if test -n "$KERBEROS_LIBS" && test -n "$KERBEROS_CFLAGS"; then
2246 PHP_EVAL_LIBLINE($KERBEROS_LIBS, $1)
2247 PHP_EVAL_INCLINE($KERBEROS_CFLAGS)
2251 dnl If still not found use old skool method
2252 if test "$found_kerberos" = "no"; then
2254 if test "$PHP_KERBEROS" = "yes"; then
2255 PHP_KERBEROS="/usr/kerberos /usr/local /usr"
2258 for i in $PHP_KERBEROS; do
2259 if test -f $i/$PHP_LIBDIR/libkrb5.a || test -f $i/$PHP_LIBDIR/libkrb5.$SHLIB_SUFFIX_NAME; then
2265 if test "$PHP_KERBEROS_DIR"; then
2267 PHP_ADD_LIBPATH($PHP_KERBEROS_DIR/$PHP_LIBDIR, $1)
2268 PHP_ADD_LIBRARY(gssapi_krb5, 1, $1)
2269 PHP_ADD_LIBRARY(krb5, 1, $1)
2270 PHP_ADD_LIBRARY(k5crypto, 1, $1)
2271 PHP_ADD_LIBRARY(com_err, 1, $1)
2272 PHP_ADD_INCLUDE($PHP_KERBEROS_DIR/include)
2276 if test "$found_kerberos" = "yes"; then
2277 ifelse([$2],[],:,[$2])
2278 ifelse([$3],[],,[else $3])
2283 dnl PHP_SETUP_OPENSSL(shared-add [, action-found [, action-not-found]])
2285 dnl Common setup macro for openssl
2287 AC_DEFUN([PHP_SETUP_OPENSSL],[
2289 unset OPENSSL_INCDIR
2290 unset OPENSSL_LIBDIR
2292 dnl Empty variable means 'no'
2293 test -z "$PHP_OPENSSL" && PHP_OPENSSL=no
2294 test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no
2296 dnl Fallbacks for different configure options
2297 if test "$PHP_OPENSSL" != "no"; then
2298 PHP_OPENSSL_DIR=$PHP_OPENSSL
2299 elif test "$PHP_IMAP_SSL" != "no"; then
2300 PHP_OPENSSL_DIR=$PHP_IMAP_SSL
2303 dnl First try to find pkg-config
2304 if test -z "$PKG_CONFIG"; then
2305 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
2308 dnl If pkg-config is found try using it
2309 if test "$PHP_OPENSSL_DIR" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then
2310 if $PKG_CONFIG --atleast-version=0.9.6 openssl; then
2312 OPENSSL_LIBS=`$PKG_CONFIG --libs openssl`
2313 OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl`
2314 OPENSSL_INCDIR=`$PKG_CONFIG --variable=includedir openssl`
2316 AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
2319 if test -n "$OPENSSL_LIBS" && test -n "$OPENSSL_INCS"; then
2320 PHP_EVAL_LIBLINE($OPENSSL_LIBS, $1)
2321 PHP_EVAL_INCLINE($OPENSSL_INCS)
2325 dnl If pkg-config fails for some reason, revert to the old method
2326 if test "$found_openssl" = "no"; then
2328 if test "$PHP_OPENSSL_DIR" = "yes"; then
2329 PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
2332 for i in $PHP_OPENSSL_DIR; do
2333 if test -r $i/include/openssl/evp.h; then
2334 OPENSSL_INCDIR=$i/include
2336 if test -r $i/$PHP_LIBDIR/libssl.a -o -r $i/$PHP_LIBDIR/libssl.$SHLIB_SUFFIX_NAME; then
2337 OPENSSL_LIBDIR=$i/$PHP_LIBDIR
2339 test -n "$OPENSSL_INCDIR" && test -n "$OPENSSL_LIBDIR" && break
2342 if test -z "$OPENSSL_INCDIR"; then
2343 AC_MSG_ERROR([Cannot find OpenSSL's <evp.h>])
2346 if test -z "$OPENSSL_LIBDIR"; then
2347 AC_MSG_ERROR([Cannot find OpenSSL's libraries])
2350 old_CPPFLAGS=$CPPFLAGS
2351 CPPFLAGS=-I$OPENSSL_INCDIR
2352 AC_MSG_CHECKING([for OpenSSL version])
2354 #include <openssl/opensslv.h>
2355 #if OPENSSL_VERSION_NUMBER >= 0x0090600fL
2359 AC_MSG_RESULT([>= 0.9.6])
2361 AC_MSG_ERROR([OpenSSL version 0.9.6 or greater required.])
2363 CPPFLAGS=$old_CPPFLAGS
2365 PHP_ADD_INCLUDE($OPENSSL_INCDIR)
2367 PHP_CHECK_LIBRARY(crypto, CRYPTO_free, [
2368 PHP_ADD_LIBRARY(crypto,,$1)
2370 AC_MSG_ERROR([libcrypto not found!])
2376 LIBS="$LIBS -lcrypto"
2377 PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [
2380 AC_MSG_ERROR([libssl not found!])
2385 PHP_ADD_LIBRARY(ssl,,$1)
2387 PHP_ADD_LIBPATH($OPENSSL_LIBDIR, $1)
2390 if test "$found_openssl" = "yes"; then
2391 dnl For apache 1.3.x static build
2392 OPENSSL_INCDIR_OPT=-I$OPENSSL_INCDIR
2393 AC_SUBST(OPENSSL_INCDIR_OPT)
2395 ifelse([$2],[],:,[$2])
2396 ifelse([$3],[],,[else $3])
2401 dnl PHP_SETUP_ICONV(shared-add [, action-found [, action-not-found]])
2403 dnl Common setup macro for iconv
2405 AC_DEFUN([PHP_SETUP_ICONV], [
2409 # Create the directories for a VPATH build:
2410 $php_shtool mkdir -p ext/iconv
2412 echo > ext/iconv/php_have_bsd_iconv.h
2413 echo > ext/iconv/php_have_glibc_iconv.h
2414 echo > ext/iconv/php_have_libiconv.h
2415 echo > ext/iconv/php_have_iconv.h
2416 echo > ext/iconv/php_php_iconv_impl.h
2417 echo > ext/iconv/php_php_iconv_h_path.h
2418 echo > ext/iconv/php_iconv_supports_errno.h
2421 dnl Check libc first if no path is provided in --with-iconv
2423 if test "$PHP_ICONV" = "yes"; then
2424 AC_CHECK_FUNC(iconv, [
2427 AC_CHECK_FUNC(libiconv,[
2428 PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv])
2429 AC_DEFINE(HAVE_LIBICONV, 1, [ ])
2436 dnl Check external libs for iconv funcs
2438 if test "$found_iconv" = "no"; then
2440 for i in $PHP_ICONV /usr/local /usr; do
2441 if test -r $i/include/giconv.h; then
2442 AC_DEFINE(HAVE_GICONV_H, 1, [ ])
2444 iconv_lib_name=giconv
2446 elif test -r $i/include/iconv.h; then
2448 iconv_lib_name=iconv
2453 if test -z "$ICONV_DIR"; then
2454 AC_MSG_ERROR([Please specify the install prefix of iconv with --with-iconv=<DIR>])
2457 if test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.a ||
2458 test -f $ICONV_DIR/$PHP_LIBDIR/lib$iconv_lib_name.$SHLIB_SUFFIX_NAME
2460 PHP_CHECK_LIBRARY($iconv_lib_name, libiconv, [
2462 PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv])
2463 AC_DEFINE(HAVE_LIBICONV,1,[ ])
2465 PHP_CHECK_LIBRARY($iconv_lib_name, iconv, [
2468 -L$ICONV_DIR/$PHP_LIBDIR
2471 -L$ICONV_DIR/$PHP_LIBDIR
2476 if test "$found_iconv" = "yes"; then
2477 PHP_DEFINE(HAVE_ICONV,1,[ext/iconv])
2478 AC_DEFINE(HAVE_ICONV,1,[ ])
2479 if test -n "$ICONV_DIR"; then
2480 PHP_ADD_LIBRARY_WITH_PATH($iconv_lib_name, $ICONV_DIR/$PHP_LIBDIR, $1)
2481 PHP_ADD_INCLUDE($ICONV_DIR/include)
2484 ifelse([$3],[],,[else $3])
2489 dnl PHP_SETUP_LIBXML(shared-add [, action-found [, action-not-found]])
2491 dnl Common setup macro for libxml
2493 AC_DEFUN([PHP_SETUP_LIBXML], [
2494 AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path,
2496 for i in $PHP_LIBXML_DIR /usr/local /usr; do
2497 if test -x "$i/bin/xml2-config"; then
2498 ac_cv_php_xml2_config_path="$i/bin/xml2-config"
2504 if test -x "$ac_cv_php_xml2_config_path"; then
2505 XML2_CONFIG="$ac_cv_php_xml2_config_path"
2506 libxml_full_version=`$XML2_CONFIG --version`
2509 set $libxml_full_version
2511 LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3`
2512 if test "$LIBXML_VERSION" -ge "2006011"; then
2513 LIBXML_LIBS=`$XML2_CONFIG --libs`
2514 LIBXML_INCS=`$XML2_CONFIG --cflags`
2515 PHP_EVAL_LIBLINE($LIBXML_LIBS, $1)
2516 PHP_EVAL_INCLINE($LIBXML_INCS)
2518 dnl Check that build works with given libs
2519 AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [
2520 PHP_TEST_BUILD(xmlInitParser,
2522 php_cv_libxml_build_works=yes
2525 AC_MSG_ERROR([build test failed. Please check the config.log for details.])
2530 if test "$php_cv_libxml_build_works" = "yes"; then
2531 AC_DEFINE(HAVE_LIBXML, 1, [ ])
2535 AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.])
2537 ifelse([$3],[],,[else $3])
2541 dnl -------------------------------------------------------------------------
2543 dnl -------------------------------------------------------------------------
2546 dnl PHP_INSTALL_HEADERS(path [, file ...])
2548 dnl PHP header files to be installed
2550 AC_DEFUN([PHP_INSTALL_HEADERS],[
2552 for header_file in $1; do
2553 PHP_RUN_ONCE(INSTALLHEADERS, $header_file, [
2554 INSTALL_HEADERS="$INSTALL_HEADERS $header_file"
2559 for header_file in $2; do
2560 hp_hf="$header_path/$header_file"
2561 PHP_RUN_ONCE(INSTALLHEADERS, $hp_hf, [
2562 INSTALL_HEADERS="$INSTALL_HEADERS $hp_hf"
2569 dnl PHP_AP_EXTRACT_VERSION(/path/httpd)
2571 dnl This macro is used to get a comparable
2572 dnl version for apache1/2.
2574 AC_DEFUN([PHP_AP_EXTRACT_VERSION],[
2575 ac_output=`$1 -v 2>&1 | grep version`
2582 APACHE_VERSION=`expr [$]4 \* 1000000 + [$]5 \* 1000 + [$]6`
2586 dnl PHP_DEBUG_MACRO(filename)
2588 AC_DEFUN([PHP_DEBUG_MACRO],[
2591 CONFIGURE: $CONFIGURE_COMMAND
2602 PHP_RPATHS: $PHP_RPATHS
2603 uname -a: `uname -a`
2606 cat >conftest.$ac_ext <<X
2612 (eval echo \"$ac_link\"; eval $ac_link && ./conftest) >>$1 2>&1
2617 dnl PHP_CONFIG_NICE(filename)
2619 dnl Generates the config.nice file
2621 AC_DEFUN([PHP_CONFIG_NICE],[
2622 AC_REQUIRE([AC_PROG_EGREP])
2623 AC_REQUIRE([LT_AC_PROG_SED])
2624 PHP_SUBST_OLD(EGREP)
2626 test -f $1 && mv $1 $1.old
2631 # Created by configure
2635 for var in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS EXTRA_LDFLAGS_PROGRAM LIBS CC CXX; do
2637 if test -n "$val"; then
2638 echo "$var='$val' \\" >> $1
2642 echo "'[$]0' \\" >> $1
2643 if test `expr -- [$]0 : "'.*"` = 0; then
2644 CONFIGURE_COMMAND="$CONFIGURE_COMMAND '[$]0'"
2646 CONFIGURE_COMMAND="$CONFIGURE_COMMAND [$]0"
2648 for arg in $ac_configure_args; do
2649 if test `expr -- $arg : "'.*"` = 0; then
2650 if test `expr -- $arg : "--.*"` = 0; then
2653 echo "'[$]arg' \\" >> $1
2654 CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS '[$]arg'"
2656 if test `expr -- $arg : "'--.*"` = 0; then
2659 echo "[$]arg \\" >> $1
2660 CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS [$]arg"
2665 CONFIGURE_COMMAND="$CONFIGURE_COMMAND $CONFIGURE_OPTIONS"
2666 PHP_SUBST_OLD(CONFIGURE_COMMAND)
2667 PHP_SUBST_OLD(CONFIGURE_OPTIONS)
2671 dnl PHP_CHECK_CONFIGURE_OPTIONS
2673 AC_DEFUN([PHP_CHECK_CONFIGURE_OPTIONS],[
2674 for arg in $ac_configure_args; do
2677 arg_name="`echo [$]arg | $SED -e 's/--with-/with-/g' -e 's/=.*//g'`"
2680 arg_name="`echo [$]arg | $SED -e 's/--without-/with-/g' -e 's/=.*//g'`"
2683 arg_name="`echo [$]arg | $SED -e 's/--enable-/enable-/g' -e 's/=.*//g'`"
2686 arg_name="`echo [$]arg | $SED -e 's/--disable-/enable-/g' -e 's/=.*//g'`"
2693 # Allow --disable-all / --enable-all
2696 # Allow certain libtool options
2697 enable-libtool-lock | with-pic | with-tags | enable-shared | enable-static | enable-fast-install | with-gnu-ld[)];;
2699 # Allow certain TSRM options
2700 with-tsrm-pth | with-tsrm-st | with-tsrm-pthreads[)];;
2702 # Allow certain Zend options
2703 with-zend-vm | enable-maintainer-zts | enable-inline-optimization[)];;
2705 # All the rest must be set using the PHP_ARG_* macros
2706 # PHP_ARG_* macros set php_enable_<arg_name> or php_with_<arg_name>
2708 # Options that exist before PHP 6
2709 if test "$PHP_MAJOR_VERSION" -lt "6"; then
2711 enable-zend-multibyte[)] continue;;
2714 is_arg_set=php_[]`echo [$]arg_name | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ-' 'abcdefghijklmnopqrstuvwxyz_'`
2715 if eval test "x\$$is_arg_set" = "x"; then
2716 PHP_UNKNOWN_CONFIGURE_OPTIONS="$PHP_UNKNOWN_CONFIGURE_OPTIONS
2725 dnl PHP_CHECK_PDO_INCLUDES([found [, not-found]])
2727 AC_DEFUN([PHP_CHECK_PDO_INCLUDES],[
2728 AC_CACHE_CHECK([for PDO includes], pdo_inc_path, [
2729 AC_MSG_CHECKING([for PDO includes])
2730 if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
2731 pdo_inc_path=$abs_srcdir/ext
2732 elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
2733 pdo_inc_path=$abs_srcdir/ext
2734 elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
2735 pdo_inc_path=$prefix/include/php/ext
2738 if test -n "$pdo_inc_path"; then
2739 ifelse([$1],[],:,[$1])
2741 ifelse([$2],[],[AC_MSG_ERROR([Cannot find php_pdo_driver.h.])],[$2])
2748 AC_DEFUN([PHP_DETECT_ICC],
2751 AC_MSG_CHECKING([for icc])
2752 AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER],
2754 AC_MSG_RESULT([no]),
2756 AC_MSG_RESULT([yes])
2761 dnl PHP_CRYPT_R_STYLE
2762 dnl detect the style of crypt_r() is any is available
2763 dnl see APR_CHECK_CRYPT_R_STYLE() for original version
2765 AC_DEFUN([PHP_CRYPT_R_STYLE],
2767 AC_CACHE_CHECK([which data struct is used by crypt_r], php_cv_crypt_r_style,[
2768 php_cv_crypt_r_style=none
2770 #define _REENTRANT 1
2774 crypt_r("passwd", "hash", &buffer);
2776 php_cv_crypt_r_style=cryptd)
2778 if test "$php_cv_crypt_r_style" = "none"; then
2780 #define _REENTRANT 1
2783 struct crypt_data buffer;
2784 crypt_r("passwd", "hash", &buffer);
2786 php_cv_crypt_r_style=struct_crypt_data)
2789 if test "$php_cv_crypt_r_style" = "none"; then
2791 #define _REENTRANT 1
2795 struct crypt_data buffer;
2796 crypt_r("passwd", "hash", &buffer);
2798 php_cv_crypt_r_style=struct_crypt_data_gnu_source)
2802 if test "$php_cv_crypt_r_style" = "cryptd"; then
2803 AC_DEFINE(CRYPT_R_CRYPTD, 1, [Define if crypt_r has uses CRYPTD])
2805 if test "$php_cv_crypt_r_style" = "struct_crypt_data" -o "$php_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then
2806 AC_DEFINE(CRYPT_R_STRUCT_CRYPT_DATA, 1, [Define if crypt_r uses struct crypt_data])
2808 if test "$php_cv_crypt_r_style" = "struct_crypt_data_gnu_source"; then
2809 AC_DEFINE(CRYPT_R_GNU_SOURCE, 1, [Define if struct crypt_data requires _GNU_SOURCE])
2811 if test "$php_cv_crypt_r_style" = "none"; then
2812 AC_MSG_ERROR([Unable to detect data struct used by crypt_r])
2817 dnl PHP_TEST_WRITE_STDOUT
2819 AC_DEFUN([PHP_TEST_WRITE_STDOUT],[
2820 AC_CACHE_CHECK(whether writing to stdout works,ac_cv_write_stdout,[
2822 #ifdef HAVE_UNISTD_H
2826 #define TEXT "This is the test message -- "
2832 n = write(1, TEXT, sizeof(TEXT)-1);
2833 return (!(n == sizeof(TEXT)-1));
2836 ac_cv_write_stdout=yes
2838 ac_cv_write_stdout=no
2840 ac_cv_write_stdout=no
2843 if test "$ac_cv_write_stdout" = "yes"; then
2844 AC_DEFINE(PHP_WRITE_STDOUT, 1, [whether write(2) works])
2848 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2849 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
2850 ## Free Software Foundation, Inc.
2851 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2853 ## This file is free software; the Free Software Foundation gives
2854 ## unlimited permission to copy and/or distribute it, with or without
2855 ## modifications, as long as this notice is preserved.
2857 # serial 47 AC_PROG_LIBTOOL
2859 ifdef([AC_ACVERSION],[
2860 # autoconf 2.13 compatibility
2861 # Set PATH_SEPARATOR variable
2862 # ---------------------------------
2863 # Find the correct PATH separator. Usually this is :', but
2864 # DJGPP uses ;' like DOS.
2865 if test "X${PATH_SEPARATOR+set}" != Xset; then
2866 UNAME=${UNAME-`uname 2>/dev/null`}
2868 *-DOS) lt_cv_sys_path_separator=';' ;;
2869 *) lt_cv_sys_path_separator=':' ;;
2871 PATH_SEPARATOR=$lt_cv_sys_path_separator
2875 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
2876 # -----------------------------------------------------------
2877 # If this macro is not defined by Autoconf, define it here.
2878 ifdef([AC_PROVIDE_IFELSE],
2880 [define([AC_PROVIDE_IFELSE],
2881 [ifdef([AC_PROVIDE_$1],
2886 AC_DEFUN([AC_PROG_LIBTOOL],
2887 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
2888 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
2889 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
2890 AC_PROVIDE_IFELSE([AC_PROG_CXX],
2892 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
2895 dnl dnl And a similar setup for Fortran 77 support
2896 dnl AC_PROVIDE_IFELSE([AC_PROG_F77],
2897 dnl [AC_LIBTOOL_F77],
2898 dnl [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
2901 dnl dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
2902 dnl dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
2903 dnl dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
2904 dnl AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2905 dnl [AC_LIBTOOL_GCJ],
2906 dnl [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2907 dnl [AC_LIBTOOL_GCJ],
2908 dnl [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
2909 dnl [AC_LIBTOOL_GCJ],
2910 dnl [ifdef([AC_PROG_GCJ],
2911 dnl [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
2912 dnl ifdef([A][M_PROG_GCJ],
2913 dnl [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
2914 dnl ifdef([LT_AC_PROG_GCJ],
2915 dnl [define([LT_AC_PROG_GCJ],
2916 dnl defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
2923 AC_DEFUN([_AC_PROG_LIBTOOL],
2924 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
2925 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
2926 dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
2927 dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
2929 # This can be used to rebuild libtool when needed
2930 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
2932 # Always use our own libtool.
2933 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2934 AC_SUBST(LIBTOOL)dnl
2936 # Prevent multiple expansion
2937 define([AC_PROG_LIBTOOL], [])
2938 ])# _AC_PROG_LIBTOOL
2943 AC_DEFUN([AC_LIBTOOL_SETUP],
2945 AC_REQUIRE([AC_ENABLE_SHARED])dnl
2946 AC_REQUIRE([AC_ENABLE_STATIC])dnl
2947 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
2948 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2949 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2950 AC_REQUIRE([AC_PROG_CC])dnl
2951 AC_REQUIRE([AC_PROG_LD])dnl
2952 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
2953 AC_REQUIRE([AC_PROG_NM])dnl
2955 AC_REQUIRE([AC_PROG_LN_S])dnl
2956 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
2957 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
2958 AC_REQUIRE([AC_OBJEXT])dnl
2959 AC_REQUIRE([AC_EXEEXT])dnl
2962 AC_LIBTOOL_SYS_MAX_CMD_LEN
2963 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
2966 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2967 _LT_AC_PROG_ECHO_BACKSLASH
2971 # AIX sometimes has problems with the GCC collect2 program. For some
2972 # reason, if we set the COLLECT_NAMES environment variable, the problems
2973 # vanish in a puff of smoke.
2974 if test "X${COLLECT_NAMES+set}" != Xset; then
2976 export COLLECT_NAMES
2981 # Sed substitution that helps us do robust quoting. It backslashifies
2982 # metacharacters that are still active within double-quoted strings.
2983 Xsed='sed -e 1s/^X//'
2984 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
2986 # Same as above, but do not quote variable references.
2987 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
2989 # Sed substitution to delay expansion of an escaped shell variable in a
2990 # double_quote_subst'ed string.
2991 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2993 # Sed substitution to avoid accidental globbing in evaled expressions
2994 no_glob_subst='s/\*/\\\*/g'
3000 default_ofile=libtool
3001 can_build_shared=yes
3003 # All known linkers require a `.a' archive for static linking (except MSVC,
3004 # which needs '.lib').
3006 ltmain="$ac_aux_dir/ltmain.sh"
3007 ofile="$default_ofile"
3008 with_gnu_ld="$lt_cv_prog_gnu_ld"
3010 AC_CHECK_TOOL(AR, ar, false)
3011 AC_CHECK_TOOL(RANLIB, ranlib, :)
3012 AC_CHECK_TOOL(STRIP, strip, :)
3015 old_CFLAGS="$CFLAGS"
3017 # Set sane defaults for various variables
3018 test -z "$AR" && AR=ar
3019 test -z "$AR_FLAGS" && AR_FLAGS=cru
3020 test -z "$AS" && AS=as
3021 test -z "$CC" && CC=cc
3022 test -z "$LTCC" && LTCC=$CC
3023 test -z "$DLLTOOL" && DLLTOOL=dlltool
3024 test -z "$LD" && LD=ld
3025 test -z "$LN_S" && LN_S="ln -s"
3026 test -z "$MAGIC_CMD" && MAGIC_CMD=file
3027 test -z "$NM" && NM=nm
3028 test -z "$SED" && SED=sed
3029 test -z "$OBJDUMP" && OBJDUMP=objdump
3030 test -z "$RANLIB" && RANLIB=:
3031 test -z "$STRIP" && STRIP=:
3032 test -z "$ac_objext" && ac_objext=o
3034 # Determine commands to create old-style static archives.
3035 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
3036 old_postinstall_cmds='chmod 644 $oldlib'
3037 old_postuninstall_cmds=
3039 if test -n "$RANLIB"; then
3042 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
3045 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
3048 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
3051 _LT_CC_BASENAME([$compiler])
3053 # Only perform the check for file, if the check method requires it
3054 case $deplibs_check_method in
3056 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
3062 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
3063 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
3064 enable_win32_dll=yes, enable_win32_dll=no)
3066 AC_ARG_ENABLE([libtool-lock],
3067 [ --disable-libtool-lock avoid locking (might break parallel builds)])
3068 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
3071 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
3072 [pic_mode="$withval"],
3074 test -z "$pic_mode" && pic_mode=default
3076 # Use C for the default configuration in the libtool script
3078 AC_LIBTOOL_LANG_C_CONFIG
3080 ])# AC_LIBTOOL_SETUP
3083 # _LT_AC_SYS_COMPILER
3084 # -------------------
3085 AC_DEFUN([_LT_AC_SYS_COMPILER],
3086 [AC_REQUIRE([AC_PROG_CC])dnl
3088 # If no C compiler was specified, use CC.
3091 # Allow CC to be a program name with arguments.
3093 ])# _LT_AC_SYS_COMPILER
3096 # _LT_CC_BASENAME(CC)
3097 # -------------------
3098 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
3099 AC_DEFUN([_LT_CC_BASENAME],
3100 [for cc_temp in $1""; do
3102 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
3103 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
3108 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
3112 # _LT_COMPILER_BOILERPLATE
3113 # ------------------------
3114 # Check for compiler boilerplate output or warnings with
3115 # the simple compiler test code.
3116 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
3117 [ac_outfile=conftest.$ac_objext
3118 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
3119 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
3120 _lt_compiler_boilerplate=`cat conftest.err`
3122 ])# _LT_COMPILER_BOILERPLATE
3125 # _LT_LINKER_BOILERPLATE
3126 # ----------------------
3127 # Check for linker boilerplate output or warnings with
3128 # the simple link test code.
3129 AC_DEFUN([_LT_LINKER_BOILERPLATE],
3130 [ac_outfile=conftest.$ac_objext
3131 printf "$lt_simple_link_test_code" >conftest.$ac_ext
3132 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
3133 _lt_linker_boilerplate=`cat conftest.err`
3135 ])# _LT_LINKER_BOILERPLATE
3138 dnl autoconf 2.13 compatibility
3139 dnl _LT_AC_TRY_LINK()
3140 AC_DEFUN(_LT_AC_TRY_LINK, [
3141 cat > conftest.$ac_ext <<EOF
3142 dnl This sometimes fails to find confdefs.h, for some reason.
3143 dnl [#]line __oline__ "[$]0"
3144 [#]line __oline__ "configure"
3145 #include "confdefs.h"
3149 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3150 ifelse([$1], , :, [$1
3153 echo "configure: failed program was:" >&5
3154 cat conftest.$ac_ext >&6
3155 ifelse([$2], , , [$2
3162 # _LT_AC_SYS_LIBPATH_AIX
3163 # ----------------------
3164 # Links a minimal program and checks the executable
3165 # for the system default hardcoded library path. In most cases,
3166 # this is /usr/lib:/lib, but when the MPI compilers are used
3167 # the location of the communication and MPI libs are included too.
3168 # If we don't find anything, use the default library path according
3169 # to the aix ld manual.
3170 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
3172 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
3174 # Check for a 64-bit object if we didn't find anything.
3175 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
3177 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
3178 ])# _LT_AC_SYS_LIBPATH_AIX
3181 # _LT_AC_SHELL_INIT(ARG)
3182 # ----------------------
3183 AC_DEFUN([_LT_AC_SHELL_INIT],
3184 [ifdef([AC_DIVERSION_NOTICE],
3185 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
3186 [AC_DIVERT_PUSH(NOTICE)])
3189 ])# _LT_AC_SHELL_INIT
3192 # _LT_AC_PROG_ECHO_BACKSLASH
3193 # --------------------------
3194 # Add some code to the start of the generated configure script which
3195 # will find an echo command which doesn't interpret backslashes.
3196 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
3197 [_LT_AC_SHELL_INIT([
3198 # Check that we are running under the correct shell.
3199 SHELL=${CONFIG_SHELL-/bin/sh}
3203 # Remove one level of quotation (which was required for Make).
3204 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
3209 if test "X[$]1" = X--no-reexec; then
3210 # Discard the --no-reexec flag, and continue.
3212 elif test "X[$]1" = X--fallback-echo; then
3213 # Avoid inline document here, it may be left over
3215 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
3216 # Yippee, $echo works!
3219 # Restart under the correct shell.
3220 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
3223 if test "X[$]1" = X--fallback-echo; then
3224 # used as fallback echo
3232 # The HP-UX ksh and POSIX shell print the target directory to stdout
3234 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3236 if test -z "$ECHO"; then
3237 if test "X${echo_test_string+set}" != Xset; then
3238 # find a string as large as possible, as long as the shell can cope with it
3239 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
3240 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
3241 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
3242 echo_test_string=`eval $cmd` &&
3243 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
3250 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
3251 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
3252 test "X$echo_testing_string" = "X$echo_test_string"; then
3255 # The Solaris, AIX, and Digital Unix default echo programs unquote
3256 # backslashes. This makes it impossible to quote backslashes using
3257 # echo "$something" | sed 's/\\/\\\\/g'
3259 # So, first we look for a working echo in the user's PATH.
3261 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3262 for dir in $PATH /usr/ucb; do
3264 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
3265 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
3266 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
3267 test "X$echo_testing_string" = "X$echo_test_string"; then
3274 if test "X$echo" = Xecho; then
3275 # We didn't find a better echo, so look for alternatives.
3276 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
3277 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
3278 test "X$echo_testing_string" = "X$echo_test_string"; then
3279 # This shell has a builtin print -r that does the trick.
3281 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
3282 test "X$CONFIG_SHELL" != X/bin/ksh; then
3283 # If we have ksh, try running configure again with it.
3284 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
3285 export ORIGINAL_CONFIG_SHELL
3286 CONFIG_SHELL=/bin/ksh
3288 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
3292 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
3293 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
3294 test "X$echo_testing_string" = "X$echo_test_string"; then
3295 # Cool, printf works
3297 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
3298 test "X$echo_testing_string" = 'X\t' &&
3299 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
3300 test "X$echo_testing_string" = "X$echo_test_string"; then
3301 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
3303 SHELL="$CONFIG_SHELL"
3305 echo="$CONFIG_SHELL [$]0 --fallback-echo"
3306 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
3307 test "X$echo_testing_string" = 'X\t' &&
3308 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
3309 test "X$echo_testing_string" = "X$echo_test_string"; then
3310 echo="$CONFIG_SHELL [$]0 --fallback-echo"
3312 # maybe with a smaller string...
3315 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
3316 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
3323 if test "$prev" != 'sed 50q "[$]0"'; then
3324 echo_test_string=`eval $prev`
3325 export echo_test_string
3326 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
3328 # Oops. We lost completely, so just stick with echo.
3337 # Copy echo and quote the copy suitably for passing to libtool from
3338 # the Makefile, instead of quoting the original, which is used later.
3340 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
3341 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
3345 ])])# _LT_AC_PROG_ECHO_BACKSLASH
3350 AC_DEFUN([_LT_AC_LOCK],
3352 #AC_ARG_ENABLE([libtool-lock],
3353 #[ --disable-libtool-lock avoid locking (might break parallel builds)])
3354 #test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
3356 # Some flags need to be propagated to the compiler or linker for good
3360 # Find out which ABI we are using.
3361 echo 'int i;' > conftest.$ac_ext
3362 if AC_TRY_EVAL(ac_compile); then
3363 case `/usr/bin/file conftest.$ac_objext` in
3375 # Find out which ABI we are using.
3376 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
3377 if AC_TRY_EVAL(ac_compile); then
3378 if test "$lt_cv_prog_gnu_ld" = yes; then
3379 case `/usr/bin/file conftest.$ac_objext` in
3381 LD="${LD-ld} -melf32bsmip"
3384 LD="${LD-ld} -melf32bmipn32"
3387 LD="${LD-ld} -melf64bmip"
3391 case `/usr/bin/file conftest.$ac_objext` in
3407 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
3408 # Find out which ABI we are using.
3409 echo 'int i;' > conftest.$ac_ext
3410 if AC_TRY_EVAL(ac_compile); then
3411 case `/usr/bin/file conftest.o` in
3415 LD="${LD-ld} -m elf_i386"
3417 ppc64-*linux*|powerpc64-*linux*)
3418 LD="${LD-ld} -m elf32ppclinux"
3421 LD="${LD-ld} -m elf_s390"
3424 LD="${LD-ld} -m elf32_sparc"
3431 LD="${LD-ld} -m elf_x86_64"
3433 ppc*-*linux*|powerpc*-*linux*)
3434 LD="${LD-ld} -m elf64ppc"
3437 LD="${LD-ld} -m elf64_s390"
3440 LD="${LD-ld} -m elf64_sparc"
3450 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3451 SAVE_CFLAGS="$CFLAGS"
3452 CFLAGS="$CFLAGS -belf"
3453 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3456 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
3458 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3459 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3460 CFLAGS="$SAVE_CFLAGS"
3463 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
3464 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
3465 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
3466 AC_CHECK_TOOL(AS, as, false)
3467 AC_CHECK_TOOL(OBJDUMP, objdump, false)
3472 need_locks="$enable_libtool_lock"
3477 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3478 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3479 # ----------------------------------------------------------------
3480 # Check whether the given compiler option works
3481 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
3482 [AC_REQUIRE([LT_AC_PROG_SED])
3483 AC_CACHE_CHECK([$1], [$2],
3485 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3486 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
3487 lt_compiler_flag="$3"
3488 # Insert the option either (1) after the last *FLAGS variable, or
3489 # (2) before a word containing "conftest.", or (3) at the end.
3490 # Note that $ac_compile itself does not contain backslashes and begins
3491 # with a dollar sign (not a hyphen), so the echo should work correctly.
3492 # The option is referenced via a variable to avoid confusing sed.
3493 lt_compile=`echo "$ac_compile" | $SED \
3494 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3495 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3496 -e 's:$: $lt_compiler_flag:'`
3497 (eval echo "\"configure:__oline__: $lt_compile\"" >&5)
3498 (eval "$lt_compile" 2>conftest.err)
3500 cat conftest.err >&5
3501 echo "configure:__oline__: \$? = $ac_status" >&5
3502 if (exit $ac_status) && test -s "$ac_outfile"; then
3503 # The compiler can only warn and ignore the option if not recognized
3504 # So say no if there are warnings other than the usual output.
3505 $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
3506 $SED '/^$/d' conftest.err >conftest.er2
3507 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
3514 if test x"[$]$2" = xyes; then
3515 ifelse([$5], , :, [$5])
3517 ifelse([$6], , :, [$6])
3519 ])# AC_LIBTOOL_COMPILER_OPTION
3522 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3523 # [ACTION-SUCCESS], [ACTION-FAILURE])
3524 # ------------------------------------------------------------
3525 # Check whether the given compiler option works
3526 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
3527 [AC_CACHE_CHECK([$1], [$2],
3529 save_LDFLAGS="$LDFLAGS"
3530 LDFLAGS="$LDFLAGS $3"
3531 printf "$lt_simple_link_test_code" > conftest.$ac_ext
3532 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3533 # The linker can only warn and ignore the option if not recognized
3534 # So say no if there are warnings
3535 if test -s conftest.err; then
3536 # Append any errors to the config.log.
3537 cat conftest.err 1>&5
3538 $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
3539 $SED '/^$/d' conftest.err >conftest.er2
3540 if diff conftest.exp conftest.er2 >/dev/null; then
3548 LDFLAGS="$save_LDFLAGS"
3551 if test x"[$]$2" = xyes; then
3552 ifelse([$4], , :, [$4])
3554 ifelse([$5], , :, [$5])
3556 ])# AC_LIBTOOL_LINKER_OPTION
3559 # AC_LIBTOOL_SYS_MAX_CMD_LEN
3560 # --------------------------
3561 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
3562 [# find the maximum length of command line arguments
3563 AC_MSG_CHECKING([the maximum length of command line arguments])
3564 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3570 # On DJGPP, this test can blow up pretty badly due to problems in libc
3571 # (any single argument exceeding 2000 bytes causes a buffer overrun
3572 # during glob expansion). Even if it were fixed, the result of this
3573 # check would be larger than it should be.
3574 lt_cv_sys_max_cmd_len=12288; # 12K is about right
3578 # Under GNU Hurd, this test is not required because there is
3579 # no limit to the length of command line arguments.
3580 # Libtool will interpret -1 as no limit whatsoever
3581 lt_cv_sys_max_cmd_len=-1;
3585 # On Win9x/ME, this test blows up -- it succeeds, but takes
3586 # about 5 minutes as the teststring grows exponentially.
3587 # Worse, since 9x/ME are not pre-emptively multitasking,
3588 # you end up with a "frozen" computer, even though with patience
3589 # the test eventually succeeds (with a max line length of 256k).
3590 # Instead, let's just punt: use the minimum linelength reported by
3591 # all of the supported platforms: 8192 (on NT/2K/XP).
3592 lt_cv_sys_max_cmd_len=8192;
3596 # On AmigaOS with pdksh, this test takes hours, literally.
3597 # So we just punt and use a minimum line length of 8192.
3598 lt_cv_sys_max_cmd_len=8192;
3601 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
3602 # This has been around since 386BSD, at least. Likely further.
3603 if test -x /sbin/sysctl; then
3604 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3605 elif test -x /usr/sbin/sysctl; then
3606 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3608 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
3610 # And add a safety zone
3611 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3612 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3615 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3616 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3617 # nice to cause kernel panics so lets avoid the loop below.
3618 # First set a reasonable default.
3619 lt_cv_sys_max_cmd_len=16384
3621 if test -x /sbin/sysconfig; then
3622 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3623 *1*) lt_cv_sys_max_cmd_len=-1 ;;
3628 # If test is not a shell built-in, we'll probably end up computing a
3629 # maximum length that is only half of the actual maximum length, but
3631 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3632 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
3633 = "XX$teststring") >/dev/null 2>&1 &&
3634 new_result=`expr "X$teststring" : ".*" 2>&1` &&
3635 lt_cv_sys_max_cmd_len=$new_result &&
3636 test $i != 17 # 1/2 MB should be enough
3639 teststring=$teststring$teststring
3642 # Add a significant safety factor because C++ compilers can tack on massive
3643 # amounts of additional arguments before passing them to the linker.
3644 # It appears as though 1/2 is a usable value.
3645 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3649 if test -n $lt_cv_sys_max_cmd_len ; then
3650 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3654 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
3657 # _LT_AC_CHECK_DLFCN
3658 # --------------------
3659 AC_DEFUN([_LT_AC_CHECK_DLFCN],
3660 [AC_CHECK_HEADERS(dlfcn.h)dnl
3661 ])# _LT_AC_CHECK_DLFCN
3664 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3665 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3666 # ------------------------------------------------------------------
3667 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
3668 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
3669 if test "$cross_compiling" = yes; then :
3672 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3673 lt_status=$lt_dlunknown
3674 cat > conftest.$ac_ext <<EOF
3675 [#line __oline__ "configure"
3676 #include "confdefs.h"
3685 # define LT_DLGLOBAL RTLD_GLOBAL
3688 # define LT_DLGLOBAL DL_GLOBAL
3690 # define LT_DLGLOBAL 0
3694 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3695 find out it does not work in some platform. */
3696 #ifndef LT_DLLAZY_OR_NOW
3698 # define LT_DLLAZY_OR_NOW RTLD_LAZY
3701 # define LT_DLLAZY_OR_NOW DL_LAZY
3704 # define LT_DLLAZY_OR_NOW RTLD_NOW
3707 # define LT_DLLAZY_OR_NOW DL_NOW
3709 # define LT_DLLAZY_OR_NOW 0
3717 extern "C" void exit (int);
3720 void fnord() { int i=42;}
3723 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3724 int status = $lt_dlunknown;
3728 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
3729 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
3730 /* dlclose (self); */
3736 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
3737 (./conftest; exit; ) >&5 2>/dev/null
3740 x$lt_dlno_uscore) $1 ;;
3741 x$lt_dlneed_uscore) $2 ;;
3742 x$lt_unknown|x*) $3 ;;
3745 # compilation failed
3750 ])# _LT_AC_TRY_DLOPEN_SELF
3753 # AC_LIBTOOL_DLOPEN_SELF
3754 # -------------------
3755 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
3756 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
3757 if test "x$enable_dlopen" != xyes; then
3758 enable_dlopen=unknown
3759 enable_dlopen_self=unknown
3760 enable_dlopen_self_static=unknown
3767 lt_cv_dlopen="load_add_on"
3769 lt_cv_dlopen_self=yes
3773 lt_cv_dlopen="LoadLibrary"
3778 lt_cv_dlopen="dlopen"
3783 # if libdl is installed we need to link against it
3784 AC_CHECK_LIB([dl], [dlopen],
3785 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
3788 lt_cv_dlopen_self=yes
3793 AC_CHECK_FUNC([shl_load],
3794 [lt_cv_dlopen="shl_load"],
3795 [AC_CHECK_LIB([dld], [shl_load],
3796 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
3797 [AC_CHECK_FUNC([dlopen],
3798 [lt_cv_dlopen="dlopen"],
3799 [AC_CHECK_LIB([dl], [dlopen],
3800 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
3801 [AC_CHECK_LIB([svld], [dlopen],
3802 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
3803 [AC_CHECK_LIB([dld], [dld_link],
3804 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
3813 if test "x$lt_cv_dlopen" != xno; then
3819 case $lt_cv_dlopen in
3821 save_CPPFLAGS="$CPPFLAGS"
3822 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3824 save_LDFLAGS="$LDFLAGS"
3825 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3828 LIBS="$lt_cv_dlopen_libs $LIBS"
3830 AC_CACHE_CHECK([whether a program can dlopen itself],
3831 lt_cv_dlopen_self, [dnl
3832 _LT_AC_TRY_DLOPEN_SELF(
3833 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3834 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3837 if test "x$lt_cv_dlopen_self" = xyes; then
3838 LDFLAGS="$LDFLAGS $link_static_flag"
3839 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3840 lt_cv_dlopen_self_static, [dnl
3841 _LT_AC_TRY_DLOPEN_SELF(
3842 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3843 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
3847 CPPFLAGS="$save_CPPFLAGS"
3848 LDFLAGS="$save_LDFLAGS"
3853 case $lt_cv_dlopen_self in
3854 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3855 *) enable_dlopen_self=unknown ;;
3858 case $lt_cv_dlopen_self_static in
3859 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3860 *) enable_dlopen_self_static=unknown ;;
3863 ])# AC_LIBTOOL_DLOPEN_SELF
3866 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
3867 # ---------------------------------
3868 # Check to see if options -c and -o are simultaneously supported by compiler
3869 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
3870 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
3871 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3872 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3873 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3874 $rm -r conftest 2>/dev/null
3878 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
3880 lt_compiler_flag="-o out/conftest2.$ac_objext"
3881 # Insert the option either (1) after the last *FLAGS variable, or
3882 # (2) before a word containing "conftest.", or (3) at the end.
3883 # Note that $ac_compile itself does not contain backslashes and begins
3884 # with a dollar sign (not a hyphen), so the echo should work correctly.
3885 lt_compile=`echo "$ac_compile" | $SED \
3886 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3887 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3888 -e 's:$: $lt_compiler_flag:'`
3889 (eval echo "\"configure:__oline__: $lt_compile\"" >&5)
3890 (eval "$lt_compile" 2>out/conftest.err)
3892 cat out/conftest.err >&5
3893 echo "configure:__oline__: \$? = $ac_status" >&5
3894 if (exit $ac_status) && test -s out/conftest2.$ac_objext
3896 # The compiler can only warn and ignore the option if not recognized
3897 # So say no if there are warnings
3898 $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
3899 $SED '/^$/d' out/conftest.err >out/conftest.er2
3900 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3901 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3906 # SGI C++ compiler will create directory out/ii_files/ for
3907 # template instantiation
3908 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
3909 $rm out/* && rmdir out
3914 ])# AC_LIBTOOL_PROG_CC_C_O
3917 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
3918 # -----------------------------------------
3919 # Check to see if we can do hard links to lock some files if needed
3920 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
3921 [AC_REQUIRE([_LT_AC_LOCK])dnl
3923 hard_links="nottested"
3924 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3925 # do not overwrite the value of need_locks provided by the user
3926 AC_MSG_CHECKING([if we can lock with hard links])
3929 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3931 ln conftest.a conftest.b 2>&5 || hard_links=no
3932 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3933 AC_MSG_RESULT([$hard_links])
3934 if test "$hard_links" = no; then
3935 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
3941 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
3946 AC_DEFUN([AC_LIBTOOL_OBJDIR],
3947 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3948 [rm -f .libs 2>/dev/null
3949 mkdir .libs 2>/dev/null
3950 if test -d .libs; then
3953 # MS-DOS does not allow filenames that begin with a dot.
3956 rmdir .libs 2>/dev/null])
3957 objdir=$lt_cv_objdir
3958 ])# AC_LIBTOOL_OBJDIR
3961 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
3962 # ----------------------------------------------
3963 # Check hardcoding attributes.
3964 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
3965 [AC_MSG_CHECKING([how to hardcode library paths into programs])
3966 _LT_AC_TAGVAR(hardcode_action, $1)=
3967 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
3968 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
3969 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3971 # We can hardcode non-existant directories.
3972 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
3973 # If the only mechanism to avoid hardcoding is shlibpath_var, we
3974 # have to relink, otherwise we might link with an installed library
3975 # when we should be linking with a yet-to-be-installed one
3976 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3977 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
3978 # Linking always hardcodes the temporary library directory.
3979 _LT_AC_TAGVAR(hardcode_action, $1)=relink
3981 # We can link without hardcoding, and we can hardcode nonexisting dirs.
3982 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
3985 # We cannot hardcode anything, or else we can only hardcode existing
3987 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
3989 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
3991 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
3992 # Fast installation is not supported
3993 enable_fast_install=no
3994 elif test "$shlibpath_overrides_runpath" = yes ||
3995 test "$enable_shared" = no; then
3996 # Fast installation is not necessary
3997 enable_fast_install=needless
3999 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
4002 # AC_LIBTOOL_SYS_LIB_STRIP
4003 # ------------------------
4004 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
4007 AC_MSG_CHECKING([whether stripping libraries is possible])
4008 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
4009 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
4010 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
4011 AC_MSG_RESULT([yes])
4013 # FIXME - insert some real tests, host_os isn't really good enough
4016 if test -n "$STRIP" ; then
4017 striplib="$STRIP -x"
4018 AC_MSG_RESULT([yes])
4028 ])# AC_LIBTOOL_SYS_LIB_STRIP
4031 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
4032 # -----------------------------
4033 # PORTME Fill in your ld.so characteristics
4034 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
4035 [AC_MSG_CHECKING([dynamic linker characteristics])
4037 libname_spec='lib$name'
4045 shlibpath_overrides_runpath=unknown
4047 dynamic_linker="$host_os ld.so"
4048 sys_lib_dlsearch_path_spec="/lib /usr/lib"
4049 if test "$GCC" = yes; then
4050 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
4051 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
4052 # if the path contains ";" then we assume it to be the separator
4053 # otherwise default to the standard path separator (i.e. ":") - it is
4054 # assumed that no part of a normal pathname contains ";" but that should
4055 # okay in the real world where ";" in dirpaths is itself problematic.
4056 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
4058 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4061 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
4063 need_lib_prefix=unknown
4064 hardcode_into_libs=no
4066 # when you set need_version to no, make sure it does not cause -set_version
4067 # flags to be left without arguments
4068 need_version=unknown
4073 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
4074 shlibpath_var=LIBPATH
4076 # AIX 3 has no versioning support, so we append a major version to the name.
4077 soname_spec='${libname}${release}${shared_ext}$major'
4084 hardcode_into_libs=yes
4085 if test "$host_cpu" = ia64; then
4086 # AIX 5 supports IA64
4087 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
4088 shlibpath_var=LD_LIBRARY_PATH
4090 # With GCC up to 2.95.x, collect2 would create an import file
4091 # for dependence libraries. The import file would start with
4092 # the line `#! .'. This would cause the generated library to
4093 # depend on `.', always an invalid library. This was fixed in
4094 # development snapshots of GCC prior to 3.0.
4096 aix4 | aix4.[[01]] | aix4.[[01]].*)
4097 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
4099 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
4106 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
4107 # soname into executable. Probably we can add versioning support to
4108 # collect2, so additional links can be useful in future.
4109 if test "$aix_use_runtimelinking" = yes; then
4110 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
4111 # instead of lib<name>.a to let people know that these are not
4112 # typical AIX shared libraries.
4113 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4115 # We preserve .a as extension for shared libraries through AIX4.2
4116 # and later when we are not doing run time linking.
4117 library_names_spec='${libname}${release}.a $libname.a'
4118 soname_spec='${libname}${release}${shared_ext}$major'
4120 shlibpath_var=LIBPATH
4125 library_names_spec='$libname.ixlibrary $libname.a'
4126 # Create ${libname}_ixlibrary.a entries in /sys/libs.
4127 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
4131 library_names_spec='${libname}${shared_ext}'
4132 dynamic_linker="$host_os ld.so"
4133 shlibpath_var=LIBRARY_PATH
4139 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4140 soname_spec='${libname}${release}${shared_ext}$major'
4141 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
4142 shlibpath_var=LD_LIBRARY_PATH
4143 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
4144 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
4145 # the default ld.so.conf also contains /usr/contrib/lib and
4146 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
4147 # libtool to hard-code these into programs
4150 cygwin* | mingw* | pw32*)
4151 version_type=windows
4156 case $GCC,$host_os in
4157 yes,cygwin* | yes,mingw* | yes,pw32*)
4158 library_names_spec='$libname.dll.a'
4159 # DLL is installed to $(libdir)/../bin by postinstall_cmds
4160 postinstall_cmds='base_file=`basename \${file}`~
4161 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
4162 dldir=$destdir/`dirname \$dlpath`~
4163 test -d \$dldir || mkdir -p \$dldir~
4164 $install_prog $dir/$dlname \$dldir/$dlname~
4165 chmod a+x \$dldir/$dlname'
4166 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4167 dlpath=$dir/\$dldll~
4169 shlibpath_overrides_runpath=yes
4173 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
4174 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4175 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
4178 # MinGW DLLs use traditional 'lib' prefix
4179 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4180 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
4181 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
4182 # It is most probably a Windows format PATH printed by
4183 # mingw gcc, but we are running on Cygwin. Gcc prints its search
4184 # path with ; separators, and with drive letters. We can handle the
4185 # drive letters (cygwin fileutils understands them), so leave them,
4186 # especially as we might pass files found there to a mingw objdump,
4187 # which wouldn't understand a cygwinified path. Ahh.
4188 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
4190 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
4194 # pw32 DLLs use 'pw' prefix rather than 'lib'
4195 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4201 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
4204 dynamic_linker='Win32 ld.exe'
4205 # FIXME: first we should search . and the directory the executable is in
4209 darwin* | rhapsody*)
4210 dynamic_linker="$host_os dyld"
4214 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
4215 soname_spec='${libname}${release}${major}$shared_ext'
4216 shlibpath_overrides_runpath=yes
4217 shlibpath_var=DYLD_LIBRARY_PATH
4218 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
4219 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
4220 if test "$GCC" = yes; then
4221 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
4223 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
4225 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
4232 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
4233 soname_spec='${libname}${release}${shared_ext}$major'
4234 shlibpath_var=LD_LIBRARY_PATH
4245 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4246 soname_spec='${libname}${release}${shared_ext}$major'
4247 shlibpath_var=LD_LIBRARY_PATH
4248 shlibpath_overrides_runpath=no
4249 hardcode_into_libs=yes
4250 dynamic_linker='GNU ld.so'
4253 freebsd* | dragonfly*)
4254 # DragonFly does not have aout. When/if they implement a new
4255 # versioning mechanism, adjust this.
4256 if test -x /usr/bin/objformat; then
4257 objformat=`/usr/bin/objformat`
4260 freebsd[[123]]*) objformat=aout ;;
4264 version_type=freebsd-$objformat
4265 case $version_type in
4267 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4272 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
4276 shlibpath_var=LD_LIBRARY_PATH
4279 shlibpath_overrides_runpath=yes
4281 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
4282 shlibpath_overrides_runpath=yes
4283 hardcode_into_libs=yes
4286 shlibpath_overrides_runpath=no
4287 hardcode_into_libs=yes
4296 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4297 soname_spec='${libname}${release}${shared_ext}$major'
4298 shlibpath_var=LD_LIBRARY_PATH
4299 hardcode_into_libs=yes
4302 hpux9* | hpux10* | hpux11*)
4303 # Give a soname corresponding to the major version so that dld.sl refuses to
4304 # link against other versions.
4311 hardcode_into_libs=yes
4312 dynamic_linker="$host_os dld.so"
4313 shlibpath_var=LD_LIBRARY_PATH
4314 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4315 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4316 soname_spec='${libname}${release}${shared_ext}$major'
4317 if test "X$HPUX_IA64_MODE" = X32; then
4318 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4320 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4322 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4326 hardcode_into_libs=yes
4327 dynamic_linker="$host_os dld.sl"
4328 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4329 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4330 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4331 soname_spec='${libname}${release}${shared_ext}$major'
4332 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4333 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4337 dynamic_linker="$host_os dld.sl"
4338 shlibpath_var=SHLIB_PATH
4339 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4340 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4341 soname_spec='${libname}${release}${shared_ext}$major'
4344 # HP-UX runs *really* slowly unless shared libraries are mode 555.
4345 postinstall_cmds='chmod 555 $lib'
4348 irix5* | irix6* | nonstopux*)
4350 nonstopux*) version_type=nonstopux ;;
4352 if test "$lt_cv_prog_gnu_ld" = yes; then
4360 soname_spec='${libname}${release}${shared_ext}$major'
4361 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
4363 irix5* | nonstopux*)
4367 case $LD in # libtool.m4 will add one of these switches to LD
4368 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4369 libsuff= shlibsuff= libmagic=32-bit;;
4370 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4371 libsuff=32 shlibsuff=N32 libmagic=N32;;
4372 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4373 libsuff=64 shlibsuff=64 libmagic=64-bit;;
4374 *) libsuff= shlibsuff= libmagic=never-match;;
4378 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4379 shlibpath_overrides_runpath=no
4380 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4381 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4382 hardcode_into_libs=yes
4385 # No shared lib support for Linux oldld, aout, or coff.
4386 linux*oldld* | linux*aout* | linux*coff*)
4390 # This must be Linux ELF.
4395 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4396 soname_spec='${libname}${release}${shared_ext}$major'
4397 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4398 shlibpath_var=LD_LIBRARY_PATH
4399 shlibpath_overrides_runpath=no
4400 # This implies no fast_install, which is unacceptable.
4401 # Some rework will be needed to allow for fast_install
4402 # before this can be enabled.
4403 hardcode_into_libs=yes
4405 # find out which ABI we are using
4408 x86_64*|s390x*|powerpc64*)
4409 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
4410 if AC_TRY_EVAL(ac_compile); then
4411 case `/usr/bin/file conftest.$ac_objext` in
4414 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
4422 # Append ld.so.conf contents to the search path
4423 if test -f /etc/ld.so.conf; then
4424 lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
4425 sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
4428 # We used to test for /lib/ld.so.1 and disable shared libraries on
4429 # powerpc, because MkLinux only supported shared libraries with the
4430 # GNU dynamic linker. Since this was broken with cross compilers,
4431 # most powerpc-linux boxes support dynamic linking these days and
4432 # people can always --disable-shared, the test was removed, and we
4433 # assume the GNU/Linux dynamic linker is in use.
4434 dynamic_linker='GNU/Linux ld.so'
4441 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4442 soname_spec='${libname}${release}${shared_ext}$major'
4443 shlibpath_var=LD_LIBRARY_PATH
4444 shlibpath_overrides_runpath=no
4445 hardcode_into_libs=yes
4446 dynamic_linker='GNU ld.so'
4453 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4454 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4455 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4456 dynamic_linker='NetBSD (a.out) ld.so'
4458 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4459 soname_spec='${libname}${release}${shared_ext}$major'
4460 dynamic_linker='NetBSD ld.elf_so'
4462 shlibpath_var=LD_LIBRARY_PATH
4463 shlibpath_overrides_runpath=yes
4464 hardcode_into_libs=yes
4469 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4470 shlibpath_var=LD_LIBRARY_PATH
4471 shlibpath_overrides_runpath=yes
4478 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4479 soname_spec='${libname}${release}${shared_ext}$major'
4480 shlibpath_var=LD_LIBRARY_PATH
4481 shlibpath_overrides_runpath=yes
4487 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4489 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
4490 *) need_version=no ;;
4492 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4493 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4494 shlibpath_var=LD_LIBRARY_PATH
4495 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4497 openbsd2.[[89]] | openbsd2.[[89]].*)
4498 shlibpath_overrides_runpath=no
4501 shlibpath_overrides_runpath=yes
4505 shlibpath_overrides_runpath=yes
4510 libname_spec='$name'
4513 library_names_spec='$libname${shared_ext} $libname.a'
4514 dynamic_linker='OS/2 ld.exe'
4515 shlibpath_var=LIBPATH
4518 osf3* | osf4* | osf5*)
4522 soname_spec='${libname}${release}${shared_ext}$major'
4523 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4524 shlibpath_var=LD_LIBRARY_PATH
4525 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4526 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4531 soname_spec='${libname}${release}${shared_ext}$major'
4532 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4533 shlibpath_var=LD_LIBRARY_PATH
4540 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4541 soname_spec='${libname}${release}${shared_ext}$major'
4542 shlibpath_var=LD_LIBRARY_PATH
4543 shlibpath_overrides_runpath=yes
4544 hardcode_into_libs=yes
4545 # ldd complains unless libraries are executable
4546 postinstall_cmds='chmod +x $lib'
4551 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4552 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4553 shlibpath_var=LD_LIBRARY_PATH
4554 shlibpath_overrides_runpath=yes
4555 if test "$with_gnu_ld" = yes; then
4561 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4563 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4564 soname_spec='${libname}${release}${shared_ext}$major'
4565 shlibpath_var=LD_LIBRARY_PATH
4566 case $host_vendor in
4568 shlibpath_overrides_runpath=no
4570 export_dynamic_flag_spec='${wl}-Blargedynsym'
4571 runpath_var=LD_RUN_PATH
4579 shlibpath_overrides_runpath=no
4580 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4586 if test -d /usr/nec ;then
4588 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4589 soname_spec='$libname${shared_ext}.$major'
4590 shlibpath_var=LD_LIBRARY_PATH
4596 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4597 soname_spec='${libname}${release}${shared_ext}$major'
4598 shlibpath_var=LD_LIBRARY_PATH
4605 AC_MSG_RESULT([$dynamic_linker])
4606 test "$dynamic_linker" = no && can_build_shared=no
4607 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
4612 AC_DEFUN([_LT_AC_TAGCONFIG],
4613 [AC_ARG_WITH([tags],
4614 [ --with-tags[=TAGS] include additional configurations [automatic]
4616 [tagnames="$withval"])
4618 if test -f "$ltmain" && test -n "$tagnames"; then
4619 if test ! -f "${ofile}"; then
4620 AC_MSG_WARN([output file \`$ofile' does not exist])
4623 if test -z "$LTCC"; then
4624 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
4625 if test -z "$LTCC"; then
4626 AC_MSG_WARN([output file \`$ofile' does not look like a libtool script])
4628 AC_MSG_WARN([using \`LTCC=$LTCC', extracted from \`$ofile'])
4632 # Extract list of available tagged configurations in $ofile.
4633 # Note that this assumes the entire list is on one line.
4634 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
4636 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4637 for tagname in $tagnames; do
4639 # Check whether tagname contains only valid characters
4640 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
4642 *) AC_MSG_ERROR([invalid tag name: $tagname])
4646 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
4648 AC_MSG_ERROR([tag name \"$tagname\" already exists])
4651 # Update the list of available tags.
4652 if test -n "$tagname"; then
4653 echo appending configuration tag \"$tagname\" to $ofile
4657 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
4658 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
4659 (test "X$CXX" != "Xg++"))) ; then
4660 AC_LIBTOOL_LANG_CXX_CONFIG
4667 # if test -n "$F77" && test "X$F77" != "Xno"; then
4668 # AC_LIBTOOL_LANG_F77_CONFIG
4675 # if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
4676 # AC_LIBTOOL_LANG_GCJ_CONFIG
4683 # AC_LIBTOOL_LANG_RC_CONFIG
4687 AC_MSG_ERROR([Unsupported tag name: $tagname])
4691 # Append the new tag name to the list of available tags.
4692 if test -n "$tagname" ; then
4693 available_tags="$available_tags $tagname"
4699 # Now substitute the updated list of available tags.
4700 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
4701 mv "${ofile}T" "$ofile"
4705 AC_MSG_ERROR([unable to update list of available tagged configurations.])
4708 ])# _LT_AC_TAGCONFIG
4713 # enable checks for dlopen support
4714 AC_DEFUN([AC_LIBTOOL_DLOPEN],
4715 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
4716 ])# AC_LIBTOOL_DLOPEN
4719 # AC_LIBTOOL_WIN32_DLL
4720 # --------------------
4721 # declare package support for building win32 DLLs
4722 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
4723 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
4724 ])# AC_LIBTOOL_WIN32_DLL
4727 # AC_ENABLE_SHARED([DEFAULT])
4728 # ---------------------------
4729 # implement the --enable-shared flag
4730 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
4731 AC_DEFUN([AC_ENABLE_SHARED],
4732 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
4733 AC_ARG_ENABLE([shared],
4734 changequote(<<, >>)dnl
4735 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
4736 changequote([, ])dnl
4737 [p=${PACKAGE-default}
4739 yes) enable_shared=yes ;;
4740 no) enable_shared=no ;;
4743 # Look at the argument we got. We use all the common list separators.
4744 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4745 for pkg in $enableval; do
4747 if test "X$pkg" = "X$p"; then
4754 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
4755 ])# AC_ENABLE_SHARED
4760 #- set the default shared flag to --disable-shared
4761 AC_DEFUN([AC_DISABLE_SHARED],
4762 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4763 AC_ENABLE_SHARED(no)
4764 ])# AC_DISABLE_SHARED
4767 # AC_ENABLE_STATIC([DEFAULT])
4768 # ---------------------------
4769 # implement the --enable-static flag
4770 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
4771 AC_DEFUN([AC_ENABLE_STATIC],
4772 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
4773 AC_ARG_ENABLE([static],
4774 changequote(<<, >>)dnl
4775 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
4776 changequote([, ])dnl
4777 [p=${PACKAGE-default}
4779 yes) enable_static=yes ;;
4780 no) enable_static=no ;;
4783 # Look at the argument we got. We use all the common list separators.
4784 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4785 for pkg in $enableval; do
4787 if test "X$pkg" = "X$p"; then
4794 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
4795 ])# AC_ENABLE_STATIC
4800 # set the default static flag to --disable-static
4801 AC_DEFUN([AC_DISABLE_STATIC],
4802 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4803 AC_ENABLE_STATIC(no)
4804 ])# AC_DISABLE_STATIC
4807 # AC_ENABLE_FAST_INSTALL([DEFAULT])
4808 # ---------------------------------
4809 # implement the --enable-fast-install flag
4810 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
4811 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
4812 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
4813 AC_ARG_ENABLE([fast-install],
4814 changequote(<<, >>)dnl
4815 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
4816 changequote([, ])dnl
4817 [p=${PACKAGE-default}
4819 yes) enable_fast_install=yes ;;
4820 no) enable_fast_install=no ;;
4822 enable_fast_install=no
4823 # Look at the argument we got. We use all the common list separators.
4824 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4825 for pkg in $enableval; do
4827 if test "X$pkg" = "X$p"; then
4828 enable_fast_install=yes
4834 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
4835 ])# AC_ENABLE_FAST_INSTALL
4838 # AC_DISABLE_FAST_INSTALL
4839 # -----------------------
4840 # set the default to --disable-fast-install
4841 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
4842 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4843 AC_ENABLE_FAST_INSTALL(no)
4844 ])# AC_DISABLE_FAST_INSTALL
4847 # AC_LIBTOOL_PICMODE([MODE])
4848 # --------------------------
4849 # implement the --with-pic flag
4850 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
4851 AC_DEFUN([AC_LIBTOOL_PICMODE],
4852 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4853 pic_mode=ifelse($#,1,$1,default)
4854 ])# AC_LIBTOOL_PICMODE
4859 # This is predefined starting with Autoconf 2.54, so this conditional
4860 # definition can be removed once we require Autoconf 2.54 or later.
4861 ifdef([AC_PROG_EGREP], [], [AC_DEFUN([AC_PROG_EGREP],
4862 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
4863 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
4864 then ac_cv_prog_egrep='grep -E'
4865 else ac_cv_prog_egrep='egrep'
4867 EGREP=$ac_cv_prog_egrep
4872 # AC_PATH_TOOL_PREFIX
4873 # -------------------
4874 # find a file program which can recognise shared library
4875 AC_DEFUN([AC_PATH_TOOL_PREFIX],
4876 [AC_REQUIRE([AC_PROG_EGREP])dnl
4877 AC_MSG_CHECKING([for $1])
4878 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4880 [[\\/*] | ?:[\\/]*])
4881 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4884 lt_save_MAGIC_CMD="$MAGIC_CMD"
4885 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4886 dnl $ac_dummy forces splitting on constant user-supplied paths.
4887 dnl POSIX.2 word splitting is done only on the output of word expansions,
4888 dnl not every word. This closes a longstanding sh security hole.
4889 ac_dummy="ifelse([$2], , $PATH, [$2])"
4890 for ac_dir in $ac_dummy; do
4892 test -z "$ac_dir" && ac_dir=.
4893 if test -f $ac_dir/$1; then
4894 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4895 if test -n "$file_magic_test_file"; then
4896 case $deplibs_check_method in
4898 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
4899 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4900 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4901 $EGREP "$file_magic_regex" > /dev/null; then
4906 *** Warning: the command libtool uses to detect shared libraries,
4907 *** $file_magic_cmd, produces output that libtool cannot recognize.
4908 *** The result is that libtool may fail to recognize shared libraries
4909 *** as such. This will affect the creation of libtool libraries that
4910 *** depend on shared libraries, but programs linked with such libtool
4911 *** libraries will work regardless of this problem. Nevertheless, you
4912 *** may want to report the problem to your system manager and/or to
4913 *** bug-libtool@gnu.org
4923 MAGIC_CMD="$lt_save_MAGIC_CMD"
4926 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4927 if test -n "$MAGIC_CMD"; then
4928 AC_MSG_RESULT($MAGIC_CMD)
4932 ])# AC_PATH_TOOL_PREFIX
4937 # find a file program which can recognise a shared library
4938 AC_DEFUN([AC_PATH_MAGIC],
4939 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4940 if test -z "$lt_cv_path_MAGIC_CMD"; then
4941 if test -n "$ac_tool_prefix"; then
4942 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4952 # find the pathname to the GNU or non-GNU linker
4953 AC_DEFUN([AC_PROG_LD],
4954 [AC_ARG_WITH([gnu-ld],
4955 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
4956 [test "$withval" = no || with_gnu_ld=yes],
4958 AC_REQUIRE([LT_AC_PROG_SED])dnl
4959 AC_REQUIRE([AC_PROG_CC])dnl
4960 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4961 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4963 if test "$GCC" = yes; then
4964 # Check if gcc -print-prog-name=ld gives a path.
4965 AC_MSG_CHECKING([for ld used by $CC])
4968 # gcc leaves a trailing carriage return which upsets mingw
4969 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4971 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4974 # Accept absolute paths.
4975 [[\\/]]* | ?:[[\\/]]*)
4976 re_direlt='/[[^/]][[^/]]*/\.\./'
4977 # Canonicalize the pathname of ld
4978 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
4979 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4980 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
4982 test -z "$LD" && LD="$ac_prog"
4985 # If it fails, then pretend we aren't using GCC.
4989 # If it is relative, then search for the first ld in PATH.
4993 elif test "$with_gnu_ld" = yes; then
4994 AC_MSG_CHECKING([for GNU ld])
4996 AC_MSG_CHECKING([for non-GNU ld])
4998 AC_CACHE_VAL(lt_cv_path_LD,
4999 [if test -z "$LD"; then
5000 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5001 for ac_dir in $PATH; do
5003 test -z "$ac_dir" && ac_dir=.
5004 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5005 lt_cv_path_LD="$ac_dir/$ac_prog"
5006 # Check to see if the program is GNU ld. I'd rather use --version,
5007 # but apparently some variants of GNU ld only accept -v.
5008 # Break only if it was the GNU/non-GNU ld that we prefer.
5009 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5010 *GNU* | *'with BFD'*)
5011 test "$with_gnu_ld" != no && break
5014 test "$with_gnu_ld" != yes && break
5021 lt_cv_path_LD="$LD" # Let the user override the test with a path.
5024 if test -n "$LD"; then
5029 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
5036 AC_DEFUN([AC_PROG_LD_GNU],
5037 [AC_REQUIRE([AC_PROG_EGREP])dnl
5038 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
5039 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
5040 case `$LD -v 2>&1 </dev/null` in
5041 *GNU* | *'with BFD'*)
5042 lt_cv_prog_gnu_ld=yes
5045 lt_cv_prog_gnu_ld=no
5048 with_gnu_ld=$lt_cv_prog_gnu_ld
5052 # AC_PROG_LD_RELOAD_FLAG
5053 # ----------------------
5054 # find reload flag for linker
5055 # -- PORTME Some linkers may need a different reload flag.
5056 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
5057 [AC_CACHE_CHECK([for $LD option to reload object files],
5058 lt_cv_ld_reload_flag,
5059 [lt_cv_ld_reload_flag='-r'])
5060 reload_flag=$lt_cv_ld_reload_flag
5061 case $reload_flag in
5063 *) reload_flag=" $reload_flag" ;;
5065 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5068 if test "$GCC" = yes; then
5069 reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
5071 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5075 ])# AC_PROG_LD_RELOAD_FLAG
5078 # AC_DEPLIBS_CHECK_METHOD
5079 # -----------------------
5080 # how to check for library dependencies
5081 # -- PORTME fill in with the dynamic library characteristics
5082 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
5083 [AC_CACHE_CHECK([how to recognise dependent libraries],
5084 lt_cv_deplibs_check_method,
5085 [lt_cv_file_magic_cmd='$MAGIC_CMD'
5086 lt_cv_file_magic_test_file=
5087 lt_cv_deplibs_check_method='unknown'
5088 # Need to set the preceding variable on all platforms that support
5089 # interlibrary dependencies.
5090 # 'none' -- dependencies not supported.
5091 # `unknown' -- same as none, but documents that we really don't know.
5092 # 'pass_all' -- all dependencies passed with no checks.
5093 # 'test_compile' -- check by making test program.
5094 # 'file_magic [[regex]]' -- check by looking for files in library path
5095 # which responds to the $file_magic_cmd with a given extended regex.
5096 # If you have `file' or equivalent on your system and you're not sure
5097 # whether `pass_all' will *always* work, you probably want this one.
5101 lt_cv_deplibs_check_method=pass_all
5105 lt_cv_deplibs_check_method=pass_all
5109 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
5110 lt_cv_file_magic_cmd='/usr/bin/file -L'
5111 lt_cv_file_magic_test_file=/shlib/libc.so
5115 # func_win32_libid is a shell function defined in ltmain.sh
5116 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5117 lt_cv_file_magic_cmd='func_win32_libid'
5121 # Base MSYS/MinGW do not provide the 'file' command needed by
5122 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
5123 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
5124 lt_cv_file_magic_cmd='$OBJDUMP -f'
5127 darwin* | rhapsody*)
5128 lt_cv_deplibs_check_method=pass_all
5131 freebsd* | kfreebsd*-gnu | dragonfly*)
5132 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5135 # Not sure whether the presence of OpenBSD here was a mistake.
5136 # Let's accept both of them until this is cleared up.
5137 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
5138 lt_cv_file_magic_cmd=/usr/bin/file
5139 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5143 lt_cv_deplibs_check_method=pass_all
5148 lt_cv_deplibs_check_method=pass_all
5151 hpux10.20* | hpux11*)
5152 lt_cv_file_magic_cmd=/usr/bin/file
5155 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
5156 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5159 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
5160 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5163 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
5164 lt_cv_file_magic_test_file=/usr/lib/libc.sl
5169 irix5* | irix6* | nonstopux*)
5171 *-32|*"-32 ") libmagic=32-bit;;
5172 *-n32|*"-n32 ") libmagic=N32;;
5173 *-64|*"-64 ") libmagic=64-bit;;
5174 *) libmagic=never-match;;
5176 lt_cv_deplibs_check_method=pass_all
5179 # This must be Linux ELF.
5181 lt_cv_deplibs_check_method=pass_all
5185 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
5186 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5188 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
5193 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
5194 lt_cv_file_magic_cmd=/usr/bin/file
5195 lt_cv_file_magic_test_file=/usr/lib/libnls.so
5199 lt_cv_deplibs_check_method=unknown
5203 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5204 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
5206 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5210 osf3* | osf4* | osf5*)
5211 lt_cv_deplibs_check_method=pass_all
5215 lt_cv_deplibs_check_method=pass_all
5219 lt_cv_deplibs_check_method=pass_all
5222 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5223 case $host_vendor in
5225 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]]'
5226 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5229 lt_cv_deplibs_check_method=pass_all
5232 lt_cv_file_magic_cmd='/bin/file'
5233 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
5236 lt_cv_file_magic_cmd='/bin/file'
5237 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
5238 lt_cv_file_magic_test_file=/lib/libc.so
5241 lt_cv_deplibs_check_method=pass_all
5246 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
5247 lt_cv_deplibs_check_method=pass_all
5251 file_magic_cmd=$lt_cv_file_magic_cmd
5252 deplibs_check_method=$lt_cv_deplibs_check_method
5253 test -z "$deplibs_check_method" && deplibs_check_method=unknown
5254 ])# AC_DEPLIBS_CHECK_METHOD
5259 # find the pathname to a BSD-compatible name lister
5260 AC_DEFUN([AC_PROG_NM],
5261 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
5262 [if test -n "$NM"; then
5263 # Let the user override the test.
5266 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5267 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
5269 test -z "$ac_dir" && ac_dir=.
5270 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
5271 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5272 # Check to see if the nm accepts a BSD-compat flag.
5273 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
5274 # nm: unknown option "B" ignored
5275 # Tru64's nm complains that /dev/null is an invalid object file
5276 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5277 */dev/null* | *'Invalid file or object type'*)
5278 lt_cv_path_NM="$tmp_nm -B"
5282 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5284 lt_cv_path_NM="$tmp_nm -p"
5288 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5289 continue # so that we can try to find one that supports BSD flags
5296 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
5304 # check for math library
5305 AC_DEFUN([AC_CHECK_LIBM],
5306 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
5309 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
5310 # These system don't have libm, or don't need it
5313 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
5314 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
5317 AC_CHECK_LIB(m, cos, LIBM="-lm")
5323 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
5324 # -----------------------------------
5325 # sets LIBLTDL to the link flags for the libltdl convenience library and
5326 # LTDLINCL to the include flags for the libltdl header and adds
5327 # --enable-ltdl-convenience to the configure arguments. Note that
5328 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
5329 # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
5330 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
5331 # (note the single quotes!). If your package is not flat and you're not
5332 # using automake, define top_builddir and top_srcdir appropriately in
5334 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
5335 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
5336 case $enable_ltdl_convenience in
5337 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
5338 "") enable_ltdl_convenience=yes
5339 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
5341 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
5342 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
5343 # For backwards non-gettext consistent compatibility...
5345 ])# AC_LIBLTDL_CONVENIENCE
5348 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
5349 # -----------------------------------
5350 # sets LIBLTDL to the link flags for the libltdl installable library and
5351 # LTDLINCL to the include flags for the libltdl header and adds
5352 # --enable-ltdl-install to the configure arguments. Note that
5353 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
5354 # and an installed libltdl is not found, it is assumed to be `libltdl'.
5355 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
5356 # '${top_srcdir}/' (note the single quotes!). If your package is not
5357 # flat and you're not using automake, define top_builddir and top_srcdir
5358 # appropriately in the Makefiles.
5359 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
5360 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
5361 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
5362 AC_CHECK_LIB(ltdl, lt_dlinit,
5363 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
5364 [if test x"$enable_ltdl_install" = xno; then
5365 AC_MSG_WARN([libltdl not installed, but installation disabled])
5367 enable_ltdl_install=yes
5370 if test x"$enable_ltdl_install" = x"yes"; then
5371 ac_configure_args="$ac_configure_args --enable-ltdl-install"
5372 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
5373 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
5375 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
5379 # For backwards non-gettext consistent compatibility...
5381 ])# AC_LIBLTDL_INSTALLABLE
5386 # enable support for C++ libraries
5387 AC_DEFUN([AC_LIBTOOL_CXX],
5388 [AC_REQUIRE([_LT_AC_LANG_CXX])
5394 AC_DEFUN([_LT_AC_LANG_CXX],
5395 [AC_REQUIRE([AC_PROG_CXX])
5396 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
5397 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
5400 # _LT_AC_PROG_CXXCPP
5402 AC_DEFUN([_LT_AC_PROG_CXXCPP],
5404 AC_REQUIRE([AC_PROG_CXX])
5405 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5406 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5407 (test "X$CXX" != "Xg++"))) ; then
5410 ])# _LT_AC_PROG_CXXCPP
5414 # enable support for Fortran 77 libraries
5415 #AC_DEFUN([AC_LIBTOOL_F77],
5416 #[AC_REQUIRE([_LT_AC_LANG_F77])
5422 #AC_DEFUN([_LT_AC_LANG_F77],
5423 #[AC_REQUIRE([AC_PROG_F77])
5424 #_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
5425 #])# _LT_AC_LANG_F77
5430 # enable support for GCJ libraries
5431 #AC_DEFUN([AC_LIBTOOL_GCJ],
5432 #[AC_REQUIRE([_LT_AC_LANG_GCJ])
5438 #AC_DEFUN([_LT_AC_LANG_GCJ],
5439 #[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
5440 # [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
5441 # [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
5442 # [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
5443 # [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
5444 # [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
5445 #_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
5446 #])# _LT_AC_LANG_GCJ
5451 # enable support for Windows resource files
5452 #AC_DEFUN([AC_LIBTOOL_RC],
5453 #[AC_REQUIRE([LT_AC_PROG_RC])
5454 #_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
5458 # AC_LIBTOOL_LANG_C_CONFIG
5459 # ------------------------
5460 # Ensure that the configuration vars for the C compiler are
5461 # suitably defined. Those variables are subsequently used by
5462 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5463 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
5464 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
5469 # Source file extension for C test sources.
5472 # Object file extension for compiled C test sources.
5474 _LT_AC_TAGVAR(objext, $1)=$objext
5476 # Code to be used in simple compile tests
5477 lt_simple_compile_test_code="int some_variable = 0;\n"
5479 # Code to be used in simple link tests
5480 lt_simple_link_test_code='int main(){return(0);}\n'
5484 # save warnings/boilerplate of simple test code
5485 _LT_COMPILER_BOILERPLATE
5486 _LT_LINKER_BOILERPLATE
5489 # Check for any special shared library compilation flags.
5491 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
5492 if test "$GCC" = no; then
5495 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
5499 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
5500 AC_MSG_WARN([\`$CC' requires \`$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
5501 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
5503 AC_MSG_WARN([add \`$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
5504 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
5510 # Check to make sure the static flag actually works.
5512 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
5513 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
5514 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
5516 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
5520 ## There is no encapsulation within the following macros, do not change
5521 ## the running order or otherwise move them around unless you know exactly
5522 ## what you are doing...
5523 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5524 AC_LIBTOOL_PROG_COMPILER_PIC($1)
5525 AC_LIBTOOL_PROG_CC_C_O($1)
5526 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5527 AC_LIBTOOL_PROG_LD_SHLIBS($1)
5528 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5529 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5530 AC_LIBTOOL_SYS_LIB_STRIP
5531 AC_LIBTOOL_DLOPEN_SELF($1)
5533 # Report which librarie types wil actually be built
5534 AC_MSG_CHECKING([if libtool supports shared libraries])
5535 AC_MSG_RESULT([$can_build_shared])
5537 AC_MSG_CHECKING([whether to build shared libraries])
5538 test "$can_build_shared" = "no" && enable_shared=no
5540 # On AIX, shared libraries and static libraries use the same namespace, and
5541 # are all built from PIC.
5544 test "$enable_shared" = yes && enable_static=no
5545 if test -n "$RANLIB"; then
5546 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5547 postinstall_cmds='$RANLIB $lib'
5552 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5553 test "$enable_shared" = yes && enable_static=no
5557 AC_MSG_RESULT([$enable_shared])
5559 AC_MSG_CHECKING([whether to build static libraries])
5560 # Make sure either enable_shared or enable_static is yes.
5561 test "$enable_shared" = yes || enable_static=yes
5562 AC_MSG_RESULT([$enable_static])
5564 AC_LIBTOOL_CONFIG($1)
5568 ])# AC_LIBTOOL_LANG_C_CONFIG
5571 # AC_LIBTOOL_LANG_CXX_CONFIG
5572 # --------------------------
5573 # Ensure that the configuration vars for the C compiler are
5574 # suitably defined. Those variables are subsequently used by
5575 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5576 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
5577 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
5580 AC_REQUIRE([AC_PROG_CXX])
5581 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
5583 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5584 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5585 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5586 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5587 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5588 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5589 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5590 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5591 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5592 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5593 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5594 _LT_AC_TAGVAR(module_cmds, $1)=
5595 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5596 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5597 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5598 _LT_AC_TAGVAR(no_undefined_flag, $1)=
5599 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5600 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5602 # Dependencies to place before and after the object being linked:
5603 _LT_AC_TAGVAR(predep_objects, $1)=
5604 _LT_AC_TAGVAR(postdep_objects, $1)=
5605 _LT_AC_TAGVAR(predeps, $1)=
5606 _LT_AC_TAGVAR(postdeps, $1)=
5607 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
5609 # Source file extension for C++ test sources.
5612 # Object file extension for compiled C++ test sources.
5614 _LT_AC_TAGVAR(objext, $1)=$objext
5616 # Code to be used in simple compile tests
5617 lt_simple_compile_test_code="int some_variable = 0;\n"
5619 # Code to be used in simple link tests
5620 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
5622 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5625 # save warnings/boilerplate of simple test code
5626 _LT_COMPILER_BOILERPLATE
5627 _LT_LINKER_BOILERPLATE
5629 # Allow CC to be a program name with arguments.
5634 lt_save_with_gnu_ld=$with_gnu_ld
5635 lt_save_path_LD=$lt_cv_path_LD
5636 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5637 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5639 unset lt_cv_prog_gnu_ld
5641 if test -n "${lt_cv_path_LDCXX+set}"; then
5642 lt_cv_path_LD=$lt_cv_path_LDCXX
5646 test -z "${LDCXX+set}" || LD=$LDCXX
5649 _LT_AC_TAGVAR(compiler, $1)=$CC
5650 _LT_CC_BASENAME([$compiler])
5652 # We don't want -fno-exception wen compiling C++ code, so set the
5653 # no_builtin_flag separately
5654 if test "$GXX" = yes; then
5655 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5657 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5660 if test "$GXX" = yes; then
5661 # Set up default GNU C++ configuration
5665 # Check if GNU C++ uses GNU ld as the underlying linker, since the
5666 # archiving commands below assume that GNU ld is being used.
5667 if test "$with_gnu_ld" = yes; then
5668 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5669 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5671 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5672 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5674 # If archive_cmds runs LD, not CC, wlarc should be empty
5675 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5676 # investigate it a little bit more. (MM)
5679 # ancient GNU ld didn't support --whole-archive et. al.
5680 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
5681 grep 'no-whole-archive' > /dev/null; then
5682 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5684 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5690 # A generic and very simple default shared library creation
5691 # command for GNU C++ for the case where it uses the native
5692 # linker, instead of GNU ld. If possible, this setting should
5693 # overridden to take advantage of the native linker features on
5694 # the platform it is being used on.
5695 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5698 # Commands to make compiler produce verbose output that lists
5699 # what "hidden" libraries, object files and flags are used when
5700 # linking a shared library.
5701 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5709 # PORTME: fill in a description of your system's C++ link characteristics
5710 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5711 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5714 # FIXME: insert proper C++ library support
5715 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5718 if test "$host_cpu" = ia64; then
5719 # On IA64, the linker does run time linking by default, so we don't
5720 # have to do anything special.
5721 aix_use_runtimelinking=no
5722 exp_sym_flag='-Bexport'
5725 aix_use_runtimelinking=no
5727 # Test if we are trying to use run time linking or normal
5728 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5729 # need to do runtime linking.
5730 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5731 for ld_flag in $LDFLAGS; do
5734 aix_use_runtimelinking=yes
5741 exp_sym_flag='-bexport'
5742 no_entry_flag='-bnoentry'
5745 # When large executables or shared objects are built, AIX ld can
5746 # have problems creating the table of contents. If linking a library
5747 # or program results in "error TOC overflow" add -mminimal-toc to
5748 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5749 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5751 _LT_AC_TAGVAR(archive_cmds, $1)=''
5752 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5753 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5754 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5756 if test "$GXX" = yes; then
5757 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5758 # We only want to do this on AIX 4.2 and lower, the check
5759 # below for broken collect2 doesn't work under 4.3+
5760 collect2name=`${CC} -print-prog-name=collect2`
5761 if test -f "$collect2name" && \
5762 strings "$collect2name" | grep resolve_lib_name >/dev/null
5764 # We have reworked collect2
5765 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5767 # We have old collect2
5768 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5769 # It fails to find uninstalled libraries when the uninstalled
5770 # path is not listed in the libpath. Setting hardcode_minus_L
5771 # to unsupported forces relinking
5772 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5773 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5774 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5777 shared_flag='-shared'
5778 if test "$aix_use_runtimelinking" = yes; then
5779 shared_flag="$shared_flag "'${wl}-G'
5783 if test "$host_cpu" = ia64; then
5784 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5785 # chokes on -Wl,-G. The following line is correct:
5788 if test "$aix_use_runtimelinking" = yes; then
5789 shared_flag='${wl}-G'
5791 shared_flag='${wl}-bM:SRE'
5796 # It seems that -bexpall does not export symbols beginning with
5797 # underscore (_), so it is better to generate a list of symbols to export.
5798 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5799 if test "$aix_use_runtimelinking" = yes; then
5800 # Warning - without using the other runtime loading flags (-brtl),
5801 # -berok will link without error, but may produce a broken library.
5802 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5803 # Determine the default libpath from the value encoded in an empty executable.
5804 _LT_AC_SYS_LIBPATH_AIX
5805 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5807 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5809 if test "$host_cpu" = ia64; then
5810 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5811 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5812 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
5814 # Determine the default libpath from the value encoded in an empty executable.
5815 _LT_AC_SYS_LIBPATH_AIX
5816 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5817 # Warning - without using the other run time loading flags,
5818 # -berok will link without error, but may produce a broken library.
5819 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5820 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5821 # -bexpall does not export symbols beginning with underscore (_)
5822 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5823 # Exported symbols can be pulled into shared objects from archives
5824 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
5825 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5826 # This is similar to how AIX traditionally builds its shared libraries.
5827 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5832 case $cc_basename in
5834 # FIXME: insert proper C++ library support
5835 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5841 cygwin* | mingw* | pw32*)
5842 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5843 # as there is no search path for DLLs.
5844 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5845 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5846 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5847 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5849 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5850 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5851 # If the export-symbols file already is a .def file (1st line
5852 # is EXPORTS), use it as is; otherwise, prepend...
5853 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5854 cp $export_symbols $output_objdir/$soname.def;
5856 echo EXPORTS > $output_objdir/$soname.def;
5857 cat $export_symbols >> $output_objdir/$soname.def;
5859 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5861 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5864 darwin* | rhapsody*)
5866 rhapsody* | darwin1.[[012]])
5867 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5870 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5871 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5873 case ${MACOSX_DEPLOYMENT_TARGET} in
5875 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5878 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5884 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5885 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5886 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5887 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5888 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
5889 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5891 if test "$GXX" = yes ; then
5892 lt_int_apple_cc_single_mod=no
5893 output_verbose_link_cmd='echo'
5894 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
5895 lt_int_apple_cc_single_mod=yes
5897 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
5898 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5900 _LT_AC_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'
5902 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5903 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5904 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
5905 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5907 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5909 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5911 case $cc_basename in
5913 output_verbose_link_cmd='echo'
5914 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
5915 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5916 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5917 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5918 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5921 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5928 case $cc_basename in
5930 # FIXME: insert proper C++ library support
5931 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5934 # Green Hills C++ Compiler
5935 # FIXME: insert proper C++ library support
5936 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5939 # FIXME: insert proper C++ library support
5940 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5945 # C++ shared libraries reported to be fairly broken before switch to ELF
5946 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5949 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5951 freebsd* | kfreebsd*-gnu | dragonfly*)
5952 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5954 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5959 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5960 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5961 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5962 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5963 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5964 # but as the default
5965 # location of the library.
5967 case $cc_basename in
5969 # FIXME: insert proper C++ library support
5970 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5973 _LT_AC_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'
5974 # Commands to make compiler produce verbose output that lists
5975 # what "hidden" libraries, object files and flags are used when
5976 # linking a shared library.
5978 # There doesn't appear to be a way to prevent this compiler from
5979 # explicitly linking system object files so we need to strip them
5980 # from the output so that they don't get included in the library
5982 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; echo $list'
5985 if test "$GXX" = yes; then
5986 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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'
5988 # FIXME: insert proper C++ library support
5989 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5995 if test $with_gnu_ld = no; then
5998 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5999 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6000 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6003 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6006 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6007 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6008 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6014 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6015 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6018 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6019 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6020 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6021 # but as the default
6022 # location of the library.
6025 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6026 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6027 # but as the default
6028 # location of the library.
6032 case $cc_basename in
6034 # FIXME: insert proper C++ library support
6035 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6040 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
6043 _LT_AC_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'
6046 # Commands to make compiler produce verbose output that lists
6047 # what "hidden" libraries, object files and flags are used when
6048 # linking a shared library.
6050 # There doesn't appear to be a way to prevent this compiler from
6051 # explicitly linking system object files so we need to strip them
6052 # from the output so that they don't get included in the library
6054 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; echo $list'
6057 if test "$GXX" = yes; then
6058 if test $with_gnu_ld = no; then
6061 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
6064 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6069 # FIXME: insert proper C++ library support
6070 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6076 case $cc_basename in
6079 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6081 # Archives containing C++ object files must be created using
6082 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6083 # necessary to make sure instantiated templates are included
6085 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6088 if test "$GXX" = yes; then
6089 if test "$with_gnu_ld" = no; then
6090 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6092 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
6095 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6098 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6099 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6102 case $cc_basename in
6104 # Kuck and Associates, Inc. (KAI) C++ Compiler
6106 # KCC will only create a shared library if the output file
6107 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6108 # to its proper name (with version) after linking.
6109 _LT_AC_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'
6110 _LT_AC_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'
6111 # Commands to make compiler produce verbose output that lists
6112 # what "hidden" libraries, object files and flags are used when
6113 # linking a shared library.
6115 # There doesn't appear to be a way to prevent this compiler from
6116 # explicitly linking system object files so we need to strip them
6117 # from the output so that they don't get included in the library
6119 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; echo $list'
6121 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
6122 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6124 # Archives containing C++ object files must be created using
6125 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6126 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6131 # version 8.0 and above of icpc choke on multiply defined symbols
6132 # if we add $predep_objects and $postdep_objects, however 7.1 and
6133 # earlier do not add the objects themselves.
6134 case `$CC -V 2>&1` in
6136 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6137 _LT_AC_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'
6139 *) # Version 8.0 or newer
6142 ia64*) tmp_idyn=' -i_dynamic';;
6144 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6145 _LT_AC_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'
6148 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6149 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6150 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6151 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6154 # Portland Group C++ compiler
6155 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6156 _LT_AC_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'
6158 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6159 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6160 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6164 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6165 _LT_AC_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'
6167 runpath_var=LD_RUN_PATH
6168 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6169 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6171 # Commands to make compiler produce verbose output that lists
6172 # what "hidden" libraries, object files and flags are used when
6173 # linking a shared library.
6175 # There doesn't appear to be a way to prevent this compiler from
6176 # explicitly linking system object files so we need to strip them
6177 # from the output so that they don't get included in the library
6179 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $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; echo $list'
6184 # FIXME: insert proper C++ library support
6185 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6188 # FIXME: insert proper C++ library support
6189 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6192 case $cc_basename in
6194 # FIXME: insert proper C++ library support
6195 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6198 # FIXME: insert proper C++ library support
6199 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6204 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6205 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6207 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6208 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6209 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6211 # Workaround some broken pre-1.5 toolchains
6212 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6215 # C++ shared libraries are fairly broken
6216 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6219 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6220 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6221 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6222 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6223 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6224 _LT_AC_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'
6225 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6226 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6228 output_verbose_link_cmd='echo'
6231 case $cc_basename in
6233 # Kuck and Associates, Inc. (KAI) C++ Compiler
6235 # KCC will only create a shared library if the output file
6236 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6237 # to its proper name (with version) after linking.
6238 _LT_AC_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'
6240 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6241 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6243 # Archives containing C++ object files must be created using
6244 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6245 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6249 # Rational C++ 2.4.1
6250 # FIXME: insert proper C++ library support
6251 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6254 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6255 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6257 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6258 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6260 # Commands to make compiler produce verbose output that lists
6261 # what "hidden" libraries, object files and flags are used when
6262 # linking a shared library.
6264 # There doesn't appear to be a way to prevent this compiler from
6265 # explicitly linking system object files so we need to strip them
6266 # from the output so that they don't get included in the library
6268 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list'
6271 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6272 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6273 _LT_AC_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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6275 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6276 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6278 # Commands to make compiler produce verbose output that lists
6279 # what "hidden" libraries, object files and flags are used when
6280 # linking a shared library.
6281 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
6284 # FIXME: insert proper C++ library support
6285 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6291 case $cc_basename in
6293 # Kuck and Associates, Inc. (KAI) C++ Compiler
6295 # KCC will only create a shared library if the output file
6296 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6297 # to its proper name (with version) after linking.
6298 _LT_AC_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'
6300 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6301 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6303 # Archives containing C++ object files must be created using
6304 # the KAI C++ compiler.
6305 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
6308 # Rational C++ 2.4.1
6309 # FIXME: insert proper C++ library support
6310 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6313 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6314 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6315 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6316 echo "-hidden">> $lib.exp~
6317 $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~
6320 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6321 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6323 # Commands to make compiler produce verbose output that lists
6324 # what "hidden" libraries, object files and flags are used when
6325 # linking a shared library.
6327 # There doesn't appear to be a way to prevent this compiler from
6328 # explicitly linking system object files so we need to strip them
6329 # from the output so that they don't get included in the library
6331 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list'
6334 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6335 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6336 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6338 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6339 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6341 # Commands to make compiler produce verbose output that lists
6342 # what "hidden" libraries, object files and flags are used when
6343 # linking a shared library.
6344 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
6347 # FIXME: insert proper C++ library support
6348 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6354 # FIXME: insert proper C++ library support
6355 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6358 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6359 case $cc_basename in
6361 # FIXME: insert proper C++ library support
6362 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6365 # FIXME: insert proper C++ library support
6366 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6371 case $cc_basename in
6374 # FIXME: insert proper C++ library support
6375 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6379 # FIXME: insert proper C++ library support
6380 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6383 # FIXME: insert proper C++ library support
6384 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6389 case $cc_basename in
6391 # Sun C++ 4.2, 5.x and Centerline C++
6392 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
6393 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6394 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6395 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6396 $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'
6398 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6399 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6401 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6403 # The C++ compiler is used as linker so we must use $wl
6404 # flag to pass the commands to the underlying system
6405 # linker. We must also pass each convience library through
6406 # to the system linker between allextract/defaultextract.
6407 # The C++ compiler will combine linker options so we
6408 # cannot just pass the convience library names through
6410 # Supported since Solaris 2.6 (maybe 2.5.1?)
6411 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
6414 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6416 output_verbose_link_cmd='echo'
6418 # Archives containing C++ object files must be created using
6419 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6420 # necessary to make sure instantiated templates are included
6422 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6425 # Green Hills C++ Compiler
6426 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6428 # The C++ compiler must be used to create the archive.
6429 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6432 # GNU C++ compiler with Solaris linker
6433 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6434 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6435 if $CC --version | grep -v '^2\.7' > /dev/null; then
6436 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6437 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6438 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
6440 # Commands to make compiler produce verbose output that lists
6441 # what "hidden" libraries, object files and flags are used when
6442 # linking a shared library.
6443 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
6445 # g++ 2.7 appears to require `-G' NOT `-shared' on this
6447 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6448 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6449 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
6451 # Commands to make compiler produce verbose output that lists
6452 # what "hidden" libraries, object files and flags are used when
6453 # linking a shared library.
6454 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
6457 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6462 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
6463 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6466 case $cc_basename in
6468 # NonStop-UX NCC 3.20
6469 # FIXME: insert proper C++ library support
6470 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6473 # FIXME: insert proper C++ library support
6474 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6479 # FIXME: insert proper C++ library support
6480 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6483 # FIXME: insert proper C++ library support
6484 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6487 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6488 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6490 _LT_AC_TAGVAR(GCC, $1)="$GXX"
6491 _LT_AC_TAGVAR(LD, $1)="$LD"
6494 ## There is no encapsulation within the following macros, do not change
6495 ## the running order or otherwise move them around unless you know exactly
6496 ## what you are doing...
6497 AC_LIBTOOL_POSTDEP_PREDEP($1)
6498 AC_LIBTOOL_PROG_COMPILER_PIC($1)
6499 AC_LIBTOOL_PROG_CC_C_O($1)
6500 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
6501 AC_LIBTOOL_PROG_LD_SHLIBS($1)
6502 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
6503 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
6504 AC_LIBTOOL_SYS_LIB_STRIP
6505 AC_LIBTOOL_DLOPEN_SELF($1)
6507 AC_LIBTOOL_CONFIG($1)
6514 with_gnu_ldcxx=$with_gnu_ld
6515 with_gnu_ld=$lt_save_with_gnu_ld
6516 lt_cv_path_LDCXX=$lt_cv_path_LD
6517 lt_cv_path_LD=$lt_save_path_LD
6518 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6519 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6520 ])# AC_LIBTOOL_LANG_CXX_CONFIG
6522 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
6523 # ------------------------
6524 # Figure out "hidden" library dependencies from verbose
6525 # compiler output when linking a shared library.
6526 # Parse the compiler output and extract the necessary
6527 # objects, libraries and library flags.
6528 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
6529 dnl we can't use the lt_simple_compile_test_code here,
6530 dnl because it contains code intended for an executable,
6531 dnl not a library. It's possible we should let each
6532 dnl tag define a new lt_????_link_test_code variable,
6533 dnl but it's only used here...
6534 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
6536 void foo (void) { a = 0; }
6538 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
6542 Foo (void) { a = 0; }
6547 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
6555 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
6558 public void bar (void) {
6564 dnl Parse the compiler output and extract the necessary
6565 dnl objects, libraries and library flags.
6566 if AC_TRY_EVAL(ac_compile); then
6567 # Parse the compiler output and extract the necessary
6568 # objects, libraries and library flags.
6570 # Sentinel used to keep track of whether or not we are before
6571 # the conftest object file.
6572 pre_test_object_deps_done=no
6574 # The `*' in the case matches for architectures that use `case' in
6575 # $output_verbose_cmd can trigger glob expansion during the loop
6576 # eval without this substitution.
6577 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
6579 for p in `eval $output_verbose_link_cmd`; do
6583 # Some compilers place space between "-{L,R}" and the path.
6586 || test $p = "-R"; then
6593 if test "$pre_test_object_deps_done" = no; then
6596 # Internal compiler library paths should come after those
6597 # provided the user. The postdeps already come after the
6598 # user supplied libs so there is no need to process them.
6599 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
6600 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6602 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6605 # The "-l" case would never come before the object being
6606 # linked, so don't bother handling this case.
6609 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
6610 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
6612 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
6618 # This assumes that the test object file only shows up
6619 # once in the compiler output.
6620 if test "$p" = "conftest.$objext"; then
6621 pre_test_object_deps_done=yes
6625 if test "$pre_test_object_deps_done" = no; then
6626 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
6627 _LT_AC_TAGVAR(predep_objects, $1)="$p"
6629 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
6632 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
6633 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
6635 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
6640 *) ;; # Ignore the rest.
6648 echo "libtool.m4: error: problem compiling $1 test program"
6651 $rm -f confest.$objext
6653 # PORTME: override above test on systems where it is broken
6657 case $cc_basename in
6659 # Adding this requires a known-good setup of shared libraries for
6660 # Sun compiler versions before 5.6, else PIC objects from an old
6661 # archive will be linked into the output, leading to subtle bugs.
6662 _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
6668 case " $_LT_AC_TAGVAR(postdeps, $1) " in
6669 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6671 ])# AC_LIBTOOL_POSTDEP_PREDEP
6673 # AC_LIBTOOL_LANG_F77_CONFIG
6674 # ------------------------
6675 # Ensure that the configuration vars for the C compiler are
6676 # suitably defined. Those variables are subsequently used by
6677 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
6678 #AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
6679 #AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
6680 #[AC_REQUIRE([AC_PROG_F77])
6684 #_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6685 #_LT_AC_TAGVAR(allow_undefined_flag, $1)=
6686 #_LT_AC_TAGVAR(always_export_symbols, $1)=no
6687 #_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6688 #_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6689 #_LT_AC_TAGVAR(hardcode_direct, $1)=no
6690 #_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6691 #_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6692 #_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6693 #_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6694 #_LT_AC_TAGVAR(hardcode_automatic, $1)=no
6695 #_LT_AC_TAGVAR(module_cmds, $1)=
6696 #_LT_AC_TAGVAR(module_expsym_cmds, $1)=
6697 #_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6698 #_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6699 #_LT_AC_TAGVAR(no_undefined_flag, $1)=
6700 #_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6701 #_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6703 ## Source file extension for f77 test sources.
6706 ## Object file extension for compiled f77 test sources.
6708 #_LT_AC_TAGVAR(objext, $1)=$objext
6710 ## Code to be used in simple compile tests
6711 #lt_simple_compile_test_code=" subroutine t\n return\n end\n"
6713 ## Code to be used in simple link tests
6714 #lt_simple_link_test_code=" program t\n end\n"
6716 ## ltmain only uses $CC for tagged configurations so make sure $CC is set.
6717 #_LT_AC_SYS_COMPILER
6719 ## save warnings/boilerplate of simple test code
6720 #_LT_COMPILER_BOILERPLATE
6721 #_LT_LINKER_BOILERPLATE
6723 ## Allow CC to be a program name with arguments.
6727 #_LT_AC_TAGVAR(compiler, $1)=$CC
6728 #_LT_CC_BASENAME([$compiler])
6730 #AC_MSG_CHECKING([if libtool supports shared libraries])
6731 #AC_MSG_RESULT([$can_build_shared])
6733 #AC_MSG_CHECKING([whether to build shared libraries])
6734 #test "$can_build_shared" = "no" && enable_shared=no
6736 ## On AIX, shared libraries and static libraries use the same namespace, and
6737 ## are all built from PIC.
6740 # test "$enable_shared" = yes && enable_static=no
6741 # if test -n "$RANLIB"; then
6742 # archive_cmds="$archive_cmds~\$RANLIB \$lib"
6743 # postinstall_cmds='$RANLIB $lib'
6747 # if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6748 # test "$enable_shared" = yes && enable_static=no
6752 #AC_MSG_RESULT([$enable_shared])
6754 #AC_MSG_CHECKING([whether to build static libraries])
6755 ## Make sure either enable_shared or enable_static is yes.
6756 #test "$enable_shared" = yes || enable_static=yes
6757 #AC_MSG_RESULT([$enable_static])
6759 #test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6761 #_LT_AC_TAGVAR(GCC, $1)="$G77"
6762 #_LT_AC_TAGVAR(LD, $1)="$LD"
6764 #AC_LIBTOOL_PROG_COMPILER_PIC($1)
6765 #AC_LIBTOOL_PROG_CC_C_O($1)
6766 #AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
6767 #AC_LIBTOOL_PROG_LD_SHLIBS($1)
6768 #AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
6769 #AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
6770 #AC_LIBTOOL_SYS_LIB_STRIP
6773 #AC_LIBTOOL_CONFIG($1)
6777 #])# AC_LIBTOOL_LANG_F77_CONFIG
6780 # AC_LIBTOOL_LANG_GCJ_CONFIG
6781 # --------------------------
6782 # Ensure that the configuration vars for the C compiler are
6783 # suitably defined. Those variables are subsequently used by
6784 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
6785 #AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
6786 #AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
6789 ## Source file extension for Java test sources.
6792 ## Object file extension for compiled Java test sources.
6794 #_LT_AC_TAGVAR(objext, $1)=$objext
6796 ## Code to be used in simple compile tests
6797 #lt_simple_compile_test_code="class foo {}\n"
6799 ## Code to be used in simple link tests
6800 #lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
6802 ## ltmain only uses $CC for tagged configurations so make sure $CC is set.
6803 #_LT_AC_SYS_COMPILER
6805 ## save warnings/boilerplate of simple test code
6806 #_LT_COMPILER_BOILERPLATE
6807 #_LT_LINKER_BOILERPLATE
6809 ## Allow CC to be a program name with arguments.
6813 #_LT_AC_TAGVAR(compiler, $1)=$CC
6814 #_LT_CC_BASENAME([$compiler])
6816 ## GCJ did not exist at the time GCC didn't implicitly link libc in.
6817 #_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6819 #_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6822 ### There is no encapsulation within the following macros, do not change
6823 ### the running order or otherwise move them around unless you know exactly
6824 ### what you are doing...
6825 #AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
6826 #AC_LIBTOOL_PROG_COMPILER_PIC($1)
6827 #AC_LIBTOOL_PROG_CC_C_O($1)
6828 #AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
6829 #AC_LIBTOOL_PROG_LD_SHLIBS($1)
6830 #AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
6831 #AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
6832 #AC_LIBTOOL_SYS_LIB_STRIP
6833 #AC_LIBTOOL_DLOPEN_SELF($1)
6835 #AC_LIBTOOL_CONFIG($1)
6839 #])# AC_LIBTOOL_LANG_GCJ_CONFIG
6842 # AC_LIBTOOL_LANG_RC_CONFIG
6843 # --------------------------
6844 # Ensure that the configuration vars for the Windows resource compiler are
6845 # suitably defined. Those variables are subsequently used by
6846 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
6847 #AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
6848 #AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
6851 ## Source file extension for RC test sources.
6854 ## Object file extension for compiled RC test sources.
6856 #_LT_AC_TAGVAR(objext, $1)=$objext
6858 ## Code to be used in simple compile tests
6859 #lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
6861 ## Code to be used in simple link tests
6862 #lt_simple_link_test_code="$lt_simple_compile_test_code"
6864 ## ltmain only uses $CC for tagged configurations so make sure $CC is set.
6865 #_LT_AC_SYS_COMPILER
6867 ## save warnings/boilerplate of simple test code
6868 #_LT_COMPILER_BOILERPLATE
6869 #_LT_LINKER_BOILERPLATE
6871 ## Allow CC to be a program name with arguments.
6875 #_LT_AC_TAGVAR(compiler, $1)=$CC
6876 #_LT_CC_BASENAME([$compiler])
6877 #_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6879 #AC_LIBTOOL_CONFIG($1)
6883 #])# AC_LIBTOOL_LANG_RC_CONFIG
6886 # AC_LIBTOOL_CONFIG([TAGNAME])
6887 # ----------------------------
6888 # If TAGNAME is not passed, then create an initial libtool script
6889 # with a default configuration from the untagged config vars. Otherwise
6890 # add code to config.status for appending the configuration named by
6891 # TAGNAME from the matching tagged config vars.
6892 AC_DEFUN([AC_LIBTOOL_CONFIG],
6893 [# The else clause should only fire when bootstrapping the
6894 # libtool distribution, otherwise you forgot to ship ltmain.sh
6895 # with your package, and you will get complaints that there are
6896 # no rules to generate ltmain.sh.
6897 if test -f "$ltmain"; then
6898 # See if we are running on zsh, and set the options which allow our commands through
6899 # without removal of \ escapes.
6900 if test -n "${ZSH_VERSION+set}" ; then
6901 setopt NO_GLOB_SUBST
6903 # Now quote all the things that may contain metacharacters while being
6904 # careful not to overquote the AC_SUBSTed values. We take copies of the
6905 # variables and quote the copies for generation of the libtool script.
6906 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
6908 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
6909 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
6910 deplibs_check_method reload_flag reload_cmds need_locks \
6911 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
6912 lt_cv_sys_global_symbol_to_c_name_address \
6913 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
6914 old_postinstall_cmds old_postuninstall_cmds \
6915 _LT_AC_TAGVAR(compiler, $1) \
6916 _LT_AC_TAGVAR(CC, $1) \
6917 _LT_AC_TAGVAR(LD, $1) \
6918 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
6919 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
6920 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
6921 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
6922 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
6923 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
6924 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
6925 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
6926 _LT_AC_TAGVAR(old_archive_cmds, $1) \
6927 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
6928 _LT_AC_TAGVAR(predep_objects, $1) \
6929 _LT_AC_TAGVAR(postdep_objects, $1) \
6930 _LT_AC_TAGVAR(predeps, $1) \
6931 _LT_AC_TAGVAR(postdeps, $1) \
6932 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
6933 _LT_AC_TAGVAR(archive_cmds, $1) \
6934 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
6935 _LT_AC_TAGVAR(postinstall_cmds, $1) \
6936 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
6937 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
6938 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
6939 _LT_AC_TAGVAR(no_undefined_flag, $1) \
6940 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
6941 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
6942 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
6943 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
6944 _LT_AC_TAGVAR(hardcode_automatic, $1) \
6945 _LT_AC_TAGVAR(module_cmds, $1) \
6946 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
6947 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
6948 _LT_AC_TAGVAR(exclude_expsyms, $1) \
6949 _LT_AC_TAGVAR(include_expsyms, $1); do
6952 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
6953 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
6954 _LT_AC_TAGVAR(archive_cmds, $1) | \
6955 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
6956 _LT_AC_TAGVAR(module_cmds, $1) | \
6957 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
6958 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
6959 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
6960 extract_expsyms_cmds | reload_cmds | finish_cmds | \
6961 postinstall_cmds | postuninstall_cmds | \
6962 old_postinstall_cmds | old_postuninstall_cmds | \
6963 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
6964 # Double-quote double-evaled strings.
6965 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
6968 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
6974 *'\[$]0 --fallback-echo"')
6975 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
6980 [cfgfile="${ofile}T"
6981 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
6987 cat <<__EOF__ >> "$cfgfile"
6991 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
6992 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
6993 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
6995 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
6996 # Free Software Foundation, Inc.
6998 # This file is part of GNU Libtool:
6999 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7001 # This program is free software; you can redistribute it and/or modify
7002 # it under the terms of the GNU General Public License as published by
7003 # the Free Software Foundation; either version 2 of the License, or
7004 # (at your option) any later version.
7006 # This program is distributed in the hope that it will be useful, but
7007 # WITHOUT ANY WARRANTY; without even the implied warranty of
7008 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7009 # General Public License for more details.
7011 # You should have received a copy of the GNU General Public License
7012 # along with this program; if not, write to the Free Software
7013 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
7015 # As a special exception to the GNU General Public License, if you
7016 # distribute this file as part of a program that contains a
7017 # configuration script generated by Autoconf, you may include it under
7018 # the same distribution terms that you use for the rest of that program.
7020 # A sed program that does not truncate output.
7023 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7024 Xsed="$SED -e 1s/^X//"
7026 # The HP-UX ksh and POSIX shell print the target directory to stdout
7028 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
7030 # The names of the tagged configurations supported by this script.
7033 # ### BEGIN LIBTOOL CONFIG],
7034 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
7036 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7038 # Shell to use when invoking shell scripts.
7041 # Whether or not to build shared libraries.
7042 build_libtool_libs=$enable_shared
7044 # Whether or not to build static libraries.
7045 build_old_libs=$enable_static
7047 # Whether or not to add -lc for building shared libraries.
7048 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
7050 # Whether or not to disallow shared libs when runtime libs are static
7051 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
7053 # Whether or not to optimize for fast installation.
7054 fast_install=$enable_fast_install
7057 host_alias=$host_alias
7062 build_alias=$build_alias
7066 # An echo program that does not interpret backslashes.
7071 AR_FLAGS=$lt_AR_FLAGS
7076 # A language-specific compiler.
7077 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
7079 # Is the compiler the GNU C compiler?
7080 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
7085 # The linker used to build libraries.
7086 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
7088 # Whether we need hard or soft links.
7091 # A BSD-compatible nm program.
7094 # A symbol stripping program
7097 # Used to examine libraries when file_magic_cmd begins "file"
7098 MAGIC_CMD=$MAGIC_CMD
7100 # Used on cygwin: DLL creation program.
7103 # Used on cygwin: object dumper.
7106 # Used on cygwin: assembler.
7109 # The name of the directory that contains temporary libtool files.
7112 # How to create reloadable object files.
7113 reload_flag=$lt_reload_flag
7114 reload_cmds=$lt_reload_cmds
7116 # How to pass a linker flag through the compiler.
7117 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
7119 # Object file suffix (normally "o").
7122 # Old archive suffix (normally "a").
7125 # Shared library suffix (normally ".so").
7126 shrext_cmds='$shrext_cmds'
7128 # Executable file suffix (normally "").
7131 # Additional compiler flags for building library objects.
7132 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
7135 # What is the maximum length of a command?
7136 max_cmd_len=$lt_cv_sys_max_cmd_len
7138 # Does compiler simultaneously support -c and -o options?
7139 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
7141 # Must we lock files when doing compilation?
7142 need_locks=$lt_need_locks
7144 # Do we need the lib prefix for modules?
7145 need_lib_prefix=$need_lib_prefix
7147 # Do we need a version for libraries?
7148 need_version=$need_version
7150 # Whether dlopen is supported.
7151 dlopen_support=$enable_dlopen
7153 # Whether dlopen of programs is supported.
7154 dlopen_self=$enable_dlopen_self
7156 # Whether dlopen of statically linked programs is supported.
7157 dlopen_self_static=$enable_dlopen_self_static
7159 # Compiler flag to prevent dynamic linking.
7160 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
7162 # Compiler flag to turn off builtin functions.
7163 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
7165 # Compiler flag to allow reflexive dlopens.
7166 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
7168 # Compiler flag to generate shared objects directly from archives.
7169 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
7171 # Compiler flag to generate thread-safe objects.
7172 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
7174 # Library versioning type.
7175 version_type=$version_type
7177 # Format of library name prefix.
7178 libname_spec=$lt_libname_spec
7180 # List of archive names. First name is the real one, the rest are links.
7181 # The last name is the one that the linker finds with -lNAME.
7182 library_names_spec=$lt_library_names_spec
7184 # The coded name of the library, if different from the real name.
7185 soname_spec=$lt_soname_spec
7187 # Commands used to build and install an old-style archive.
7189 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
7190 old_postinstall_cmds=$lt_old_postinstall_cmds
7191 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7193 # Create an old-style archive from a shared archive.
7194 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
7196 # Create a temporary old-style archive to link instead of a shared archive.
7197 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
7199 # Commands used to build and install a shared archive.
7200 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
7201 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
7202 postinstall_cmds=$lt_postinstall_cmds
7203 postuninstall_cmds=$lt_postuninstall_cmds
7205 # Commands used to build a loadable module (assumed same as above if empty)
7206 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
7207 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
7209 # Commands to strip libraries.
7210 old_striplib=$lt_old_striplib
7211 striplib=$lt_striplib
7213 # Dependencies to place before the objects being linked to create a
7215 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
7217 # Dependencies to place after the objects being linked to create a
7219 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
7221 # Dependencies to place before the objects being linked to create a
7223 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
7225 # Dependencies to place after the objects being linked to create a
7227 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
7229 # The library search path used internally by the compiler when linking
7231 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
7233 # Method to check whether dependent libraries are shared objects.
7234 deplibs_check_method=$lt_deplibs_check_method
7236 # Command to use when deplibs_check_method == file_magic.
7237 file_magic_cmd=$lt_file_magic_cmd
7239 # Flag that allows shared libraries with undefined symbols to be built.
7240 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
7242 # Flag that forces no undefined symbols.
7243 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
7245 # Commands used to finish a libtool library installation in a directory.
7246 finish_cmds=$lt_finish_cmds
7248 # Same as above, but a single script fragment to be evaled but not shown.
7249 finish_eval=$lt_finish_eval
7251 # Take the output of nm and produce a listing of raw symbols and C names.
7252 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
7254 # Transform the output of nm in a proper C declaration
7255 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
7257 # Transform the output of nm in a C name address pair
7258 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
7260 # This is the shared library runtime path variable.
7261 runpath_var=$runpath_var
7263 # This is the shared library path variable.
7264 shlibpath_var=$shlibpath_var
7266 # Is shlibpath searched before the hard-coded library search path?
7267 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7269 # How to hardcode a shared library path into an executable.
7270 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
7272 # Whether we should hardcode library paths into libraries.
7273 hardcode_into_libs=$hardcode_into_libs
7275 # Flag to hardcode \$libdir into a binary during linking.
7276 # This must work even if \$libdir does not exist.
7277 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
7279 # If ld is used when linking, flag to hardcode \$libdir into
7280 # a binary during linking. This must work even if \$libdir does
7282 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
7284 # Whether we need a single -rpath flag with a separated argument.
7285 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
7287 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
7289 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
7291 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7293 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
7295 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7296 # the resulting binary.
7297 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
7299 # Set to yes if building a shared library automatically hardcodes DIR into the library
7300 # and all subsequent libraries and executables linked against it.
7301 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
7303 # Variables whose values should be saved in libtool wrapper scripts and
7304 # restored at relink time.
7305 variables_saved_for_relink="$variables_saved_for_relink"
7307 # Whether libtool must link a program against all its dependency libraries.
7308 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
7310 # Compile-time system search path for libraries
7311 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7313 # Run-time system search path for libraries
7314 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7316 # Fix the shell variable \$srcfile for the compiler.
7317 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
7319 # Set to yes if exported symbols are required.
7320 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
7322 # The commands to list exported symbols.
7323 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
7325 # The commands to extract the exported symbol list from a shared archive.
7326 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7328 # Symbols that should not be listed in the preloaded symbols.
7329 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
7331 # Symbols that must always be exported.
7332 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
7335 [# ### END LIBTOOL CONFIG],
7336 [# ### END LIBTOOL TAG CONFIG: $tagname])
7343 cat <<\EOF >> "$cfgfile"
7345 # AIX sometimes has problems with the GCC collect2 program. For some
7346 # reason, if we set the COLLECT_NAMES environment variable, the problems
7347 # vanish in a puff of smoke.
7348 if test "X${COLLECT_NAMES+set}" != Xset; then
7350 export COLLECT_NAMES
7356 # We use sed instead of cat because bash on DJGPP gets confused if
7357 # if finds mixed CR/LF and LF-only lines. Since sed operates in
7358 # text mode, it properly converts lines to CR/LF. This bash problem
7359 # is reportedly fixed, but why not run on old versions too?
7360 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
7362 mv -f "$cfgfile" "$ofile" || \
7363 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
7367 # If there is no Makefile yet, we rely on a make rule to execute
7368 # `config.status --recheck' to rerun these tests and create the
7369 # libtool script then.
7370 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
7371 if test -f "$ltmain_in"; then
7372 test -f Makefile && make "$ltmain"
7375 ])# AC_LIBTOOL_CONFIG
7378 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
7379 # -------------------------------------------
7380 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
7381 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
7383 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7385 if test "$GCC" = yes; then
7386 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7388 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
7389 lt_cv_prog_compiler_rtti_exceptions,
7390 [-fno-rtti -fno-exceptions], [],
7391 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
7393 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
7396 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
7397 # ---------------------------------
7398 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
7399 [AC_REQUIRE([AC_CANONICAL_HOST])
7400 AC_REQUIRE([AC_PROG_NM])
7401 AC_REQUIRE([AC_OBJEXT])
7402 # Check for command to grab the raw symbol name followed by C symbol from nm.
7403 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
7404 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
7406 # These are sane defaults that work on at least a few old systems.
7407 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
7409 # Character class describing NM global symbol codes.
7410 symcode='[[BCDEGRST]]'
7412 # Regexp to match symbols that can be accessed directly from C.
7413 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
7415 # Transform an extracted symbol line into a proper C declaration
7416 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
7418 # Transform an extracted symbol line into symbol name and symbol address
7419 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
7421 # Define system-specific variables.
7426 cygwin* | mingw* | pw32*)
7427 symcode='[[ABCDGISTW]]'
7429 hpux*) # Its linker distinguishes data from code symbols
7430 if test "$host_cpu" = ia64; then
7431 symcode='[[ABCDEGRST]]'
7433 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7434 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
7437 if test "$host_cpu" = ia64; then
7438 symcode='[[ABCDGIRSTW]]'
7439 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7440 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
7444 symcode='[[BCDEGRST]]'
7447 symcode='[[BCDEGQRST]]'
7453 symcode='[[DFNSTU]]'
7457 # Handle CRLF in mingw tool chain
7461 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7465 # If we're using GNU nm, then use its standard symbol codes.
7466 case `$NM -V 2>&1` in
7467 *GNU* | *'with BFD'*)
7468 symcode='[[ABCDGIRSTW]]' ;;
7471 # Try without a prefix undercore, then with it.
7472 for ac_symprfx in "" "_"; do
7474 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
7475 symxfrm="\\1 $ac_symprfx\\2 \\2"
7477 # Write the raw and C identifiers.
7478 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7480 # Check to see that the pipe works correctly.
7484 cat > conftest.$ac_ext <<EOF
7489 void nm_test_func(){}
7493 int main(){nm_test_var='a';nm_test_func();return(0);}
7496 if AC_TRY_EVAL(ac_compile); then
7497 # Now try to grab the symbols.
7499 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
7500 # Try sorting and uniquifying the output.
7501 if sort "$nlist" | uniq > "$nlist"T; then
7502 mv -f "$nlist"T "$nlist"
7507 # Make sure that we snagged all the symbols we need.
7508 if grep ' nm_test_var$' "$nlist" >/dev/null; then
7509 if grep ' nm_test_func$' "$nlist" >/dev/null; then
7510 cat <<EOF > conftest.$ac_ext
7516 # Now generate the symbol file.
7517 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
7519 cat <<EOF >> conftest.$ac_ext
7520 #if defined (__STDC__) && __STDC__
7521 # define lt_ptr_t void *
7523 # define lt_ptr_t char *
7527 /* The mapping between symbol names and symbols. */
7532 lt_preloaded_symbols[[]] =
7535 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
7536 cat <<\EOF >> conftest.$ac_ext
7544 # Now try linking the two files.
7545 mv conftest.$ac_objext conftstm.$ac_objext
7546 lt_save_LIBS="$LIBS"
7547 lt_save_CFLAGS="$CFLAGS"
7548 LIBS="conftstm.$ac_objext"
7549 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
7550 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
7553 LIBS="$lt_save_LIBS"
7554 CFLAGS="$lt_save_CFLAGS"
7556 echo "cannot find nm_test_func in $nlist" >&5
7559 echo "cannot find nm_test_var in $nlist" >&5
7562 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7565 echo "$progname: failed program was:" >&5
7566 cat conftest.$ac_ext >&5
7568 rm -f conftest* conftst*
7570 # Do not use the global_symbol_pipe unless it works.
7571 if test "$pipe_works" = yes; then
7574 lt_cv_sys_global_symbol_pipe=
7578 if test -z "$lt_cv_sys_global_symbol_pipe"; then
7579 lt_cv_sys_global_symbol_to_cdecl=
7581 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7582 AC_MSG_RESULT(failed)
7586 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
7589 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
7590 # ---------------------------------------
7591 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
7592 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
7593 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7594 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
7596 AC_MSG_CHECKING([for $compiler option to produce PIC])
7598 # C++ specific cases for pic, static, wl, etc.
7599 if test "$GXX" = yes; then
7600 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7601 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
7605 # All AIX code is PIC.
7606 if test "$host_cpu" = ia64; then
7607 # AIX 5 now supports IA64 processor
7608 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7612 # FIXME: we need at least 68020 code to build shared libraries, but
7613 # adding the `-m68020' flag to GCC prevents building anything better,
7615 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
7617 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7618 # PIC is the default for these OSes.
7620 mingw* | os2* | pw32*)
7621 # This hack is so that the source file can tell whether it is being
7622 # built for inclusion in a dll (and should export symbols for example).
7623 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
7625 darwin* | rhapsody*)
7626 # PIC is the default on this platform
7627 # Common symbols not allowed in MH_DYLIB files
7628 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
7631 # DJGPP does not support shared libraries at all
7632 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7635 if test -d /usr/nec; then
7636 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
7640 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7646 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7651 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7657 # All AIX code is PIC.
7658 if test "$host_cpu" = ia64; then
7659 # AIX 5 now supports IA64 processor
7660 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7662 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
7666 case $cc_basename in
7668 # Green Hills C++ Compiler
7669 # _LT_AC_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"
7674 # PIC is the default on this platform
7675 # Common symbols not allowed in MH_DYLIB files
7676 case $cc_basename in
7678 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
7679 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7684 case $cc_basename in
7686 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7689 # Green Hills C++ Compiler
7690 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7696 freebsd* | kfreebsd*-gnu | dragonfly*)
7697 # FreeBSD uses GNU C++
7699 hpux9* | hpux10* | hpux11*)
7700 case $cc_basename in
7702 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7703 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
7704 if test "$host_cpu" != ia64; then
7705 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
7709 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7710 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
7716 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
7724 irix5* | irix6* | nonstopux*)
7725 case $cc_basename in
7727 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7728 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7729 # CC pic flag -KPIC is the default.
7736 case $cc_basename in
7739 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
7740 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7744 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7745 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7746 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
7749 # Portland Group C++ compiler.
7750 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7751 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
7752 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7756 # Make sure the PIC flag is empty. It appears that all Alpha
7757 # Linux and Compaq Tru64 Unix objects are PIC.
7758 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7759 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7770 case $cc_basename in
7772 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
7780 osf3* | osf4* | osf5*)
7781 case $cc_basename in
7783 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
7786 # Rational C++ 2.4.1
7787 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7790 # Digital/Compaq C++
7791 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7792 # Make sure the PIC flag is empty. It appears that all Alpha
7793 # Linux and Compaq Tru64 Unix objects are PIC.
7794 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7795 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7804 case $cc_basename in
7806 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7813 case $cc_basename in
7815 # Sun C++ 4.2, 5.x and Centerline C++
7816 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7817 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7818 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
7821 # Green Hills C++ Compiler
7822 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
7829 case $cc_basename in
7832 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7833 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7837 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7844 case $cc_basename in
7846 # NonStop-UX NCC 3.20
7847 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7858 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7864 if test "$GCC" = yes; then
7865 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7866 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
7870 # All AIX code is PIC.
7871 if test "$host_cpu" = ia64; then
7872 # AIX 5 now supports IA64 processor
7873 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7878 # FIXME: we need at least 68020 code to build shared libraries, but
7879 # adding the `-m68020' flag to GCC prevents building anything better,
7881 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
7884 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7885 # PIC is the default for these OSes.
7888 mingw* | pw32* | os2*)
7889 # This hack is so that the source file can tell whether it is being
7890 # built for inclusion in a dll (and should export symbols for example).
7891 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
7894 darwin* | rhapsody*)
7895 # PIC is the default on this platform
7896 # Common symbols not allowed in MH_DYLIB files
7897 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
7901 # Just because we use GCC doesn't mean we suddenly get shared libraries
7902 # on systems that don't support them.
7903 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7908 if test -d /usr/nec; then
7909 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
7914 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7921 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7927 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7931 # PORTME Check for flag to pass linker flags through the system compiler.
7934 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7935 if test "$host_cpu" = ia64; then
7936 # AIX 5 now supports IA64 processor
7937 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7939 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
7943 # PIC is the default on this platform
7944 # Common symbols not allowed in MH_DYLIB files
7945 case $cc_basename in
7947 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
7948 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7953 mingw* | pw32* | os2*)
7954 # This hack is so that the source file can tell whether it is being
7955 # built for inclusion in a dll (and should export symbols for example).
7956 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
7959 hpux9* | hpux10* | hpux11*)
7960 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7961 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7968 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
7971 # Is there a better lt_prog_compiler_static that works with the bundled CC?
7972 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
7975 irix5* | irix6* | nonstopux*)
7976 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7977 # PIC (with -KPIC) is the default.
7978 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7982 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7983 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7987 case $cc_basename in
7989 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7990 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7991 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
7993 pgcc* | pgf77* | pgf90* | pgf95*)
7994 # Portland Group compilers (*not* the Pentium gcc compiler,
7995 # which looks to be a dead project)
7996 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7997 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
7998 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8001 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8002 # All Alpha code is PIC.
8003 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8008 osf3* | osf4* | osf5*)
8009 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8010 # All OSF/1 code is PIC.
8011 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
8015 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
8016 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
8020 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8021 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8022 case $cc_basename in
8024 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
8026 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
8031 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
8032 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
8033 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8036 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
8037 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8038 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
8039 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8043 if test -d /usr/nec ;then
8044 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
8045 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8050 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
8051 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
8055 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
8056 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
8060 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
8065 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
8068 # Check to make sure the PIC flag actually works.
8070 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
8071 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
8072 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
8073 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
8074 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
8076 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
8078 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
8079 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
8082 # For platforms which do not support PIC, -DPIC is meaningless:
8084 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
8087 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
8093 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
8094 # ------------------------------------
8095 # See if the linker supports building shared libraries.
8096 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
8097 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8099 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8102 # If we're using GNU nm, then we don't want the "-C" option.
8103 # -C means demangle to AIX nm, but means don't demangle with GNU nm
8104 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
8105 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
8107 _LT_AC_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'
8111 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
8114 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
8117 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8122 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
8123 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8124 _LT_AC_TAGVAR(archive_cmds, $1)=
8125 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
8126 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
8127 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
8128 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
8129 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8130 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
8131 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
8132 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8133 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8134 _LT_AC_TAGVAR(hardcode_direct, $1)=no
8135 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
8136 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8137 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
8138 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
8139 _LT_AC_TAGVAR(module_cmds, $1)=
8140 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
8141 _LT_AC_TAGVAR(always_export_symbols, $1)=no
8142 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8143 # include_expsyms should be a list of space-separated symbols to be *always*
8144 # included in the symbol list
8145 _LT_AC_TAGVAR(include_expsyms, $1)=
8146 # exclude_expsyms can be an extended regexp of symbols to exclude
8147 # it will be wrapped by ` (' and `)$', so one must not match beginning or
8148 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
8149 # as well as any symbol that contains `d'.
8150 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
8151 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
8152 # platforms (ab)use it in PIC code, but their linkers get confused if
8153 # the symbol is explicitly referenced. Since portable code cannot
8154 # rely on this symbol name, it's probably fine to never include it in
8155 # preloaded symbol tables.
8156 extract_expsyms_cmds=
8157 # Just being paranoid about ensuring that cc_basename is set.
8158 _LT_CC_BASENAME([$compiler])
8160 cygwin* | mingw* | pw32*)
8161 # FIXME: the MSVC++ port hasn't been tested in a loooong time
8162 # When not using gcc, we currently assume that we are using
8163 # Microsoft Visual C++.
8164 if test "$GCC" != yes; then
8173 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
8174 if test "$with_gnu_ld" = yes; then
8175 # If archive_cmds runs LD, not CC, wlarc should be empty
8178 # Set some defaults for GNU ld with shared library support. These
8179 # are reset later if shared libraries are not supported. Putting them
8180 # here allows them to be overridden if necessary.
8181 runpath_var=LD_RUN_PATH
8182 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8183 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8184 # ancient GNU ld didn't support --whole-archive et. al.
8185 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
8186 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8188 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8190 supports_anon_versioning=no
8191 case `$LD -v 2>/dev/null` in
8192 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
8193 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
8194 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
8195 *\ 2.11.*) ;; # other 2.11 versions
8196 *) supports_anon_versioning=yes ;;
8199 # See if GNU ld supports shared libraries.
8201 aix3* | aix4* | aix5*)
8202 # On AIX/PPC, the GNU linker is very broken
8203 if test "$host_cpu" != ia64; then
8204 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8207 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
8208 *** to be unable to reliably create shared libraries on AIX.
8209 *** Therefore, libtool is disabling shared libraries support. If you
8210 *** really care for shared libraries, you may want to modify your PATH
8211 *** so that a non-GNU linker is found, and then restart.
8218 _LT_AC_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)'
8219 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8220 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8222 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
8223 # that the semantics of dynamic libraries on AmigaOS, at least up
8224 # to version 4, is to share data among multiple programs linked
8225 # with the same dynamic library. Since this doesn't match the
8226 # behavior of shared libraries on other platforms, we can't use
8228 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8232 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8233 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8234 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8235 # support --undefined. This deserves some investigation. FIXME
8236 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8238 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8242 cygwin* | mingw* | pw32*)
8243 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8244 # as there is no search path for DLLs.
8245 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8246 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8247 _LT_AC_TAGVAR(always_export_symbols, $1)=no
8248 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8249 _LT_AC_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'
8251 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8252 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8253 # If the export-symbols file already is a .def file (1st line
8254 # is EXPORTS), use it as is; otherwise, prepend...
8255 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8256 cp $export_symbols $output_objdir/$soname.def;
8258 echo EXPORTS > $output_objdir/$soname.def;
8259 cat $export_symbols >> $output_objdir/$soname.def;
8261 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
8263 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8268 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8270 case $cc_basename,$host_cpu in
8271 pgcc*) # Portland Group C compiler
8272 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
8273 tmp_addflag=' $pic_flag'
8275 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
8276 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
8277 tmp_addflag=' $pic_flag -Mnomain' ;;
8278 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
8279 tmp_addflag=' -i_dynamic' ;;
8280 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
8281 tmp_addflag=' -i_dynamic -nofor_main' ;;
8282 ifc* | ifort*) # Intel Fortran compiler
8283 tmp_addflag=' -nofor_main' ;;
8285 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8287 if test $supports_anon_versioning = yes; then
8288 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
8289 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8290 $echo "local: *; };" >> $output_objdir/$libname.ver~
8291 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8294 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8299 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8300 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
8303 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8304 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8309 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
8310 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8313 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
8314 *** create shared libraries on Solaris systems. Therefore, libtool
8315 *** is disabling shared libraries support. We urge you to upgrade GNU
8316 *** binutils to release 2.9.1 or newer. Another option is to modify
8317 *** your PATH or compiler configuration so that the native linker is
8318 *** used, and then restart.
8321 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8322 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8323 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8325 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8330 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8332 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8333 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8337 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8338 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8339 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8341 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8346 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
8348 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
8349 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
8350 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
8353 # PORTME fill in a description of your system's linker (not GNU ld)
8356 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8357 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
8358 _LT_AC_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'
8359 # Note: this linker hardcodes the directories in LIBPATH if there
8360 # are no directories specified by -L.
8361 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8362 if test "$GCC" = yes && test -z "$link_static_flag"; then
8363 # Neither direct hardcoding nor static linking is supported with a
8365 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
8370 if test "$host_cpu" = ia64; then
8371 # On IA64, the linker does run time linking by default, so we don't
8372 # have to do anything special.
8373 aix_use_runtimelinking=no
8374 exp_sym_flag='-Bexport'
8377 # If we're using GNU nm, then we don't want the "-C" option.
8378 # -C means demangle to AIX nm, but means don't demangle with GNU nm
8379 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
8380 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
8382 _LT_AC_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'
8384 aix_use_runtimelinking=no
8386 # Test if we are trying to use run time linking or normal
8387 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8388 # need to do runtime linking.
8389 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
8390 for ld_flag in $LDFLAGS; do
8391 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
8392 aix_use_runtimelinking=yes
8398 exp_sym_flag='-bexport'
8399 no_entry_flag='-bnoentry'
8402 # When large executables or shared objects are built, AIX ld can
8403 # have problems creating the table of contents. If linking a library
8404 # or program results in "error TOC overflow" add -mminimal-toc to
8405 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
8406 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8408 _LT_AC_TAGVAR(archive_cmds, $1)=''
8409 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8410 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
8411 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8413 if test "$GCC" = yes; then
8414 case $host_os in aix4.[[012]]|aix4.[[012]].*)
8415 # We only want to do this on AIX 4.2 and lower, the check
8416 # below for broken collect2 doesn't work under 4.3+
8417 collect2name=`${CC} -print-prog-name=collect2`
8418 if test -f "$collect2name" && \
8419 strings "$collect2name" | grep resolve_lib_name >/dev/null
8421 # We have reworked collect2
8422 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8424 # We have old collect2
8425 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
8426 # It fails to find uninstalled libraries when the uninstalled
8427 # path is not listed in the libpath. Setting hardcode_minus_L
8428 # to unsupported forces relinking
8429 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8430 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8431 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
8434 shared_flag='-shared'
8435 if test "$aix_use_runtimelinking" = yes; then
8436 shared_flag="$shared_flag "'${wl}-G'
8440 if test "$host_cpu" = ia64; then
8441 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8442 # chokes on -Wl,-G. The following line is correct:
8445 if test "$aix_use_runtimelinking" = yes; then
8446 shared_flag='${wl}-G'
8448 shared_flag='${wl}-bM:SRE'
8453 # It seems that -bexpall does not export symbols beginning with
8454 # underscore (_), so it is better to generate a list of symbols to export.
8455 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
8456 if test "$aix_use_runtimelinking" = yes; then
8457 # Warning - without using the other runtime loading flags (-brtl),
8458 # -berok will link without error, but may produce a broken library.
8459 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
8460 # Determine the default libpath from the value encoded in an empty executable.
8461 _LT_AC_SYS_LIBPATH_AIX
8462 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8463 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8465 if test "$host_cpu" = ia64; then
8466 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8467 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8468 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
8470 # Determine the default libpath from the value encoded in an empty executable.
8471 _LT_AC_SYS_LIBPATH_AIX
8472 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8473 # Warning - without using the other run time loading flags,
8474 # -berok will link without error, but may produce a broken library.
8475 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8476 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8477 # -bexpall does not export symbols beginning with underscore (_)
8478 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
8479 # Exported symbols can be pulled into shared objects from archives
8480 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
8481 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8482 # This is similar to how AIX traditionally builds its shared libraries.
8483 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
8489 _LT_AC_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)'
8490 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8491 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8492 # see comment about different semantics on the GNU ld section
8493 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8497 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
8500 cygwin* | mingw* | pw32*)
8501 # When not using gcc, we currently assume that we are using
8502 # Microsoft Visual C++.
8503 # hardcode_libdir_flag_spec is actually meaningless, as there is
8504 # no search path for DLLs.
8505 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
8506 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8507 # Tell ltmain to make .lib files, not .a files.
8509 # Tell ltmain to make .dll files, not .so files.
8511 # FIXME: Setting linknames here is a bad hack.
8512 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
8513 # The linker will automatically build a .lib file if we build a DLL.
8514 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
8515 # FIXME: Should let the user specify the lib program.
8516 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
8517 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
8518 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8521 darwin* | rhapsody*)
8523 rhapsody* | darwin1.[[012]])
8524 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
8527 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8528 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8530 case ${MACOSX_DEPLOYMENT_TARGET} in
8532 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8535 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
8541 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8542 _LT_AC_TAGVAR(hardcode_direct, $1)=no
8543 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
8544 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
8545 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
8546 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8547 if test "$GCC" = yes ; then
8548 output_verbose_link_cmd='echo'
8549 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
8550 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8551 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
8552 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8553 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8555 case $cc_basename in
8557 output_verbose_link_cmd='echo'
8558 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
8559 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8560 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
8561 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8562 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8565 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8572 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8573 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8574 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8578 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8581 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
8582 # support. Future versions do this automatically, but an explicit c++rt0.o
8583 # does not break anything, and helps significantly (at the cost of a little
8586 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
8587 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8588 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8589 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8592 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
8594 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8595 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8596 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8597 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8600 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
8601 freebsd* | kfreebsd*-gnu | dragonfly*)
8602 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
8603 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8604 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8605 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8609 if test "$GCC" = yes; then
8610 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8612 _LT_AC_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'
8614 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8615 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8616 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8618 # hardcode_minus_L: Not really in the search PATH,
8619 # but as the default location of the library.
8620 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8621 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8625 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8628 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8631 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8637 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
8640 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
8644 if test "$with_gnu_ld" = no; then
8647 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8648 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
8649 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8650 _LT_AC_TAGVAR(hardcode_direct, $1)=no
8651 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8654 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8655 _LT_AC_TAGVAR(hardcode_direct, $1)=no
8656 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8658 # hardcode_minus_L: Not really in the search PATH,
8659 # but as the default location of the library.
8660 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8663 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8664 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8665 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8666 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8668 # hardcode_minus_L: Not really in the search PATH,
8669 # but as the default location of the library.
8670 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8676 irix5* | irix6* | nonstopux*)
8677 if test "$GCC" = yes; then
8678 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8680 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
8681 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
8683 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8684 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8685 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8689 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8690 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
8692 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
8694 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8695 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8696 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8700 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8701 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8702 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8703 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8704 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8708 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8709 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8710 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8711 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8712 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
8713 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8714 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8717 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
8718 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8719 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8722 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8723 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8730 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8731 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8732 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
8733 _LT_AC_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'
8734 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
8738 if test "$GCC" = yes; then
8739 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8740 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8742 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8743 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
8745 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8746 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8749 osf4* | osf5*) # as osf3* with the addition of -msym flag
8750 if test "$GCC" = yes; then
8751 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8752 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8753 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8755 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8756 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
8757 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
8758 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
8760 # Both c and cxx compiler support -rpath directly
8761 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8763 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
8767 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8768 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8769 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8770 runpath_var=LD_RUN_PATH
8771 hardcode_runpath_var=yes
8775 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
8776 if test "$GCC" = yes; then
8778 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8779 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8780 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
8783 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8784 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8785 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8787 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8788 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8790 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8792 # The compiler driver will combine linker options so we
8793 # cannot just pass the convience library names through
8794 # without $wl, iff we do not link with $LD.
8795 # Luckily, gcc supports the same syntax we need for Sun Studio.
8796 # Supported since Solaris 2.6 (maybe 2.5.1?)
8799 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
8801 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
8804 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8808 if test "x$host_vendor" = xsequent; then
8809 # Use $CC to link under sequent, because it throws in some extra .o
8810 # files that make .init and .fini sections work.
8811 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
8813 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
8815 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8816 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8817 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
8818 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8822 case $host_vendor in
8824 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8825 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
8828 ## LD is ld it makes a PLAMLIB
8829 ## CC just makes a GrossModule.
8830 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8831 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
8832 _LT_AC_TAGVAR(hardcode_direct, $1)=no
8835 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8836 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
8839 runpath_var='LD_RUN_PATH'
8840 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8844 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8845 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8846 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
8850 if test -d /usr/nec; then
8851 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8852 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8853 runpath_var=LD_RUN_PATH
8854 hardcode_runpath_var=yes
8855 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
8860 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8861 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
8862 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
8863 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8864 hardcode_runpath_var=yes
8865 runpath_var=LD_RUN_PATH
8868 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
8869 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
8870 if test "$GCC" = yes; then
8871 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8873 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8875 runpath_var='LD_RUN_PATH'
8876 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8880 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
8881 # $CC -shared without GNU ld will not create a library from C++
8882 # object files and a static libstdc++, better avoid it by now
8883 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8884 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8885 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8886 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
8887 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8888 runpath_var='LD_RUN_PATH'
8892 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8893 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8894 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8898 _LT_AC_TAGVAR(ld_shlibs, $1)=no
8903 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
8904 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8906 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
8907 if test "$GCC" = yes; then
8908 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
8912 # Do we need to explicitly link libc?
8914 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
8916 # Assume -lc should be added
8917 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8919 if test "$enable_shared" = yes && test "$GCC" = yes; then
8920 case $_LT_AC_TAGVAR(archive_cmds, $1) in
8922 # FIXME: we may have to deal with multi-command sequences.
8925 # Test whether the compiler implicitly links with -lc since on some
8926 # systems, -lgcc has to come before -lc. If gcc already passes -lc
8927 # to ld, don't add -lc before -lgcc.
8928 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
8930 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8932 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
8935 libobjs=conftest.$ac_objext
8937 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
8943 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
8944 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
8945 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
8947 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8949 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8951 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
8953 cat conftest.err 1>&5
8956 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
8962 ])# AC_LIBTOOL_PROG_LD_SHLIBS
8965 # _LT_AC_FILE_LTDLL_C
8966 # -------------------
8967 # Be careful that the start marker always follows a newline.
8968 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
8969 # /* ltdll.c starts here */
8970 # #define WIN32_LEAN_AND_MEAN
8971 # #include <windows.h>
8972 # #undef WIN32_LEAN_AND_MEAN
8973 # #include <stdio.h>
8975 # #ifndef __CYGWIN__
8976 # # ifdef __CYGWIN32__
8977 # # define __CYGWIN__ __CYGWIN32__
8981 # #ifdef __cplusplus
8984 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
8985 # #ifdef __cplusplus
8990 # #include <cygwin/cygwin_dll.h>
8991 # DECLARE_CYGWIN_DLL( DllMain );
8993 # HINSTANCE __hDllInstance_base;
8996 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
8998 # __hDllInstance_base = hInst;
9001 # /* ltdll.c ends here */
9002 ])# _LT_AC_FILE_LTDLL_C
9005 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
9006 # ---------------------------------
9007 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
9011 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
9012 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9013 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9014 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9015 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9016 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
9017 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
9019 # This is just to silence aclocal about the macro not being used
9020 ifelse([AC_DISABLE_FAST_INSTALL])
9022 #AC_DEFUN([LT_AC_PROG_GCJ],
9023 #[AC_CHECK_TOOL(GCJ, gcj, no)
9024 # test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
9025 # AC_SUBST(GCJFLAGS)
9028 #AC_DEFUN([LT_AC_PROG_RC],
9029 #[AC_CHECK_TOOL(RC, windres, no)
9032 ############################################################
9033 # NOTE: This macro has been submitted for inclusion into #
9034 # GNU Autoconf as AC_PROG_SED. When it is available in #
9035 # a released version of Autoconf we should remove this #
9036 # macro and use it instead. #
9037 ############################################################
9040 # Check for a fully-functional sed program, that truncates
9041 # as few characters as possible. Prefer GNU sed if found.
9042 AC_DEFUN([LT_AC_PROG_SED],
9043 [AC_MSG_CHECKING([for a sed that does not truncate output])
9044 AC_CACHE_VAL(lt_cv_path_SED,
9045 [# Loop through the user's path and test for sed and gsed.
9046 # Then use that list of sed's as ones to test for truncation.
9047 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9051 test -z "$as_dir" && as_dir=.
9052 for lt_ac_prog in sed gsed; do
9053 for ac_exec_ext in '' $ac_executable_extensions; do
9054 if test -f "$as_dir/$lt_ac_prog$ac_exec_ext"; then
9055 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
9062 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
9063 # along with /bin/sed that truncates output.
9064 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
9065 test ! -f $lt_ac_sed && continue
9066 cat /dev/null > conftest.in
9068 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
9069 # Check for GNU sed and select it if it is found.
9070 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
9071 lt_cv_path_SED=$lt_ac_sed
9075 cat conftest.in conftest.in >conftest.tmp
9076 mv conftest.tmp conftest.in
9077 cp conftest.in conftest.nl
9079 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
9080 cmp -s conftest.out conftest.nl || break
9081 # 10000 chars as input seems more than enough
9082 test $lt_ac_count -gt 10 && break
9083 lt_ac_count=`expr $lt_ac_count + 1`
9084 if test $lt_ac_count -gt $lt_ac_max; then
9085 lt_ac_max=$lt_ac_count
9086 lt_cv_path_SED=$lt_ac_sed
9092 AC_MSG_RESULT([$SED])