llvm.org GIT mirror llvm / a773bd5
Update the auto* tools: autoconf 2.60, libtool 1.5.22, automake 1.9.6. Update ltld.[ch] to version 1.5.22. Correct the notes about updating these tools (autoconf/README.TXT) Add configure options for getting the correct option for including a whole archive when linking. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29529 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 13 years ago
11 changed file(s) with 12756 addition(s) and 10015 deletion(s). Raw diff Collapse all Expand all
232232
233233 # Things we just assume are "there"
234234 ECHO := echo
235
236 # Get the options for causing archives to link all their content instead of
237 # just missing symbols, and the inverse of that. This is used for certain LLVM
238 # tools that permit loadable modules. It ensures that the LLVM symbols will be
239 # available to those loadable modules.
240 LINKALL := @LINKALL@
241 NOLINKALL := @NOLINKALL@
66 configfile=configure.ac
77 test -d autoconf && test -f autoconf/$configfile && cd autoconf
88 test -f $configfile || die "Can't find 'autoconf' dir; please cd into it first"
9 autoconf --version | grep '2\.59' > /dev/null
10 test $? -eq 0 || die "Your autoconf was not detected as being 2.59"
11 aclocal --version | grep '^aclocal.*1\.9\.2' > /dev/null
12 test $? -eq 0 || die "Your aclocal was not detected as being 1.9.2"
13 autoheader --version | grep '^autoheader.*2\.59' > /dev/null
14 test $? -eq 0 || die "Your autoheader was not detected as being 2.59"
15 libtool --version | grep '1\.5\.10' > /dev/null
16 test $? -eq 0 || die "Your libtool was not detected as being 1.5.10"
9 autoconf --version | grep '2\.60' > /dev/null
10 test $? -eq 0 || die "Your autoconf was not detected as being 2.60"
11 aclocal --version | grep '^aclocal.*1\.9\.6' > /dev/null
12 test $? -eq 0 || die "Your aclocal was not detected as being 1.9.6"
13 autoheader --version | grep '^autoheader.*2\.60' > /dev/null
14 test $? -eq 0 || die "Your autoheader was not detected as being 2.60"
15 libtool --version | grep '1\.5\.22' > /dev/null
16 test $? -eq 0 || die "Your libtool was not detected as being 1.5.22"
1717 echo ""
1818 echo "### NOTE: ############################################################"
1919 echo "### If you get *any* warnings from autoconf below you MUST fix the"
2323 echo "### present. You should get just three 'Regenerating..' lines."
2424 echo "######################################################################"
2525 echo ""
26 echo "Regenerating aclocal.m4 with aclocal 1.9.2"
26 echo "Regenerating aclocal.m4 with aclocal 1.9.6"
2727 cwd=`pwd`
2828 aclocal --force -I $cwd/m4 || die "aclocal failed"
29 echo "Regenerating configure with autoconf 2.59"
29 echo "Regenerating configure with autoconf 2.60"
3030 autoconf --force --warnings=all -o ../$outfile $configfile || die "autoconf failed"
3131 cd ..
32 echo "Regenerating config.h.in with autoheader 2.59"
32 echo "Regenerating config.h.in with autoheader 2.60"
3333 autoheader --warnings=all -I autoconf -I autoconf/m4 autoconf/$configfile || die "autoheader failed"
3434 exit 0
77 3. Copy /ltdl.m4 to llvm/autoconf/m4
88 4. Copy /share/aclocal/libtool.m4 to llvm/autoconf/m4/libtool.m4
99 5. Copy /share/libtool/ltmain.sh to llvm/autoconf/ltmain.sh
10 6. Run sed -e 's/output.exp/outputname.exp/g' on ltmain.sh
11 7. Copy /share/libtool/libltdl/ltdl.c to llvm/lib/System
12 8. Copy /share/libtool/libltdl/ltdl.h to llvm/lib/System
13 9. Adjust the llvm/autoconf/m4/libtool.m4 file to ensure that the variable
14 default_ofile is set to "mklib" instead of "libtool"
10 6. Copy /share/libtool/libltdl/ltdl.c to llvm/lib/System
11 7. Copy /share/libtool/libltdl/ltdl.h to llvm/lib/System
12 8. Edit the ltdl.h file to #include "llvm/Config/config.h" at the very top. You
13 might also need to resolve some compiler warnings (typically about
14 comparison of signed vs. unsigned values). But, you won't find out about
15 those until you build LLVM (step 13).
16 9. Edit the llvm/autoconf/m4/libtool.m4 file so that:
17 a) in AC_PROB_LIBTOOL macro, the value of LIBTOOL is set to
18 $(top_builddir)/mklib, not $(top_builddir)/libtool
19 b) in AC_LIBTOOL_SETUP macro, the variable default_ofile is set to
20 "mklib" instead of "libtool"
21 c) s/AC_ENABLE_SHARED_DEFAULT/enable_shared_default/g
22 d) s/AC_ENABLE_STATIC_DEFAULT/enable_static_default/g
23 e) s/AC_ENABLE_FAST_INSTALL_DEFAULT/enable_fast_install_default/g
1524 10. Run "autoupdate libtool.m4 ltdl.m4" in the llvm/autoconf/m4 directory.
1625 This should correctly update the macro definitions in the libtool m4
1726 files to match the version of autoconf that LLVM uses. This converts
1827 AC_HELP_STRING to AS_HELP_STRING and AC_TRY_LINK to AC_LINK_IFELSE, amongst
1928 other things. You may need to manually adjust the files.
2029 11. Run AutoRegen.sh to get the new macros into configure script
21 12. If there are any warnings from configure, go to step 9.
22 13. Rebuild LLVM, making sure it reconfigured
30 12. If there are any warnings from AutoRegen.sh, go to step 9.
31 13. Rebuild LLVM, making sure it reconfigures
2332 14. Test the JIT which uses libltdl
2433 15. If it all works, only THEN commit the changes.
2534
3544 5. Run autoupdate on all the m4 macros in llvm/autoconf/m4
3645 6. Run autoupdate on llvm/autoconf/configure.ac
3746 7. Regenerate configure script with AutoRegen.sh
38 8. If there are any warnings from autoconf, fix them and go to step 7.
47 8. If there are any warnings from AutoRegen.sh, fix them and go to step 7.
3948 9. Test, test, test.
101101 [llvm_cv_os_type],
102102 [case $host in
103103 *-*-aix*)
104 llvm_cv_link_all_option="-Wl,--whole-archive"
105 llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
104106 llvm_cv_os_type="AIX"
105107 llvm_cv_platform_type="Unix" ;;
106108 *-*-cygwin*)
109 llvm_cv_link_all_option="-Wl,--whole-archive"
110 llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
107111 llvm_cv_os_type="Cygwin"
108112 llvm_cv_platform_type="Unix" ;;
109113 *-*-darwin*)
114 llvm_cv_link_all_option="-Wl,-all_load"
115 llvm_cv_link_all_option="-Wl,-noall_load"
110116 llvm_cv_os_type="Darwin"
111117 llvm_cv_platform_type="Unix" ;;
112118 *-*-freebsd*)
119 llvm_cv_link_all_option="-Wl,--whole-archive"
120 llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
113121 llvm_cv_os_type="FreeBSD"
114122 llvm_cv_platform_type="Unix" ;;
115123 *-*-openbsd*)
124 llvm_cv_link_all_option="-Wl,--whole-archive"
125 llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
116126 llvm_cv_os_type="OpenBSD"
117127 llvm_cv_platform_type="Unix" ;;
118128 *-*-hpux*)
129 llvm_cv_link_all_option="-Wl,--whole-archive"
130 llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
119131 llvm_cv_os_type="HP-UX"
120132 llvm_cv_platform_type="Unix" ;;
121133 *-*-interix*)
134 llvm_cv_link_all_option="-Wl,--whole-archive"
135 llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
122136 llvm_cv_os_type="Interix"
123137 llvm_cv_platform_type="Unix" ;;
124138 *-*-linux*)
139 llvm_cv_link_all_option="-Wl,--whole-archive"
140 llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
125141 llvm_cv_os_type="Linux"
126142 llvm_cv_platform_type="Unix" ;;
127143 *-*-solaris*)
144 llvm_cv_link_all_option="-Wl,-z,allextract"
145 llvm_cv_no_link_all_option="-Wl,-z,defaultextract"
128146 llvm_cv_os_type="SunOS"
129147 llvm_cv_platform_type="Unix" ;;
130148 *-*-win32*)
149 llvm_cv_link_all_option="-Wl,--whole-archive"
150 llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
131151 llvm_cv_os_type="Win32"
132152 llvm_cv_platform_type="Win32" ;;
133153 *-*-mingw*)
154 llvm_cv_link_all_option="-Wl,--whole-archive"
155 llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
134156 llvm_cv_os_type="MingW"
135157 llvm_cv_platform_type="Win32" ;;
136158 *)
159 llvm_cv_link_all_option=""
160 llvm_cv_no_link_all_option=""
137161 llvm_cv_os_type="Unknown"
138162 llvm_cv_platform_type="Unknown" ;;
139163 esac])
146170 dnl Set the "OS" Makefile variable based on the platform type so the
147171 dnl makefile can configure itself to specific build hosts
148172 AC_SUBST(OS,$llvm_cv_os_type)
173
174 dnl Set the LINKALL and NOLINKALL Makefile variables based on the platform
175 AC_SUBST(LINKALL,$llvm_cv_link_all_option)
176 AC_SUBST(NOLINKALL,$llvm_cv_no_link_all_option)
149177
150178 dnl Set the "LLVM_ON_*" variables based on llvm_cvs_platform_type
151179 dnl This is used by lib/System to determine the basic kind of implementation
0 # ltmain.sh - Provide generalized library-building support services.
11 # NOTE: Changing this file will not affect anything until you rerun configure.
22 #
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
44 # Free Software Foundation, Inc.
55 # Originally by Gordon Matzigkeit , 1996
66 #
1616 #
1717 # You should have received a copy of the GNU General Public License
1818 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2020 #
2121 # As a special exception to the GNU General Public License, if you
2222 # distribute this file as part of a program that contains a
4242
4343 PROGRAM=ltmain.sh
4444 PACKAGE=libtool
45 VERSION=1.5.10
46 TIMESTAMP=" (1.1220.2.130 2004/09/19 12:13:49)"
45 VERSION=1.5.22
46 TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
4747
4848 # See if we are running on zsh, and set the options which allow our
4949 # commands through without removal of \ escapes.
8787 Xsed="${SED}"' -e 1s/^X//'
8888 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
8989 # test EBCDIC or ASCII
90 case `echo A|tr A '\301'` in
91 A) # EBCDIC based system
92 SP2NL="tr '\100' '\n'"
93 NL2SP="tr '\r\n' '\100\100'"
90 case `echo X|tr X '\101'` in
91 A) # ASCII based system
92 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
93 SP2NL='tr \040 \012'
94 NL2SP='tr \015\012 \040\040'
9495 ;;
95 *) # Assume ASCII based system
96 SP2NL="tr '\040' '\012'"
97 NL2SP="tr '\015\012' '\040\040'"
96 *) # EBCDIC based system
97 SP2NL='tr \100 \n'
98 NL2SP='tr \r\n \100\100'
9899 ;;
99100 esac
100101
111112 fi
112113
113114 # Make sure IFS has a sensible default
114 : ${IFS="
115 "}
115 lt_nl='
116 '
117 IFS=" $lt_nl"
116118
117119 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
118120 $echo "$modename: not configured to build any kind of library" 1>&2
129131 show="$echo"
130132 show_help=
131133 execute_dlfiles=
134 duplicate_deps=no
135 preserve_args=
132136 lo2o="s/\\.lo\$/.${objext}/"
133137 o2lo="s/\\.${objext}\$/.lo/"
134138
135139 #####################################
136140 # Shell function definitions:
137141 # This seems to be the best place for them
142
143 # func_mktempdir [string]
144 # Make a temporary directory that won't clash with other running
145 # libtool processes, and avoids race conditions if possible. If
146 # given, STRING is the basename for that directory.
147 func_mktempdir ()
148 {
149 my_template="${TMPDIR-/tmp}/${1-$progname}"
150
151 if test "$run" = ":"; then
152 # Return a directory name, but don't create it in dry-run mode
153 my_tmpdir="${my_template}-$$"
154 else
155
156 # If mktemp works, use that first and foremost
157 my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
158
159 if test ! -d "$my_tmpdir"; then
160 # Failing that, at least try and use $RANDOM to avoid a race
161 my_tmpdir="${my_template}-${RANDOM-0}$$"
162
163 save_mktempdir_umask=`umask`
164 umask 0077
165 $mkdir "$my_tmpdir"
166 umask $save_mktempdir_umask
167 fi
168
169 # If we're not in dry-run mode, bomb out on failure
170 test -d "$my_tmpdir" || {
171 $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
172 exit $EXIT_FAILURE
173 }
174 fi
175
176 $echo "X$my_tmpdir" | $Xsed
177 }
178
138179
139180 # func_win32_libid arg
140181 # return the library type of file 'arg'
142183 # Need a lot of goo to handle *both* DLLs and import libs
143184 # Has to be a shell function in order to 'eat' the argument
144185 # that is supplied when $file_magic_command is called.
145 func_win32_libid () {
186 func_win32_libid ()
187 {
146188 win32_libid_type="unknown"
147189 win32_fileres=`file -L $1 2>/dev/null`
148190 case $win32_fileres in
153195 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
154196 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
155197 win32_nmres=`eval $NM -f posix -A $1 | \
156 sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
157 if test "X$win32_nmres" = "Ximport" ; then
158 win32_libid_type="x86 archive import"
159 else
160 win32_libid_type="x86 archive static"
161 fi
198 $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
199 case $win32_nmres in
200 import*) win32_libid_type="x86 archive import";;
201 *) win32_libid_type="x86 archive static";;
202 esac
162203 fi
163204 ;;
164205 *DLL*)
182223 # Only attempt this if the compiler in the base compile
183224 # command doesn't match the default compiler.
184225 # arg is usually of the form 'gcc ...'
185 func_infer_tag () {
226 func_infer_tag ()
227 {
186228 if test -n "$available_tags" && test -z "$tagname"; then
187229 CC_quoted=
188230 for arg in $CC; do
241283 }
242284
243285
286 # func_extract_an_archive dir oldlib
287 func_extract_an_archive ()
288 {
289 f_ex_an_ar_dir="$1"; shift
290 f_ex_an_ar_oldlib="$1"
291
292 $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
293 $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
294 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
295 :
296 else
297 $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
298 exit $EXIT_FAILURE
299 fi
300 }
301
244302 # func_extract_archives gentop oldlib ...
245 func_extract_archives () {
303 func_extract_archives ()
304 {
246305 my_gentop="$1"; shift
247306 my_oldlibs=${1+"$@"}
248307 my_oldobjs=""
273332 $run ${rm}r "$my_xdir"
274333 $show "$mkdir $my_xdir"
275334 $run $mkdir "$my_xdir"
276 status=$?
277 if test "$status" -ne 0 && test ! -d "$my_xdir"; then
278 exit $status
335 exit_status=$?
336 if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
337 exit $exit_status
279338 fi
280339 case $host in
281340 *-darwin*)
286345 cd $my_xdir || exit $?
287346 darwin_archive=$my_xabs
288347 darwin_curdir=`pwd`
289 darwin_base_archive=`basename $darwin_archive`
348 darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
290349 darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
291350 if test -n "$darwin_arches"; then
292351 darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
295354 for darwin_arch in $darwin_arches ; do
296355 mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
297356 lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
298 # Remove the table of contents from the thin files.
299 $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF 2>/dev/null || true
300 $AR -d "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" __.SYMDEF\ SORTED 2>/dev/null || true
301357 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
302 $AR -xo "${darwin_base_archive}"
303 rm "${darwin_base_archive}"
358 func_extract_an_archive "`pwd`" "${darwin_base_archive}"
304359 cd "$darwin_curdir"
360 $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
305361 done # $darwin_arches
306362 ## Okay now we have a bunch of thin objects, gotta fatten them up :)
307 darwin_filelist=`find unfat-$$ -type f | xargs basename | sort -u | $NL2SP`
363 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
308364 darwin_file=
309365 darwin_files=
310366 for darwin_file in $darwin_filelist; do
311367 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
312368 lipo -create -output "$darwin_file" $darwin_files
313369 done # $darwin_filelist
314 rm -rf unfat-$$
370 ${rm}r unfat-$$
315371 cd "$darwin_orig_dir"
316372 else
317 cd $darwin_orig_dir
318 (cd $my_xdir && $AR x $my_xabs) || exit $?
373 cd "$darwin_orig_dir"
374 func_extract_an_archive "$my_xdir" "$my_xabs"
319375 fi # $darwin_arches
320376 fi # $run
321 ;;
377 ;;
322378 *)
323 # We will extract separately just the conflicting names and we will
324 # no longer touch any unique names. It is faster to leave these
325 # extract automatically by $AR in one run.
326 $show "(cd $my_xdir && $AR x $my_xabs)"
327 $run eval "(cd \$my_xdir && $AR x \$my_xabs)" || exit $?
328 if ($AR t "$my_xabs" | sort | sort -uc >/dev/null 2>&1); then
329 :
330 else
331 $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
332 $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
333 $AR t "$my_xabs" | sort | uniq -cd | while read -r count name
334 do
335 i=1
336 while test "$i" -le "$count"
337 do
338 # Put our $i before any first dot (extension)
339 # Never overwrite any file
340 name_to="$name"
341 while test "X$name_to" = "X$name" || test -f "$my_xdir/$name_to"
342 do
343 name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
344 done
345 $show "(cd $my_xdir && $AR xN $i $my_xabs '$name' && $mv '$name' '$name_to')"
346 $run eval "(cd \$my_xdir && $AR xN $i \$my_xabs '$name' && $mv '$name' '$name_to')" || exit $?
347 i=`expr $i + 1`
348 done
349 done
350 fi
351 ;;
379 func_extract_an_archive "$my_xdir" "$my_xabs"
380 ;;
352381 esac
353382 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
354383 done
355
356384 func_extract_archives_result="$my_oldobjs"
357385 }
358386 # End of Shell function definitions
360388
361389 # Darwin sucks
362390 eval std_shrext=\"$shrext_cmds\"
391
392 disable_libs=no
363393
364394 # Parse our command line options once, thoroughly.
365395 while test "$#" -gt 0
425455 --version)
426456 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
427457 $echo
428 $echo "Copyright (C) 2003 Free Software Foundation, Inc."
458 $echo "Copyright (C) 2005 Free Software Foundation, Inc."
429459 $echo "This is free software; see the source for copying conditions. There is NO"
430460 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
431 exit $EXIT_SUCCESS
461 exit $?
432462 ;;
433463
434464 --config)
437467 for tagname in $taglist; do
438468 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
439469 done
440 exit $EXIT_SUCCESS
470 exit $?
441471 ;;
442472
443473 --debug)
462492 else
463493 $echo "disable static libraries"
464494 fi
465 exit $EXIT_SUCCESS
495 exit $?
466496 ;;
467497
468498 --finish) mode="finish" ;;
477507 preserve_args="$preserve_args $arg"
478508 ;;
479509
480 --tag) prevopt="--tag" prev=tag ;;
510 --tag)
511 prevopt="--tag"
512 prev=tag
513 preserve_args="$preserve_args --tag"
514 ;;
481515 --tag=*)
482516 set tag "$optarg" ${1+"$@"}
483517 shift
509543 exit $EXIT_FAILURE
510544 fi
511545
546 case $disable_libs in
547 no)
548 ;;
549 shared)
550 build_libtool_libs=no
551 build_old_libs=yes
552 ;;
553 static)
554 build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
555 ;;
556 esac
557
512558 # If this variable is set in any of the actions, the command in it
513559 # will be execed at the end. This prevents here-documents from being
514560 # left over by shells.
519565 # Infer the operation mode.
520566 if test -z "$mode"; then
521567 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
522 $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
568 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
523569 case $nonopt in
524570 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
525571 mode=link
585631
586632 for arg
587633 do
588 case "$arg_mode" in
634 case $arg_mode in
589635 arg )
590636 # do not "continue". Instead, add this to base_compile
591637 lastarg="$arg"
667713 case $lastarg in
668714 # Double-quote args containing other shell metacharacters.
669715 # Many Bourne shells cannot handle close brackets correctly
670 # in scan sets, so we specify it separately.
716 # in scan sets, and some SunOS ksh mistreat backslash-escaping
717 # in scan sets (worked around with variable expansion),
718 # and furthermore cannot handle '|' '&' '(' ')' in scan sets
719 # at all, so we specify them separately.
671720 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
672721 lastarg="\"$lastarg\""
673722 ;;
741790 esac
742791 done
743792
793 qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
794 case $qlibobj in
795 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
796 qlibobj="\"$qlibobj\"" ;;
797 esac
798 test "X$libobj" != "X$qlibobj" \
799 && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
800 && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
744801 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
745802 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
746803 if test "X$xdir" = "X$obj"; then
813870 $run $rm $removelist
814871 exit $EXIT_FAILURE
815872 fi
816 $echo $srcfile > "$lockfile"
873 $echo "$srcfile" > "$lockfile"
817874 fi
818875
819876 if test -n "$fix_srcfile_path"; then
820877 eval srcfile=\"$fix_srcfile_path\"
821878 fi
879 qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
880 case $qsrcfile in
881 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
882 qsrcfile="\"$qsrcfile\"" ;;
883 esac
822884
823885 $run $rm "$libobj" "${libobj}T"
824886
840902 fbsd_hideous_sh_bug=$base_compile
841903
842904 if test "$pic_mode" != no; then
843 command="$base_compile $srcfile $pic_flag"
905 command="$base_compile $qsrcfile $pic_flag"
844906 else
845907 # Don't build PIC code
846 command="$base_compile $srcfile"
908 command="$base_compile $qsrcfile"
847909 fi
848910
849911 if test ! -d "${xdir}$objdir"; then
850912 $show "$mkdir ${xdir}$objdir"
851913 $run $mkdir ${xdir}$objdir
852 status=$?
853 if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
854 exit $status
914 exit_status=$?
915 if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
916 exit $exit_status
855917 fi
856918 fi
857919
923985 if test "$build_old_libs" = yes; then
924986 if test "$pic_mode" != yes; then
925987 # Don't build PIC code
926 command="$base_compile $srcfile"
988 command="$base_compile $qsrcfile"
927989 else
928 command="$base_compile $srcfile $pic_flag"
990 command="$base_compile $qsrcfile $pic_flag"
929991 fi
930992 if test "$compiler_c_o" = yes; then
931993 command="$command -o $obj"
10541116 no_install=no
10551117 objs=
10561118 non_pic_objects=
1119 notinst_path= # paths that contain not-installed libtool libraries
10571120 precious_files_regex=
10581121 prefer_static_libs=no
10591122 preload=no
10821145 if test -n "$link_static_flag"; then
10831146 dlopen_self=$dlopen_self_static
10841147 fi
1148 prefer_static_libs=yes
10851149 else
10861150 if test -z "$pic_flag" && test -n "$link_static_flag"; then
10871151 dlopen_self=$dlopen_self_static
10881152 fi
1153 prefer_static_libs=built
10891154 fi
10901155 build_libtool_libs=no
10911156 build_old_libs=yes
1092 prefer_static_libs=yes
10931157 break
10941158 ;;
10951159 esac
12641328 if test -z "$pic_object" || test "$pic_object" = none ; then
12651329 arg="$non_pic_object"
12661330 fi
1331 else
1332 # If the PIC object exists, use it instead.
1333 # $xdir was prepended to $pic_object above.
1334 non_pic_object="$pic_object"
1335 non_pic_objects="$non_pic_objects $non_pic_object"
12671336 fi
12681337 else
12691338 # Only an error if not doing a dry-run.
13471416 prev=
13481417 continue
13491418 ;;
1419 darwin_framework|darwin_framework_skip)
1420 test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
1421 compile_command="$compile_command $arg"
1422 finalize_command="$finalize_command $arg"
1423 prev=
1424 continue
1425 ;;
13501426 *)
13511427 eval "$prev=\"\$arg\""
13521428 prev=
14021478 else
14031479 prev=expsyms_regex
14041480 fi
1481 continue
1482 ;;
1483
1484 -framework|-arch|-isysroot)
1485 case " $CC " in
1486 *" ${arg} ${1} "* | *" ${arg} ${1} "*)
1487 prev=darwin_framework_skip ;;
1488 *) compiler_flags="$compiler_flags $arg"
1489 prev=darwin_framework ;;
1490 esac
1491 compile_command="$compile_command $arg"
1492 finalize_command="$finalize_command $arg"
14051493 continue
14061494 ;;
14071495
14311519 absdir=`cd "$dir" && pwd`
14321520 if test -z "$absdir"; then
14331521 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1434 exit $EXIT_FAILURE
1522 absdir="$dir"
1523 notinst_path="$notinst_path $dir"
14351524 fi
14361525 dir="$absdir"
14371526 ;;
14451534 esac
14461535 case $host in
14471536 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1537 testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
14481538 case :$dllsearchpath: in
14491539 *":$dir:"*) ;;
14501540 *) dllsearchpath="$dllsearchpath:$dir";;
14511541 esac
1542 case :$dllsearchpath: in
1543 *":$testbindir:"*) ;;
1544 *) dllsearchpath="$dllsearchpath:$testbindir";;
1545 esac
14521546 ;;
14531547 esac
14541548 continue
14571551 -l*)
14581552 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
14591553 case $host in
1460 *-*-cygwin* | *-*-pw32* | *-*-beos*)
1554 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
14611555 # These systems don't actually have a C or math library (as such)
14621556 continue
14631557 ;;
1464 *-*-mingw* | *-*-os2*)
1558 *-*-os2*)
14651559 # These systems don't actually have a C library (as such)
14661560 test "X$arg" = "X-lc" && continue
14671561 ;;
1468 *-*-openbsd* | *-*-freebsd*)
1562 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
14691563 # Do not include libc due to us having libc/libc_r.
14701564 test "X$arg" = "X-lc" && continue
14711565 ;;
14731567 # Rhapsody C and math libraries are in the System framework
14741568 deplibs="$deplibs -framework System"
14751569 continue
1570 ;;
1571 *-*-sco3.2v5* | *-*-sco5v6*)
1572 # Causes problems with __ctype
1573 test "X$arg" = "X-lc" && continue
1574 ;;
1575 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
1576 # Compiler inserts libc in the correct place for threads to work
1577 test "X$arg" = "X-lc" && continue
1578 ;;
14761579 esac
14771580 elif test "X$arg" = "X-lc_r"; then
14781581 case $host in
1479 *-*-openbsd* | *-*-freebsd*)
1582 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
14801583 # Do not include libc_r directly, use -pthread flag.
14811584 continue
14821585 ;;
14861589 continue
14871590 ;;
14881591
1592 # Tru64 UNIX uses -model [arg] to determine the layout of C++
1593 # classes, name mangling, and exception handling.
1594 -model)
1595 compile_command="$compile_command $arg"
1596 compiler_flags="$compiler_flags $arg"
1597 finalize_command="$finalize_command $arg"
1598 prev=xcompiler
1599 continue
1600 ;;
1601
14891602 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
1490 deplibs="$deplibs $arg"
1603 compiler_flags="$compiler_flags $arg"
1604 compile_command="$compile_command $arg"
1605 finalize_command="$finalize_command $arg"
14911606 continue
14921607 ;;
14931608
14961611 continue
14971612 ;;
14981613
1499 # gcc -m* arguments should be passed to the linker via $compiler_flags
1500 # in order to pass architecture information to the linker
1501 # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo
1502 # but this is not reliable with gcc because gcc may use -mfoo to
1503 # select a different linker, different libraries, etc, while
1504 # -Wl,-mfoo simply passes -mfoo to the linker.
1505 -m*)
1614 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
1615 # -r[0-9][0-9]* specifies the processor on the SGI compiler
1616 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
1617 # +DA*, +DD* enable 64-bit mode on the HP compiler
1618 # -q* pass through compiler args for the IBM compiler
1619 # -m* pass through architecture-specific compiler args for GCC
1620 # -m*, -t[45]*, -txscale* pass through architecture-specific
1621 # compiler args for GCC
1622 # -pg pass through profiling flag for GCC
1623 # @file GCC response files
1624 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
1625 -t[45]*|-txscale*|@*)
1626
15061627 # Unknown arguments in both finalize_command and compile_command need
15071628 # to be aesthetically quoted because they are evaled later.
15081629 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
15131634 esac
15141635 compile_command="$compile_command $arg"
15151636 finalize_command="$finalize_command $arg"
1516 if test "$with_gcc" = "yes" ; then
1517 compiler_flags="$compiler_flags $arg"
1518 fi
1637 compiler_flags="$compiler_flags $arg"
15191638 continue
15201639 ;;
15211640
17531872 if test -z "$pic_object" || test "$pic_object" = none ; then
17541873 arg="$non_pic_object"
17551874 fi
1875 else
1876 # If the PIC object exists, use it instead.
1877 # $xdir was prepended to $pic_object above.
1878 non_pic_object="$pic_object"
1879 non_pic_objects="$non_pic_objects $non_pic_object"
17561880 fi
17571881 else
17581882 # Only an error if not doing a dry-run.
18581982 if test ! -d "$output_objdir"; then
18591983 $show "$mkdir $output_objdir"
18601984 $run $mkdir $output_objdir
1861 status=$?
1862 if test "$status" -ne 0 && test ! -d "$output_objdir"; then
1863 exit $status
1985 exit_status=$?
1986 if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
1987 exit $exit_status
18641988 fi
18651989 fi
18661990
19232047 newlib_search_path=
19242048 need_relink=no # whether we're linking any uninstalled libtool libraries
19252049 notinst_deplibs= # not-installed libtool libraries
1926 notinst_path= # paths that contain not-installed libtool libraries
19272050 case $linkmode in
19282051 lib)
19292052 passes="conv link"
19752098 compile_deplibs="$deplib $compile_deplibs"
19762099 finalize_deplibs="$deplib $finalize_deplibs"
19772100 else
1978 deplibs="$deplib $deplibs"
2101 compiler_flags="$compiler_flags $deplib"
19792102 fi
19802103 continue
19812104 ;;
19822105 -l*)
19832106 if test "$linkmode" != lib && test "$linkmode" != prog; then
19842107 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
1985 continue
1986 fi
1987 if test "$pass" = conv; then
1988 deplibs="$deplib $deplibs"
19892108 continue
19902109 fi
19912110 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
21632282 esac # case $deplib
21642283 if test "$found" = yes || test -f "$lib"; then :
21652284 else
2166 $echo "$modename: cannot find the library \`$lib'" 1>&2
2285 $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
21672286 exit $EXIT_FAILURE
21682287 fi
21692288
21872306 # it will not redefine variables installed, or shouldnotlink
21882307 installed=yes
21892308 shouldnotlink=no
2309 avoidtemprpath=
2310
21902311
21912312 # Read the .la file
21922313 case $lib in
22852406 dir="$libdir"
22862407 absdir="$libdir"
22872408 fi
2409 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
22882410 else
22892411 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
22902412 dir="$ladir"
23692491 if test -n "$library_names" &&
23702492 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
23712493 # We need to hardcode the library path
2372 if test -n "$shlibpath_var"; then
2494 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
23732495 # Make sure the rpath contains only unique directories.
23742496 case "$temp_rpath " in
23752497 *" $dir "*) ;;
23762498 *" $absdir "*) ;;
2377 *) temp_rpath="$temp_rpath $dir" ;;
2499 *) temp_rpath="$temp_rpath $absdir" ;;
23782500 esac
23792501 fi
23802502
24112533 fi
24122534
24132535 link_static=no # Whether the deplib will be linked statically
2536 use_static_libs=$prefer_static_libs
2537 if test "$use_static_libs" = built && test "$installed" = yes ; then
2538 use_static_libs=no
2539 fi
24142540 if test -n "$library_names" &&
2415 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
2541 { test "$use_static_libs" = no || test -z "$old_library"; }; then
24162542 if test "$installed" = no; then
24172543 notinst_deplibs="$notinst_deplibs $lib"
24182544 need_relink=yes
25252651 if test "$hardcode_direct" = no; then
25262652 add="$dir/$linklib"
25272653 case $host in
2528 *-*-sco3.2v5* ) add_dir="-L$dir" ;;
2654 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
2655 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
2656 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
2657 *-*-unixware7*) add_dir="-L$dir" ;;
25292658 *-*-darwin* )
25302659 # if the lib is a module then we can not link against
25312660 # it, someone is ignoring the new warnings I added
2532 if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
2661 if /usr/bin/file -L $add 2> /dev/null |
2662 $EGREP ": [^:]* bundle" >/dev/null ; then
25332663 $echo "** Warning, lib $linklib is a module, not a shared library"
25342664 if test -z "$old_library" ; then
25352665 $echo
25602690 add_dir="-L$dir"
25612691 # Try looking first in the location we're being installed to.
25622692 if test -n "$inst_prefix_dir"; then
2563 case "$libdir" in
2693 case $libdir in
25642694 [\\/]*)
25652695 add_dir="$add_dir -L$inst_prefix_dir$libdir"
25662696 ;;
26332763 add_dir="-L$libdir"
26342764 # Try looking first in the location we're being installed to.
26352765 if test -n "$inst_prefix_dir"; then
2636 case "$libdir" in
2766 case $libdir in
26372767 [\\/]*)
26382768 add_dir="$add_dir -L$inst_prefix_dir$libdir"
26392769 ;;
26942824 fi
26952825 fi
26962826 else
2697 convenience="$convenience $dir/$old_library"
2698 old_convenience="$old_convenience $dir/$old_library"
26992827 deplibs="$dir/$old_library $deplibs"
27002828 link_static=yes
27012829 fi
28132941 *) continue ;;
28142942 esac
28152943 case " $deplibs " in
2944 *" $path "*) ;;
2945 *) deplibs="$path $deplibs" ;;
2946 esac
2947 case " $deplibs " in
28162948 *" $depdepl "*) ;;
28172949 *) deplibs="$depdepl $deplibs" ;;
2818 esac
2819 case " $deplibs " in
2820 *" $path "*) ;;
2821 *) deplibs="$deplibs $path" ;;
28222950 esac
28232951 done
28242952 fi # link_all_deplibs != no
30833211
30843212 # Check that each of the things are valid numbers.
30853213 case $current in
3086 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
3214 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
30873215 *)
3088 $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
3216 $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
30893217 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
30903218 exit $EXIT_FAILURE
30913219 ;;
30923220 esac
30933221
30943222 case $revision in
3095 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
3223 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
30963224 *)
3097 $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
3225 $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
30983226 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
30993227 exit $EXIT_FAILURE
31003228 ;;
31013229 esac
31023230
31033231 case $age in
3104 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
3232 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
31053233 *)
3106 $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
3234 $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
31073235 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
31083236 exit $EXIT_FAILURE
31093237 ;;
32823410
32833411 # Eliminate all temporary directories.
32843412 for path in $notinst_path; do
3285 lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
3286 deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
3287 dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
3413 lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
3414 deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
3415 dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
32883416 done
32893417
32903418 if test -n "$xrpath"; then
33353463 *-*-netbsd*)
33363464 # Don't link with libc until the a.out ld.so is fixed.
33373465 ;;
3338 *-*-openbsd* | *-*-freebsd*)
3466 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
33393467 # Do not include libc due to us having libc/libc_r.
3340 test "X$arg" = "X-lc" && continue
3468 ;;
3469 *-*-sco3.2v5* | *-*-sco5v6*)
3470 # Causes problems with __ctype
3471 ;;
3472 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
3473 # Compiler inserts libc in the correct place for threads to work
33413474 ;;
33423475 *)
33433476 # Add libc to deplibs on all other systems if necessary.
33813514 int main() { return 0; }
33823515 EOF
33833516 $rm conftest
3384 $LTCC -o conftest conftest.c $deplibs
3517 $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
33853518 if test "$?" -eq 0 ; then
33863519 ldd_output=`ldd conftest`
33873520 for i in $deplibs; do
3388 name="`expr $i : '-l\(.*\)'`"
3521 name=`expr $i : '-l\(.*\)'`
33893522 # If $name is empty we are operating on a -L argument.
33903523 if test "$name" != "" && test "$name" -ne "0"; then
33913524 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
34223555 # Error occurred in the first compile. Let's try to salvage
34233556 # the situation: Compile a separate program for each library.
34243557 for i in $deplibs; do
3425 name="`expr $i : '-l\(.*\)'`"
3558 name=`expr $i : '-l\(.*\)'`
34263559 # If $name is empty we are operating on a -L argument.
34273560 if test "$name" != "" && test "$name" != "0"; then
34283561 $rm conftest
3429 $LTCC -o conftest conftest.c $i
3562 $LTCC $LTCFLAGS -o conftest conftest.c $i
34303563 # Did it work?
34313564 if test "$?" -eq 0 ; then
34323565 ldd_output=`ldd conftest`
34743607 set dummy $deplibs_check_method
34753608 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
34763609 for a_deplib in $deplibs; do
3477 name="`expr $a_deplib : '-l\(.*\)'`"
3610 name=`expr $a_deplib : '-l\(.*\)'`
34783611 # If $name is empty we are operating on a -L argument.
34793612 if test "$name" != "" && test "$name" != "0"; then
34803613 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
35433676 set dummy $deplibs_check_method
35443677 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
35453678 for a_deplib in $deplibs; do
3546 name="`expr $a_deplib : '-l\(.*\)'`"
3679 name=`expr $a_deplib : '-l\(.*\)'`
35473680 # If $name is empty we are operating on a -L argument.
35483681 if test -n "$name" && test "$name" != "0"; then
35493682 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
36733806 deplibs=$newdeplibs
36743807 fi
36753808
3809
3810 # move library search paths that coincide with paths to not yet
3811 # installed libraries to the beginning of the library search list
3812 new_libs=
3813 for path in $notinst_path; do
3814 case " $new_libs " in
3815 *" -L$path/$objdir "*) ;;
3816 *)
3817 case " $deplibs " in
3818 *" -L$path/$objdir "*)
3819 new_libs="$new_libs -L$path/$objdir" ;;
3820 esac
3821 ;;
3822 esac
3823 done
3824 for deplib in $deplibs; do
3825 case $deplib in
3826 -L*)
3827 case " $new_libs " in
3828 *" $deplib "*) ;;
3829 *) new_libs="$new_libs $deplib" ;;
3830 esac
3831 ;;
3832 *) new_libs="$new_libs $deplib" ;;
3833 esac
3834 done
3835 deplibs="$new_libs"
3836
3837
36763838 # All the library-specific variables (install_libdir is set above).
36773839 library_names=
36783840 old_library=
37563918 fi
37573919
37583920 lib="$output_objdir/$realname"
3921 linknames=
37593922 for link
37603923 do
37613924 linknames="$linknames $link"
37843947 # The command line is too long to execute in one step.
37853948 $show "using reloadable object file for export list..."
37863949 skipped_export=:
3950 # Break out early, otherwise skipped_export may be
3951 # set to false by a later but shorter cmd.
3952 break
37873953 fi
37883954 done
37893955 IFS="$save_ifs"
38534019 fi
38544020 fi
38554021
3856 if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
4022 if test "X$skipped_export" != "X:" &&
4023 len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
38574024 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
38584025 :
38594026 else
38724039 save_libobjs=$libobjs
38734040 fi
38744041 save_output=$output
4042 output_la=`$echo "X$output" | $Xsed -e "$basename"`
38754043
38764044 # Clear the reloadable object creation command queue and
38774045 # initialize k to one.
38814049 delfiles=
38824050 last_robj=
38834051 k=1
3884 output=$output_objdir/$save_output-${k}.$objext
4052 output=$output_objdir/$output_la-${k}.$objext
38854053 # Loop over the list of objects to be linked.
38864054 for obj in $save_libobjs
38874055 do
38884056 eval test_cmds=\"$reload_cmds $objlist $last_robj\"
38894057 if test "X$objlist" = X ||
3890 { len=`expr "X$test_cmds" : ".*"` &&
4058 { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
38914059 test "$len" -le "$max_cmd_len"; }; then
38924060 objlist="$objlist $obj"
38934061 else
39014069 # the last one created.
39024070 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
39034071 fi
3904 last_robj=$output_objdir/$save_output-${k}.$objext
4072 last_robj=$output_objdir/$output_la-${k}.$objext
39054073 k=`expr $k + 1`
3906 output=$output_objdir/$save_output-${k}.$objext
4074 output=$output_objdir/$output_la-${k}.$objext
39074075 objlist=$obj
39084076 len=1
39094077 fi
39234091 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
39244092 fi
39254093
3926 # Set up a command to remove the reloadale object files
4094 # Set up a command to remove the reloadable object files
39274095 # after they are used.
39284096 i=0
39294097 while test "$i" -lt "$k"
39304098 do
39314099 i=`expr $i + 1`
3932 delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
4100 delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
39334101 done
39344102
39354103 $echo "creating a temporary reloadable object file: $output"
39774145 IFS="$save_ifs"
39784146 eval cmd=\"$cmd\"
39794147 $show "$cmd"
3980 $run eval "$cmd" || exit $?
4148 $run eval "$cmd" || {
4149 lt_exit=$?
4150
4151 # Restore the uninstalled library and exit
4152 if test "$mode" = relink; then
4153 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
4154 fi
4155
4156 exit $lt_exit
4157 }
39814158 done
39824159 IFS="$save_ifs"
39834160
39844161 # Restore the uninstalled library and exit
39854162 if test "$mode" = relink; then
39864163 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
4164
4165 if test -n "$convenience"; then
4166 if test -z "$whole_archive_flag_spec"; then
4167 $show "${rm}r $gentop"
4168 $run ${rm}r "$gentop"
4169 fi
4170 fi
4171
39874172 exit $EXIT_SUCCESS
39884173 fi
39894174
41644349 fi
41654350 ;;
41664351 esac
4352
4353
4354 # move library search paths that coincide with paths to not yet
4355 # installed libraries to the beginning of the library search list
4356 new_libs=
4357 for path in $notinst_path; do
4358 case " $new_libs " in
4359 *" -L$path/$objdir "*) ;;
4360 *)
4361 case " $compile_deplibs " in
4362 *" -L$path/$objdir "*)
4363 new_libs="$new_libs -L$path/$objdir" ;;
4364 esac
4365 ;;
4366 esac
4367 done
4368 for deplib in $compile_deplibs; do
4369 case $deplib in
4370 -L*)
4371 case " $new_libs " in
4372 *" $deplib "*) ;;
4373 *) new_libs="$new_libs $deplib" ;;
4374 esac
4375 ;;
4376 *) new_libs="$new_libs $deplib" ;;
4377 esac
4378 done
4379 compile_deplibs="$new_libs"
4380
41674381
41684382 compile_command="$compile_command $compile_deplibs"
41694383 finalize_command="$finalize_command $finalize_deplibs"
42094423 fi
42104424 case $host in
42114425 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
4426 testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
42124427 case :$dllsearchpath: in
42134428 *":$libdir:"*) ;;
42144429 *) dllsearchpath="$dllsearchpath:$libdir";;
4430 esac
4431 case :$dllsearchpath: in
4432 *":$testbindir:"*) ;;
4433 *) dllsearchpath="$dllsearchpath:$testbindir";;
42154434 esac
42164435 ;;
42174436 esac
43284547 if test -z "$export_symbols"; then
43294548 export_symbols="$output_objdir/$outputname.exp"
43304549 $run $rm $export_symbols
4331 $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4550 $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4551 case $host in
4552 *cygwin* | *mingw* )
4553 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4554 $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
4555 ;;
4556 esac
43324557 else
4333 $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4558 $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
43344559 $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
43354560 $run eval 'mv "$nlist"T "$nlist"'
4561 case $host in
4562 *cygwin* | *mingw* )
4563 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4564 $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
4565 ;;
4566 esac
43364567 fi
43374568 fi
43384569
43834614 #endif
43844615
43854616 /* The mapping between symbol names and symbols. */
4617 "
4618
4619 case $host in
4620 *cygwin* | *mingw* )
4621 $echo >> "$output_objdir/$dlsyms" "\
4622 /* DATA imports from DLLs on WIN32 can't be const, because
4623 runtime relocations are performed -- see ld's documentation
4624 on pseudo-relocs */
4625 struct {
4626 "
4627 ;;
4628 * )
4629 $echo >> "$output_objdir/$dlsyms" "\
43864630 const struct {
4631 "
4632 ;;
4633 esac
4634
4635
4636 $echo >> "$output_objdir/$dlsyms" "\
43874637 const char *name;
43884638 lt_ptr address;
43894639 }
44304680 esac
44314681
44324682 # Now compile the dynamic symbol file.
4433 $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
4434 $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
4683 $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
4684 $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
44354685
44364686 # Clean up the generated files.
44374687 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
44384688 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
44394689
44404690 # Transform the symbol file into the correct name.
4441 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4442 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4691 case $host in
4692 *cygwin* | *mingw* )
4693 if test -f "$output_objdir/${outputname}.def" ; then
4694 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
4695 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
4696 else
4697 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4698 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4699 fi
4700 ;;
4701 * )
4702 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4703 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4704 ;;
4705 esac
44434706 ;;
44444707 *)
44454708 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
44644727 # We have no uninstalled library dependencies, so finalize right now.
44654728 $show "$link_command"
44664729 $run eval "$link_command"
4467 status=$?
4730 exit_status=$?
44684731
44694732 # Delete the generated files.
44704733 if test -n "$dlsyms"; then
44724735 $run $rm "$output_objdir/${outputname}S.${objext}"
44734736 fi
44744737
4475 exit $status
4738 exit $exit_status
44764739 fi
44774740
44784741 if test -n "$shlibpath_var"; then
46124875 esac
46134876 case $host in
46144877 *cygwin* | *mingw* )
4615 cwrappersource=`$echo ${objdir}/lt-${output}.c`
4616 cwrapper=`$echo ${output}.exe`
4617 $rm $cwrappersource $cwrapper
4618 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
4878 output_name=`basename $output`
4879 output_path=`dirname $output`
4880 cwrappersource="$output_path/$objdir/lt-$output_name.c"
4881 cwrapper="$output_path/$output_name.exe"
4882 $rm $cwrappersource $cwrapper
4883 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
46194884
46204885 cat > $cwrappersource <
46214886
46404905 #include
46414906 #include
46424907 #include
4908 #include
4909 #include
4910 #include
46434911
46444912 #if defined(PATH_MAX)
46454913 # define LT_PATHMAX PATH_MAX
46504918 #endif
46514919
46524920 #ifndef DIR_SEPARATOR
4653 #define DIR_SEPARATOR '/'
4921 # define DIR_SEPARATOR '/'
4922 # define PATH_SEPARATOR ':'
46544923 #endif
46554924
46564925 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
46574926 defined (__OS2__)
4658 #define HAVE_DOS_BASED_FILE_SYSTEM
4659 #ifndef DIR_SEPARATOR_2
4660 #define DIR_SEPARATOR_2 '\\'
4661 #endif
4927 # define HAVE_DOS_BASED_FILE_SYSTEM
4928 # ifndef DIR_SEPARATOR_2
4929 # define DIR_SEPARATOR_2 '\\'
4930 # endif
4931 # ifndef PATH_SEPARATOR_2
4932 # define PATH_SEPARATOR_2 ';'
4933 # endif
46624934 #endif
46634935
46644936 #ifndef DIR_SEPARATOR_2
46684940 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
46694941 #endif /* DIR_SEPARATOR_2 */
46704942
4943 #ifndef PATH_SEPARATOR_2
4944 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
4945 #else /* PATH_SEPARATOR_2 */
4946 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
4947 #endif /* PATH_SEPARATOR_2 */
4948
46714949 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
46724950 #define XFREE(stale) do { \
46734951 if (stale) { free ((void *) stale); stale = 0; } \
46744952 } while (0)
46754953
4954 /* -DDEBUG is fairly common in CFLAGS. */
4955 #undef DEBUG
4956 #if defined DEBUGWRAPPER
4957 # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
4958 #else
4959 # define DEBUG(format, ...)
4960 #endif
4961
46764962 const char *program_name = NULL;
46774963
46784964 void * xmalloc (size_t num);
46794965 char * xstrdup (const char *string);
4680 char * basename (const char *name);
4681 char * fnqualify(const char *path);
4966 const char * base_name (const char *name);
4967 char * find_executable(const char *wrapper);
4968 int check_executable(const char *path);
46824969 char * strendzap(char *str, const char *pat);
46834970 void lt_fatal (const char *message, ...);
46844971
46884975 char **newargz;
46894976 int i;
46904977
4691 program_name = (char *) xstrdup ((char *) basename (argv[0]));
4978 program_name = (char *) xstrdup (base_name (argv[0]));
4979 DEBUG("(main) argv[0] : %s\n",argv[0]);
4980 DEBUG("(main) program_name : %s\n",program_name);
46924981 newargz = XMALLOC(char *, argc+2);
46934982 EOF
46944983
4695 cat >> $cwrappersource <
4696 newargz[0] = "$SHELL";
4984 cat >> $cwrappersource <
4985 newargz[0] = (char *) xstrdup("$SHELL");
46974986 EOF
46984987
4699 cat >> $cwrappersource <<"EOF"
4700 newargz[1] = fnqualify(argv[0]);
4988 cat >> $cwrappersource <<"EOF"
4989 newargz[1] = find_executable(argv[0]);
4990 if (newargz[1] == NULL)
4991 lt_fatal("Couldn't find %s", argv[0]);
4992 DEBUG("(main) found exe at : %s\n",newargz[1]);
47014993 /* we know the script has the same name, without the .exe */
47024994 /* so make sure newargz[1] doesn't end in .exe */
47034995 strendzap(newargz[1],".exe");
47044996 for (i = 1; i < argc; i++)
47054997 newargz[i+1] = xstrdup(argv[i]);
47064998 newargz[argc+1] = NULL;
4999
5000 for (i=0; i
5001 {
5002 DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
5003 ;
5004 }
5005
47075006 EOF
47085007
4709 cat >> $cwrappersource <
5008 case $host_os in
5009 mingw*)
5010 cat >> $cwrappersource <
5011 execv("$SHELL",(char const **)newargz);
5012 EOF
5013 ;;
5014 *)
5015 cat >> $cwrappersource <
47105016 execv("$SHELL",newargz);
47115017 EOF
4712
4713 cat >> $cwrappersource <<"EOF"
5018 ;;
5019 esac
5020
5021 cat >> $cwrappersource <<"EOF"
5022 return 127;
47145023 }
47155024
47165025 void *
47305039 ;
47315040 }
47325041
4733 char *
4734 basename (const char *name)
5042 const char *
5043 base_name (const char *name)
47355044 {
47365045 const char *base;
47375046
47385047 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
47395048 /* Skip over the disk name in MSDOS pathnames. */
4740 if (isalpha (name[0]) && name[1] == ':')
5049 if (isalpha ((unsigned char)name[0]) && name[1] == ':')
47415050 name += 2;
47425051 #endif
47435052
47445053 for (base = name; *name; name++)
47455054 if (IS_DIR_SEPARATOR (*name))
47465055 base = name + 1;
4747 return (char *) base;
5056 return base;
47485057 }
47495058
5059 int
5060 check_executable(const char * path)
5061 {
5062 struct stat st;
5063
5064 DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
5065 if ((!path) || (!*path))
5066 return 0;
5067
5068 if ((stat (path, &st) >= 0) &&
5069 (
5070 /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
5071 #if defined (S_IXOTH)
5072 ((st.st_mode & S_IXOTH) == S_IXOTH) ||
5073 #endif
5074 #if defined (S_IXGRP)
5075 ((st.st_mode & S_IXGRP) == S_IXGRP) ||
5076 #endif
5077 ((st.st_mode & S_IXUSR) == S_IXUSR))
5078 )
5079 return 1;
5080 else
5081 return 0;
5082 }
5083
5084 /* Searches for the full path of the wrapper. Returns
5085 newly allocated full path name if found, NULL otherwise */
47505086 char *
4751 fnqualify(const char *path)
5087 find_executable (const char* wrapper)
47525088 {
4753 size_t size;
4754 char *p;
5089 int has_slash = 0;
5090 const char* p;
5091 const char* p_next;
5092 /* static buffer for getcwd */
47555093 char tmp[LT_PATHMAX + 1];
4756
4757 assert(path != NULL);
4758
4759 /* Is it qualified already? */
5094 int tmp_len;
5095 char* concat_name;
5096
5097 DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
5098
5099 if ((wrapper == NULL) || (*wrapper == '\0'))
5100 return NULL;
5101
5102 /* Absolute path? */
47605103 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
4761 if (isalpha (path[0]) && path[1] == ':')
4762 return xstrdup (path);
5104 if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
5105 {
5106 concat_name = xstrdup (wrapper);
5107 if (check_executable(concat_name))
5108 return concat_name;
5109 XFREE(concat_name);
5110 }
5111 else
5112 {
47635113 #endif
4764 if (IS_DIR_SEPARATOR (path[0]))
4765 return xstrdup (path);
4766
4767 /* prepend the current directory */
4768 /* doesn't handle '~' */
5114 if (IS_DIR_SEPARATOR (wrapper[0]))
5115 {
5116 concat_name = xstrdup (wrapper);
5117 if (check_executable(concat_name))
5118 return concat_name;
5119 XFREE(concat_name);
5120 }
5121 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5122 }
5123 #endif
5124
5125 for (p = wrapper; *p; p++)
5126 if (*p == '/')
5127 {
5128 has_slash = 1;
5129 break;
5130 }
5131 if (!has_slash)
5132 {
5133 /* no slashes; search PATH */
5134 const char* path = getenv ("PATH");
5135 if (path != NULL)
5136 {
5137 for (p = path; *p; p = p_next)
5138 {
5139 const char* q;
5140 size_t p_len;
5141 for (q = p; *q; q++)
5142 if (IS_PATH_SEPARATOR(*q))
5143 break;
5144 p_len = q - p;
5145 p_next = (*q == '\0' ? q : q + 1);
5146 if (p_len == 0)
5147 {
5148 /* empty path: current directory */
5149 if (getcwd (tmp, LT_PATHMAX) == NULL)
5150 lt_fatal ("getcwd failed");
5151 tmp_len = strlen(tmp);
5152 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5153 memcpy (concat_name, tmp, tmp_len);
5154 concat_name[tmp_len] = '/';
5155 strcpy (concat_name + tmp_len + 1, wrapper);
5156 }
5157 else
5158 {
5159 concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
5160 memcpy (concat_name, p, p_len);
5161 concat_name[p_len] = '/';
5162 strcpy (concat_name + p_len + 1, wrapper);
5163 }
5164 if (check_executable(concat_name))
5165 return concat_name;
5166 XFREE(concat_name);
5167 }
5168 }
5169 /* not found in PATH; assume curdir */
5170 }
5171 /* Relative path | not found in path: prepend cwd */
47695172 if (getcwd (tmp, LT_PATHMAX) == NULL)
47705173 lt_fatal ("getcwd failed");
4771 size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
4772 p = XMALLOC(char, size);
4773 sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
4774 return p;
5174 tmp_len = strlen(tmp);
5175 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5176 memcpy (concat_name, tmp, tmp_len);
5177 concat_name[tmp_len] = '/';
5178 strcpy (concat_name + tmp_len + 1, wrapper);
5179
5180 if (check_executable(concat_name))
5181 return concat_name;
5182 XFREE(concat_name);
5183 return NULL;
47755184 }
47765185
47775186 char *
48155224 va_end (ap);
48165225 }
48175226 EOF
4818 # we should really use a build-platform specific compiler
4819 # here, but OTOH, the wrappers (shell script and this C one)
4820 # are only useful if you want to execute the "real" binary.
4821 # Since the "real" binary is built for $host, then this
4822 # wrapper might as well be built for $host, too.
4823 $run $LTCC -s -o $cwrapper $cwrappersource
4824 ;;
4825 esac
4826 $rm $output
4827 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
5227 # we should really use a build-platform specific compiler
5228 # here, but OTOH, the wrappers (shell script and this C one)
5229 # are only useful if you want to execute the "real" binary.
5230 # Since the "real" binary is built for $host, then this
5231 # wrapper might as well be built for $host, too.
5232 $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
5233 ;;
5234 esac
5235 $rm $output
5236 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
48285237
48295238 $echo > $output "\
48305239 #! $SHELL
49745383 # Backslashes separate directories on plain windows
49755384 *-*-mingw | *-*-os2*)
49765385 $echo >> $output "\
4977 exec \$progdir\\\\\$program \${1+\"\$@\"}
5386 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
49785387 "
49795388 ;;
49805389
49815390 *)
49825391 $echo >> $output "\
4983 exec \$progdir/\$program \${1+\"\$@\"}
5392 exec \"\$progdir/\$program\" \${1+\"\$@\"}
49845393 "
49855394 ;;
49865395 esac
49905399 fi
49915400 else
49925401 # The program doesn't exist.
4993 \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
5402 \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
49945403 \$echo \"This script is just a wrapper for \$program.\" 1>&2
49955404 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
49965405 exit $EXIT_FAILURE
50325441 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
50335442 cmds=$old_archive_from_new_cmds
50345443 else
5444 # POSIX demands no paths to be encoded in archives. We have
5445 # to avoid creating archives with duplicate basenames if we
5446 # might have to extract them afterwards, e.g., when creating a
5447 # static archive out of a convenience library, or when linking
5448 # the entirety of a libtool archive into another (currently
5449 # not supported by libtool).
5450 if (for obj in $oldobjs
5451 do
5452 $echo "X$obj" | $Xsed -e 's%^.*/%%'
5453 done | sort | sort -uc >/dev/null 2>&1); then
5454 :
5455 else
5456 $echo "copying selected object files to avoid basename conflicts..."
5457
5458 if test -z "$gentop"; then
5459 gentop="$output_objdir/${outputname}x"
5460 generated="$generated $gentop"
5461
5462 $show "${rm}r $gentop"
5463 $run ${rm}r "$gentop"
5464 $show "$mkdir $gentop"
5465 $run $mkdir "$gentop"
5466 exit_status=$?
5467 if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
5468 exit $exit_status
5469 fi
5470 fi
5471
5472 save_oldobjs=$oldobjs
5473 oldobjs=
5474 counter=1
5475 for obj in $save_oldobjs
5476 do
5477 objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
5478 case " $oldobjs " in
5479 " ") oldobjs=$obj ;;
5480 *[\ /]"$objbase "*)
5481 while :; do
5482 # Make sure we don't pick an alternate name that also
5483 # overlaps.
5484 newobj=lt$counter-$objbase
5485 counter=`expr $counter + 1`
5486 case " $oldobjs " in
5487 *[\ /]"$newobj "*) ;;
5488 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
5489 esac
5490 done
5491 $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5492 $run ln "$obj" "$gentop/$newobj" ||
5493 $run cp "$obj" "$gentop/$newobj"
5494 oldobjs="$oldobjs $gentop/$newobj"
5495 ;;
5496 *) oldobjs="$oldobjs $obj" ;;
5497 esac
5498 done
5499 fi
5500
50355501 eval cmds=\"$old_archive_cmds\"
50365502
50375503 if len=`expr "X$cmds" : ".*"` &&
50455511 objlist=
50465512 concat_cmds=
50475513 save_oldobjs=$oldobjs
5048 # GNU ar 2.10+ was changed to match POSIX; thus no paths are
5049 # encoded into archives. This makes 'ar r' malfunction in
5050 # this piecewise linking case whenever conflicting object
5051 # names appear in distinct ar calls; check, warn and compensate.
5052 if (for obj in $save_oldobjs
5053 do
5054 $echo "X$obj" | $Xsed -e 's%^.*/%%'
5055 done | sort | sort -uc >/dev/null 2>&1); then
5056 :
5057 else
5058 $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
5059 $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
5060 AR_FLAGS=cq
5061 fi
5514
50625515 # Is there a better way of finding the last object in the list?
50635516 for obj in $save_oldobjs
50645517 do
50695522 oldobjs="$objlist $obj"
50705523 objlist="$objlist $obj"
50715524 eval test_cmds=\"$old_archive_cmds\"
5072 if len=`expr "X$test_cmds" : ".*"` &&
5525 if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
50735526 test "$len" -le "$max_cmd_len"; then
50745527 :
50755528 else
52665719 # install_prog (especially on Windows NT).
52675720 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
52685721 # Allow the use of GNU shtool's install command.
5269 $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
5722 $echo "X$nonopt" | grep shtool > /dev/null; then
52705723 # Aesthetically quote it.
52715724 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
52725725 case $arg in
5273 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5726 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
52745727 arg="\"$arg\""
52755728 ;;
52765729 esac
52795732 shift
52805733 else
52815734 install_prog=
5282 arg="$nonopt"
5735 arg=$nonopt
52835736 fi
52845737
52855738 # The real first argument should be the name of the installation program.
52865739 # Aesthetically quote it.
52875740 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
52885741 case $arg in
5289 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5742 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
52905743 arg="\"$arg\""
52915744 ;;
52925745 esac
53045757 do
53055758 if test -n "$dest"; then
53065759 files="$files $dest"
5307 dest="$arg"
5760 dest=$arg
53085761 continue
53095762 fi
53105763
53115764 case $arg in
53125765 -d) isdir=yes ;;
5313 -f) prev="-f" ;;
5314 -g) prev="-g" ;;
5315 -m) prev="-m" ;;
5316 -o) prev="-o" ;;
5766 -f)
5767 case " $install_prog " in
5768 *[\\\ /]cp\ *) ;;
5769 *) prev=$arg ;;
5770 esac
5771 ;;
5772 -g | -m | -o) prev=$arg ;;
53175773 -s)
53185774 stripme=" -s"
53195775 continue
53205776 ;;
5321 -*) ;;
5322
5777 -*)
5778 ;;
53235779 *)
53245780 # If the previous option needed an argument, then skip it.
53255781 if test -n "$prev"; then
53265782 prev=
53275783 else
5328 dest="$arg"
5784 dest=$arg
53295785 continue
53305786 fi
53315787 ;;
53345790 # Aesthetically quote the argument.
53355791 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
53365792 case $arg in
5337 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5793 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
53385794 arg="\"$arg\""
53395795 ;;
53405796 esac
55035959
55045960 if test "$#" -gt 0; then
55055961 # Delete the old symlinks, and create new ones.
5962 # Try `ln -sf' first, because the `ln' binary might depend on
5963 # the symlink we replace! Solaris /bin/ln does not understand -f,
5964 # so we also need to try rm && ln -s.
55065965 for linkname
55075966 do
55085967 if test "$linkname" != "$realname"; then
5509 $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5510 $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5968 $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
5969 $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
55115970 fi
55125971 done
55135972 fi
55205979 IFS="$save_ifs"
55215980 eval cmd=\"$cmd\"
55225981 $show "$cmd"
5523 $run eval "$cmd" || exit $?
5982 $run eval "$cmd" || {
5983 lt_exit=$?
5984
5985 # Restore the uninstalled library and exit
5986 if test "$mode" = relink; then
5987 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
5988 fi
5989
5990 exit $lt_exit
5991 }
55245992 done
55255993 IFS="$save_ifs"
55265994 fi
56146082 notinst_deplibs=
56156083 relink_command=
56166084
5617 # To insure that "foo" is sourced, and not "foo.exe",
5618 # finese the cygwin/MSYS system by explicitly sourcing "foo."
5619 # which disallows the automatic-append-.exe behavior.
5620 case $build in
5621 *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
5622 *) wrapperdot=${wrapper} ;;
5623 esac
6085 # Note that it is not necessary on cygwin/mingw to append a dot to
6086 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6087 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6088 # `FILE.' does not work on cygwin managed mounts.
6089 #
56246090 # If there is no directory component, then add one.
5625 case $file in
5626 */* | *\\*) . ${wrapperdot} ;;
5627 *) . ./${wrapperdot} ;;
6091 case $wrapper in
6092 */* | *\\*) . ${wrapper} ;;
6093 *) . ./${wrapper} ;;
56286094 esac
56296095
56306096 # Check the variables that should have been set.
56526118 done
56536119
56546120 relink_command=
5655 # To insure that "foo" is sourced, and not "foo.exe",
5656 # finese the cygwin/MSYS system by explicitly sourcing "foo."
5657 # which disallows the automatic-append-.exe behavior.
5658 case $build in
5659 *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
5660 *) wrapperdot=${wrapper} ;;
5661 esac
6121 # Note that it is not necessary on cygwin/mingw to append a dot to
6122 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6123 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6124 # `FILE.' does not work on cygwin managed mounts.
6125 #
56626126 # If there is no directory component, then add one.
5663 case $file in
5664 */* | *\\*) . ${wrapperdot} ;;
5665 *) . ./${wrapperdot} ;;
6127 case $wrapper in
6128 */* | *\\*) . ${wrapper} ;;
6129 *) . ./${wrapper} ;;
56666130 esac
56676131
56686132 outputname=
56696133 if test "$fast_install" = no && test -n "$relink_command"; then
56706134 if test "$finalize" = yes && test -z "$run"; then
5671 tmpdir="/tmp"
5672 test -n "$TMPDIR" && tmpdir="$TMPDIR"
5673 tmpdir="$tmpdir/libtool-$$"
5674 save_umask=`umask`
5675 umask 0077
5676 if $mkdir "$tmpdir"; then
5677 umask $save_umask
5678 else
5679 umask $save_umask
5680 $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
5681 continue
5682 fi
6135 tmpdir=`func_mktempdir`
56836136 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
56846137 outputname="$tmpdir/$file"
56856138 # Replace the output file specification.
57036156 fi
57046157
57056158 # remove .exe since cygwin /usr/bin/install will append another
5706 # one anyways
6159 # one anyway
57076160 case $install_prog,$host in
57086161 */usr/bin/install*,*cygwin*)
57096162 case $file:$destfile in
58036256 # Exit here if they wanted silent mode.
58046257 test "$show" = : && exit $EXIT_SUCCESS
58056258
5806 $echo "----------------------------------------------------------------------"
6259 $echo "X----------------------------------------------------------------------" | $Xsed
58076260 $echo "Libraries have been installed in:"
58086261 for libdir in $libdirs; do
58096262 $echo " $libdir"
58366289 $echo
58376290 $echo "See any operating system documentation about shared libraries for"
58386291 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
5839 $echo "----------------------------------------------------------------------"
6292 $echo "X----------------------------------------------------------------------" | $Xsed
58406293 exit $EXIT_SUCCESS
58416294 ;;
58426295
60536506 rmfiles="$rmfiles $objdir/$n"
60546507 done
60556508 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
6056 test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
6057
6058 if test "$mode" = uninstall; then
6509
6510 case "$mode" in
6511 clean)
6512 case " $library_names " in
6513 # " " in the beginning catches empty $dlname
6514 *" $dlname "*) ;;
6515 *) rmfiles="$rmfiles $objdir/$dlname" ;;
6516 esac
6517 test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
6518 ;;
6519 uninstall)
60596520 if test -n "$library_names"; then
60606521 # Do each command in the postuninstall commands.
60616522 cmds=$postuninstall_cmds
60886549 IFS="$save_ifs"
60896550 fi
60906551 # FIXME: should reinstall the best remaining shared library.
6091 fi
6552 ;;
6553 esac
60926554 fi
60936555 ;;
60946556
63736835 $echo
63746836 $echo "Try \`$modename --help' for more information about other modes."
63756837
6376 exit $EXIT_SUCCESS
6838 exit $?
63776839
63786840 # The TAGs below are defined such that we never get into a situation
63796841 # in which we disable both kinds of libraries. Given conflicting
63876849 # configuration. But we'll never go from static-only to shared-only.
63886850
63896851 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
6390 build_libtool_libs=no
6391 build_old_libs=yes
6852 disable_libs=shared
63926853 # ### END LIBTOOL TAG CONFIG: disable-shared
63936854
63946855 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
6395 build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
6856 disable_libs=static
63966857 # ### END LIBTOOL TAG CONFIG: disable-static
63976858
63986859 # Local Variables:
0 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
1 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
22 ## Free Software Foundation, Inc.
33 ## Originally by Gordon Matzigkeit , 1996
44 ##
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 2 of the License, or
8 ## (at your option) any later version.
9 ##
10 ## This program is distributed in the hope that it will be useful, but
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ## General Public License for more details.
14 ##
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; if not, write to the Free Software
17 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 ##
19 ## As a special exception to the GNU General Public License, if you
20 ## distribute this file as part of a program that contains a
21 ## configuration script generated by Autoconf, you may include it under
22 ## the same distribution terms that you use for the rest of that program.
23
24 # serial 47 AC_PROG_LIBTOOL
5 ## This file is free software; the Free Software Foundation gives
6 ## unlimited permission to copy and/or distribute it, with or without
7 ## modifications, as long as this notice is preserved.
8
9 # serial 48 AC_PROG_LIBTOOL
2510
2611
2712 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
9277 # AC_LIBTOOL_SETUP
9378 # ----------------
9479 AC_DEFUN([AC_LIBTOOL_SETUP],
95 [AC_PREREQ(2.50)dnl
80 [AC_PREREQ(2.60)dnl
9681 AC_REQUIRE([AC_ENABLE_SHARED])dnl
9782 AC_REQUIRE([AC_ENABLE_STATIC])dnl
9883 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
131116
132117 # Sed substitution that helps us do robust quoting. It backslashifies
133118 # metacharacters that are still active within double-quoted strings.
134 Xsed='sed -e s/^X//'
119 Xsed='sed -e 1s/^X//'
135120 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
136121
137122 # Same as above, but do not quote variable references.
151136 default_ofile=mklib
152137 can_build_shared=yes
153138
154 # All known linkers require a `.a' archive for static linking (except M$VC,
139 # All known linkers require a `.a' archive for static linking (except MSVC,
155140 # which needs '.lib').
156141 libext=a
157142 ltmain="$ac_aux_dir/ltmain.sh"
171156 test -z "$AS" && AS=as
172157 test -z "$CC" && CC=cc
173158 test -z "$LTCC" && LTCC=$CC
159 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
174160 test -z "$DLLTOOL" && DLLTOOL=dlltool
175161 test -z "$LD" && LD=ld
176162 test -z "$LN_S" && LN_S="ln -s"
190176 if test -n "$RANLIB"; then
191177 case $host_os in
192178 openbsd*)
193 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
179 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
194180 ;;
195181 *)
196 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
182 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
197183 ;;
198184 esac
199185 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
200186 fi
201187
202 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
188 _LT_CC_BASENAME([$compiler])
203189
204190 # Only perform the check for file, if the check method requires it
205191 case $deplibs_check_method in
215201 enable_win32_dll=yes, enable_win32_dll=no)
216202
217203 AC_ARG_ENABLE([libtool-lock],
218 [AS_HELP_STRING([--disable-libtool-lock],
219 [avoid locking (might break parallel builds)])])
204 [AS_HELP_STRING([--disable-libtool-lock],[avoid locking (might break parallel builds)])])
220205 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
221206
222207 AC_ARG_WITH([pic],
223 [AS_HELP_STRING([--with-pic],
224 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
208 [AS_HELP_STRING([--with-pic],[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
225209 [pic_mode="$withval"],
226210 [pic_mode=default])
227211 test -z "$pic_mode" && pic_mode=default
241225 # If no C compiler was specified, use CC.
242226 LTCC=${LTCC-"$CC"}
243227
228 # If no C compiler flags were specified, use CFLAGS.
229 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
230
244231 # Allow CC to be a program name with arguments.
245232 compiler=$CC
246233 ])# _LT_AC_SYS_COMPILER
234
235
236 # _LT_CC_BASENAME(CC)
237 # -------------------
238 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
239 AC_DEFUN([_LT_CC_BASENAME],
240 [for cc_temp in $1""; do
241 case $cc_temp in
242 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
243 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
244 \-*) ;;
245 *) break;;
246 esac
247 done
248 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
249 ])
250
251
252 # _LT_COMPILER_BOILERPLATE
253 # ------------------------
254 # Check for compiler boilerplate output or warnings with
255 # the simple compiler test code.
256 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
257 [ac_outfile=conftest.$ac_objext
258 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
259 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
260 _lt_compiler_boilerplate=`cat conftest.err`
261 $rm conftest*
262 ])# _LT_COMPILER_BOILERPLATE
263
264
265 # _LT_LINKER_BOILERPLATE
266 # ----------------------
267 # Check for linker boilerplate output or warnings with
268 # the simple link test code.
269 AC_DEFUN([_LT_LINKER_BOILERPLATE],
270 [ac_outfile=conftest.$ac_objext
271 printf "$lt_simple_link_test_code" >conftest.$ac_ext
272 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
273 _lt_linker_boilerplate=`cat conftest.err`
274 $rm conftest*
275 ])# _LT_LINKER_BOILERPLATE
247276
248277
249278 # _LT_AC_SYS_LIBPATH_AIX
325354 # find a string as large as possible, as long as the shell can cope with it
326355 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
327356 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
328 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
329 echo_test_string="`eval $cmd`" &&
357 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
358 echo_test_string=`eval $cmd` &&
330359 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
331360 then
332361 break
436465 # -----------
437466 AC_DEFUN([_LT_AC_LOCK],
438467 [AC_ARG_ENABLE([libtool-lock],
439 [AS_HELP_STRING([--disable-libtool-lock],
440 [avoid locking (might break parallel builds)])])
468 [AS_HELP_STRING([--disable-libtool-lock],[avoid locking (might break parallel builds)])])
441469 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
442470
443471 # Some flags need to be propagated to the compiler or linker for good
495523 # Find out which ABI we are using.
496524 echo 'int i;' > conftest.$ac_ext
497525 if AC_TRY_EVAL(ac_compile); then
498 case "`/usr/bin/file conftest.o`" in
526 case `/usr/bin/file conftest.o` in
499527 *32-bit*)
500528 case $host in
501529 x86_64-*linux*)
538566 SAVE_CFLAGS="$CFLAGS"
539567 CFLAGS="$CFLAGS -belf"
540568 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
541 [AC_LANG_PUSH([C])
542 AC_LINK_IFELSE([AC_LANG_SOURCE([[]],[[]])],
543 [lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
544 AC_LANG_POP([C])])
569 [AC_LANG_PUSH(C)
570 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
571 AC_LANG_POP])
545572 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
546573 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
547574 CFLAGS="$SAVE_CFLAGS"
548575 fi
549576 ;;
577 sparc*-*solaris*)
578 # Find out which ABI we are using.
579 echo 'int i;' > conftest.$ac_ext
580 if AC_TRY_EVAL(ac_compile); then
581 case `/usr/bin/file conftest.o` in
582 *64-bit*)
583 case $lt_cv_prog_gnu_ld in
584 yes*) LD="${LD-ld} -m elf64_sparc" ;;
585 *) LD="${LD-ld} -64" ;;
586 esac
587 ;;
588 esac
589 fi
590 rm -rf conftest*
591 ;;
592
550593 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
551594 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
552595 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
578621 # with a dollar sign (not a hyphen), so the echo should work correctly.
579622 # The option is referenced via a variable to avoid confusing sed.
580623 lt_compile=`echo "$ac_compile" | $SED \
581 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
624 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
582625 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
583626 -e 's:$: $lt_compiler_flag:'`
584627 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
588631 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
589632 if (exit $ac_status) && test -s "$ac_outfile"; then
590633 # The compiler can only warn and ignore the option if not recognized
591 # So say no if there are warnings
592 if test ! -s conftest.err; then
634 # So say no if there are warnings other than the usual output.
635 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
636 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
637 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
593638 $2=yes
594639 fi
595640 fi
615660 LDFLAGS="$LDFLAGS $3"
616661 printf "$lt_simple_link_test_code" > conftest.$ac_ext
617662 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
618 # The compiler can only warn and ignore the option if not recognized
663 # The linker can only warn and ignore the option if not recognized
619664 # So say no if there are warnings
620665 if test -s conftest.err; then
621666 # Append any errors to the config.log.
622667 cat conftest.err 1>&AS_MESSAGE_LOG_FD
668 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
669 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
670 if diff conftest.exp conftest.er2 >/dev/null; then
671 $2=yes
672 fi
623673 else
624674 $2=yes
625675 fi
678728 lt_cv_sys_max_cmd_len=8192;
679729 ;;
680730
681 netbsd* | freebsd* | openbsd* | darwin* )
731 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
682732 # This has been around since 386BSD, at least. Likely further.
683733 if test -x /sbin/sysctl; then
684734 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
685735 elif test -x /usr/sbin/sysctl; then
686736 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
687737 else
688 lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
738 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
689739 fi
690740 # And add a safety zone
691741 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
692 ;;
693
694 *)
742 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
743 ;;
744
745 interix*)
746 # We know the value 262144 and hardcode it with a safety zone (like BSD)
747 lt_cv_sys_max_cmd_len=196608
748 ;;
749
750 osf*)
751 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
752 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
753 # nice to cause kernel panics so lets avoid the loop below.
754 # First set a reasonable default.
755 lt_cv_sys_max_cmd_len=16384
756 #
757 if test -x /sbin/sysconfig; then
758 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
759 *1*) lt_cv_sys_max_cmd_len=-1 ;;
760 esac
761 fi
762 ;;
763 sco3.2v5*)
764 lt_cv_sys_max_cmd_len=102400
765 ;;
766 sysv5* | sco5v6* | sysv4.2uw2*)
767 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
768 if test -n "$kargmax"; then
769 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
770 else
771 lt_cv_sys_max_cmd_len=32768
772 fi
773 ;;
774 *)
695775 # If test is not a shell built-in, we'll probably end up computing a
696776 # maximum length that is only half of the actual maximum length, but
697777 # we can't tell.
722802
723803
724804 # _LT_AC_CHECK_DLFCN
725 # --------------------
805 # ------------------
726806 AC_DEFUN([_LT_AC_CHECK_DLFCN],
727807 [AC_CHECK_HEADERS(dlfcn.h)dnl
728808 ])# _LT_AC_CHECK_DLFCN
730810
731811 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
732812 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
733 # ------------------------------------------------------------------
813 # ---------------------------------------------------------------------
734814 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
735815 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
736816 if test "$cross_compiling" = yes; then :
796876 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
797877 /* dlclose (self); */
798878 }
879 else
880 puts (dlerror ());
799881
800882 exit (status);
801883 }]
802884 EOF
803885 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
804 (./conftest; exit; ) 2>/dev/null
886 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
805887 lt_status=$?
806888 case x$lt_status in
807889 x$lt_dlno_uscore) $1 ;;
808890 x$lt_dlneed_uscore) $2 ;;
809 x$lt_unknown|x*) $3 ;;
891 x$lt_dlunknown|x*) $3 ;;
810892 esac
811893 else :
812894 # compilation failed
818900
819901
820902 # AC_LIBTOOL_DLOPEN_SELF
821 # -------------------
903 # ----------------------
822904 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
823905 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
824906 if test "x$enable_dlopen" != xyes; then
889971 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
890972
891973 save_LDFLAGS="$LDFLAGS"
892 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
974 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
893975
894976 save_LIBS="$LIBS"
895977 LIBS="$lt_cv_dlopen_libs $LIBS"
902984 ])
903985
904986 if test "x$lt_cv_dlopen_self" = xyes; then
905 LDFLAGS="$LDFLAGS $link_static_flag"
987 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
906988 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
907989 lt_cv_dlopen_self_static, [dnl
908990 _LT_AC_TRY_DLOPEN_SELF(
9501032 # Note that $ac_compile itself does not contain backslashes and begins
9511033 # with a dollar sign (not a hyphen), so the echo should work correctly.
9521034 lt_compile=`echo "$ac_compile" | $SED \
953 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1035 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
9541036 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
9551037 -e 's:$: $lt_compiler_flag:'`
9561038 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
9621044 then
9631045 # The compiler can only warn and ignore the option if not recognized
9641046 # So say no if there are warnings
965 if test ! -s out/conftest.err; then
1047 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1048 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1049 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
9661050 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9671051 fi
9681052 fi
969 chmod u+w .
1053 chmod u+w . 2>&AS_MESSAGE_LOG_FD
9701054 $rm conftest*
9711055 # SGI C++ compiler will create directory out/ii_files/ for
9721056 # template instantiation
12261310 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
12271311 dldir=$destdir/`dirname \$dlpath`~
12281312 test -d \$dldir || mkdir -p \$dldir~
1229 $install_prog $dir/$dlname \$dldir/$dlname'
1313 $install_prog $dir/$dlname \$dldir/$dlname~
1314 chmod a+x \$dldir/$dlname'
12301315 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
12311316 dlpath=$dir/\$dldll~
12321317 $rm \$dlpath'
12561341 ;;
12571342 pw32*)
12581343 # pw32 DLLs use 'pw' prefix rather than 'lib'
1259 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
1344 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
12601345 ;;
12611346 esac
12621347 ;;
12791364 soname_spec='${libname}${release}${major}$shared_ext'
12801365 shlibpath_overrides_runpath=yes
12811366 shlibpath_var=DYLD_LIBRARY_PATH
1282 shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
1367 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
12831368 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
12841369 if test "$GCC" = yes; then
12851370 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"`
13141399 dynamic_linker='GNU ld.so'
13151400 ;;
13161401
1317 freebsd*)
1318 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1402 freebsd* | dragonfly*)
1403 # DragonFly does not have aout. When/if they implement a new
1404 # versioning mechanism, adjust this.
1405 if test -x /usr/bin/objformat; then
1406 objformat=`/usr/bin/objformat`
1407 else
1408 case $host_os in
1409 freebsd[[123]]*) objformat=aout ;;
1410 *) objformat=elf ;;
1411 esac
1412 fi
13191413 version_type=freebsd-$objformat
13201414 case $version_type in
13211415 freebsd-elf*)
13331427 freebsd2*)
13341428 shlibpath_overrides_runpath=yes
13351429 ;;
1336 freebsd3.[01]* | freebsdelf3.[01]*)
1430 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
13371431 shlibpath_overrides_runpath=yes
13381432 hardcode_into_libs=yes
13391433 ;;
1340 *) # from 3.2 on
1434 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
1435 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
13411436 shlibpath_overrides_runpath=no
1437 hardcode_into_libs=yes
1438 ;;
1439 freebsd*) # from 4.6 on
1440 shlibpath_overrides_runpath=yes
13421441 hardcode_into_libs=yes
13431442 ;;
13441443 esac
13601459 version_type=sunos
13611460 need_lib_prefix=no
13621461 need_version=no
1363 case "$host_cpu" in
1462 case $host_cpu in
13641463 ia64*)
13651464 shrext_cmds='.so'
13661465 hardcode_into_libs=yes
14001499 postinstall_cmds='chmod 555 $lib'
14011500 ;;
14021501
1502 interix3*)
1503 version_type=linux
1504 need_lib_prefix=no
1505 need_version=no
1506 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1507 soname_spec='${libname}${release}${shared_ext}$major'
1508 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1509 shlibpath_var=LD_LIBRARY_PATH
1510 shlibpath_overrides_runpath=no
1511 hardcode_into_libs=yes
1512 ;;
1513
14031514 irix5* | irix6* | nonstopux*)
14041515 case $host_os in
14051516 nonstopux*) version_type=nonstopux ;;
14591570
14601571 # Append ld.so.conf contents to the search path
14611572 if test -f /etc/ld.so.conf; then
1462 lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
1573 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
14631574 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
14641575 fi
14651576
15211632
15221633 openbsd*)
15231634 version_type=sunos
1635 sys_lib_dlsearch_path_spec="/usr/lib"
15241636 need_lib_prefix=no
1525 need_version=no
1637 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1638 case $host_os in
1639 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1640 *) need_version=no ;;
1641 esac
15261642 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
15271643 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
15281644 shlibpath_var=LD_LIBRARY_PATH
15581674 shlibpath_var=LD_LIBRARY_PATH
15591675 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
15601676 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1561 ;;
1562
1563 sco3.2v5*)
1564 version_type=osf
1565 soname_spec='${libname}${release}${shared_ext}$major'
1566 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1567 shlibpath_var=LD_LIBRARY_PATH
15681677 ;;
15691678
15701679 solaris*)
15921701 need_version=yes
15931702 ;;
15941703
1595 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1704 sysv4 | sysv4.3*)
15961705 version_type=linux
15971706 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15981707 soname_spec='${libname}${release}${shared_ext}$major'
16251734 fi
16261735 ;;
16271736
1737 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1738 version_type=freebsd-elf
1739 need_lib_prefix=no
1740 need_version=no
1741 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1742 soname_spec='${libname}${release}${shared_ext}$major'
1743 shlibpath_var=LD_LIBRARY_PATH
1744 hardcode_into_libs=yes
1745 if test "$with_gnu_ld" = yes; then
1746 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1747 shlibpath_overrides_runpath=no
1748 else
1749 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1750 shlibpath_overrides_runpath=yes
1751 case $host_os in
1752 sco3.2v5*)
1753 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
1754 ;;
1755 esac
1756 fi
1757 sys_lib_dlsearch_path_spec='/usr/lib'
1758 ;;
1759
16281760 uts4*)
16291761 version_type=linux
16301762 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16381770 esac
16391771 AC_MSG_RESULT([$dynamic_linker])
16401772 test "$dynamic_linker" = no && can_build_shared=no
1773
1774 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
1775 if test "$GCC" = yes; then
1776 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1777 fi
16411778 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
16421779
16431780
16451782 # ----------------
16461783 AC_DEFUN([_LT_AC_TAGCONFIG],
16471784 [AC_ARG_WITH([tags],
1648 [AS_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1649 [include additional configurations @<:@automatic@:>@])],
1785 [AS_HELP_STRING([--with-tags@<:@=TAGS@:>@],[include additional configurations @<:@automatic@:>@])],
16501786 [tagnames="$withval"])
16511787
16521788 if test -f "$ltmain" && test -n "$tagnames"; then
16621798 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
16631799 fi
16641800 fi
1801 if test -z "$LTCFLAGS"; then
1802 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1803 fi
16651804
16661805 # Extract list of available tagged configurations in $ofile.
16671806 # Note that this assumes the entire list is on one line.
16841823
16851824 # Update the list of available tags.
16861825 if test -n "$tagname"; then
1687 echo appending configuration tag "$tagname" to $ofile
1826 echo appending configuration tag \"$tagname\" to $ofile
16881827
16891828 case $tagname in
16901829 CXX)
16911830 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1692 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1831 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
16931832 (test "X$CXX" != "Xg++"))) ; then
16941833 AC_LIBTOOL_LANG_CXX_CONFIG
16951834 else
17521891
17531892 # AC_LIBTOOL_WIN32_DLL
17541893 # --------------------
1755 # declare package support for building win32 dll's
1894 # declare package support for building win32 DLLs
17561895 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
17571896 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
17581897 ])# AC_LIBTOOL_WIN32_DLL
17631902 # implement the --enable-shared flag
17641903 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
17651904 AC_DEFUN([AC_ENABLE_SHARED],
1766 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1905 [define([enable_shared_default], ifelse($1, no, no, yes))dnl
17671906 AC_ARG_ENABLE([shared],
1768 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1769 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1907 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],[build shared libraries @<:@default=enable_shared_default@:>@])],
17701908 [p=${PACKAGE-default}
17711909 case $enableval in
17721910 yes) enable_shared=yes ;;
17841922 IFS="$lt_save_ifs"
17851923 ;;
17861924 esac],
1787 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1925 [enable_shared=]enable_shared_default)
17881926 ])# AC_ENABLE_SHARED
17891927
17901928
17911929 # AC_DISABLE_SHARED
17921930 # -----------------
1793 #- set the default shared flag to --disable-shared
1931 # set the default shared flag to --disable-shared
17941932 AC_DEFUN([AC_DISABLE_SHARED],
17951933 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
17961934 AC_ENABLE_SHARED(no)
18021940 # implement the --enable-static flag
18031941 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
18041942 AC_DEFUN([AC_ENABLE_STATIC],
1805 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1943 [define([enable_static_default], ifelse($1, no, no, yes))dnl
18061944 AC_ARG_ENABLE([static],
1807 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1808 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1945 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],[build static libraries @<:@default=enable_static_default@:>@])],
18091946 [p=${PACKAGE-default}
18101947 case $enableval in
18111948 yes) enable_static=yes ;;
18231960 IFS="$lt_save_ifs"
18241961 ;;
18251962 esac],
1826 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
1963 [enable_static=]enable_static_default)
18271964 ])# AC_ENABLE_STATIC
18281965
18291966
18411978 # implement the --enable-fast-install flag
18421979 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
18431980 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
1844 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
1981 [define([enable_Fast_install_default], ifelse($1, no, no, yes))dnl
18451982 AC_ARG_ENABLE([fast-install],
1846 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
1847 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
1983 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],[optimize for fast installation @<:@default=enable_Fast_install_default@:>@])],
18481984 [p=${PACKAGE-default}
18491985 case $enableval in
18501986 yes) enable_fast_install=yes ;;
18621998 IFS="$lt_save_ifs"
18631999 ;;
18642000 esac],
1865 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2001 [enable_fast_install=]enable_Fast_install_default)
18662002 ])# AC_ENABLE_FAST_INSTALL
18672003
18682004
19262062 if test -n "$file_magic_test_file"; then
19272063 case $deplibs_check_method in
19282064 "file_magic "*)
1929 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2065 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
19302066 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
19312067 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
19322068 $EGREP "$file_magic_regex" > /dev/null; then
19832119 # find the pathname to the GNU or non-GNU linker
19842120 AC_DEFUN([AC_PROG_LD],
19852121 [AC_ARG_WITH([gnu-ld],
1986 [AS_HELP_STRING([--with-gnu-ld],
1987 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2122 [AS_HELP_STRING([--with-gnu-ld],[assume the C compiler uses GNU ld @<:@default=no@:>@])],
19882123 [test "$withval" = no || with_gnu_ld=yes],
19892124 [with_gnu_ld=no])
19902125 AC_REQUIRE([LT_AC_PROG_SED])dnl
20362171 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
20372172 lt_cv_path_LD="$ac_dir/$ac_prog"
20382173 # Check to see if the program is GNU ld. I'd rather use --version,
2039 # but apparently some GNU ld's only accept -v.
2174 # but apparently some variants of GNU ld only accept -v.
20402175 # Break only if it was the GNU/non-GNU ld that we prefer.
20412176 case `"$lt_cv_path_LD" -v 2>&1
20422177 *GNU* | *'with BFD'*)
20682203 AC_DEFUN([AC_PROG_LD_GNU],
20692204 [AC_REQUIRE([AC_PROG_EGREP])dnl
20702205 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2071 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2206 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
20722207 case `$LD -v 2>&1
20732208 *GNU* | *'with BFD'*)
20742209 lt_cv_prog_gnu_ld=yes
20982233 case $host_os in
20992234 darwin*)
21002235 if test "$GCC" = yes; then
2101 reload_cmds='$CC -nostdlib ${wl}-r $compiler_flags -o $output$reload_objs'
2236 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
21022237 else
21032238 reload_cmds='$LD$reload_flag -o $output$reload_objs'
21042239 fi
21602295 lt_cv_deplibs_check_method=pass_all
21612296 ;;
21622297
2163 freebsd* | kfreebsd*-gnu)
2298 freebsd* | kfreebsd*-gnu | dragonfly*)
21642299 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
21652300 case $host_cpu in
21662301 i*86 )
21672302 # Not sure whether the presence of OpenBSD here was a mistake.
21682303 # Let's accept both of them until this is cleared up.
2169 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
2304 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
21702305 lt_cv_file_magic_cmd=/usr/bin/file
21712306 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
21722307 ;;
21822317
21832318 hpux10.20* | hpux11*)
21842319 lt_cv_file_magic_cmd=/usr/bin/file
2185 case "$host_cpu" in
2320 case $host_cpu in
21862321 ia64*)
21872322 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
21882323 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
21962331 lt_cv_file_magic_test_file=/usr/lib/libc.sl
21972332 ;;
21982333 esac
2334 ;;
2335
2336 interix3*)
2337 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2338 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
21992339 ;;
22002340
22012341 irix5* | irix6* | nonstopux*)
22432383 lt_cv_deplibs_check_method=pass_all
22442384 ;;
22452385
2246 sco3.2v5*)
2247 lt_cv_deplibs_check_method=pass_all
2248 ;;
2249
22502386 solaris*)
22512387 lt_cv_deplibs_check_method=pass_all
22522388 ;;
22532389
2254 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2390 sysv4 | sysv4.3*)
22552391 case $host_vendor in
22562392 motorola)
22572393 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]]'
22722408 siemens)
22732409 lt_cv_deplibs_check_method=pass_all
22742410 ;;
2411 pc)
2412 lt_cv_deplibs_check_method=pass_all
2413 ;;
22752414 esac
22762415 ;;
22772416
2278 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2417 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
22792418 lt_cv_deplibs_check_method=pass_all
22802419 ;;
22812420 esac
22952434 # Let the user override the test.
22962435 lt_cv_path_NM="$NM"
22972436 else
2298 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2299 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2300 IFS="$lt_save_ifs"
2301 test -z "$ac_dir" && ac_dir=.
2302 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2303 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2304 # Check to see if the nm accepts a BSD-compat flag.
2305 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2306 # nm: unknown option "B" ignored
2307 # Tru64's nm complains that /dev/null is an invalid object file
2308 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2309 */dev/null* | *'Invalid file or object type'*)
2310 lt_cv_path_NM="$tmp_nm -B"
2311 break
2312 ;;
2313 *)
2314 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2315 */dev/null*)
2316 lt_cv_path_NM="$tmp_nm -p"
2437 lt_nm_to_check="${ac_tool_prefix}nm"
2438 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
2439 lt_nm_to_check="$lt_nm_to_check nm"
2440 fi
2441 for lt_tmp_nm in $lt_nm_to_check; do
2442 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2443 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2444 IFS="$lt_save_ifs"
2445 test -z "$ac_dir" && ac_dir=.
2446 tmp_nm="$ac_dir/$lt_tmp_nm"
2447 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2448 # Check to see if the nm accepts a BSD-compat flag.
2449 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2450 # nm: unknown option "B" ignored
2451 # Tru64's nm complains that /dev/null is an invalid object file
2452 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2453 */dev/null* | *'Invalid file or object type'*)
2454 lt_cv_path_NM="$tmp_nm -B"
23172455 break
23182456 ;;
23192457 *)
2320 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2321 continue # so that we can try to find one that supports BSD flags
2458 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2459 */dev/null*)
2460 lt_cv_path_NM="$tmp_nm -p"
2461 break
2462 ;;
2463 *)
2464 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2465 continue # so that we can try to find one that supports BSD flags
2466 ;;
2467 esac
23222468 ;;
23232469 esac
2324 esac
2325 fi
2470 fi
2471 done
2472 IFS="$lt_save_ifs"
23262473 done
2327 IFS="$lt_save_ifs"
23282474 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
23292475 fi])
23302476 NM="$lt_cv_path_NM"
23562502 # -----------------------------------
23572503 # sets LIBLTDL to the link flags for the libltdl convenience library and
23582504 # LTDLINCL to the include flags for the libltdl header and adds
2359 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
2360 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2361 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
2362 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
2363 # '${top_srcdir}/' (note the single quotes!). If your package is not
2364 # flat and you're not using automake, define top_builddir and
2365 # top_srcdir appropriately in the Makefiles.
2505 # --enable-ltdl-convenience to the configure arguments. Note that
2506 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2507 # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
2508 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2509 # (note the single quotes!). If your package is not flat and you're not
2510 # using automake, define top_builddir and top_srcdir appropriately in
2511 # the Makefiles.
23662512 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
23672513 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
23682514 case $enable_ltdl_convenience in
23812527 # -----------------------------------
23822528 # sets LIBLTDL to the link flags for the libltdl installable library and
23832529 # LTDLINCL to the include flags for the libltdl header and adds
2384 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
2385 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2386 # DIRECTORY is not provided and an installed libltdl is not found, it is
2387 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
2388 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
2389 # quotes!). If your package is not flat and you're not using automake,
2390 # define top_builddir and top_srcdir appropriately in the Makefiles.
2530 # --enable-ltdl-install to the configure arguments. Note that
2531 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2532 # and an installed libltdl is not found, it is assumed to be `libltdl'.
2533 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2534 # '${top_srcdir}/' (note the single quotes!). If your package is not
2535 # flat and you're not using automake, define top_builddir and top_srcdir
2536 # appropriately in the Makefiles.
23912537 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
23922538 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
23932539 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
24302576 ])# _LT_AC_LANG_CXX
24312577
24322578 # _LT_AC_PROG_CXXCPP
2433 # ---------------
2579 # ------------------
24342580 AC_DEFUN([_LT_AC_PROG_CXXCPP],
24352581 [
24362582 AC_REQUIRE([AC_PROG_CXX])
24372583 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2438 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2584 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
24392585 (test "X$CXX" != "Xg++"))) ; then
24402586 AC_PROG_CXXCPP
24412587 fi
24792625
24802626
24812627 # AC_LIBTOOL_RC
2482 # --------------
2628 # -------------
24832629 # enable support for Windows resource files
24842630 AC_DEFUN([AC_LIBTOOL_RC],
24852631 [AC_REQUIRE([LT_AC_PROG_RC])
25122658
25132659 _LT_AC_SYS_COMPILER
25142660
2515 #
2516 # Check for any special shared library compilation flags.
2517 #
2518 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
2519 if test "$GCC" = no; then
2520 case $host_os in
2521 sco3.2v5*)
2522 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
2523 ;;
2524 esac
2525 fi
2526 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
2527 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
2528 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
2529 else
2530 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
2531 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
2532 fi
2533 fi
2534
2535
2536 #
2537 # Check to make sure the static flag actually works.
2538 #
2539 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
2540 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
2541 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
2542 [],
2543 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
2544
2661 # save warnings/boilerplate of simple test code
2662 _LT_COMPILER_BOILERPLATE
2663 _LT_LINKER_BOILERPLATE
25452664
25462665 ## CAVEAT EMPTOR:
25472666 ## There is no encapsulation within the following macros, do not change
25552674 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
25562675 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
25572676 AC_LIBTOOL_SYS_LIB_STRIP
2558 AC_LIBTOOL_DLOPEN_SELF($1)
2559
2560 # Report which librarie types wil actually be built
2677 AC_LIBTOOL_DLOPEN_SELF
2678
2679 # Report which library types will actually be built
25612680 AC_MSG_CHECKING([if libtool supports shared libraries])
25622681 AC_MSG_RESULT([$can_build_shared])
25632682
25662685
25672686 # On AIX, shared libraries and static libraries use the same namespace, and
25682687 # are all built from PIC.
2569 case "$host_os" in
2688 case $host_os in
25702689 aix3*)
25712690 test "$enable_shared" = yes && enable_static=no
25722691 if test -n "$RANLIB"; then
26162735 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
26172736 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
26182737 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2738 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
26192739 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
26202740 _LT_AC_TAGVAR(module_cmds, $1)=
26212741 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
26332753 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
26342754
26352755 # Source file extension for C++ test sources.
2636 ac_ext=cc
2756 ac_ext=cpp
26372757
26382758 # Object file extension for compiled C++ test sources.
26392759 objext=o
26432763 lt_simple_compile_test_code="int some_variable = 0;\n"
26442764
26452765 # Code to be used in simple link tests
2646 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
2766 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
26472767
26482768 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
26492769 _LT_AC_SYS_COMPILER
2770
2771 # save warnings/boilerplate of simple test code
2772 _LT_COMPILER_BOILERPLATE
2773 _LT_LINKER_BOILERPLATE
26502774
26512775 # Allow CC to be a program name with arguments.
26522776 lt_save_CC=$CC
26582782 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
26592783 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
26602784 else
2661 unset lt_cv_prog_gnu_ld
2785 $as_unset lt_cv_prog_gnu_ld
26622786 fi
26632787 if test -n "${lt_cv_path_LDCXX+set}"; then
26642788 lt_cv_path_LD=$lt_cv_path_LDCXX
26652789 else
2666 unset lt_cv_path_LD
2790 $as_unset lt_cv_path_LD
26672791 fi
26682792 test -z "${LDCXX+set}" || LD=$LDCXX
26692793 CC=${CXX-"c++"}
26702794 compiler=$CC
26712795 _LT_AC_TAGVAR(compiler, $1)=$CC
2672 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
2796 _LT_CC_BASENAME([$compiler])
26732797
26742798 # We don't want -fno-exception wen compiling C++ code, so set the
26752799 # no_builtin_flag separately
27582882 ;;
27592883 esac
27602884 done
2885 ;;
27612886 esac
27622887
27632888 exp_sym_flag='-bexport'
27762901 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
27772902
27782903 if test "$GXX" = yes; then
2779 case $host_os in aix4.[012]|aix4.[012].*)
2904 case $host_os in aix4.[[012]]|aix4.[[012]].*)
27802905 # We only want to do this on AIX 4.2 and lower, the check
27812906 # below for broken collect2 doesn't work under 4.3+
27822907 collect2name=`${CC} -print-prog-name=collect2`
27952920 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
27962921 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
27972922 fi
2923 ;;
27982924 esac
27992925 shared_flag='-shared'
2926 if test "$aix_use_runtimelinking" = yes; then
2927 shared_flag="$shared_flag "'${wl}-G'
2928 fi
28002929 else
28012930 # not using gcc
28022931 if test "$host_cpu" = ia64; then
28232952 _LT_AC_SYS_LIBPATH_AIX
28242953 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
28252954
2826 _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"
2955 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
28272956 else
28282957 if test "$host_cpu" = ia64; then
28292958 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
28302959 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2831 _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"
2960 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
28322961 else
28332962 # Determine the default libpath from the value encoded in an empty executable.
28342963 _LT_AC_SYS_LIBPATH_AIX
28372966 # -berok will link without error, but may produce a broken library.
28382967 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
28392968 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2840 # -bexpall does not export symbols beginning with underscore (_)
2841 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
28422969 # Exported symbols can be pulled into shared objects from archives
2843 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
2970 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
28442971 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
2845 # This is similar to how AIX traditionally builds it's shared libraries.
2846 _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'
2972 # This is similar to how AIX traditionally builds its shared libraries.
2973 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
28472974 fi
28482975 fi
28492976 ;;
2977
2978 beos*)
2979 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
2980 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
2981 # Joseph Beckenbach says some releases of gcc
2982 # support --undefined. This deserves some investigation. FIXME
2983 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2984 else
2985 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2986 fi
2987 ;;
2988
28502989 chorus*)
28512990 case $cc_basename in
28522991 *)
28552994 ;;
28562995 esac
28572996 ;;
2858
28592997
28602998 cygwin* | mingw* | pw32*)
28612999 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
28663004 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
28673005
28683006 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
2869 _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'
3007 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
28703008 # If the export-symbols file already is a .def file (1st line
28713009 # is EXPORTS), use it as is; otherwise, prepend...
28723010 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
28753013 echo EXPORTS > $output_objdir/$soname.def;
28763014 cat $export_symbols >> $output_objdir/$soname.def;
28773015 fi~
2878 $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'
3016 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
28793017 else
28803018 _LT_AC_TAGVAR(ld_shlibs, $1)=no
28813019 fi
28823020 ;;
28833021 darwin* | rhapsody*)
2884 case "$host_os" in
3022 case $host_os in
28853023 rhapsody* | darwin1.[[012]])
28863024 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
28873025 ;;
29193057 _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'
29203058 fi
29213059 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
2922 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3060 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
29233061 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
29243062 _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}'
29253063 else
29273065 fi
29283066 _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}'
29293067 else
2930 case "$cc_basename" in
3068 case $cc_basename in
29313069 xlc*)
29323070 output_verbose_link_cmd='echo'
29333071 _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'
29343072 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
2935 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3073 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
29363074 _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}'
29373075 _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}'
29383076 ;;
29453083
29463084 dgux*)
29473085 case $cc_basename in
2948 ec++)
3086 ec++*)
29493087 # FIXME: insert proper C++ library support
29503088 _LT_AC_TAGVAR(ld_shlibs, $1)=no
29513089 ;;
2952 ghcx)
3090 ghcx*)
29533091 # Green Hills C++ Compiler
29543092 # FIXME: insert proper C++ library support
29553093 _LT_AC_TAGVAR(ld_shlibs, $1)=no
29603098 ;;
29613099 esac
29623100 ;;
2963 freebsd[12]*)
3101 freebsd[[12]]*)
29643102 # C++ shared libraries reported to be fairly broken before switch to ELF
29653103 _LT_AC_TAGVAR(ld_shlibs, $1)=no
29663104 ;;
29673105 freebsd-elf*)
29683106 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
29693107 ;;
2970 freebsd* | kfreebsd*-gnu)
3108 freebsd* | kfreebsd*-gnu | dragonfly*)
29713109 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
29723110 # conventions
29733111 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
29843122 # location of the library.
29853123
29863124 case $cc_basename in
2987 CC)
3125 CC*)
29883126 # FIXME: insert proper C++ library support
29893127 _LT_AC_TAGVAR(ld_shlibs, $1)=no
29903128 ;;
2991 aCC)
3129 aCC*)
29923130 _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'
29933131 # Commands to make compiler produce verbose output that lists
29943132 # what "hidden" libraries, object files and flags are used when
29983136 # explicitly linking system object files so we need to strip them
29993137 # from the output so that they don't get included in the library
30003138 # dependencies.
3001 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'
3139 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'
30023140 ;;
30033141 *)
30043142 if test "$GXX" = yes; then
30123150 ;;
30133151 hpux10*|hpux11*)
30143152 if test $with_gnu_ld = no; then
3015 case "$host_cpu" in
3016 hppa*64*)
3017 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3153 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3154 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3155
3156 case $host_cpu in
3157 hppa*64*|ia64*)
30183158 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3019 _LT_AC_TAGVAR(hardcode_libdir_separator,