Codebase list libev / 539cc91
Imported Upstream version 4.15 Jérémy Lal 11 years ago
21 changed file(s) with 7819 addition(s) and 4324 deletion(s). Raw diff Collapse all Expand all
11
22 TODO: ev_loop_wakeup
33 TODO: EV_STANDALONE == NO_HASSEL (do not use clock_gettime in ev_standalone)
4 TODO: faq, process a thing in each iteration
5 TODO: dbeugging tips, ev_verify, ev_init twice
6 TODO: ev_break for immediate exit (EVBREAK_NOW?)
7 TODO: ev_feed_child_event
8 TODO: document the special problem of signals around fork.
9 TODO: store pid for each signal
10 TODO: document file descriptor usage per loop
11 TODO: store loop pid_t and compare isndie signal handler,store 1 for same, 2 for differign pid, clean up in loop_fork
12 TODO: embed watchers need updating when fd changes
13 TODO: document portbaility requirements for atomic pointer access
14
15 4.15 Fri Mar 1 12:04:50 CET 2013
16 - destroying a non-default loop would stop the global waitpid
17 watcher (Denis Bilenko).
18 - queueing pending watchers of higher priority from a watcher now invokes
19 them in a timely fashion (reported by Denis Bilenko).
20 - add throw() to all libev functions that cannot throw exceptions, for
21 further code size decrease when compiling for C++.
22 - add throw () to callbacks that must not throw exceptions (allocator,
23 syserr, loop acquire/release, periodic reschedule cbs).
24 - fix event_base_loop return code, add event_get_callback, event_base_new,
25 event_base_get_method calls to improve libevent 1.x emulation and add
26 some libevent 2.x functionality (based on a patch by Jeff Davey).
27 - add more memory fences to fix a bug reported by Jeff Davey. Better
28 be overfenced than underprotected.
29 - ev_run now returns a boolean status (true meaning watchers are
30 still active).
31 - ev_once: undef EV_ERROR in ev_kqueue.c, to avoid clashing with
32 libev's EV_ERROR (reported by 191919).
33 - (ecb) add memory fence support for xlC (Darin McBride).
34 - (ecb) add memory fence support for gcc-mips (Anton Kirilov).
35 - (ecb) add memory fence support for gcc-alpha (Christian Weisgerber).
36 - work around some kernels losing file descriptors by leaking
37 the kqueue descriptor in the child.
38 - work around linux inotify not reporting IN_ATTRIB changes for directories
39 in many cases.
40 - include sys/syscall.h instead of plain syscall.h.
41 - check for io watcher loops in ev_verify, check for the most
42 common reported usage bug in ev_io_start.
43 - chose socket vs. WSASocket at compiletime using EV_USE_WSASOCKET.
44 - always use WSASend/WSARecv directly on windows, hoping that this
45 works in all cases (unlike read/write/send/recv...).
46 - try to detect signals around a fork faster (test program by
47 Denis Bilenko).
48 - work around recent glibc versions that leak memory in realloc.
49 - rename ev::embed::set to ev::embed::set_embed to avoid clashing
50 the watcher base set (loop) method.
51 - rewrite the async/signal pipe logic to always keep a valid fd, which
52 simplifies (and hopefuly correctifies :) the race checking
53 on fork, at the cost of one extra fd.
54 - add fat, msdos, jffs2, ramfs, ntfs and btrfs to the list of
55 inotify-supporting filesystems.
56 - move orig_CFLAGS assignment to after AC_INIT, as newer autoconf
57 versions ignore it before
58 (https://bugzilla.redhat.com/show_bug.cgi?id=908096).
59 - add some untested android support.
60 - enum expressions must be of type int (reported by Juan Pablo L).
461
562 4.11 Sat Feb 4 19:52:39 CET 2012
663 - INCOMPATIBLE CHANGE: ev_timer_again now clears the pending status, as
0 All files in libev are Copyright (C)2007,2008,2009 Marc Alexander Lehmann.
0 All files in libev are
1 Copyright (c)2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann.
12
23 Redistribution and use in source and binary forms, with or without
34 modification, are permitted provided that the following conditions are
0 # Makefile.in generated by automake 1.11.1 from Makefile.am.
0 # Makefile.in generated by automake 1.11.6 from Makefile.am.
11 # @configure_input@
22
33 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
5 # Inc.
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
5 # Foundation, Inc.
66 # This Makefile.in is free software; the Free Software Foundation
77 # gives unlimited permission to copy and/or distribute it,
88 # with or without modifications, as long as this notice is preserved.
1616
1717
1818 VPATH = @srcdir@
19 am__make_dryrun = \
20 { \
21 am__dry=no; \
22 case $$MAKEFLAGS in \
23 *\\[\ \ ]*) \
24 echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
25 | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
26 *) \
27 for am__flg in $$MAKEFLAGS; do \
28 case $$am__flg in \
29 *=*|--*) ;; \
30 *n*) am__dry=yes; break;; \
31 esac; \
32 done;; \
33 esac; \
34 test $$am__dry = yes; \
35 }
1936 pkgdatadir = $(datadir)/@PACKAGE@
2037 pkgincludedir = $(includedir)/@PACKAGE@
2138 pkglibdir = $(libdir)/@PACKAGE@
7188 am__base_list = \
7289 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
7390 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
91 am__uninstall_files_from_dir = { \
92 test -z "$$files" \
93 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
94 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
95 $(am__cd) "$$dir" && rm -f $$files; }; \
96 }
7497 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)" \
7598 "$(DESTDIR)$(includedir)"
7699 LTLIBRARIES = $(lib_LTLIBRARIES)
95118 $(LDFLAGS) -o $@
96119 SOURCES = $(libev_la_SOURCES)
97120 DIST_SOURCES = $(libev_la_SOURCES)
121 am__can_run_installinfo = \
122 case $$AM_UPDATE_INFO_DIR in \
123 n|no|NO) false;; \
124 *) (install-info --version) >/dev/null 2>&1;; \
125 esac
98126 man3dir = $(mandir)/man3
99127 NROFF = nroff
100128 MANS = $(man_MANS)
105133 distdir = $(PACKAGE)-$(VERSION)
106134 top_distdir = $(distdir)
107135 am__remove_distdir = \
108 { test ! -d "$(distdir)" \
109 || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
110 && rm -fr "$(distdir)"; }; }
136 if test -d "$(distdir)"; then \
137 find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
138 && rm -rf "$(distdir)" \
139 || { sleep 5 && rm -rf "$(distdir)"; }; \
140 else :; fi
111141 DIST_ARCHIVES = $(distdir).tar.gz
112142 GZIP_ENV = --best
113143 distuninstallcheck_listfiles = find . -type f -print
144 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
145 | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
114146 distcleancheck_listfiles = find . -type f -print
115147 ACLOCAL = @ACLOCAL@
116148 AMTAR = @AMTAR@
127159 CYGPATH_W = @CYGPATH_W@
128160 DEFS = @DEFS@
129161 DEPDIR = @DEPDIR@
162 DLLTOOL = @DLLTOOL@
130163 DSYMUTIL = @DSYMUTIL@
131164 DUMPBIN = @DUMPBIN@
132165 ECHO_C = @ECHO_C@
151184 LTLIBOBJS = @LTLIBOBJS@
152185 MAINT = @MAINT@
153186 MAKEINFO = @MAKEINFO@
187 MANIFEST_TOOL = @MANIFEST_TOOL@
154188 MKDIR_P = @MKDIR_P@
155189 NM = @NM@
156190 NMEDIT = @NMEDIT@
176210 abs_srcdir = @abs_srcdir@
177211 abs_top_builddir = @abs_top_builddir@
178212 abs_top_srcdir = @abs_top_srcdir@
213 ac_ct_AR = @ac_ct_AR@
179214 ac_ct_CC = @ac_ct_CC@
180215 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
181216 am__include = @am__include@
208243 libexecdir = @libexecdir@
209244 localedir = @localedir@
210245 localstatedir = @localstatedir@
211 lt_ECHO = @lt_ECHO@
212246 mandir = @mandir@
213247 mkdir_p = @mkdir_p@
214248 oldincludedir = @oldincludedir@
241275
242276 .SUFFIXES:
243277 .SUFFIXES: .c .lo .o .obj
244 am--refresh:
278 am--refresh: Makefile
245279 @:
246280 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
247281 @for dep in $?; do \
277311 $(am__aclocal_m4_deps):
278312
279313 config.h: stamp-h1
280 @if test ! -f $@; then \
281 rm -f stamp-h1; \
282 $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
283 else :; fi
314 @if test ! -f $@; then rm -f stamp-h1; else :; fi
315 @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
284316
285317 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
286318 @rm -f stamp-h1
294326 -rm -f config.h stamp-h1
295327 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
296328 @$(NORMAL_INSTALL)
297 test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
298329 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
299330 list2=; for p in $$list; do \
300331 if test -f $$p; then \
302333 else :; fi; \
303334 done; \
304335 test -z "$$list2" || { \
336 echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
337 $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
305338 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
306339 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
307340 }
323356 echo "rm -f \"$${dir}/so_locations\""; \
324357 rm -f "$${dir}/so_locations"; \
325358 done
326 libev.la: $(libev_la_OBJECTS) $(libev_la_DEPENDENCIES)
359 libev.la: $(libev_la_OBJECTS) $(libev_la_DEPENDENCIES) $(EXTRA_libev_la_DEPENDENCIES)
327360 $(libev_la_LINK) -rpath $(libdir) $(libev_la_OBJECTS) $(libev_la_LIBADD) $(LIBS)
328361
329362 mostlyclean-compile:
366399 -rm -f libtool config.lt
367400 install-man3: $(man_MANS)
368401 @$(NORMAL_INSTALL)
369 test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)"
370 @list=''; test -n "$(man3dir)" || exit 0; \
371 { for i in $$list; do echo "$$i"; done; \
372 l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
373 sed -n '/\.3[a-z]*$$/p'; \
402 @list1=''; \
403 list2='$(man_MANS)'; \
404 test -n "$(man3dir)" \
405 && test -n "`echo $$list1$$list2`" \
406 || exit 0; \
407 echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \
408 $(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \
409 { for i in $$list1; do echo "$$i"; done; \
410 if test -n "$$list2"; then \
411 for i in $$list2; do echo "$$i"; done \
412 | sed -n '/\.3[a-z]*$$/p'; \
413 fi; \
374414 } | while read p; do \
375415 if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
376416 echo "$$d$$p"; echo "$$p"; \
399439 sed -n '/\.3[a-z]*$$/p'; \
400440 } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
401441 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
402 test -z "$$files" || { \
403 echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \
404 cd "$(DESTDIR)$(man3dir)" && rm -f $$files; }
442 dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir)
405443 install-includeHEADERS: $(include_HEADERS)
406444 @$(NORMAL_INSTALL)
407 test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
408445 @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
446 if test -n "$$list"; then \
447 echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
448 $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
449 fi; \
409450 for p in $$list; do \
410451 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
411452 echo "$$d$$p"; \
419460 @$(NORMAL_UNINSTALL)
420461 @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
421462 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
422 test -n "$$files" || exit 0; \
423 echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
424 cd "$(DESTDIR)$(includedir)" && rm -f $$files
463 dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
425464
426465 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
427466 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
532571 $(am__remove_distdir)
533572
534573 dist-bzip2: distdir
535 tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
574 tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
575 $(am__remove_distdir)
576
577 dist-lzip: distdir
578 tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
536579 $(am__remove_distdir)
537580
538581 dist-lzma: distdir
540583 $(am__remove_distdir)
541584
542585 dist-xz: distdir
543 tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
586 tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
544587 $(am__remove_distdir)
545588
546589 dist-tarZ: distdir
571614 bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
572615 *.tar.lzma*) \
573616 lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
617 *.tar.lz*) \
618 lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
574619 *.tar.xz*) \
575620 xz -dc $(distdir).tar.xz | $(am__untar) ;;\
576621 *.tar.Z*) \
580625 *.zip*) \
581626 unzip $(distdir).zip ;;\
582627 esac
583 chmod -R a-w $(distdir); chmod a+w $(distdir)
628 chmod -R a-w $(distdir); chmod u+w $(distdir)
584629 mkdir $(distdir)/_build
585630 mkdir $(distdir)/_inst
586631 chmod a-w $(distdir)
590635 && am__cwd=`pwd` \
591636 && $(am__cd) $(distdir)/_build \
592637 && ../configure --srcdir=.. --prefix="$$dc_install_base" \
638 $(AM_DISTCHECK_CONFIGURE_FLAGS) \
593639 $(DISTCHECK_CONFIGURE_FLAGS) \
594640 && $(MAKE) $(AM_MAKEFLAGS) \
595641 && $(MAKE) $(AM_MAKEFLAGS) dvi \
618664 list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
619665 sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
620666 distuninstallcheck:
621 @$(am__cd) '$(distuninstallcheck_dir)' \
622 && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
667 @test -n '$(distuninstallcheck_dir)' || { \
668 echo 'ERROR: trying to run $@ with an empty' \
669 '$$(distuninstallcheck_dir)' >&2; \
670 exit 1; \
671 }; \
672 $(am__cd) '$(distuninstallcheck_dir)' || { \
673 echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
674 exit 1; \
675 }; \
676 test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
623677 || { echo "ERROR: files left after uninstall:" ; \
624678 if test -n "$(DESTDIR)"; then \
625679 echo " (check DESTDIR support)"; \
652706
653707 installcheck: installcheck-am
654708 install-strip:
655 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
656 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
657 `test -z '$(STRIP)' || \
658 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
709 if test -z '$(STRIP)'; then \
710 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
711 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
712 install; \
713 else \
714 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
715 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
716 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
717 fi
659718 mostlyclean-generic:
660719
661720 clean-generic:
748807
749808 .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
750809 clean-generic clean-libLTLIBRARIES clean-libtool ctags dist \
751 dist-all dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ \
752 dist-xz dist-zip distcheck distclean distclean-compile \
753 distclean-generic distclean-hdr distclean-libtool \
754 distclean-tags distcleancheck distdir distuninstallcheck dvi \
755 dvi-am html html-am info info-am install install-am \
756 install-data install-data-am install-dvi install-dvi-am \
757 install-exec install-exec-am install-html install-html-am \
758 install-includeHEADERS install-info install-info-am \
759 install-libLTLIBRARIES install-man install-man3 install-pdf \
760 install-pdf-am install-ps install-ps-am install-strip \
761 installcheck installcheck-am installdirs maintainer-clean \
762 maintainer-clean-generic mostlyclean mostlyclean-compile \
763 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
764 tags uninstall uninstall-am uninstall-includeHEADERS \
765 uninstall-libLTLIBRARIES uninstall-man uninstall-man3
810 dist-all dist-bzip2 dist-gzip dist-lzip dist-lzma dist-shar \
811 dist-tarZ dist-xz dist-zip distcheck distclean \
812 distclean-compile distclean-generic distclean-hdr \
813 distclean-libtool distclean-tags distcleancheck distdir \
814 distuninstallcheck dvi dvi-am html html-am info info-am \
815 install install-am install-data install-data-am install-dvi \
816 install-dvi-am install-exec install-exec-am install-html \
817 install-html-am install-includeHEADERS install-info \
818 install-info-am install-libLTLIBRARIES install-man \
819 install-man3 install-pdf install-pdf-am install-ps \
820 install-ps-am install-strip installcheck installcheck-am \
821 installdirs maintainer-clean maintainer-clean-generic \
822 mostlyclean mostlyclean-compile mostlyclean-generic \
823 mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
824 uninstall-am uninstall-includeHEADERS uninstall-libLTLIBRARIES \
825 uninstall-man uninstall-man3
766826
767827
768828 ev.3: ev.pod
2323 - relative timers/timeouts (handle time jumps).
2424 - fast intra-thread communication between multiple
2525 event loops (with optional fast linux eventfd backend).
26 - extremely easy to embed.
27 - very small codebase, no bloated library.
26 - extremely easy to embed (fully documented, no dependencies,
27 autoconf supported but optional).
28 - very small codebase, no bloated library, simple code.
2829 - fully extensible by being able to plug into the event loop,
2930 integrate other event loops, integrate other event loop users.
3031 - very little memory use (small watchers, small event loop data).
3132 - optional C++ interface allowing method and function callbacks
3233 at no extra memory or runtime overhead.
3334 - optional Perl interface with similar characteristics (capable
34 of running Glib/Gtk2 on libev, interfaces with Net::SNMP and
35 libadns).
35 of running Glib/Gtk2 on libev).
3636 - support for other languages (multiple C++ interfaces, D, Ruby,
3737 Python) available from third-parties.
3838
39 Examples of programs that embed libev: the EV perl module,
40 rxvt-unicode, gvpe (GNU Virtual Private Ethernet), the Deliantra MMORPG
41 server (http://www.deliantra.net/), Rubinius (a next-generation Ruby
42 VM), the Ebb web server, the Rev event toolkit.
39 Examples of programs that embed libev: the EV perl module, node.js,
40 auditd, rxvt-unicode, gvpe (GNU Virtual Private Ethernet), the
41 Deliantra MMORPG server (http://www.deliantra.net/), Rubinius (a
42 next-generation Ruby VM), the Ebb web server, the Rev event toolkit.
4343
4444
4545 CONTRIBUTORS
11 event_add
22 event_base_dispatch
33 event_base_free
4 event_base_get_method
45 event_base_loop
56 event_base_loopexit
7 event_base_new
68 event_base_once
79 event_base_priority_init
810 event_base_set
911 event_del
1012 event_dispatch
13 event_get_callback
1114 event_get_method
1215 event_get_version
1316 event_init
0 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
0 # generated automatically by aclocal 1.11.6 -*- Autoconf -*-
11
22 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3 # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
3 # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
4 # Inc.
45 # This file is free software; the Free Software Foundation
56 # gives unlimited permission to copy and/or distribute it,
67 # with or without modifications, as long as this notice is preserved.
1213
1314 m4_ifndef([AC_AUTOCONF_VERSION],
1415 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
15 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
16 [m4_warning([this file was generated for autoconf 2.67.
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
17 [m4_warning([this file was generated for autoconf 2.69.
1718 You have another version of autoconf. It may work, but is not guaranteed to.
1819 If you have problems, you may need to regenerate the build system entirely.
1920 To do so, use the procedure documented by the package, typically `autoreconf'.])])
2122 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2223 #
2324 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
24 # 2006, 2007, 2008 Free Software Foundation, Inc.
25 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
26 # Foundation, Inc.
2527 # Written by Gordon Matzigkeit, 1996
2628 #
2729 # This file is free software; the Free Software Foundation gives
3032
3133 m4_define([_LT_COPYING], [dnl
3234 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
33 # 2006, 2007, 2008 Free Software Foundation, Inc.
35 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
36 # Foundation, Inc.
3437 # Written by Gordon Matzigkeit, 1996
3538 #
3639 # This file is part of GNU Libtool.
5760 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5861 ])
5962
60 # serial 56 LT_INIT
63 # serial 57 LT_INIT
6164
6265
6366 # LT_PREREQ(VERSION)
8689 # ------------------
8790 AC_DEFUN([LT_INIT],
8891 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
92 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
8993 AC_BEFORE([$0], [LT_LANG])dnl
9094 AC_BEFORE([$0], [LT_OUTPUT])dnl
9195 AC_BEFORE([$0], [LTDL_INIT])dnl
101105 AC_REQUIRE([LTVERSION_VERSION])dnl
102106 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
103107 m4_require([_LT_PROG_LTMAIN])dnl
108
109 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
104110
105111 dnl Parse OPTIONS
106112 _LT_SET_OPTIONS([$0], [$1])
138144 *) break;;
139145 esac
140146 done
141 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
147 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
142148 ])
143149
144150
158164 m4_defun([_LT_SETUP],
159165 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
160166 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
167 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
168 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
169
170 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
171 dnl
161172 _LT_DECL([], [host_alias], [0], [The host system])dnl
162173 _LT_DECL([], [host], [0])dnl
163174 _LT_DECL([], [host_os], [0])dnl
180191 dnl
181192 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
182193 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
194 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
183195 m4_require([_LT_CMD_RELOAD])dnl
184196 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
197 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
185198 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
186199 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
200 m4_require([_LT_WITH_SYSROOT])dnl
187201
188202 _LT_CONFIG_LIBTOOL_INIT([
189203 # See if we are running on zsh, and set the options which allow our
199213 _LT_CHECK_OBJDIR
200214
201215 m4_require([_LT_TAG_COMPILER])dnl
202 _LT_PROG_ECHO_BACKSLASH
203216
204217 case $host_os in
205218 aix3*)
213226 ;;
214227 esac
215228
216 # Sed substitution that helps us do robust quoting. It backslashifies
217 # metacharacters that are still active within double-quoted strings.
218 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
219
220 # Same as above, but do not quote variable references.
221 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
222
223 # Sed substitution to delay expansion of an escaped shell variable in a
224 # double_quote_subst'ed string.
225 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
226
227 # Sed substitution to delay expansion of an escaped single quote.
228 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
229
230 # Sed substitution to avoid accidental globbing in evaled expressions
231 no_glob_subst='s/\*/\\\*/g'
232
233229 # Global variables:
234230 ofile=libtool
235231 can_build_shared=yes
269265 _LT_CONFIG_COMMANDS
270266 ])# _LT_SETUP
271267
268
269 # _LT_PREPARE_SED_QUOTE_VARS
270 # --------------------------
271 # Define a few sed substitution that help us do robust quoting.
272 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
273 [# Backslashify metacharacters that are still active within
274 # double-quoted strings.
275 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
276
277 # Same as above, but do not quote variable references.
278 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
279
280 # Sed substitution to delay expansion of an escaped shell variable in a
281 # double_quote_subst'ed string.
282 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
283
284 # Sed substitution to delay expansion of an escaped single quote.
285 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
286
287 # Sed substitution to avoid accidental globbing in evaled expressions
288 no_glob_subst='s/\*/\\\*/g'
289 ])
272290
273291 # _LT_PROG_LTMAIN
274292 # ---------------
422440 # declaration there will have the same value as in `configure'. VARNAME
423441 # must have a single quote delimited value for this to work.
424442 m4_define([_LT_CONFIG_STATUS_DECLARE],
425 [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
443 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
426444
427445
428446 # _LT_CONFIG_STATUS_DECLARATIONS
432450 # embedded single quotes properly. In configure, this macro expands
433451 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
434452 #
435 # <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
453 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
436454 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
437455 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
438456 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
531549 LTCFLAGS='$LTCFLAGS'
532550 compiler='$compiler_DEFAULT'
533551
552 # A function that is used when there is no print builtin or printf.
553 func_fallback_echo ()
554 {
555 eval 'cat <<_LTECHO_EOF
556 \$[]1
557 _LTECHO_EOF'
558 }
559
534560 # Quote evaled strings.
535561 for var in lt_decl_all_varnames([[ \
536562 ]], lt_decl_quote_varnames); do
537 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
563 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
538564 *[[\\\\\\\`\\"\\\$]]*)
539 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
565 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
540566 ;;
541567 *)
542568 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
547573 # Double-quote double-evaled strings.
548574 for var in lt_decl_all_varnames([[ \
549575 ]], lt_decl_dquote_varnames); do
550 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
576 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
551577 *[[\\\\\\\`\\"\\\$]]*)
552 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
578 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
553579 ;;
554580 *)
555581 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
557583 esac
558584 done
559585
560 # Fix-up fallback echo if it was mangled by the above quoting rules.
561 case \$lt_ECHO in
562 *'\\\[$]0 --fallback-echo"')dnl "
563 lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
564 ;;
565 esac
566
567586 _LT_OUTPUT_LIBTOOL_INIT
568587 ])
569588
589 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
590 # ------------------------------------
591 # Generate a child script FILE with all initialization necessary to
592 # reuse the environment learned by the parent script, and make the
593 # file executable. If COMMENT is supplied, it is inserted after the
594 # `#!' sequence but before initialization text begins. After this
595 # macro, additional text can be appended to FILE to form the body of
596 # the child script. The macro ends with non-zero status if the
597 # file could not be fully written (such as if the disk is full).
598 m4_ifdef([AS_INIT_GENERATED],
599 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
600 [m4_defun([_LT_GENERATED_FILE_INIT],
601 [m4_require([AS_PREPARE])]dnl
602 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
603 [lt_write_fail=0
604 cat >$1 <<_ASEOF || lt_write_fail=1
605 #! $SHELL
606 # Generated by $as_me.
607 $2
608 SHELL=\${CONFIG_SHELL-$SHELL}
609 export SHELL
610 _ASEOF
611 cat >>$1 <<\_ASEOF || lt_write_fail=1
612 AS_SHELL_SANITIZE
613 _AS_PREPARE
614 exec AS_MESSAGE_FD>&1
615 _ASEOF
616 test $lt_write_fail = 0 && chmod +x $1[]dnl
617 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
570618
571619 # LT_OUTPUT
572620 # ---------
576624 AC_DEFUN([LT_OUTPUT],
577625 [: ${CONFIG_LT=./config.lt}
578626 AC_MSG_NOTICE([creating $CONFIG_LT])
579 cat >"$CONFIG_LT" <<_LTEOF
580 #! $SHELL
581 # Generated by $as_me.
582 # Run this file to recreate a libtool stub with the current configuration.
583
627 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
628 [# Run this file to recreate a libtool stub with the current configuration.])
629
630 cat >>"$CONFIG_LT" <<\_LTEOF
584631 lt_cl_silent=false
585 SHELL=\${CONFIG_SHELL-$SHELL}
586 _LTEOF
587
588 cat >>"$CONFIG_LT" <<\_LTEOF
589 AS_SHELL_SANITIZE
590 _AS_PREPARE
591
592 exec AS_MESSAGE_FD>&1
593632 exec AS_MESSAGE_LOG_FD>>config.log
594633 {
595634 echo
615654 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
616655 configured by $[0], generated by m4_PACKAGE_STRING.
617656
618 Copyright (C) 2008 Free Software Foundation, Inc.
657 Copyright (C) 2011 Free Software Foundation, Inc.
619658 This config.lt script is free software; the Free Software Foundation
620659 gives unlimited permision to copy, distribute and modify it."
621660
660699 # appending to config.log, which fails on DOS, as config.log is still kept
661700 # open by configure. Here we exec the FD to /dev/null, effectively closing
662701 # config.log, so it can be properly (re)opened and appended to by config.lt.
663 if test "$no_create" != yes; then
664 lt_cl_success=:
665 test "$silent" = yes &&
666 lt_config_lt_args="$lt_config_lt_args --quiet"
667 exec AS_MESSAGE_LOG_FD>/dev/null
668 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
669 exec AS_MESSAGE_LOG_FD>>config.log
670 $lt_cl_success || AS_EXIT(1)
671 fi
702 lt_cl_success=:
703 test "$silent" = yes &&
704 lt_config_lt_args="$lt_config_lt_args --quiet"
705 exec AS_MESSAGE_LOG_FD>/dev/null
706 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
707 exec AS_MESSAGE_LOG_FD>>config.log
708 $lt_cl_success || AS_EXIT(1)
672709 ])# LT_OUTPUT
673710
674711
731768 # if finds mixed CR/LF and LF-only lines. Since sed operates in
732769 # text mode, it properly converts lines to CR/LF. This bash problem
733770 # is reportedly fixed, but why not run on old versions too?
734 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
735 || (rm -f "$cfgfile"; exit 1)
736
737 _LT_PROG_XSI_SHELLFNS
738
739 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
740 || (rm -f "$cfgfile"; exit 1)
741
742 mv -f "$cfgfile" "$ofile" ||
771 sed '$q' "$ltmain" >> "$cfgfile" \
772 || (rm -f "$cfgfile"; exit 1)
773
774 _LT_PROG_REPLACE_SHELLFNS
775
776 mv -f "$cfgfile" "$ofile" ||
743777 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
744778 chmod +x "$ofile"
745779 ],
784818 m4_case([$1],
785819 [C], [_LT_LANG(C)],
786820 [C++], [_LT_LANG(CXX)],
821 [Go], [_LT_LANG(GO)],
787822 [Java], [_LT_LANG(GCJ)],
788823 [Fortran 77], [_LT_LANG(F77)],
789824 [Fortran], [_LT_LANG(FC)],
803838 m4_define([_LT_LANG_]$1[_enabled], [])dnl
804839 _LT_LANG_$1_CONFIG($1)])dnl
805840 ])# _LT_LANG
841
842
843 m4_ifndef([AC_PROG_GO], [
844 # NOTE: This macro has been submitted for inclusion into #
845 # GNU Autoconf as AC_PROG_GO. When it is available in #
846 # a released version of Autoconf we should remove this #
847 # macro and use it instead. #
848 m4_defun([AC_PROG_GO],
849 [AC_LANG_PUSH(Go)dnl
850 AC_ARG_VAR([GOC], [Go compiler command])dnl
851 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
852 _AC_ARG_VAR_LDFLAGS()dnl
853 AC_CHECK_TOOL(GOC, gccgo)
854 if test -z "$GOC"; then
855 if test -n "$ac_tool_prefix"; then
856 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
857 fi
858 fi
859 if test -z "$GOC"; then
860 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
861 fi
862 ])#m4_defun
863 ])#m4_ifndef
806864
807865
808866 # _LT_LANG_DEFAULT_CONFIG
835893 m4_ifdef([LT_PROG_GCJ],
836894 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
837895
896 AC_PROVIDE_IFELSE([AC_PROG_GO],
897 [LT_LANG(GO)],
898 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
899
838900 AC_PROVIDE_IFELSE([LT_PROG_RC],
839901 [LT_LANG(RC)],
840902 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
845907 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
846908 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
847909 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
910 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
848911 dnl aclocal-1.4 backwards compatibility:
849912 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
850913 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
851914 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
852915 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
916 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
853917
854918
855919 # _LT_TAG_COMPILER
935999 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
9361000 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
9371001 _lt_result=$?
938 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1002 # If there is a non-empty error log, and "single_module"
1003 # appears in it, assume the flag caused a linker warning
1004 if test -s conftest.err && $GREP single_module conftest.err; then
1005 cat conftest.err >&AS_MESSAGE_LOG_FD
1006 # Otherwise, if the output was created with a 0 exit code from
1007 # the compiler, it worked.
1008 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
9391009 lt_cv_apple_cc_single_mod=yes
9401010 else
9411011 cat conftest.err >&AS_MESSAGE_LOG_FD
9431013 rm -rf libconftest.dylib*
9441014 rm -f conftest.*
9451015 fi])
1016
9461017 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
9471018 [lt_cv_ld_exported_symbols_list],
9481019 [lt_cv_ld_exported_symbols_list=no
9531024 [lt_cv_ld_exported_symbols_list=yes],
9541025 [lt_cv_ld_exported_symbols_list=no])
9551026 LDFLAGS="$save_LDFLAGS"
1027 ])
1028
1029 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1030 [lt_cv_ld_force_load=no
1031 cat > conftest.c << _LT_EOF
1032 int forced_loaded() { return 2;}
1033 _LT_EOF
1034 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1035 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1036 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1037 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1038 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1039 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1040 cat > conftest.c << _LT_EOF
1041 int main() { return 0;}
1042 _LT_EOF
1043 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1044 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1045 _lt_result=$?
1046 if test -s conftest.err && $GREP force_load conftest.err; then
1047 cat conftest.err >&AS_MESSAGE_LOG_FD
1048 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
1049 lt_cv_ld_force_load=yes
1050 else
1051 cat conftest.err >&AS_MESSAGE_LOG_FD
1052 fi
1053 rm -f conftest.err libconftest.a conftest conftest.c
1054 rm -rf conftest.dSYM
9561055 ])
9571056 case $host_os in
9581057 rhapsody* | darwin1.[[012]])
9811080 else
9821081 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
9831082 fi
984 if test "$DSYMUTIL" != ":"; then
1083 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
9851084 _lt_dsymutil='~$DSYMUTIL $lib || :'
9861085 else
9871086 _lt_dsymutil=
9911090 ])
9921091
9931092
994 # _LT_DARWIN_LINKER_FEATURES
995 # --------------------------
1093 # _LT_DARWIN_LINKER_FEATURES([TAG])
1094 # ---------------------------------
9961095 # Checks for linker and compiler features on darwin
9971096 m4_defun([_LT_DARWIN_LINKER_FEATURES],
9981097 [
10011100 _LT_TAGVAR(hardcode_direct, $1)=no
10021101 _LT_TAGVAR(hardcode_automatic, $1)=yes
10031102 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1004 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1103 if test "$lt_cv_ld_force_load" = "yes"; then
1104 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1105 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1106 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1107 else
1108 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1109 fi
10051110 _LT_TAGVAR(link_all_deplibs, $1)=yes
10061111 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
10071112 case $cc_basename in
10091114 *) _lt_dar_can_shared=$GCC ;;
10101115 esac
10111116 if test "$_lt_dar_can_shared" = "yes"; then
1012 output_verbose_link_cmd=echo
1117 output_verbose_link_cmd=func_echo_all
10131118 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
10141119 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
10151120 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
10251130 fi
10261131 ])
10271132
1028 # _LT_SYS_MODULE_PATH_AIX
1029 # -----------------------
1133 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1134 # ----------------------------------
10301135 # Links a minimal program and checks the executable
10311136 # for the system default hardcoded library path. In most cases,
10321137 # this is /usr/lib:/lib, but when the MPI compilers are used
10331138 # the location of the communication and MPI libs are included too.
10341139 # If we don't find anything, use the default library path according
10351140 # to the aix ld manual.
1141 # Store the results from the different compilers for each TAGNAME.
1142 # Allow to override them for all tags through lt_cv_aix_libpath.
10361143 m4_defun([_LT_SYS_MODULE_PATH_AIX],
10371144 [m4_require([_LT_DECL_SED])dnl
1038 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1039 lt_aix_libpath_sed='
1040 /Import File Strings/,/^$/ {
1041 /^0/ {
1042 s/^0 *\(.*\)$/\1/
1043 p
1044 }
1045 }'
1046 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1047 # Check for a 64-bit object if we didn't find anything.
1048 if test -z "$aix_libpath"; then
1049 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1050 fi],[])
1051 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1145 if test "${lt_cv_aix_libpath+set}" = set; then
1146 aix_libpath=$lt_cv_aix_libpath
1147 else
1148 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1149 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1150 lt_aix_libpath_sed='[
1151 /Import File Strings/,/^$/ {
1152 /^0/ {
1153 s/^0 *\([^ ]*\) *$/\1/
1154 p
1155 }
1156 }]'
1157 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1158 # Check for a 64-bit object if we didn't find anything.
1159 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1160 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1161 fi],[])
1162 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1163 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1164 fi
1165 ])
1166 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1167 fi
10521168 ])# _LT_SYS_MODULE_PATH_AIX
10531169
10541170
10551171 # _LT_SHELL_INIT(ARG)
10561172 # -------------------
10571173 m4_define([_LT_SHELL_INIT],
1058 [ifdef([AC_DIVERSION_NOTICE],
1059 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1060 [AC_DIVERT_PUSH(NOTICE)])
1061 $1
1062 AC_DIVERT_POP
1063 ])# _LT_SHELL_INIT
1174 [m4_divert_text([M4SH-INIT], [$1
1175 ])])# _LT_SHELL_INIT
1176
10641177
10651178
10661179 # _LT_PROG_ECHO_BACKSLASH
10671180 # -----------------------
1068 # Add some code to the start of the generated configure script which
1069 # will find an echo command which doesn't interpret backslashes.
1181 # Find how we can fake an echo command that does not interpret backslash.
1182 # In particular, with Autoconf 2.60 or later we add some code to the start
1183 # of the generated configure script which will find a shell with a builtin
1184 # printf (which we can use as an echo command).
10701185 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1071 [_LT_SHELL_INIT([
1072 # Check that we are running under the correct shell.
1073 SHELL=${CONFIG_SHELL-/bin/sh}
1074
1075 case X$lt_ECHO in
1076 X*--fallback-echo)
1077 # Remove one level of quotation (which was required for Make).
1078 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1079 ;;
1186 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1187 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1188 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1189
1190 AC_MSG_CHECKING([how to print strings])
1191 # Test print first, because it will be a builtin if present.
1192 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1193 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1194 ECHO='print -r --'
1195 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1196 ECHO='printf %s\n'
1197 else
1198 # Use this function as a fallback that always works.
1199 func_fallback_echo ()
1200 {
1201 eval 'cat <<_LTECHO_EOF
1202 $[]1
1203 _LTECHO_EOF'
1204 }
1205 ECHO='func_fallback_echo'
1206 fi
1207
1208 # func_echo_all arg...
1209 # Invoke $ECHO with all args, space-separated.
1210 func_echo_all ()
1211 {
1212 $ECHO "$*"
1213 }
1214
1215 case "$ECHO" in
1216 printf*) AC_MSG_RESULT([printf]) ;;
1217 print*) AC_MSG_RESULT([print -r]) ;;
1218 *) AC_MSG_RESULT([cat]) ;;
10801219 esac
10811220
1082 ECHO=${lt_ECHO-echo}
1083 if test "X[$]1" = X--no-reexec; then
1084 # Discard the --no-reexec flag, and continue.
1085 shift
1086 elif test "X[$]1" = X--fallback-echo; then
1087 # Avoid inline document here, it may be left over
1088 :
1089 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1090 # Yippee, $ECHO works!
1091 :
1092 else
1093 # Restart under the correct shell.
1094 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1095 fi
1096
1097 if test "X[$]1" = X--fallback-echo; then
1098 # used as fallback echo
1099 shift
1100 cat <<_LT_EOF
1101 [$]*
1102 _LT_EOF
1103 exit 0
1104 fi
1105
1106 # The HP-UX ksh and POSIX shell print the target directory to stdout
1107 # if CDPATH is set.
1108 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1109
1110 if test -z "$lt_ECHO"; then
1111 if test "X${echo_test_string+set}" != Xset; then
1112 # find a string as large as possible, as long as the shell can cope with it
1113 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1114 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1115 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1116 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1117 then
1118 break
1119 fi
1120 done
1121 fi
1122
1123 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1124 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1125 test "X$echo_testing_string" = "X$echo_test_string"; then
1126 :
1127 else
1128 # The Solaris, AIX, and Digital Unix default echo programs unquote
1129 # backslashes. This makes it impossible to quote backslashes using
1130 # echo "$something" | sed 's/\\/\\\\/g'
1131 #
1132 # So, first we look for a working echo in the user's PATH.
1133
1134 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1135 for dir in $PATH /usr/ucb; do
1136 IFS="$lt_save_ifs"
1137 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1138 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1139 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1140 test "X$echo_testing_string" = "X$echo_test_string"; then
1141 ECHO="$dir/echo"
1142 break
1143 fi
1144 done
1145 IFS="$lt_save_ifs"
1146
1147 if test "X$ECHO" = Xecho; then
1148 # We didn't find a better echo, so look for alternatives.
1149 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1150 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1151 test "X$echo_testing_string" = "X$echo_test_string"; then
1152 # This shell has a builtin print -r that does the trick.
1153 ECHO='print -r'
1154 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1155 test "X$CONFIG_SHELL" != X/bin/ksh; then
1156 # If we have ksh, try running configure again with it.
1157 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1158 export ORIGINAL_CONFIG_SHELL
1159 CONFIG_SHELL=/bin/ksh
1160 export CONFIG_SHELL
1161 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1162 else
1163 # Try using printf.
1164 ECHO='printf %s\n'
1165 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1166 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1167 test "X$echo_testing_string" = "X$echo_test_string"; then
1168 # Cool, printf works
1169 :
1170 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1171 test "X$echo_testing_string" = 'X\t' &&
1172 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1173 test "X$echo_testing_string" = "X$echo_test_string"; then
1174 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1175 export CONFIG_SHELL
1176 SHELL="$CONFIG_SHELL"
1177 export SHELL
1178 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1179 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1180 test "X$echo_testing_string" = 'X\t' &&
1181 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1182 test "X$echo_testing_string" = "X$echo_test_string"; then
1183 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1184 else
1185 # maybe with a smaller string...
1186 prev=:
1187
1188 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1189 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1190 then
1191 break
1192 fi
1193 prev="$cmd"
1194 done
1195
1196 if test "$prev" != 'sed 50q "[$]0"'; then
1197 echo_test_string=`eval $prev`
1198 export echo_test_string
1199 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1200 else
1201 # Oops. We lost completely, so just stick with echo.
1202 ECHO=echo
1203 fi
1204 fi
1205 fi
1206 fi
1207 fi
1208 fi
1209
1210 # Copy echo and quote the copy suitably for passing to libtool from
1211 # the Makefile, instead of quoting the original, which is used later.
1212 lt_ECHO=$ECHO
1213 if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1214 lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1215 fi
1216
1217 AC_SUBST(lt_ECHO)
1218 ])
1221 m4_ifdef([_AS_DETECT_SUGGESTED],
1222 [_AS_DETECT_SUGGESTED([
1223 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1224 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1225 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1226 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1227 PATH=/empty FPATH=/empty; export PATH FPATH
1228 test "X`printf %s $ECHO`" = "X$ECHO" \
1229 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1230
12191231 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1220 _LT_DECL([], [ECHO], [1],
1221 [An echo program that does not interpret backslashes])
1232 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
12221233 ])# _LT_PROG_ECHO_BACKSLASH
12231234
1235
1236 # _LT_WITH_SYSROOT
1237 # ----------------
1238 AC_DEFUN([_LT_WITH_SYSROOT],
1239 [AC_MSG_CHECKING([for sysroot])
1240 AC_ARG_WITH([sysroot],
1241 [ --with-sysroot[=DIR] Search for dependent libraries within DIR
1242 (or the compiler's sysroot if not specified).],
1243 [], [with_sysroot=no])
1244
1245 dnl lt_sysroot will always be passed unquoted. We quote it here
1246 dnl in case the user passed a directory name.
1247 lt_sysroot=
1248 case ${with_sysroot} in #(
1249 yes)
1250 if test "$GCC" = yes; then
1251 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1252 fi
1253 ;; #(
1254 /*)
1255 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1256 ;; #(
1257 no|'')
1258 ;; #(
1259 *)
1260 AC_MSG_RESULT([${with_sysroot}])
1261 AC_MSG_ERROR([The sysroot must be an absolute path.])
1262 ;;
1263 esac
1264
1265 AC_MSG_RESULT([${lt_sysroot:-no}])
1266 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1267 [dependent libraries, and in which our libraries should be installed.])])
12241268
12251269 # _LT_ENABLE_LOCK
12261270 # ---------------
12501294 ;;
12511295 *-*-irix6*)
12521296 # Find out which ABI we are using.
1253 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1297 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
12541298 if AC_TRY_EVAL(ac_compile); then
12551299 if test "$lt_cv_prog_gnu_ld" = yes; then
12561300 case `/usr/bin/file conftest.$ac_objext` in
13431387 CFLAGS="$SAVE_CFLAGS"
13441388 fi
13451389 ;;
1346 sparc*-*solaris*)
1390 *-*solaris*)
13471391 # Find out which ABI we are using.
13481392 echo 'int i;' > conftest.$ac_ext
13491393 if AC_TRY_EVAL(ac_compile); then
13501394 case `/usr/bin/file conftest.o` in
13511395 *64-bit*)
13521396 case $lt_cv_prog_gnu_ld in
1353 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1397 yes*)
1398 case $host in
1399 i?86-*-solaris*)
1400 LD="${LD-ld} -m elf_x86_64"
1401 ;;
1402 sparc*-*-solaris*)
1403 LD="${LD-ld} -m elf64_sparc"
1404 ;;
1405 esac
1406 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
1407 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1408 LD="${LD-ld}_sol2"
1409 fi
1410 ;;
13541411 *)
13551412 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
13561413 LD="${LD-ld} -64"
13681425 ])# _LT_ENABLE_LOCK
13691426
13701427
1428 # _LT_PROG_AR
1429 # -----------
1430 m4_defun([_LT_PROG_AR],
1431 [AC_CHECK_TOOLS(AR, [ar], false)
1432 : ${AR=ar}
1433 : ${AR_FLAGS=cru}
1434 _LT_DECL([], [AR], [1], [The archiver])
1435 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1436
1437 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1438 [lt_cv_ar_at_file=no
1439 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1440 [echo conftest.$ac_objext > conftest.lst
1441 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1442 AC_TRY_EVAL([lt_ar_try])
1443 if test "$ac_status" -eq 0; then
1444 # Ensure the archiver fails upon bogus file names.
1445 rm -f conftest.$ac_objext libconftest.a
1446 AC_TRY_EVAL([lt_ar_try])
1447 if test "$ac_status" -ne 0; then
1448 lt_cv_ar_at_file=@
1449 fi
1450 fi
1451 rm -f conftest.* libconftest.a
1452 ])
1453 ])
1454
1455 if test "x$lt_cv_ar_at_file" = xno; then
1456 archiver_list_spec=
1457 else
1458 archiver_list_spec=$lt_cv_ar_at_file
1459 fi
1460 _LT_DECL([], [archiver_list_spec], [1],
1461 [How to feed a file listing to the archiver])
1462 ])# _LT_PROG_AR
1463
1464
13711465 # _LT_CMD_OLD_ARCHIVE
13721466 # -------------------
13731467 m4_defun([_LT_CMD_OLD_ARCHIVE],
1374 [AC_CHECK_TOOL(AR, ar, false)
1375 test -z "$AR" && AR=ar
1376 test -z "$AR_FLAGS" && AR_FLAGS=cru
1377 _LT_DECL([], [AR], [1], [The archiver])
1378 _LT_DECL([], [AR_FLAGS], [1])
1468 [_LT_PROG_AR
13791469
13801470 AC_CHECK_TOOL(STRIP, strip, :)
13811471 test -z "$STRIP" && STRIP=:
13941484 if test -n "$RANLIB"; then
13951485 case $host_os in
13961486 openbsd*)
1397 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1487 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
13981488 ;;
13991489 *)
1400 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1490 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
14011491 ;;
14021492 esac
1403 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1493 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
14041494 fi
1495
1496 case $host_os in
1497 darwin*)
1498 lock_old_archive_extraction=yes ;;
1499 *)
1500 lock_old_archive_extraction=no ;;
1501 esac
14051502 _LT_DECL([], [old_postinstall_cmds], [2])
14061503 _LT_DECL([], [old_postuninstall_cmds], [2])
14071504 _LT_TAGDECL([], [old_archive_cmds], [2],
14081505 [Commands used to build an old-style archive])
1506 _LT_DECL([], [lock_old_archive_extraction], [0],
1507 [Whether to use a lock for old archive extraction])
14091508 ])# _LT_CMD_OLD_ARCHIVE
14101509
14111510
14301529 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14311530 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
14321531 -e 's:$: $lt_compiler_flag:'`
1433 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1532 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
14341533 (eval "$lt_compile" 2>conftest.err)
14351534 ac_status=$?
14361535 cat conftest.err >&AS_MESSAGE_LOG_FD
1437 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1536 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
14381537 if (exit $ac_status) && test -s "$ac_outfile"; then
14391538 # The compiler can only warn and ignore the option if not recognized
14401539 # So say no if there are warnings other than the usual output.
1441 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1540 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
14421541 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14431542 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
14441543 $2=yes
14781577 if test -s conftest.err; then
14791578 # Append any errors to the config.log.
14801579 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1481 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1580 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
14821581 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14831582 if diff conftest.exp conftest.er2 >/dev/null; then
14841583 $2=yes
15381637 # the test eventually succeeds (with a max line length of 256k).
15391638 # Instead, let's just punt: use the minimum linelength reported by
15401639 # all of the supported platforms: 8192 (on NT/2K/XP).
1640 lt_cv_sys_max_cmd_len=8192;
1641 ;;
1642
1643 mint*)
1644 # On MiNT this can take a long time and run out of memory.
15411645 lt_cv_sys_max_cmd_len=8192;
15421646 ;;
15431647
15641668 interix*)
15651669 # We know the value 262144 and hardcode it with a safety zone (like BSD)
15661670 lt_cv_sys_max_cmd_len=196608
1671 ;;
1672
1673 os2*)
1674 # The test takes a long time on OS/2.
1675 lt_cv_sys_max_cmd_len=8192
15671676 ;;
15681677
15691678 osf*)
16051714 # If test is not a shell built-in, we'll probably end up computing a
16061715 # maximum length that is only half of the actual maximum length, but
16071716 # we can't tell.
1608 while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1609 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1717 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
1718 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
16101719 test $i != 17 # 1/2 MB should be enough
16111720 do
16121721 i=`expr $i + 1`
16571766 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
16581767 lt_status=$lt_dlunknown
16591768 cat > conftest.$ac_ext <<_LT_EOF
1660 [#line __oline__ "configure"
1769 [#line $LINENO "configure"
16611770 #include "confdefs.h"
16621771
16631772 #if HAVE_DLFCN_H
16981807 # endif
16991808 #endif
17001809
1701 void fnord() { int i=42;}
1810 /* When -fvisbility=hidden is used, assume the code has been annotated
1811 correspondingly for the symbols needed. */
1812 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1813 int fnord () __attribute__((visibility("default")));
1814 #endif
1815
1816 int fnord () { return 42; }
17021817 int main ()
17031818 {
17041819 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
17071822 if (self)
17081823 {
17091824 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1710 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1825 else
1826 {
1827 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1828 else puts (dlerror ());
1829 }
17111830 /* dlclose (self); */
17121831 }
17131832 else
18832002 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
18842003 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
18852004 -e 's:$: $lt_compiler_flag:'`
1886 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2005 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
18872006 (eval "$lt_compile" 2>out/conftest.err)
18882007 ac_status=$?
18892008 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1890 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2009 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
18912010 if (exit $ac_status) && test -s out/conftest2.$ac_objext
18922011 then
18932012 # The compiler can only warn and ignore the option if not recognized
18942013 # So say no if there are warnings
1895 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2014 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
18962015 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
18972016 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
18982017 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
20512170 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
20522171 m4_require([_LT_DECL_OBJDUMP])dnl
20532172 m4_require([_LT_DECL_SED])dnl
2173 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
20542174 AC_MSG_CHECKING([dynamic linker characteristics])
20552175 m4_if([$1],
20562176 [], [
20592179 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
20602180 *) lt_awk_arg="/^libraries:/" ;;
20612181 esac
2062 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2063 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2182 case $host_os in
2183 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2184 *) lt_sed_strip_eq="s,=/,/,g" ;;
2185 esac
2186 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2187 case $lt_search_path_spec in
2188 *\;*)
20642189 # if the path contains ";" then we assume it to be the separator
20652190 # otherwise default to the standard path separator (i.e. ":") - it is
20662191 # assumed that no part of a normal pathname contains ";" but that should
20672192 # okay in the real world where ";" in dirpaths is itself problematic.
2068 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2069 else
2070 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2071 fi
2193 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2194 ;;
2195 *)
2196 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2197 ;;
2198 esac
20722199 # Ok, now we have the path, separated by spaces, we can step through it
20732200 # and add multilib dir if necessary.
20742201 lt_tmp_lt_search_path_spec=
20812208 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
20822209 fi
20832210 done
2084 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2211 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
20852212 BEGIN {RS=" "; FS="/|\n";} {
20862213 lt_foo="";
20872214 lt_count=0;
21012228 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
21022229 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
21032230 }'`
2104 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2231 # AWK program above erroneously prepends '/' to C:/dos/paths
2232 # for these hosts.
2233 case $host_os in
2234 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2235 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2236 esac
2237 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
21052238 else
21062239 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
21072240 fi])
21272260
21282261 case $host_os in
21292262 aix3*)
2130 version_type=linux
2263 version_type=linux # correct to gnu/linux during the next big refactor
21312264 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
21322265 shlibpath_var=LIBPATH
21332266
21362269 ;;
21372270
21382271 aix[[4-9]]*)
2139 version_type=linux
2272 version_type=linux # correct to gnu/linux during the next big refactor
21402273 need_lib_prefix=no
21412274 need_version=no
21422275 hardcode_into_libs=yes
21892322 m68k)
21902323 library_names_spec='$libname.ixlibrary $libname.a'
21912324 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2192 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2325 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
21932326 ;;
21942327 esac
21952328 ;;
22012334 ;;
22022335
22032336 bsdi[[45]]*)
2204 version_type=linux
2337 version_type=linux # correct to gnu/linux during the next big refactor
22052338 need_version=no
22062339 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
22072340 soname_spec='${libname}${release}${shared_ext}$major'
22202353 need_version=no
22212354 need_lib_prefix=no
22222355
2223 case $GCC,$host_os in
2224 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2356 case $GCC,$cc_basename in
2357 yes,*)
2358 # gcc
22252359 library_names_spec='$libname.dll.a'
22262360 # DLL is installed to $(libdir)/../bin by postinstall_cmds
22272361 postinstall_cmds='base_file=`basename \${file}`~
22422376 cygwin*)
22432377 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
22442378 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2245 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2379 m4_if([$1], [],[
2380 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
22462381 ;;
22472382 mingw* | cegcc*)
22482383 # MinGW DLLs use traditional 'lib' prefix
22492384 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2250 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2251 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2252 # It is most probably a Windows format PATH printed by
2253 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2254 # path with ; separators, and with drive letters. We can handle the
2255 # drive letters (cygwin fileutils understands them), so leave them,
2256 # especially as we might pass files found there to a mingw objdump,
2257 # which wouldn't understand a cygwinified path. Ahh.
2258 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2259 else
2260 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2261 fi
22622385 ;;
22632386 pw32*)
22642387 # pw32 DLLs use 'pw' prefix rather than 'lib'
22652388 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
22662389 ;;
22672390 esac
2391 dynamic_linker='Win32 ld.exe'
22682392 ;;
22692393
2394 *,cl*)
2395 # Native MSVC
2396 libname_spec='$name'
2397 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2398 library_names_spec='${libname}.dll.lib'
2399
2400 case $build_os in
2401 mingw*)
2402 sys_lib_search_path_spec=
2403 lt_save_ifs=$IFS
2404 IFS=';'
2405 for lt_path in $LIB
2406 do
2407 IFS=$lt_save_ifs
2408 # Let DOS variable expansion print the short 8.3 style file name.
2409 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2410 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2411 done
2412 IFS=$lt_save_ifs
2413 # Convert to MSYS style.
2414 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2415 ;;
2416 cygwin*)
2417 # Convert to unix form, then to dos form, then back to unix form
2418 # but this time dos style (no spaces!) so that the unix form looks
2419 # like /cygdrive/c/PROGRA~1:/cygdr...
2420 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2421 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2422 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2423 ;;
2424 *)
2425 sys_lib_search_path_spec="$LIB"
2426 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2427 # It is most probably a Windows format PATH.
2428 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2429 else
2430 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2431 fi
2432 # FIXME: find the short name or the path components, as spaces are
2433 # common. (e.g. "Program Files" -> "PROGRA~1")
2434 ;;
2435 esac
2436
2437 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2438 postinstall_cmds='base_file=`basename \${file}`~
2439 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2440 dldir=$destdir/`dirname \$dlpath`~
2441 test -d \$dldir || mkdir -p \$dldir~
2442 $install_prog $dir/$dlname \$dldir/$dlname'
2443 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2444 dlpath=$dir/\$dldll~
2445 $RM \$dlpath'
2446 shlibpath_overrides_runpath=yes
2447 dynamic_linker='Win32 link.exe'
2448 ;;
2449
22702450 *)
2451 # Assume MSVC wrapper
22712452 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2453 dynamic_linker='Win32 ld.exe'
22722454 ;;
22732455 esac
2274 dynamic_linker='Win32 ld.exe'
22752456 # FIXME: first we should search . and the directory the executable is in
22762457 shlibpath_var=PATH
22772458 ;;
22922473 ;;
22932474
22942475 dgux*)
2295 version_type=linux
2476 version_type=linux # correct to gnu/linux during the next big refactor
22962477 need_lib_prefix=no
22972478 need_version=no
22982479 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
22992480 soname_spec='${libname}${release}${shared_ext}$major'
23002481 shlibpath_var=LD_LIBRARY_PATH
2301 ;;
2302
2303 freebsd1*)
2304 dynamic_linker=no
23052482 ;;
23062483
23072484 freebsd* | dragonfly*)
23112488 objformat=`/usr/bin/objformat`
23122489 else
23132490 case $host_os in
2314 freebsd[[123]]*) objformat=aout ;;
2491 freebsd[[23]].*) objformat=aout ;;
23152492 *) objformat=elf ;;
23162493 esac
23172494 fi
23292506 esac
23302507 shlibpath_var=LD_LIBRARY_PATH
23312508 case $host_os in
2332 freebsd2*)
2509 freebsd2.*)
23332510 shlibpath_overrides_runpath=yes
23342511 ;;
23352512 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
23482525 esac
23492526 ;;
23502527
2351 gnu*)
2352 version_type=linux
2528 haiku*)
2529 version_type=linux # correct to gnu/linux during the next big refactor
23532530 need_lib_prefix=no
23542531 need_version=no
2532 dynamic_linker="$host_os runtime_loader"
23552533 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
23562534 soname_spec='${libname}${release}${shared_ext}$major'
2357 shlibpath_var=LD_LIBRARY_PATH
2535 shlibpath_var=LIBRARY_PATH
2536 shlibpath_overrides_runpath=yes
2537 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
23582538 hardcode_into_libs=yes
23592539 ;;
23602540
24002580 soname_spec='${libname}${release}${shared_ext}$major'
24012581 ;;
24022582 esac
2403 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2583 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
24042584 postinstall_cmds='chmod 555 $lib'
2585 # or fails outright, so override atomically:
2586 install_override_mode=555
24052587 ;;
24062588
24072589 interix[[3-9]]*)
2408 version_type=linux
2590 version_type=linux # correct to gnu/linux during the next big refactor
24092591 need_lib_prefix=no
24102592 need_version=no
24112593 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
24212603 nonstopux*) version_type=nonstopux ;;
24222604 *)
24232605 if test "$lt_cv_prog_gnu_ld" = yes; then
2424 version_type=linux
2606 version_type=linux # correct to gnu/linux during the next big refactor
24252607 else
24262608 version_type=irix
24272609 fi ;;
24582640 dynamic_linker=no
24592641 ;;
24602642
2461 # This must be Linux ELF.
2462 linux* | k*bsd*-gnu | kopensolaris*-gnu)
2463 version_type=linux
2643 # This must be glibc/ELF.
2644 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2645 version_type=linux # correct to gnu/linux during the next big refactor
24642646 need_lib_prefix=no
24652647 need_version=no
24662648 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
24682650 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
24692651 shlibpath_var=LD_LIBRARY_PATH
24702652 shlibpath_overrides_runpath=no
2653
24712654 # Some binutils ld are patched to set DT_RUNPATH
2472 save_LDFLAGS=$LDFLAGS
2473 save_libdir=$libdir
2474 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2475 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2476 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2477 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2478 [shlibpath_overrides_runpath=yes])])
2479 LDFLAGS=$save_LDFLAGS
2480 libdir=$save_libdir
2655 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2656 [lt_cv_shlibpath_overrides_runpath=no
2657 save_LDFLAGS=$LDFLAGS
2658 save_libdir=$libdir
2659 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2660 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2661 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2662 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2663 [lt_cv_shlibpath_overrides_runpath=yes])])
2664 LDFLAGS=$save_LDFLAGS
2665 libdir=$save_libdir
2666 ])
2667 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
24812668
24822669 # This implies no fast_install, which is unacceptable.
24832670 # Some rework will be needed to allow for fast_install
24862673
24872674 # Append ld.so.conf contents to the search path
24882675 if test -f /etc/ld.so.conf; then
2489 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2676 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
24902677 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
24912678 fi
24922679
25302717 ;;
25312718
25322719 newsos6)
2533 version_type=linux
2720 version_type=linux # correct to gnu/linux during the next big refactor
25342721 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
25352722 shlibpath_var=LD_LIBRARY_PATH
25362723 shlibpath_overrides_runpath=yes
25992786 ;;
26002787
26012788 solaris*)
2602 version_type=linux
2789 version_type=linux # correct to gnu/linux during the next big refactor
26032790 need_lib_prefix=no
26042791 need_version=no
26052792 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
26242811 ;;
26252812
26262813 sysv4 | sysv4.3*)
2627 version_type=linux
2814 version_type=linux # correct to gnu/linux during the next big refactor
26282815 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
26292816 soname_spec='${libname}${release}${shared_ext}$major'
26302817 shlibpath_var=LD_LIBRARY_PATH
26482835
26492836 sysv4*MP*)
26502837 if test -d /usr/nec ;then
2651 version_type=linux
2838 version_type=linux # correct to gnu/linux during the next big refactor
26522839 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
26532840 soname_spec='$libname${shared_ext}.$major'
26542841 shlibpath_var=LD_LIBRARY_PATH
26792866
26802867 tpf*)
26812868 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2682 version_type=linux
2869 version_type=linux # correct to gnu/linux during the next big refactor
26832870 need_lib_prefix=no
26842871 need_version=no
26852872 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
26892876 ;;
26902877
26912878 uts4*)
2692 version_type=linux
2879 version_type=linux # correct to gnu/linux during the next big refactor
26932880 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
26942881 soname_spec='${libname}${release}${shared_ext}$major'
26952882 shlibpath_var=LD_LIBRARY_PATH
27312918 The last name is the one that the linker finds with -lNAME]])
27322919 _LT_DECL([], [soname_spec], [1],
27332920 [[The coded name of the library, if different from the real name]])
2921 _LT_DECL([], [install_override_mode], [1],
2922 [Permission mode override for installation of shared libraries])
27342923 _LT_DECL([], [postinstall_cmds], [2],
27352924 [Command to use after installation of a shared archive])
27362925 _LT_DECL([], [postuninstall_cmds], [2],
28433032 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
28443033 m4_require([_LT_DECL_SED])dnl
28453034 m4_require([_LT_DECL_EGREP])dnl
3035 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
28463036
28473037 AC_ARG_WITH([gnu-ld],
28483038 [AS_HELP_STRING([--with-gnu-ld],
29643154 esac
29653155 reload_cmds='$LD$reload_flag -o $output$reload_objs'
29663156 case $host_os in
3157 cygwin* | mingw* | pw32* | cegcc*)
3158 if test "$GCC" != yes; then
3159 reload_cmds=false
3160 fi
3161 ;;
29673162 darwin*)
29683163 if test "$GCC" = yes; then
29693164 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
29723167 fi
29733168 ;;
29743169 esac
2975 _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2976 _LT_DECL([], [reload_cmds], [2])dnl
3170 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3171 _LT_TAGDECL([], [reload_cmds], [2])dnl
29773172 ])# _LT_CMD_RELOAD
29783173
29793174
30253220 # Base MSYS/MinGW do not provide the 'file' command needed by
30263221 # func_win32_libid shell function, so use a weaker test based on 'objdump',
30273222 # unless we find 'file', for example because we are cross-compiling.
3028 if ( file / ) >/dev/null 2>&1; then
3223 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3224 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
30293225 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
30303226 lt_cv_file_magic_cmd='func_win32_libid'
30313227 else
3032 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3228 # Keep this pattern in sync with the one in func_win32_libid.
3229 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
30333230 lt_cv_file_magic_cmd='$OBJDUMP -f'
30343231 fi
30353232 ;;
30363233
3037 cegcc)
3234 cegcc*)
30383235 # use the weaker test based on 'objdump'. See mingw*.
30393236 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
30403237 lt_cv_file_magic_cmd='$OBJDUMP -f'
30603257 fi
30613258 ;;
30623259
3063 gnu*)
3260 haiku*)
30643261 lt_cv_deplibs_check_method=pass_all
30653262 ;;
30663263
30723269 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
30733270 ;;
30743271 hppa*64*)
3075 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
3272 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
30763273 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
30773274 ;;
30783275 *)
3079 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3276 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
30803277 lt_cv_file_magic_test_file=/usr/lib/libc.sl
30813278 ;;
30823279 esac
30973294 lt_cv_deplibs_check_method=pass_all
30983295 ;;
30993296
3100 # This must be Linux ELF.
3101 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3297 # This must be glibc/ELF.
3298 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
31023299 lt_cv_deplibs_check_method=pass_all
31033300 ;;
31043301
31763373 ;;
31773374 esac
31783375 ])
3376
3377 file_magic_glob=
3378 want_nocaseglob=no
3379 if test "$build" = "$host"; then
3380 case $host_os in
3381 mingw* | pw32*)
3382 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3383 want_nocaseglob=yes
3384 else
3385 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3386 fi
3387 ;;
3388 esac
3389 fi
3390
31793391 file_magic_cmd=$lt_cv_file_magic_cmd
31803392 deplibs_check_method=$lt_cv_deplibs_check_method
31813393 test -z "$deplibs_check_method" && deplibs_check_method=unknown
31833395 _LT_DECL([], [deplibs_check_method], [1],
31843396 [Method to check whether dependent libraries are shared objects])
31853397 _LT_DECL([], [file_magic_cmd], [1],
3186 [Command to use when deplibs_check_method == "file_magic"])
3398 [Command to use when deplibs_check_method = "file_magic"])
3399 _LT_DECL([], [file_magic_glob], [1],
3400 [How to find potential files when deplibs_check_method = "file_magic"])
3401 _LT_DECL([], [want_nocaseglob], [1],
3402 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
31873403 ])# _LT_CHECK_MAGIC_METHOD
31883404
31893405
32403456 NM="$lt_cv_path_NM"
32413457 else
32423458 # Didn't find any BSD compatible name lister, look for dumpbin.
3243 AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3459 if test -n "$DUMPBIN"; then :
3460 # Let the user override the test.
3461 else
3462 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3463 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
3464 *COFF*)
3465 DUMPBIN="$DUMPBIN -symbols"
3466 ;;
3467 *)
3468 DUMPBIN=:
3469 ;;
3470 esac
3471 fi
32443472 AC_SUBST([DUMPBIN])
32453473 if test "$DUMPBIN" != ":"; then
32463474 NM="$DUMPBIN"
32533481 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
32543482 [lt_cv_nm_interface="BSD nm"
32553483 echo "int some_variable = 0;" > conftest.$ac_ext
3256 (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3484 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
32573485 (eval "$ac_compile" 2>conftest.err)
32583486 cat conftest.err >&AS_MESSAGE_LOG_FD
3259 (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3487 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
32603488 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
32613489 cat conftest.err >&AS_MESSAGE_LOG_FD
3262 (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3490 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
32633491 cat conftest.out >&AS_MESSAGE_LOG_FD
32643492 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
32653493 lt_cv_nm_interface="MS dumpbin"
32733501 dnl aclocal-1.4 backwards compatibility:
32743502 dnl AC_DEFUN([AM_PROG_NM], [])
32753503 dnl AC_DEFUN([AC_PROG_NM], [])
3504
3505 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3506 # --------------------------------
3507 # how to determine the name of the shared library
3508 # associated with a specific link library.
3509 # -- PORTME fill in with the dynamic library characteristics
3510 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3511 [m4_require([_LT_DECL_EGREP])
3512 m4_require([_LT_DECL_OBJDUMP])
3513 m4_require([_LT_DECL_DLLTOOL])
3514 AC_CACHE_CHECK([how to associate runtime and link libraries],
3515 lt_cv_sharedlib_from_linklib_cmd,
3516 [lt_cv_sharedlib_from_linklib_cmd='unknown'
3517
3518 case $host_os in
3519 cygwin* | mingw* | pw32* | cegcc*)
3520 # two different shell functions defined in ltmain.sh
3521 # decide which to use based on capabilities of $DLLTOOL
3522 case `$DLLTOOL --help 2>&1` in
3523 *--identify-strict*)
3524 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3525 ;;
3526 *)
3527 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3528 ;;
3529 esac
3530 ;;
3531 *)
3532 # fallback: assume linklib IS sharedlib
3533 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3534 ;;
3535 esac
3536 ])
3537 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3538 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3539
3540 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3541 [Command to associate shared and link libraries])
3542 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3543
3544
3545 # _LT_PATH_MANIFEST_TOOL
3546 # ----------------------
3547 # locate the manifest tool
3548 m4_defun([_LT_PATH_MANIFEST_TOOL],
3549 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3550 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3551 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3552 [lt_cv_path_mainfest_tool=no
3553 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3554 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3555 cat conftest.err >&AS_MESSAGE_LOG_FD
3556 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3557 lt_cv_path_mainfest_tool=yes
3558 fi
3559 rm -f conftest*])
3560 if test "x$lt_cv_path_mainfest_tool" != xyes; then
3561 MANIFEST_TOOL=:
3562 fi
3563 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3564 ])# _LT_PATH_MANIFEST_TOOL
32763565
32773566
32783567 # LT_LIB_M
32823571 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
32833572 LIBM=
32843573 case $host in
3285 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3574 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
32863575 # These system don't have libm, or don't need it
32873576 ;;
32883577 *-ncr-sysv4.3*)
33103599 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
33113600
33123601 if test "$GCC" = yes; then
3313 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3602 case $cc_basename in
3603 nvcc*)
3604 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3605 *)
3606 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3607 esac
33143608
33153609 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
33163610 lt_cv_prog_compiler_rtti_exceptions,
33273621 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
33283622 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
33293623 AC_REQUIRE([AC_PROG_CC])dnl
3624 AC_REQUIRE([AC_PROG_AWK])dnl
33303625 AC_REQUIRE([LT_PATH_NM])dnl
33313626 AC_REQUIRE([LT_PATH_LD])dnl
33323627 m4_require([_LT_DECL_SED])dnl
33943689 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
33953690
33963691 # Transform an extracted symbol line into symbol name and symbol address
3397 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3398 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
3692 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3693 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
33993694
34003695 # Handle CRLF in mingw tool chain
34013696 opt_cr=
34193714 # which start with @ or ?.
34203715 lt_cv_sys_global_symbol_pipe="$AWK ['"\
34213716 " {last_section=section; section=\$ 3};"\
3717 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
34223718 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
34233719 " \$ 0!~/External *\|/{next};"\
34243720 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
34313727 else
34323728 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
34333729 fi
3730 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
34343731
34353732 # Check to see that the pipe works correctly.
34363733 pipe_works=no
34523749 if AC_TRY_EVAL(ac_compile); then
34533750 # Now try to grab the symbols.
34543751 nlist=conftest.nm
3455 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3752 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
34563753 # Try sorting and uniquifying the output.
34573754 if sort "$nlist" | uniq > "$nlist"T; then
34583755 mv -f "$nlist"T "$nlist"
34643761 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
34653762 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
34663763 cat <<_LT_EOF > conftest.$ac_ext
3764 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3765 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3766 /* DATA imports from DLLs on WIN32 con't be const, because runtime
3767 relocations are performed -- see ld's documentation on pseudo-relocs. */
3768 # define LT@&t@_DLSYM_CONST
3769 #elif defined(__osf__)
3770 /* This system does not cope well with relocations in const data. */
3771 # define LT@&t@_DLSYM_CONST
3772 #else
3773 # define LT@&t@_DLSYM_CONST const
3774 #endif
3775
34673776 #ifdef __cplusplus
34683777 extern "C" {
34693778 #endif
34753784 cat <<_LT_EOF >> conftest.$ac_ext
34763785
34773786 /* The mapping between symbol names and symbols. */
3478 const struct {
3787 LT@&t@_DLSYM_CONST struct {
34793788 const char *name;
34803789 void *address;
34813790 }
35013810 _LT_EOF
35023811 # Now try linking the two files.
35033812 mv conftest.$ac_objext conftstm.$ac_objext
3504 lt_save_LIBS="$LIBS"
3505 lt_save_CFLAGS="$CFLAGS"
3813 lt_globsym_save_LIBS=$LIBS
3814 lt_globsym_save_CFLAGS=$CFLAGS
35063815 LIBS="conftstm.$ac_objext"
35073816 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
35083817 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
35093818 pipe_works=yes
35103819 fi
3511 LIBS="$lt_save_LIBS"
3512 CFLAGS="$lt_save_CFLAGS"
3820 LIBS=$lt_globsym_save_LIBS
3821 CFLAGS=$lt_globsym_save_CFLAGS
35133822 else
35143823 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
35153824 fi
35423851 AC_MSG_RESULT(ok)
35433852 fi
35443853
3854 # Response file support.
3855 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3856 nm_file_list_spec='@'
3857 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
3858 nm_file_list_spec='@'
3859 fi
3860
35453861 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
35463862 [Take the output of nm and produce a listing of raw symbols and C names])
35473863 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
35523868 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
35533869 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
35543870 [Transform the output of nm in a C name address pair when lib prefix is needed])
3871 _LT_DECL([], [nm_file_list_spec], [1],
3872 [Specify filename containing input files for $NM])
35553873 ]) # _LT_CMD_GLOBAL_SYMBOLS
35563874
35573875
35633881 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
35643882 _LT_TAGVAR(lt_prog_compiler_static, $1)=
35653883
3566 AC_MSG_CHECKING([for $compiler option to produce PIC])
35673884 m4_if([$1], [CXX], [
35683885 # C++ specific cases for pic, static, wl, etc.
35693886 if test "$GXX" = yes; then
36133930 *djgpp*)
36143931 # DJGPP does not support shared libraries at all
36153932 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3933 ;;
3934 haiku*)
3935 # PIC is the default for Haiku.
3936 # The "-static" flag exists, but is broken.
3937 _LT_TAGVAR(lt_prog_compiler_static, $1)=
36163938 ;;
36173939 interix[[3-9]]*)
36183940 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
36623984 # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
36633985 ;;
36643986 esac
3987 ;;
3988 mingw* | cygwin* | os2* | pw32* | cegcc*)
3989 # This hack is so that the source file can tell whether it is being
3990 # built for inclusion in a dll (and should export symbols for example).
3991 m4_if([$1], [GCJ], [],
3992 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
36653993 ;;
36663994 dgux*)
36673995 case $cc_basename in
37194047 ;;
37204048 esac
37214049 ;;
3722 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4050 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
37234051 case $cc_basename in
37244052 KCC*)
37254053 # KAI C++ Compiler
37524080 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
37534081 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
37544082 ;;
3755 xlc* | xlC*)
3756 # IBM XL 8.0 on PPC
4083 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4084 # IBM XL 8.0, 9.0 on PPC and BlueGene
37574085 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
37584086 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
37594087 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
38154143 ;;
38164144 solaris*)
38174145 case $cc_basename in
3818 CC*)
4146 CC* | sunCC*)
38194147 # Sun C++ 4.2, 5.x and Centerline C++
38204148 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
38214149 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
39194247 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
39204248 ;;
39214249
4250 haiku*)
4251 # PIC is the default for Haiku.
4252 # The "-static" flag exists, but is broken.
4253 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4254 ;;
4255
39224256 hpux*)
39234257 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
39244258 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
39594293
39604294 *)
39614295 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4296 ;;
4297 esac
4298
4299 case $cc_basename in
4300 nvcc*) # Cuda Compiler Driver 2.2
4301 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4302 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4303 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4304 fi
39624305 ;;
39634306 esac
39644307 else
40034346 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
40044347 ;;
40054348
4006 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4349 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
40074350 case $cc_basename in
40084351 # old Intel for x86_64 which still supported -KPIC.
40094352 ecc*)
40244367 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
40254368 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
40264369 ;;
4027 pgcc* | pgf77* | pgf90* | pgf95*)
4370 nagfor*)
4371 # NAG Fortran compiler
4372 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4373 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4374 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4375 ;;
4376 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
40284377 # Portland Group compilers (*not* the Pentium gcc compiler,
40294378 # which looks to be a dead project)
40304379 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40364385 # All Alpha code is PIC.
40374386 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
40384387 ;;
4039 xl*)
4040 # IBM XL C 8.0/Fortran 10.1 on PPC
4388 xl* | bgxl* | bgf* | mpixl*)
4389 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
40414390 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40424391 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
40434392 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
40444393 ;;
40454394 *)
40464395 case `$CC -V 2>&1 | sed 5q` in
4396 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4397 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4398 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4399 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4400 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4401 ;;
4402 *Sun\ F* | *Sun*Fortran*)
4403 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4404 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4405 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4406 ;;
40474407 *Sun\ C*)
40484408 # Sun C 5.9
40494409 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
40504410 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
40514411 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40524412 ;;
4053 *Sun\ F*)
4054 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4055 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4413 *Intel*\ [[CF]]*Compiler*)
4414 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4415 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4416 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4417 ;;
4418 *Portland\ Group*)
4419 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4420 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
40564421 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4057 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
40584422 ;;
40594423 esac
40604424 ;;
40864450 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
40874451 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
40884452 case $cc_basename in
4089 f77* | f90* | f95*)
4453 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
40904454 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
40914455 *)
40924456 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
41434507 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
41444508 ;;
41454509 esac
4146 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4147 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4148 [How to pass a linker flag through the compiler])
4510
4511 AC_CACHE_CHECK([for $compiler option to produce PIC],
4512 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4513 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4514 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
41494515
41504516 #
41514517 # Check to make sure the PIC flag actually works.
41644530 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
41654531 [Additional compiler flags for building library objects])
41664532
4533 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4534 [How to pass a linker flag through the compiler])
41674535 #
41684536 # Check to make sure the static flag actually works.
41694537 #
41844552 m4_defun([_LT_LINKER_SHLIBS],
41854553 [AC_REQUIRE([LT_PATH_LD])dnl
41864554 AC_REQUIRE([LT_PATH_NM])dnl
4555 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
41874556 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
41884557 m4_require([_LT_DECL_EGREP])dnl
41894558 m4_require([_LT_DECL_SED])dnl
41924561 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
41934562 m4_if([$1], [CXX], [
41944563 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4564 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
41954565 case $host_os in
41964566 aix[[4-9]]*)
41974567 # If we're using GNU nm, then we don't want the "-C" option.
41984568 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4569 # Also, AIX nm treats weak defined symbols like other global defined
4570 # symbols, whereas GNU nm marks them as "W".
41994571 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4200 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4572 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
42014573 else
42024574 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
42034575 fi
42044576 ;;
42054577 pw32*)
42064578 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4207 ;;
4579 ;;
42084580 cygwin* | mingw* | cegcc*)
4209 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4210 ;;
4211 linux* | k*bsd*-gnu)
4581 case $cc_basename in
4582 cl*)
4583 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4584 ;;
4585 *)
4586 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4587 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4588 ;;
4589 esac
4590 ;;
4591 linux* | k*bsd*-gnu | gnu*)
42124592 _LT_TAGVAR(link_all_deplibs, $1)=no
4213 ;;
4593 ;;
42144594 *)
42154595 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4216 ;;
4596 ;;
42174597 esac
4218 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
42194598 ], [
42204599 runpath_var=
42214600 _LT_TAGVAR(allow_undefined_flag, $1)=
42304609 _LT_TAGVAR(hardcode_direct, $1)=no
42314610 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
42324611 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4233 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
42344612 _LT_TAGVAR(hardcode_libdir_separator, $1)=
42354613 _LT_TAGVAR(hardcode_minus_L, $1)=no
42364614 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
42754653 openbsd*)
42764654 with_gnu_ld=no
42774655 ;;
4278 linux* | k*bsd*-gnu)
4656 linux* | k*bsd*-gnu | gnu*)
42794657 _LT_TAGVAR(link_all_deplibs, $1)=no
42804658 ;;
42814659 esac
42824660
42834661 _LT_TAGVAR(ld_shlibs, $1)=yes
4662
4663 # On some targets, GNU ld is compatible enough with the native linker
4664 # that we're better off using the native interface for both.
4665 lt_use_gnu_ld_interface=no
42844666 if test "$with_gnu_ld" = yes; then
4667 case $host_os in
4668 aix*)
4669 # The AIX port of GNU ld has always aspired to compatibility
4670 # with the native linker. However, as the warning in the GNU ld
4671 # block says, versions before 2.19.5* couldn't really create working
4672 # shared libraries, regardless of the interface used.
4673 case `$LD -v 2>&1` in
4674 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
4675 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
4676 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
4677 *)
4678 lt_use_gnu_ld_interface=yes
4679 ;;
4680 esac
4681 ;;
4682 *)
4683 lt_use_gnu_ld_interface=yes
4684 ;;
4685 esac
4686 fi
4687
4688 if test "$lt_use_gnu_ld_interface" = yes; then
42854689 # If archive_cmds runs LD, not CC, wlarc should be empty
42864690 wlarc='${wl}'
42874691
43154719 _LT_TAGVAR(ld_shlibs, $1)=no
43164720 cat <<_LT_EOF 1>&2
43174721
4318 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
4722 *** Warning: the GNU linker, at least up to release 2.19, is reported
43194723 *** to be unable to reliably create shared libraries on AIX.
43204724 *** Therefore, libtool is disabling shared libraries support. If you
4321 *** really care for shared libraries, you may want to modify your PATH
4322 *** so that a non-GNU linker is found, and then restart.
4725 *** really care for shared libraries, you may want to install binutils
4726 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
4727 *** You will then need to restart the configuration process.
43234728
43244729 _LT_EOF
43254730 fi
43554760 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
43564761 # as there is no search path for DLLs.
43574762 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4763 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
43584764 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
43594765 _LT_TAGVAR(always_export_symbols, $1)=no
43604766 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4361 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
4767 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4768 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
43624769
43634770 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
43644771 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
43764783 fi
43774784 ;;
43784785
4786 haiku*)
4787 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4788 _LT_TAGVAR(link_all_deplibs, $1)=yes
4789 ;;
4790
43794791 interix[[3-9]]*)
43804792 _LT_TAGVAR(hardcode_direct, $1)=no
43814793 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
44014813 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
44024814 && test "$tmp_diet" = no
44034815 then
4404 tmp_addflag=
4816 tmp_addflag=' $pic_flag'
44054817 tmp_sharedflag='-shared'
44064818 case $cc_basename,$host_cpu in
44074819 pgcc*) # Portland Group C compiler
4408 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4820 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
44094821 tmp_addflag=' $pic_flag'
44104822 ;;
4411 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
4412 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4823 pgf77* | pgf90* | pgf95* | pgfortran*)
4824 # Portland Group f77 and f90 compilers
4825 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
44134826 tmp_addflag=' $pic_flag -Mnomain' ;;
44144827 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
44154828 tmp_addflag=' -i_dynamic' ;;
44204833 lf95*) # Lahey Fortran 8.1
44214834 _LT_TAGVAR(whole_archive_flag_spec, $1)=
44224835 tmp_sharedflag='--shared' ;;
4423 xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4836 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
44244837 tmp_sharedflag='-qmkshrobj'
44254838 tmp_addflag= ;;
4839 nvcc*) # Cuda Compiler Driver 2.2
4840 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4841 _LT_TAGVAR(compiler_needs_object, $1)=yes
4842 ;;
44264843 esac
44274844 case `$CC -V 2>&1 | sed 5q` in
44284845 *Sun\ C*) # Sun C 5.9
4429 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4846 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
44304847 _LT_TAGVAR(compiler_needs_object, $1)=yes
44314848 tmp_sharedflag='-G' ;;
44324849 *Sun\ F*) # Sun Fortran 8.3
44424859 fi
44434860
44444861 case $cc_basename in
4445 xlf*)
4862 xlf* | bgf* | bgxlf* | mpixlf*)
44464863 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
44474864 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4448 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4449 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4450 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
4865 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4866 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
44514867 if test "x$supports_anon_versioning" = xyes; then
44524868 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
44534869 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
44544870 echo "local: *; };" >> $output_objdir/$libname.ver~
4455 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4871 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
44564872 fi
44574873 ;;
44584874 esac
44664882 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
44674883 wlarc=
44684884 else
4469 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4470 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4885 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4886 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
44714887 fi
44724888 ;;
44734889
44854901
44864902 _LT_EOF
44874903 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4488 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4489 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4904 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4905 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
44904906 else
44914907 _LT_TAGVAR(ld_shlibs, $1)=no
44924908 fi
45324948
45334949 *)
45344950 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4535 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4536 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4951 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4952 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
45374953 else
45384954 _LT_TAGVAR(ld_shlibs, $1)=no
45394955 fi
45734989 else
45744990 # If we're using GNU nm, then we don't want the "-C" option.
45754991 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4992 # Also, AIX nm treats weak defined symbols like other global
4993 # defined symbols, whereas GNU nm marks them as "W".
45764994 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4577 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4995 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
45784996 else
45794997 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
45804998 fi
46625080 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
46635081 # Determine the default libpath from the value encoded in an
46645082 # empty executable.
4665 _LT_SYS_MODULE_PATH_AIX
5083 _LT_SYS_MODULE_PATH_AIX([$1])
46665084 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4667 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5085 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
46685086 else
46695087 if test "$host_cpu" = ia64; then
46705088 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
46735091 else
46745092 # Determine the default libpath from the value encoded in an
46755093 # empty executable.
4676 _LT_SYS_MODULE_PATH_AIX
5094 _LT_SYS_MODULE_PATH_AIX([$1])
46775095 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
46785096 # Warning - without using the other run time loading flags,
46795097 # -berok will link without error, but may produce a broken library.
46805098 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
46815099 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4682 # Exported symbols can be pulled into shared objects from archives
4683 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5100 if test "$with_gnu_ld" = yes; then
5101 # We only use this code for GNU lds that support --whole-archive.
5102 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5103 else
5104 # Exported symbols can be pulled into shared objects from archives
5105 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5106 fi
46845107 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
46855108 # This is similar to how AIX traditionally builds its shared libraries.
46865109 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
47125135 # Microsoft Visual C++.
47135136 # hardcode_libdir_flag_spec is actually meaningless, as there is
47145137 # no search path for DLLs.
4715 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4716 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4717 # Tell ltmain to make .lib files, not .a files.
4718 libext=lib
4719 # Tell ltmain to make .dll files, not .so files.
4720 shrext_cmds=".dll"
4721 # FIXME: Setting linknames here is a bad hack.
4722 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4723 # The linker will automatically build a .lib file if we build a DLL.
4724 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4725 # FIXME: Should let the user specify the lib program.
4726 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4727 _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4728 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5138 case $cc_basename in
5139 cl*)
5140 # Native MSVC
5141 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5142 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5143 _LT_TAGVAR(always_export_symbols, $1)=yes
5144 _LT_TAGVAR(file_list_spec, $1)='@'
5145 # Tell ltmain to make .lib files, not .a files.
5146 libext=lib
5147 # Tell ltmain to make .dll files, not .so files.
5148 shrext_cmds=".dll"
5149 # FIXME: Setting linknames here is a bad hack.
5150 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5151 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5152 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5153 else
5154 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5155 fi~
5156 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5157 linknames='
5158 # The linker will not automatically build a static lib if we build a DLL.
5159 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5160 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5161 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5162 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5163 # Don't use ranlib
5164 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5165 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5166 lt_tool_outputfile="@TOOL_OUTPUT@"~
5167 case $lt_outputfile in
5168 *.exe|*.EXE) ;;
5169 *)
5170 lt_outputfile="$lt_outputfile.exe"
5171 lt_tool_outputfile="$lt_tool_outputfile.exe"
5172 ;;
5173 esac~
5174 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5175 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5176 $RM "$lt_outputfile.manifest";
5177 fi'
5178 ;;
5179 *)
5180 # Assume MSVC wrapper
5181 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5182 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5183 # Tell ltmain to make .lib files, not .a files.
5184 libext=lib
5185 # Tell ltmain to make .dll files, not .so files.
5186 shrext_cmds=".dll"
5187 # FIXME: Setting linknames here is a bad hack.
5188 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5189 # The linker will automatically build a .lib file if we build a DLL.
5190 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5191 # FIXME: Should let the user specify the lib program.
5192 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5193 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5194 ;;
5195 esac
47295196 ;;
47305197
47315198 darwin* | rhapsody*)
47365203 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
47375204 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
47385205 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4739 ;;
4740
4741 freebsd1*)
4742 _LT_TAGVAR(ld_shlibs, $1)=no
47435206 ;;
47445207
47455208 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
47545217 ;;
47555218
47565219 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4757 freebsd2*)
5220 freebsd2.*)
47585221 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
47595222 _LT_TAGVAR(hardcode_direct, $1)=yes
47605223 _LT_TAGVAR(hardcode_minus_L, $1)=yes
47635226
47645227 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
47655228 freebsd* | dragonfly*)
4766 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5229 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
47675230 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
47685231 _LT_TAGVAR(hardcode_direct, $1)=yes
47695232 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
47715234
47725235 hpux9*)
47735236 if test "$GCC" = yes; then
4774 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5237 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
47755238 else
47765239 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
47775240 fi
47865249 ;;
47875250
47885251 hpux10*)
4789 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4790 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5252 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5253 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
47915254 else
47925255 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
47935256 fi
47945257 if test "$with_gnu_ld" = no; then
47955258 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4796 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
47975259 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
47985260 _LT_TAGVAR(hardcode_direct, $1)=yes
47995261 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
48055267 ;;
48065268
48075269 hpux11*)
4808 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5270 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
48095271 case $host_cpu in
48105272 hppa*64*)
48115273 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
48125274 ;;
48135275 ia64*)
4814 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5276 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
48155277 ;;
48165278 *)
4817 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5279 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
48185280 ;;
48195281 esac
48205282 else
48265288 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
48275289 ;;
48285290 *)
4829 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5291 m4_if($1, [], [
5292 # Older versions of the 11.00 compiler do not understand -b yet
5293 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5294 _LT_LINKER_OPTION([if $CC understands -b],
5295 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5296 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5297 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5298 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
48305299 ;;
48315300 esac
48325301 fi
48545323
48555324 irix5* | irix6* | nonstopux*)
48565325 if test "$GCC" = yes; then
4857 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5326 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
48585327 # Try to use the -exported_symbol ld option, if it does not
48595328 # work, assume that -exports_file does not work either and
48605329 # implicitly export all symbols.
4861 save_LDFLAGS="$LDFLAGS"
4862 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
4863 AC_LINK_IFELSE(int foo(void) {},
4864 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
4865 )
4866 LDFLAGS="$save_LDFLAGS"
5330 # This should be the same for all languages, so no per-tag cache variable.
5331 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5332 [lt_cv_irix_exported_symbol],
5333 [save_LDFLAGS="$LDFLAGS"
5334 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5335 AC_LINK_IFELSE(
5336 [AC_LANG_SOURCE(
5337 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5338 [C++], [[int foo (void) { return 0; }]],
5339 [Fortran 77], [[
5340 subroutine foo
5341 end]],
5342 [Fortran], [[
5343 subroutine foo
5344 end]])])],
5345 [lt_cv_irix_exported_symbol=yes],
5346 [lt_cv_irix_exported_symbol=no])
5347 LDFLAGS="$save_LDFLAGS"])
5348 if test "$lt_cv_irix_exported_symbol" = yes; then
5349 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
5350 fi
48675351 else
4868 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4869 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
5352 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5353 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
48705354 fi
48715355 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
48725356 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
49285412 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
49295413 _LT_TAGVAR(hardcode_minus_L, $1)=yes
49305414 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4931 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5415 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
49325416 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
49335417 ;;
49345418
49355419 osf3*)
49365420 if test "$GCC" = yes; then
49375421 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4938 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5422 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
49395423 else
49405424 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4941 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5425 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
49425426 fi
49435427 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
49445428 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
49485432 osf4* | osf5*) # as osf3* with the addition of -msym flag
49495433 if test "$GCC" = yes; then
49505434 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4951 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5435 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
49525436 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
49535437 else
49545438 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4955 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5439 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
49565440 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
4957 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
5441 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
49585442
49595443 # Both c and cxx compiler support -rpath directly
49605444 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
49675451 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
49685452 if test "$GCC" = yes; then
49695453 wlarc='${wl}'
4970 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5454 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
49715455 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4972 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5456 $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
49735457 else
49745458 case `$CC -V 2>&1` in
49755459 *"Compilers 5.0"*)
51455629 # Test whether the compiler implicitly links with -lc since on some
51465630 # systems, -lgcc has to come before -lc. If gcc already passes -lc
51475631 # to ld, don't add -lc before -lgcc.
5148 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5149 $RM conftest*
5150 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5151
5152 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5153 soname=conftest
5154 lib=conftest
5155 libobjs=conftest.$ac_objext
5156 deplibs=
5157 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5158 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5159 compiler_flags=-v
5160 linker_flags=-v
5161 verstring=
5162 output_objdir=.
5163 libname=conftest
5164 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5165 _LT_TAGVAR(allow_undefined_flag, $1)=
5166 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5167 then
5168 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5169 else
5170 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5171 fi
5172 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5173 else
5174 cat conftest.err 1>&5
5175 fi
5176 $RM conftest*
5177 AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5632 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
5633 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
5634 [$RM conftest*
5635 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5636
5637 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5638 soname=conftest
5639 lib=conftest
5640 libobjs=conftest.$ac_objext
5641 deplibs=
5642 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5643 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5644 compiler_flags=-v
5645 linker_flags=-v
5646 verstring=
5647 output_objdir=.
5648 libname=conftest
5649 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5650 _LT_TAGVAR(allow_undefined_flag, $1)=
5651 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5652 then
5653 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5654 else
5655 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5656 fi
5657 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5658 else
5659 cat conftest.err 1>&5
5660 fi
5661 $RM conftest*
5662 ])
5663 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
51785664 ;;
51795665 esac
51805666 fi
52115697 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
52125698 [Flag to hardcode $libdir into a binary during linking.
52135699 This must work even if $libdir does not exist])
5214 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5215 [[If ld is used when linking, flag to hardcode $libdir into a binary
5216 during linking. This must work even if $libdir does not exist]])
52175700 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
52185701 [Whether we need a single "-rpath" flag with a separated argument])
52195702 _LT_TAGDECL([], [hardcode_direct], [0],
52395722 to runtime path list])
52405723 _LT_TAGDECL([], [link_all_deplibs], [0],
52415724 [Whether libtool must link a program against all its dependency libraries])
5242 _LT_TAGDECL([], [fix_srcfile_path], [1],
5243 [Fix the shell variable $srcfile for the compiler])
52445725 _LT_TAGDECL([], [always_export_symbols], [0],
52455726 [Set to "yes" if exported symbols are required])
52465727 _LT_TAGDECL([], [export_symbols_cmds], [2],
52515732 [Symbols that must always be exported])
52525733 _LT_TAGDECL([], [prelink_cmds], [2],
52535734 [Commands necessary for linking programs (against libraries) with templates])
5735 _LT_TAGDECL([], [postlink_cmds], [2],
5736 [Commands necessary for finishing linking programs])
52545737 _LT_TAGDECL([], [file_list_spec], [1],
52555738 [Specify filename containing input files])
52565739 dnl FIXME: Not yet implemented
53405823 ])# _LT_LANG_C_CONFIG
53415824
53425825
5343 # _LT_PROG_CXX
5344 # ------------
5345 # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5346 # compiler, we have our own version here.
5347 m4_defun([_LT_PROG_CXX],
5348 [
5349 pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5350 AC_PROG_CXX
5826 # _LT_LANG_CXX_CONFIG([TAG])
5827 # --------------------------
5828 # Ensure that the configuration variables for a C++ compiler are suitably
5829 # defined. These variables are subsequently used by _LT_CONFIG to write
5830 # the compiler configuration to `libtool'.
5831 m4_defun([_LT_LANG_CXX_CONFIG],
5832 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5833 m4_require([_LT_DECL_EGREP])dnl
5834 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
53515835 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
53525836 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
53535837 (test "X$CXX" != "Xg++"))) ; then
53555839 else
53565840 _lt_caught_CXX_error=yes
53575841 fi
5358 popdef([AC_MSG_ERROR])
5359 ])# _LT_PROG_CXX
5360
5361 dnl aclocal-1.4 backwards compatibility:
5362 dnl AC_DEFUN([_LT_PROG_CXX], [])
5363
5364
5365 # _LT_LANG_CXX_CONFIG([TAG])
5366 # --------------------------
5367 # Ensure that the configuration variables for a C++ compiler are suitably
5368 # defined. These variables are subsequently used by _LT_CONFIG to write
5369 # the compiler configuration to `libtool'.
5370 m4_defun([_LT_LANG_CXX_CONFIG],
5371 [AC_REQUIRE([_LT_PROG_CXX])dnl
5372 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5373 m4_require([_LT_DECL_EGREP])dnl
53745842
53755843 AC_LANG_PUSH(C++)
53765844 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
53825850 _LT_TAGVAR(hardcode_direct, $1)=no
53835851 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
53845852 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5385 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
53865853 _LT_TAGVAR(hardcode_libdir_separator, $1)=
53875854 _LT_TAGVAR(hardcode_minus_L, $1)=no
53885855 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
53925859 _LT_TAGVAR(module_expsym_cmds, $1)=
53935860 _LT_TAGVAR(link_all_deplibs, $1)=unknown
53945861 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5862 _LT_TAGVAR(reload_flag, $1)=$reload_flag
5863 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
53955864 _LT_TAGVAR(no_undefined_flag, $1)=
53965865 _LT_TAGVAR(whole_archive_flag_spec, $1)=
53975866 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
54235892
54245893 # Allow CC to be a program name with arguments.
54255894 lt_save_CC=$CC
5895 lt_save_CFLAGS=$CFLAGS
54265896 lt_save_LD=$LD
54275897 lt_save_GCC=$GCC
54285898 GCC=$GXX
54405910 fi
54415911 test -z "${LDCXX+set}" || LD=$LDCXX
54425912 CC=${CXX-"c++"}
5913 CFLAGS=$CXXFLAGS
54435914 compiler=$CC
54445915 _LT_TAGVAR(compiler, $1)=$CC
54455916 _LT_CC_BASENAME([$compiler])
54615932 # Check if GNU C++ uses GNU ld as the underlying linker, since the
54625933 # archiving commands below assume that GNU ld is being used.
54635934 if test "$with_gnu_ld" = yes; then
5464 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5465 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5935 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5936 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
54665937
54675938 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
54685939 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
54945965 # Commands to make compiler produce verbose output that lists
54955966 # what "hidden" libraries, object files and flags are used when
54965967 # linking a shared library.
5497 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5968 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
54985969
54995970 else
55005971 GXX=no
56036074 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
56046075 # Determine the default libpath from the value encoded in an empty
56056076 # executable.
5606 _LT_SYS_MODULE_PATH_AIX
6077 _LT_SYS_MODULE_PATH_AIX([$1])
56076078 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
56086079
5609 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6080 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
56106081 else
56116082 if test "$host_cpu" = ia64; then
56126083 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
56156086 else
56166087 # Determine the default libpath from the value encoded in an
56176088 # empty executable.
5618 _LT_SYS_MODULE_PATH_AIX
6089 _LT_SYS_MODULE_PATH_AIX([$1])
56196090 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
56206091 # Warning - without using the other run time loading flags,
56216092 # -berok will link without error, but may produce a broken library.
56226093 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
56236094 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5624 # Exported symbols can be pulled into shared objects from archives
5625 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6095 if test "$with_gnu_ld" = yes; then
6096 # We only use this code for GNU lds that support --whole-archive.
6097 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6098 else
6099 # Exported symbols can be pulled into shared objects from archives
6100 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6101 fi
56266102 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
56276103 # This is similar to how AIX traditionally builds its shared
56286104 # libraries.
56526128 ;;
56536129
56546130 cygwin* | mingw* | pw32* | cegcc*)
5655 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5656 # as there is no search path for DLLs.
5657 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5658 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5659 _LT_TAGVAR(always_export_symbols, $1)=no
5660 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5661
5662 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5663 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5664 # If the export-symbols file already is a .def file (1st line
5665 # is EXPORTS), use it as is; otherwise, prepend...
5666 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5667 cp $export_symbols $output_objdir/$soname.def;
5668 else
5669 echo EXPORTS > $output_objdir/$soname.def;
5670 cat $export_symbols >> $output_objdir/$soname.def;
5671 fi~
5672 $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'
5673 else
5674 _LT_TAGVAR(ld_shlibs, $1)=no
5675 fi
5676 ;;
6131 case $GXX,$cc_basename in
6132 ,cl* | no,cl*)
6133 # Native MSVC
6134 # hardcode_libdir_flag_spec is actually meaningless, as there is
6135 # no search path for DLLs.
6136 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6137 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6138 _LT_TAGVAR(always_export_symbols, $1)=yes
6139 _LT_TAGVAR(file_list_spec, $1)='@'
6140 # Tell ltmain to make .lib files, not .a files.
6141 libext=lib
6142 # Tell ltmain to make .dll files, not .so files.
6143 shrext_cmds=".dll"
6144 # FIXME: Setting linknames here is a bad hack.
6145 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6146 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6147 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6148 else
6149 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6150 fi~
6151 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6152 linknames='
6153 # The linker will not automatically build a static lib if we build a DLL.
6154 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6155 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6156 # Don't use ranlib
6157 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6158 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6159 lt_tool_outputfile="@TOOL_OUTPUT@"~
6160 case $lt_outputfile in
6161 *.exe|*.EXE) ;;
6162 *)
6163 lt_outputfile="$lt_outputfile.exe"
6164 lt_tool_outputfile="$lt_tool_outputfile.exe"
6165 ;;
6166 esac~
6167 func_to_tool_file "$lt_outputfile"~
6168 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6169 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6170 $RM "$lt_outputfile.manifest";
6171 fi'
6172 ;;
6173 *)
6174 # g++
6175 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6176 # as there is no search path for DLLs.
6177 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6178 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6179 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6180 _LT_TAGVAR(always_export_symbols, $1)=no
6181 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6182
6183 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6184 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6185 # If the export-symbols file already is a .def file (1st line
6186 # is EXPORTS), use it as is; otherwise, prepend...
6187 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6188 cp $export_symbols $output_objdir/$soname.def;
6189 else
6190 echo EXPORTS > $output_objdir/$soname.def;
6191 cat $export_symbols >> $output_objdir/$soname.def;
6192 fi~
6193 $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'
6194 else
6195 _LT_TAGVAR(ld_shlibs, $1)=no
6196 fi
6197 ;;
6198 esac
6199 ;;
56776200 darwin* | rhapsody*)
56786201 _LT_DARWIN_LINKER_FEATURES($1)
56796202 ;;
56966219 esac
56976220 ;;
56986221
5699 freebsd[[12]]*)
6222 freebsd2.*)
57006223 # C++ shared libraries reported to be fairly broken before
57016224 # switch to ELF
57026225 _LT_TAGVAR(ld_shlibs, $1)=no
57126235 _LT_TAGVAR(ld_shlibs, $1)=yes
57136236 ;;
57146237
5715 gnu*)
6238 haiku*)
6239 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6240 _LT_TAGVAR(link_all_deplibs, $1)=yes
57166241 ;;
57176242
57186243 hpux9*)
57396264 # explicitly linking system object files so we need to strip them
57406265 # from the output so that they don't get included in the library
57416266 # dependencies.
5742 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6267 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
57436268 ;;
57446269 *)
57456270 if test "$GXX" = yes; then
5746 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6271 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
57476272 else
57486273 # FIXME: insert proper C++ library support
57496274 _LT_TAGVAR(ld_shlibs, $1)=no
58046329 # explicitly linking system object files so we need to strip them
58056330 # from the output so that they don't get included in the library
58066331 # dependencies.
5807 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 "X$list" | $Xsed'
6332 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
58086333 ;;
58096334 *)
58106335 if test "$GXX" = yes; then
58146339 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
58156340 ;;
58166341 ia64*)
5817 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6342 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
58186343 ;;
58196344 *)
5820 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6345 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
58216346 ;;
58226347 esac
58236348 fi
58476372 case $cc_basename in
58486373 CC*)
58496374 # SGI C++
5850 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6375 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
58516376
58526377 # Archives containing C++ object files must be created using
58536378 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
58586383 *)
58596384 if test "$GXX" = yes; then
58606385 if test "$with_gnu_ld" = no; then
5861 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6386 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
58626387 else
5863 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
6388 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
58646389 fi
58656390 fi
58666391 _LT_TAGVAR(link_all_deplibs, $1)=yes
58716396 _LT_TAGVAR(inherit_rpath, $1)=yes
58726397 ;;
58736398
5874 linux* | k*bsd*-gnu | kopensolaris*-gnu)
6399 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
58756400 case $cc_basename in
58766401 KCC*)
58776402 # Kuck and Associates, Inc. (KAI) C++ Compiler
58896414 # explicitly linking system object files so we need to strip them
58906415 # from the output so that they don't get included in the library
58916416 # dependencies.
5892 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6417 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
58936418
58946419 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
58956420 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
59266451 pgCC* | pgcpp*)
59276452 # Portland Group C++ compiler
59286453 case `$CC -V` in
5929 *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
6454 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
59306455 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
59316456 rm -rf $tpldir~
59326457 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
5933 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
6458 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
59346459 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
59356460 rm -rf $tpldir~
59366461 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
5937 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
6462 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
59386463 $RANLIB $oldlib'
59396464 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
59406465 rm -rf $tpldir~
59416466 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5942 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6467 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
59436468 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
59446469 rm -rf $tpldir~
59456470 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5946 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6471 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
59476472 ;;
5948 *) # Version 6 will use weak symbols
6473 *) # Version 6 and above use weak symbols
59496474 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
59506475 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
59516476 ;;
59536478
59546479 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
59556480 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5956 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6481 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
59576482 ;;
59586483 cxx*)
59596484 # Compaq C++
59726497 # explicitly linking system object files so we need to strip them
59736498 # from the output so that they don't get included in the library
59746499 # dependencies.
5975 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6500 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
59766501 ;;
5977 xl*)
6502 xl* | mpixl* | bgxl*)
59786503 # IBM XL 8.0 on PPC, with GNU ld
59796504 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
59806505 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
59946519 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
59956520 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
59966521 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5997 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6522 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
59986523 _LT_TAGVAR(compiler_needs_object, $1)=yes
59996524
60006525 # Not sure whether something based on
60016526 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
60026527 # would be better.
6003 output_verbose_link_cmd='echo'
6528 output_verbose_link_cmd='func_echo_all'
60046529
60056530 # Archives containing C++ object files must be created using
60066531 # "CC -xar", where "CC" is the Sun C++ compiler. This is
60696594 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
60706595 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
60716596 fi
6072 output_verbose_link_cmd=echo
6597 output_verbose_link_cmd=func_echo_all
60736598 else
60746599 _LT_TAGVAR(ld_shlibs, $1)=no
60756600 fi
61046629 case $host in
61056630 osf3*)
61066631 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6107 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6632 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
61086633 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
61096634 ;;
61106635 *)
61116636 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6112 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6637 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
61136638 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
61146639 echo "-hidden">> $lib.exp~
6115 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
6640 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
61166641 $RM $lib.exp'
61176642 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
61186643 ;;
61286653 # explicitly linking system object files so we need to strip them
61296654 # from the output so that they don't get included in the library
61306655 # dependencies.
6131 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
6656 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
61326657 ;;
61336658 *)
61346659 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
61356660 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
61366661 case $host in
61376662 osf3*)
6138 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6663 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
61396664 ;;
61406665 *)
6141 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6666 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
61426667 ;;
61436668 esac
61446669
61486673 # Commands to make compiler produce verbose output that lists
61496674 # what "hidden" libraries, object files and flags are used when
61506675 # linking a shared library.
6151 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6676 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
61526677
61536678 else
61546679 # FIXME: insert proper C++ library support
61846709
61856710 solaris*)
61866711 case $cc_basename in
6187 CC*)
6712 CC* | sunCC*)
61886713 # Sun C++ 4.2, 5.x and Centerline C++
61896714 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
61906715 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
62056730 esac
62066731 _LT_TAGVAR(link_all_deplibs, $1)=yes
62076732
6208 output_verbose_link_cmd='echo'
6733 output_verbose_link_cmd='func_echo_all'
62096734
62106735 # Archives containing C++ object files must be created using
62116736 # "CC -xar", where "CC" is the Sun C++ compiler. This is
62256750 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
62266751 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
62276752 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6228 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6753 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
62296754 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6230 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6755 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
62316756
62326757 # Commands to make compiler produce verbose output that lists
62336758 # what "hidden" libraries, object files and flags are used when
62346759 # linking a shared library.
6235 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6760 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
62366761 else
62376762 # g++ 2.7 appears to require `-G' NOT `-shared' on this
62386763 # platform.
62436768 # Commands to make compiler produce verbose output that lists
62446769 # what "hidden" libraries, object files and flags are used when
62456770 # linking a shared library.
6246 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6771 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
62476772 fi
62486773
62496774 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
62976822 CC*)
62986823 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
62996824 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6825 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
6826 '"$_LT_TAGVAR(old_archive_cmds, $1)"
6827 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
6828 '"$_LT_TAGVAR(reload_cmds, $1)"
63006829 ;;
63016830 *)
63026831 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
63526881 fi # test -n "$compiler"
63536882
63546883 CC=$lt_save_CC
6884 CFLAGS=$lt_save_CFLAGS
63556885 LDCXX=$LD
63566886 LD=$lt_save_LD
63576887 GCC=$lt_save_GCC
63666896 ])# _LT_LANG_CXX_CONFIG
63676897
63686898
6899 # _LT_FUNC_STRIPNAME_CNF
6900 # ----------------------
6901 # func_stripname_cnf prefix suffix name
6902 # strip PREFIX and SUFFIX off of NAME.
6903 # PREFIX and SUFFIX must not contain globbing or regex special
6904 # characters, hashes, percent signs, but SUFFIX may contain a leading
6905 # dot (in which case that matches only a dot).
6906 #
6907 # This function is identical to the (non-XSI) version of func_stripname,
6908 # except this one can be used by m4 code that may be executed by configure,
6909 # rather than the libtool script.
6910 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
6911 AC_REQUIRE([_LT_DECL_SED])
6912 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
6913 func_stripname_cnf ()
6914 {
6915 case ${2} in
6916 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
6917 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
6918 esac
6919 } # func_stripname_cnf
6920 ])# _LT_FUNC_STRIPNAME_CNF
6921
63696922 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
63706923 # ---------------------------------
63716924 # Figure out "hidden" library dependencies from verbose
63746927 # objects, libraries and library flags.
63756928 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
63766929 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6930 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
63776931 # Dependencies to place before and after the object being linked:
63786932 _LT_TAGVAR(predep_objects, $1)=
63796933 _LT_TAGVAR(postdep_objects, $1)=
64236977 }
64246978 };
64256979 _LT_EOF
6980 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
6981 package foo
6982 func foo() {
6983 }
6984 _LT_EOF
64266985 ])
6986
6987 _lt_libdeps_save_CFLAGS=$CFLAGS
6988 case "$CC $CFLAGS " in #(
6989 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
6990 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
6991 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
6992 esac
6993
64276994 dnl Parse the compiler output and extract the necessary
64286995 dnl objects, libraries and library flags.
64296996 if AC_TRY_EVAL(ac_compile); then
64357002 pre_test_object_deps_done=no
64367003
64377004 for p in `eval "$output_verbose_link_cmd"`; do
6438 case $p in
7005 case ${prev}${p} in
64397006
64407007 -L* | -R* | -l*)
64417008 # Some compilers place space between "-{L,R}" and the path.
64447011 test $p = "-R"; then
64457012 prev=$p
64467013 continue
6447 else
6448 prev=
64497014 fi
64507015
7016 # Expand the sysroot to ease extracting the directories later.
7017 if test -z "$prev"; then
7018 case $p in
7019 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7020 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7021 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7022 esac
7023 fi
7024 case $p in
7025 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7026 esac
64517027 if test "$pre_test_object_deps_done" = no; then
6452 case $p in
6453 -L* | -R*)
7028 case ${prev} in
7029 -L | -R)
64547030 # Internal compiler library paths should come after those
64557031 # provided the user. The postdeps already come after the
64567032 # user supplied libs so there is no need to process them.
64707046 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
64717047 fi
64727048 fi
7049 prev=
64737050 ;;
64747051
7052 *.lto.$objext) ;; # Ignore GCC LTO objects
64757053 *.$objext)
64767054 # This assumes that the test object file only shows up
64777055 # once in the compiler output.
65077085 fi
65087086
65097087 $RM -f confest.$objext
7088 CFLAGS=$_lt_libdeps_save_CFLAGS
65107089
65117090 # PORTME: override above test on systems where it is broken
65127091 m4_if([$1], [CXX],
65437122
65447123 solaris*)
65457124 case $cc_basename in
6546 CC*)
7125 CC* | sunCC*)
65477126 # The more standards-conforming stlport4 library is
65487127 # incompatible with the Cstd library. Avoid specifying
65497128 # it if it's in CXXFLAGS. Ignore libCrun as
65877166 ])# _LT_SYS_HIDDEN_LIBDEPS
65887167
65897168
6590 # _LT_PROG_F77
6591 # ------------
6592 # Since AC_PROG_F77 is broken, in that it returns the empty string
6593 # if there is no fortran compiler, we have our own version here.
6594 m4_defun([_LT_PROG_F77],
6595 [
6596 pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
6597 AC_PROG_F77
6598 if test -z "$F77" || test "X$F77" = "Xno"; then
6599 _lt_disable_F77=yes
6600 fi
6601 popdef([AC_MSG_ERROR])
6602 ])# _LT_PROG_F77
6603
6604 dnl aclocal-1.4 backwards compatibility:
6605 dnl AC_DEFUN([_LT_PROG_F77], [])
6606
6607
66087169 # _LT_LANG_F77_CONFIG([TAG])
66097170 # --------------------------
66107171 # Ensure that the configuration variables for a Fortran 77 compiler are
66117172 # suitably defined. These variables are subsequently used by _LT_CONFIG
66127173 # to write the compiler configuration to `libtool'.
66137174 m4_defun([_LT_LANG_F77_CONFIG],
6614 [AC_REQUIRE([_LT_PROG_F77])dnl
6615 AC_LANG_PUSH(Fortran 77)
7175 [AC_LANG_PUSH(Fortran 77)
7176 if test -z "$F77" || test "X$F77" = "Xno"; then
7177 _lt_disable_F77=yes
7178 fi
66167179
66177180 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
66187181 _LT_TAGVAR(allow_undefined_flag, $1)=
66227185 _LT_TAGVAR(hardcode_direct, $1)=no
66237186 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
66247187 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6625 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
66267188 _LT_TAGVAR(hardcode_libdir_separator, $1)=
66277189 _LT_TAGVAR(hardcode_minus_L, $1)=no
66287190 _LT_TAGVAR(hardcode_automatic, $1)=no
66317193 _LT_TAGVAR(module_expsym_cmds, $1)=
66327194 _LT_TAGVAR(link_all_deplibs, $1)=unknown
66337195 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7196 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7197 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
66347198 _LT_TAGVAR(no_undefined_flag, $1)=
66357199 _LT_TAGVAR(whole_archive_flag_spec, $1)=
66367200 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
66707234 # Allow CC to be a program name with arguments.
66717235 lt_save_CC="$CC"
66727236 lt_save_GCC=$GCC
7237 lt_save_CFLAGS=$CFLAGS
66737238 CC=${F77-"f77"}
7239 CFLAGS=$FFLAGS
66747240 compiler=$CC
66757241 _LT_TAGVAR(compiler, $1)=$CC
66767242 _LT_CC_BASENAME([$compiler])
67247290
67257291 GCC=$lt_save_GCC
67267292 CC="$lt_save_CC"
7293 CFLAGS="$lt_save_CFLAGS"
67277294 fi # test "$_lt_disable_F77" != yes
67287295
67297296 AC_LANG_POP
67307297 ])# _LT_LANG_F77_CONFIG
6731
6732
6733 # _LT_PROG_FC
6734 # -----------
6735 # Since AC_PROG_FC is broken, in that it returns the empty string
6736 # if there is no fortran compiler, we have our own version here.
6737 m4_defun([_LT_PROG_FC],
6738 [
6739 pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
6740 AC_PROG_FC
6741 if test -z "$FC" || test "X$FC" = "Xno"; then
6742 _lt_disable_FC=yes
6743 fi
6744 popdef([AC_MSG_ERROR])
6745 ])# _LT_PROG_FC
6746
6747 dnl aclocal-1.4 backwards compatibility:
6748 dnl AC_DEFUN([_LT_PROG_FC], [])
67497298
67507299
67517300 # _LT_LANG_FC_CONFIG([TAG])
67547303 # suitably defined. These variables are subsequently used by _LT_CONFIG
67557304 # to write the compiler configuration to `libtool'.
67567305 m4_defun([_LT_LANG_FC_CONFIG],
6757 [AC_REQUIRE([_LT_PROG_FC])dnl
6758 AC_LANG_PUSH(Fortran)
7306 [AC_LANG_PUSH(Fortran)
7307
7308 if test -z "$FC" || test "X$FC" = "Xno"; then
7309 _lt_disable_FC=yes
7310 fi
67597311
67607312 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
67617313 _LT_TAGVAR(allow_undefined_flag, $1)=
67657317 _LT_TAGVAR(hardcode_direct, $1)=no
67667318 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
67677319 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6768 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
67697320 _LT_TAGVAR(hardcode_libdir_separator, $1)=
67707321 _LT_TAGVAR(hardcode_minus_L, $1)=no
67717322 _LT_TAGVAR(hardcode_automatic, $1)=no
67747325 _LT_TAGVAR(module_expsym_cmds, $1)=
67757326 _LT_TAGVAR(link_all_deplibs, $1)=unknown
67767327 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7328 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7329 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
67777330 _LT_TAGVAR(no_undefined_flag, $1)=
67787331 _LT_TAGVAR(whole_archive_flag_spec, $1)=
67797332 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
68137366 # Allow CC to be a program name with arguments.
68147367 lt_save_CC="$CC"
68157368 lt_save_GCC=$GCC
7369 lt_save_CFLAGS=$CFLAGS
68167370 CC=${FC-"f95"}
7371 CFLAGS=$FCFLAGS
68177372 compiler=$CC
68187373 GCC=$ac_cv_fc_compiler_gnu
68197374
68697424 fi # test -n "$compiler"
68707425
68717426 GCC=$lt_save_GCC
6872 CC="$lt_save_CC"
7427 CC=$lt_save_CC
7428 CFLAGS=$lt_save_CFLAGS
68737429 fi # test "$_lt_disable_FC" != yes
68747430
68757431 AC_LANG_POP
69067462 _LT_LINKER_BOILERPLATE
69077463
69087464 # Allow CC to be a program name with arguments.
6909 lt_save_CC="$CC"
7465 lt_save_CC=$CC
7466 lt_save_CFLAGS=$CFLAGS
69107467 lt_save_GCC=$GCC
69117468 GCC=yes
69127469 CC=${GCJ-"gcj"}
7470 CFLAGS=$GCJFLAGS
69137471 compiler=$CC
69147472 _LT_TAGVAR(compiler, $1)=$CC
69157473 _LT_TAGVAR(LD, $1)="$LD"
69197477 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
69207478
69217479 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7480 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7481 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
69227482
69237483 if test -n "$compiler"; then
69247484 _LT_COMPILER_NO_RTTI($1)
69347494 AC_LANG_RESTORE
69357495
69367496 GCC=$lt_save_GCC
6937 CC="$lt_save_CC"
7497 CC=$lt_save_CC
7498 CFLAGS=$lt_save_CFLAGS
69387499 ])# _LT_LANG_GCJ_CONFIG
7500
7501
7502 # _LT_LANG_GO_CONFIG([TAG])
7503 # --------------------------
7504 # Ensure that the configuration variables for the GNU Go compiler
7505 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7506 # to write the compiler configuration to `libtool'.
7507 m4_defun([_LT_LANG_GO_CONFIG],
7508 [AC_REQUIRE([LT_PROG_GO])dnl
7509 AC_LANG_SAVE
7510
7511 # Source file extension for Go test sources.
7512 ac_ext=go
7513
7514 # Object file extension for compiled Go test sources.
7515 objext=o
7516 _LT_TAGVAR(objext, $1)=$objext
7517
7518 # Code to be used in simple compile tests
7519 lt_simple_compile_test_code="package main; func main() { }"
7520
7521 # Code to be used in simple link tests
7522 lt_simple_link_test_code='package main; func main() { }'
7523
7524 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7525 _LT_TAG_COMPILER
7526
7527 # save warnings/boilerplate of simple test code
7528 _LT_COMPILER_BOILERPLATE
7529 _LT_LINKER_BOILERPLATE
7530
7531 # Allow CC to be a program name with arguments.
7532 lt_save_CC=$CC
7533 lt_save_CFLAGS=$CFLAGS
7534 lt_save_GCC=$GCC
7535 GCC=yes
7536 CC=${GOC-"gccgo"}
7537 CFLAGS=$GOFLAGS
7538 compiler=$CC
7539 _LT_TAGVAR(compiler, $1)=$CC
7540 _LT_TAGVAR(LD, $1)="$LD"
7541 _LT_CC_BASENAME([$compiler])
7542
7543 # Go did not exist at the time GCC didn't implicitly link libc in.
7544 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7545
7546 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7547 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7548 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7549
7550 if test -n "$compiler"; then
7551 _LT_COMPILER_NO_RTTI($1)
7552 _LT_COMPILER_PIC($1)
7553 _LT_COMPILER_C_O($1)
7554 _LT_COMPILER_FILE_LOCKS($1)
7555 _LT_LINKER_SHLIBS($1)
7556 _LT_LINKER_HARDCODE_LIBPATH($1)
7557
7558 _LT_CONFIG($1)
7559 fi
7560
7561 AC_LANG_RESTORE
7562
7563 GCC=$lt_save_GCC
7564 CC=$lt_save_CC
7565 CFLAGS=$lt_save_CFLAGS
7566 ])# _LT_LANG_GO_CONFIG
69397567
69407568
69417569 # _LT_LANG_RC_CONFIG([TAG])
69697597
69707598 # Allow CC to be a program name with arguments.
69717599 lt_save_CC="$CC"
7600 lt_save_CFLAGS=$CFLAGS
69727601 lt_save_GCC=$GCC
69737602 GCC=
69747603 CC=${RC-"windres"}
7604 CFLAGS=
69757605 compiler=$CC
69767606 _LT_TAGVAR(compiler, $1)=$CC
69777607 _LT_CC_BASENAME([$compiler])
69847614
69857615 GCC=$lt_save_GCC
69867616 AC_LANG_RESTORE
6987 CC="$lt_save_CC"
7617 CC=$lt_save_CC
7618 CFLAGS=$lt_save_CFLAGS
69887619 ])# _LT_LANG_RC_CONFIG
69897620
69907621
70027633 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
70037634 dnl aclocal-1.4 backwards compatibility:
70047635 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7636
7637
7638 # LT_PROG_GO
7639 # ----------
7640 AC_DEFUN([LT_PROG_GO],
7641 [AC_CHECK_TOOL(GOC, gccgo,)
7642 ])
70057643
70067644
70077645 # LT_PROG_RC
70437681 AC_SUBST([OBJDUMP])
70447682 ])
70457683
7684 # _LT_DECL_DLLTOOL
7685 # ----------------
7686 # Ensure DLLTOOL variable is set.
7687 m4_defun([_LT_DECL_DLLTOOL],
7688 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7689 test -z "$DLLTOOL" && DLLTOOL=dlltool
7690 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
7691 AC_SUBST([DLLTOOL])
7692 ])
70467693
70477694 # _LT_DECL_SED
70487695 # ------------
71347781 # Try some XSI features
71357782 xsi_shell=no
71367783 ( _lt_dummy="a/b/c"
7137 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7138 = c,a/b,, \
7784 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7785 = c,a/b,b/c, \
71397786 && eval 'test $(( 1 + 1 )) -eq 2 \
71407787 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
71417788 && xsi_shell=yes
71747821 ])# _LT_CHECK_SHELL_FEATURES
71757822
71767823
7177 # _LT_PROG_XSI_SHELLFNS
7178 # ---------------------
7179 # Bourne and XSI compatible variants of some useful shell functions.
7180 m4_defun([_LT_PROG_XSI_SHELLFNS],
7181 [case $xsi_shell in
7182 yes)
7183 cat << \_LT_EOF >> "$cfgfile"
7184
7185 # func_dirname file append nondir_replacement
7186 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
7187 # otherwise set result to NONDIR_REPLACEMENT.
7188 func_dirname ()
7189 {
7190 case ${1} in
7191 */*) func_dirname_result="${1%/*}${2}" ;;
7192 * ) func_dirname_result="${3}" ;;
7193 esac
7194 }
7195
7196 # func_basename file
7197 func_basename ()
7198 {
7199 func_basename_result="${1##*/}"
7200 }
7201
7202 # func_dirname_and_basename file append nondir_replacement
7203 # perform func_basename and func_dirname in a single function
7204 # call:
7205 # dirname: Compute the dirname of FILE. If nonempty,
7206 # add APPEND to the result, otherwise set result
7207 # to NONDIR_REPLACEMENT.
7208 # value returned in "$func_dirname_result"
7209 # basename: Compute filename of FILE.
7210 # value retuned in "$func_basename_result"
7211 # Implementation must be kept synchronized with func_dirname
7212 # and func_basename. For efficiency, we do not delegate to
7213 # those functions but instead duplicate the functionality here.
7214 func_dirname_and_basename ()
7215 {
7216 case ${1} in
7217 */*) func_dirname_result="${1%/*}${2}" ;;
7218 * ) func_dirname_result="${3}" ;;
7219 esac
7220 func_basename_result="${1##*/}"
7221 }
7222
7223 # func_stripname prefix suffix name
7224 # strip PREFIX and SUFFIX off of NAME.
7225 # PREFIX and SUFFIX must not contain globbing or regex special
7226 # characters, hashes, percent signs, but SUFFIX may contain a leading
7227 # dot (in which case that matches only a dot).
7228 func_stripname ()
7229 {
7230 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7231 # positional parameters, so assign one to ordinary parameter first.
7232 func_stripname_result=${3}
7233 func_stripname_result=${func_stripname_result#"${1}"}
7234 func_stripname_result=${func_stripname_result%"${2}"}
7235 }
7236
7237 # func_opt_split
7238 func_opt_split ()
7239 {
7240 func_opt_split_opt=${1%%=*}
7241 func_opt_split_arg=${1#*=}
7242 }
7243
7244 # func_lo2o object
7245 func_lo2o ()
7246 {
7247 case ${1} in
7248 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7249 *) func_lo2o_result=${1} ;;
7250 esac
7251 }
7252
7253 # func_xform libobj-or-source
7254 func_xform ()
7255 {
7256 func_xform_result=${1%.*}.lo
7257 }
7258
7259 # func_arith arithmetic-term...
7260 func_arith ()
7261 {
7262 func_arith_result=$(( $[*] ))
7263 }
7264
7265 # func_len string
7266 # STRING may not start with a hyphen.
7267 func_len ()
7268 {
7269 func_len_result=${#1}
7270 }
7271
7272 _LT_EOF
7824 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7825 # ------------------------------------------------------
7826 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7827 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7828 m4_defun([_LT_PROG_FUNCTION_REPLACE],
7829 [dnl {
7830 sed -e '/^$1 ()$/,/^} # $1 /c\
7831 $1 ()\
7832 {\
7833 m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
7834 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7835 && mv -f "$cfgfile.tmp" "$cfgfile" \
7836 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7837 test 0 -eq $? || _lt_function_replace_fail=:
7838 ])
7839
7840
7841 # _LT_PROG_REPLACE_SHELLFNS
7842 # -------------------------
7843 # Replace existing portable implementations of several shell functions with
7844 # equivalent extended shell implementations where those features are available..
7845 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
7846 [if test x"$xsi_shell" = xyes; then
7847 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7848 case ${1} in
7849 */*) func_dirname_result="${1%/*}${2}" ;;
7850 * ) func_dirname_result="${3}" ;;
7851 esac])
7852
7853 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7854 func_basename_result="${1##*/}"])
7855
7856 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7857 case ${1} in
7858 */*) func_dirname_result="${1%/*}${2}" ;;
7859 * ) func_dirname_result="${3}" ;;
7860 esac
7861 func_basename_result="${1##*/}"])
7862
7863 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7864 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7865 # positional parameters, so assign one to ordinary parameter first.
7866 func_stripname_result=${3}
7867 func_stripname_result=${func_stripname_result#"${1}"}
7868 func_stripname_result=${func_stripname_result%"${2}"}])
7869
7870 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7871 func_split_long_opt_name=${1%%=*}
7872 func_split_long_opt_arg=${1#*=}])
7873
7874 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7875 func_split_short_opt_arg=${1#??}
7876 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
7877
7878 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7879 case ${1} in
7880 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7881 *) func_lo2o_result=${1} ;;
7882 esac])
7883
7884 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
7885
7886 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
7887
7888 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
7889 fi
7890
7891 if test x"$lt_shell_append" = xyes; then
7892 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
7893
7894 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7895 func_quote_for_eval "${2}"
7896 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7897 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
7898
7899 # Save a `func_append' function call where possible by direct use of '+='
7900 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
7901 && mv -f "$cfgfile.tmp" "$cfgfile" \
7902 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7903 test 0 -eq $? || _lt_function_replace_fail=:
7904 else
7905 # Save a `func_append' function call even when '+=' is not available
7906 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
7907 && mv -f "$cfgfile.tmp" "$cfgfile" \
7908 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7909 test 0 -eq $? || _lt_function_replace_fail=:
7910 fi
7911
7912 if test x"$_lt_function_replace_fail" = x":"; then
7913 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
7914 fi
7915 ])
7916
7917 # _LT_PATH_CONVERSION_FUNCTIONS
7918 # -----------------------------
7919 # Determine which file name conversion functions should be used by
7920 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
7921 # for certain cross-compile configurations and native mingw.
7922 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
7923 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
7924 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
7925 AC_MSG_CHECKING([how to convert $build file names to $host format])
7926 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
7927 [case $host in
7928 *-*-mingw* )
7929 case $build in
7930 *-*-mingw* ) # actually msys
7931 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7932 ;;
7933 *-*-cygwin* )
7934 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7935 ;;
7936 * ) # otherwise, assume *nix
7937 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7938 ;;
7939 esac
72737940 ;;
7274 *) # Bourne compatible functions.
7275 cat << \_LT_EOF >> "$cfgfile"
7276
7277 # func_dirname file append nondir_replacement
7278 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
7279 # otherwise set result to NONDIR_REPLACEMENT.
7280 func_dirname ()
7281 {
7282 # Extract subdirectory from the argument.
7283 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7284 if test "X$func_dirname_result" = "X${1}"; then
7285 func_dirname_result="${3}"
7286 else
7287 func_dirname_result="$func_dirname_result${2}"
7288 fi
7289 }
7290
7291 # func_basename file
7292 func_basename ()
7293 {
7294 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7295 }
7296
7297 dnl func_dirname_and_basename
7298 dnl A portable version of this function is already defined in general.m4sh
7299 dnl so there is no need for it here.
7300
7301 # func_stripname prefix suffix name
7302 # strip PREFIX and SUFFIX off of NAME.
7303 # PREFIX and SUFFIX must not contain globbing or regex special
7304 # characters, hashes, percent signs, but SUFFIX may contain a leading
7305 # dot (in which case that matches only a dot).
7306 # func_strip_suffix prefix name
7307 func_stripname ()
7308 {
7309 case ${2} in
7310 .*) func_stripname_result=`$ECHO "X${3}" \
7311 | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7312 *) func_stripname_result=`$ECHO "X${3}" \
7313 | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7314 esac
7315 }
7316
7317 # sed scripts:
7318 my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7319 my_sed_long_arg='1s/^-[[^=]]*=//'
7320
7321 # func_opt_split
7322 func_opt_split ()
7323 {
7324 func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7325 func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7326 }
7327
7328 # func_lo2o object
7329 func_lo2o ()
7330 {
7331 func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7332 }
7333
7334 # func_xform libobj-or-source
7335 func_xform ()
7336 {
7337 func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7338 }
7339
7340 # func_arith arithmetic-term...
7341 func_arith ()
7342 {
7343 func_arith_result=`expr "$[@]"`
7344 }
7345
7346 # func_len string
7347 # STRING may not start with a hyphen.
7348 func_len ()
7349 {
7350 func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7351 }
7352
7353 _LT_EOF
7941 *-*-cygwin* )
7942 case $build in
7943 *-*-mingw* ) # actually msys
7944 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7945 ;;
7946 *-*-cygwin* )
7947 lt_cv_to_host_file_cmd=func_convert_file_noop
7948 ;;
7949 * ) # otherwise, assume *nix
7950 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7951 ;;
7952 esac
7953 ;;
7954 * ) # unhandled hosts (and "normal" native builds)
7955 lt_cv_to_host_file_cmd=func_convert_file_noop
7956 ;;
73547957 esac
7355
7356 case $lt_shell_append in
7357 yes)
7358 cat << \_LT_EOF >> "$cfgfile"
7359
7360 # func_append var value
7361 # Append VALUE to the end of shell variable VAR.
7362 func_append ()
7363 {
7364 eval "$[1]+=\$[2]"
7365 }
7366 _LT_EOF
7958 ])
7959 to_host_file_cmd=$lt_cv_to_host_file_cmd
7960 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
7961 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
7962 [0], [convert $build file names to $host format])dnl
7963
7964 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
7965 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
7966 [#assume ordinary cross tools, or native build.
7967 lt_cv_to_tool_file_cmd=func_convert_file_noop
7968 case $host in
7969 *-*-mingw* )
7970 case $build in
7971 *-*-mingw* ) # actually msys
7972 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7973 ;;
7974 esac
73677975 ;;
7368 *)
7369 cat << \_LT_EOF >> "$cfgfile"
7370
7371 # func_append var value
7372 # Append VALUE to the end of shell variable VAR.
7373 func_append ()
7374 {
7375 eval "$[1]=\$$[1]\$[2]"
7376 }
7377
7378 _LT_EOF
7379 ;;
7380 esac
7976 esac
73817977 ])
7978 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7979 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
7980 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
7981 [0], [convert $build files to toolchain format])dnl
7982 ])# _LT_PATH_CONVERSION_FUNCTIONS
73827983
73837984 # Helper functions for option handling. -*- Autoconf -*-
73847985 #
7385 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7986 # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
7987 # Inc.
73867988 # Written by Gary V. Vaughan, 2004
73877989 #
73887990 # This file is free software; the Free Software Foundation gives
73897991 # unlimited permission to copy and/or distribute it, with or without
73907992 # modifications, as long as this notice is preserved.
73917993
7392 # serial 6 ltoptions.m4
7994 # serial 7 ltoptions.m4
73937995
73947996 # This is to help aclocal find these macros, as it can't see m4_define.
73957997 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
75048106 [enable_win32_dll=yes
75058107
75068108 case $host in
7507 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
8109 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
75088110 AC_CHECK_TOOL(AS, as, false)
75098111 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
75108112 AC_CHECK_TOOL(OBJDUMP, objdump, false)
75128114 esac
75138115
75148116 test -z "$AS" && AS=as
7515 _LT_DECL([], [AS], [0], [Assembler program])dnl
8117 _LT_DECL([], [AS], [1], [Assembler program])dnl
75168118
75178119 test -z "$DLLTOOL" && DLLTOOL=dlltool
7518 _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
8120 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
75198121
75208122 test -z "$OBJDUMP" && OBJDUMP=objdump
7521 _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
8123 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
75228124 ])# win32-dll
75238125
75248126 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
77048306 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
77058307 m4_define([_LT_WITH_PIC],
77068308 [AC_ARG_WITH([pic],
7707 [AS_HELP_STRING([--with-pic],
8309 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
77088310 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
7709 [pic_mode="$withval"],
8311 [lt_p=${PACKAGE-default}
8312 case $withval in
8313 yes|no) pic_mode=$withval ;;
8314 *)
8315 pic_mode=default
8316 # Look at the argument we got. We use all the common list separators.
8317 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8318 for lt_pkg in $withval; do
8319 IFS="$lt_save_ifs"
8320 if test "X$lt_pkg" = "X$lt_p"; then
8321 pic_mode=yes
8322 fi
8323 done
8324 IFS="$lt_save_ifs"
8325 ;;
8326 esac],
77108327 [pic_mode=default])
77118328
77128329 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
78768493 # unlimited permission to copy and/or distribute it, with or without
78778494 # modifications, as long as this notice is preserved.
78788495
7879 # Generated from ltversion.in.
7880
7881 # serial 3017 ltversion.m4
8496 # @configure_input@
8497
8498 # serial 3337 ltversion.m4
78828499 # This file is part of GNU Libtool
78838500
7884 m4_define([LT_PACKAGE_VERSION], [2.2.6b])
7885 m4_define([LT_PACKAGE_REVISION], [1.3017])
8501 m4_define([LT_PACKAGE_VERSION], [2.4.2])
8502 m4_define([LT_PACKAGE_REVISION], [1.3337])
78868503
78878504 AC_DEFUN([LTVERSION_VERSION],
7888 [macro_version='2.2.6b'
7889 macro_revision='1.3017'
8505 [macro_version='2.4.2'
8506 macro_revision='1.3337'
78908507 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
78918508 _LT_DECL(, macro_revision, 0)
78928509 ])
78938510
78948511 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
78958512 #
7896 # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
8513 # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
78978514 # Written by Scott James Remnant, 2004.
78988515 #
78998516 # This file is free software; the Free Software Foundation gives
79008517 # unlimited permission to copy and/or distribute it, with or without
79018518 # modifications, as long as this notice is preserved.
79028519
7903 # serial 4 lt~obsolete.m4
8520 # serial 5 lt~obsolete.m4
79048521
79058522 # These exist entirely to fool aclocal when bootstrapping libtool.
79068523 #
79708587 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
79718588 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
79728589 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
7973 m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
79748590 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
79758591 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
79768592 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
79838599 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
79848600 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
79858601 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
7986
7987 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
8602 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
8603 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
8604 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
8605 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
8606 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
8607 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
8608 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
8609
8610 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
8611 # Foundation, Inc.
79888612 #
79898613 # This file is free software; the Free Software Foundation
79908614 # gives unlimited permission to copy and/or distribute it,
79918615 # with or without modifications, as long as this notice is preserved.
8616
8617 # serial 1
79928618
79938619 # AM_AUTOMAKE_VERSION(VERSION)
79948620 # ----------------------------
79998625 [am__api_version='1.11'
80008626 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
80018627 dnl require some minimum version. Point them to the right macro.
8002 m4_if([$1], [1.11.1], [],
8628 m4_if([$1], [1.11.6], [],
80038629 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
80048630 ])
80058631
80158641 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
80168642 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
80178643 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
8018 [AM_AUTOMAKE_VERSION([1.11.1])dnl
8644 [AM_AUTOMAKE_VERSION([1.11.6])dnl
80198645 m4_ifndef([AC_AUTOCONF_VERSION],
80208646 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
80218647 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
80228648
80238649 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
80248650
8025 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
8651 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
80268652 #
80278653 # This file is free software; the Free Software Foundation
80288654 # gives unlimited permission to copy and/or distribute it,
80298655 # with or without modifications, as long as this notice is preserved.
8656
8657 # serial 1
80308658
80318659 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
80328660 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
81098737 Usually this means the macro was only invoked conditionally.]])
81108738 fi])])
81118739
8112 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
8113 # Free Software Foundation, Inc.
8740 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
8741 # 2010, 2011 Free Software Foundation, Inc.
81148742 #
81158743 # This file is free software; the Free Software Foundation
81168744 # gives unlimited permission to copy and/or distribute it,
81178745 # with or without modifications, as long as this notice is preserved.
81188746
8119 # serial 10
8747 # serial 12
81208748
81218749 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
81228750 # written in clear, in which case automake, when reading aclocal.m4,
81568784 # instance it was reported that on HP-UX the gcc test will end up
81578785 # making a dummy file named `D' -- because `-MD' means `put the output
81588786 # in D'.
8787 rm -rf conftest.dir
81598788 mkdir conftest.dir
81608789 # Copy depcomp to subdir because otherwise we won't find it if we're
81618790 # using a relative directory.
82208849 break
82218850 fi
82228851 ;;
8223 msvisualcpp | msvcmsys)
8852 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
82248853 # This compiler won't grok `-c -o', but also, the minuso test has
82258854 # not run yet. These depmodes are late enough in the game, and
82268855 # so weak that their functioning should not be impacted.
82858914 if test "x$enable_dependency_tracking" != xno; then
82868915 am_depcomp="$ac_aux_dir/depcomp"
82878916 AMDEPBACKSLASH='\'
8917 am__nodep='_no'
82888918 fi
82898919 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
82908920 AC_SUBST([AMDEPBACKSLASH])dnl
82918921 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
8922 AC_SUBST([am__nodep])dnl
8923 _AM_SUBST_NOTMAKE([am__nodep])dnl
82928924 ])
82938925
82948926 # Generate code to set up dependency tracking. -*- Autoconf -*-
85109142 done
85119143 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
85129144
8513 # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
9145 # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
9146 # Inc.
85149147 #
85159148 # This file is free software; the Free Software Foundation
85169149 # gives unlimited permission to copy and/or distribute it,
85179150 # with or without modifications, as long as this notice is preserved.
9151
9152 # serial 1
85189153
85199154 # AM_PROG_INSTALL_SH
85209155 # ------------------
85559190 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
85569191 # From Jim Meyering
85579192
8558 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
8559 # Free Software Foundation, Inc.
9193 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
9194 # 2011 Free Software Foundation, Inc.
85609195 #
85619196 # This file is free software; the Free Software Foundation
85629197 # gives unlimited permission to copy and/or distribute it,
85769211 [disable], [m4_define([am_maintainer_other], [enable])],
85779212 [m4_define([am_maintainer_other], [enable])
85789213 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
8579 AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
9214 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
85809215 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
85819216 AC_ARG_ENABLE([maintainer-mode],
85829217 [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
86879322 fi
86889323 ])
86899324
8690 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
9325 # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
9326 # Inc.
86919327 #
86929328 # This file is free software; the Free Software Foundation
86939329 # gives unlimited permission to copy and/or distribute it,
86949330 # with or without modifications, as long as this notice is preserved.
9331
9332 # serial 1
86959333
86969334 # AM_PROG_MKDIR_P
86979335 # ---------------
87159353
87169354 # Helper functions for option handling. -*- Autoconf -*-
87179355
8718 # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
9356 # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
9357 # Foundation, Inc.
87199358 #
87209359 # This file is free software; the Free Software Foundation
87219360 # gives unlimited permission to copy and/or distribute it,
87229361 # with or without modifications, as long as this notice is preserved.
87239362
8724 # serial 4
9363 # serial 5
87259364
87269365 # _AM_MANGLE_OPTION(NAME)
87279366 # -----------------------
87299368 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
87309369
87319370 # _AM_SET_OPTION(NAME)
8732 # ------------------------------
9371 # --------------------
87339372 # Set option NAME. Presently that only means defining a flag for this option.
87349373 AC_DEFUN([_AM_SET_OPTION],
87359374 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
87369375
87379376 # _AM_SET_OPTIONS(OPTIONS)
8738 # ----------------------------------
9377 # ------------------------
87399378 # OPTIONS is a space-separated list of Automake options.
87409379 AC_DEFUN([_AM_SET_OPTIONS],
87419380 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
88119450 fi
88129451 AC_MSG_RESULT(yes)])
88139452
8814 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
9453 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
88159454 #
88169455 # This file is free software; the Free Software Foundation
88179456 # gives unlimited permission to copy and/or distribute it,
88189457 # with or without modifications, as long as this notice is preserved.
9458
9459 # serial 1
88199460
88209461 # AM_PROG_INSTALL_STRIP
88219462 # ---------------------
88399480 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
88409481 AC_SUBST([INSTALL_STRIP_PROGRAM])])
88419482
8842 # Copyright (C) 2006, 2008 Free Software Foundation, Inc.
9483 # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
88439484 #
88449485 # This file is free software; the Free Software Foundation
88459486 # gives unlimited permission to copy and/or distribute it,
88469487 # with or without modifications, as long as this notice is preserved.
88479488
8848 # serial 2
9489 # serial 3
88499490
88509491 # _AM_SUBST_NOTMAKE(VARIABLE)
88519492 # ---------------------------
88549495 AC_DEFUN([_AM_SUBST_NOTMAKE])
88559496
88569497 # AM_SUBST_NOTMAKE(VARIABLE)
8857 # ---------------------------
9498 # --------------------------
88589499 # Public sister of _AM_SUBST_NOTMAKE.
88599500 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
88609501
88619502 # Check how to create a tarball. -*- Autoconf -*-
88629503
8863 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
9504 # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
88649505 #
88659506 # This file is free software; the Free Software Foundation
88669507 # gives unlimited permission to copy and/or distribute it,
88829523 # a tarball read from stdin.
88839524 # $(am__untar) < result.tar
88849525 AC_DEFUN([_AM_PROG_TAR],
8885 [# Always define AMTAR for backward compatibility.
8886 AM_MISSING_PROG([AMTAR], [tar])
9526 [# Always define AMTAR for backward compatibility. Yes, it's still used
9527 # in the wild :-( We should find a proper way to deprecate it ...
9528 AC_SUBST([AMTAR], ['$${TAR-tar}'])
88879529 m4_if([$1], [v7],
8888 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9530 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
88899531 [m4_case([$1], [ustar],, [pax],,
88909532 [m4_fatal([Unknown tar format])])
88919533 AC_MSG_CHECKING([how to create a $1 tar archive])
+1996
-1123
configure less more
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.67.
2 # Generated by GNU Autoconf 2.69.
33 #
44 #
5 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
7 # Foundation, Inc.
5 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
86 #
97 #
108 # This configure script is free software; the Free Software Foundation
8886 IFS=" "" $as_nl"
8987
9088 # Find who we are. Look in the path if we contain no directory separator.
89 as_myself=
9190 case $0 in #((
9291 *[\\/]* ) as_myself=$0 ;;
9392 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
132131 # CDPATH.
133132 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134133
134 # Use a proper internal environment variable to ensure we don't fall
135 # into an infinite loop, continuously re-executing ourselves.
136 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
137 _as_can_reexec=no; export _as_can_reexec;
138 # We cannot yet assume a decent shell, so we have to provide a
139 # neutralization value for shells without unset; and this also
140 # works around shells that cannot unset nonexistent variables.
141 # Preserve -v and -x to the replacement shell.
142 BASH_ENV=/dev/null
143 ENV=/dev/null
144 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
145 case $- in # ((((
146 *v*x* | *x*v* ) as_opts=-vx ;;
147 *v* ) as_opts=-v ;;
148 *x* ) as_opts=-x ;;
149 * ) as_opts= ;;
150 esac
151 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
152 # Admittedly, this is quite paranoid, since all the known shells bail
153 # out after a failed `exec'.
154 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
155 as_fn_exit 255
156 fi
157 # We don't want this to propagate to other subprocesses.
158 { _as_can_reexec=; unset _as_can_reexec;}
135159 if test "x$CONFIG_SHELL" = x; then
136160 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
137161 emulate sh
165189 else
166190 exitcode=1; echo positional parameters were not saved.
167191 fi
168 test x\$exitcode = x0 || exit 1"
192 test x\$exitcode = x0 || exit 1
193 test -x / || exit 1"
169194 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
170195 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
171196 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
172197 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
198
199 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
200 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
201 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
202 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
203 PATH=/empty FPATH=/empty; export PATH FPATH
204 test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
205 || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
173206 test \$(( 1 + 1 )) = 2 || exit 1"
174207 if (eval "$as_required") 2>/dev/null; then :
175208 as_have_required=yes
210243
211244
212245 if test "x$CONFIG_SHELL" != x; then :
213 # We cannot yet assume a decent shell, so we have to provide a
214 # neutralization value for shells without unset; and this also
215 # works around shells that cannot unset nonexistent variables.
216 BASH_ENV=/dev/null
217 ENV=/dev/null
218 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
219 export CONFIG_SHELL
220 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
246 export CONFIG_SHELL
247 # We cannot yet assume a decent shell, so we have to provide a
248 # neutralization value for shells without unset; and this also
249 # works around shells that cannot unset nonexistent variables.
250 # Preserve -v and -x to the replacement shell.
251 BASH_ENV=/dev/null
252 ENV=/dev/null
253 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
254 case $- in # ((((
255 *v*x* | *x*v* ) as_opts=-vx ;;
256 *v* ) as_opts=-v ;;
257 *x* ) as_opts=-x ;;
258 * ) as_opts= ;;
259 esac
260 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
261 # Admittedly, this is quite paranoid, since all the known shells bail
262 # out after a failed `exec'.
263 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
264 exit 255
221265 fi
222266
223267 if test x$as_have_required = xno; then :
319363
320364
321365 } # as_fn_mkdir_p
366
367 # as_fn_executable_p FILE
368 # -----------------------
369 # Test if FILE is an executable regular file.
370 as_fn_executable_p ()
371 {
372 test -f "$1" && test -x "$1"
373 } # as_fn_executable_p
322374 # as_fn_append VAR VALUE
323375 # ----------------------
324376 # Append the text in VALUE to the end of the definition contained in VAR. Take
440492 chmod +x "$as_me.lineno" ||
441493 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
442494
495 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
496 # already done that, so ensure we don't try to do so again and fall
497 # in an infinite loop. This has already happened in practice.
498 _as_can_reexec=no; export _as_can_reexec
443499 # Don't try to exec as it changes $[0], causing all sort of problems
444500 # (the dirname of $[0] is not the place where we might find the
445501 # original and so on. Autoconf is especially sensitive to this).
474530 # ... but there are two gotchas:
475531 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
476532 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
477 # In both cases, we have to default to `cp -p'.
533 # In both cases, we have to default to `cp -pR'.
478534 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
479 as_ln_s='cp -p'
535 as_ln_s='cp -pR'
480536 elif ln conf$$.file conf$$ 2>/dev/null; then
481537 as_ln_s=ln
482538 else
483 as_ln_s='cp -p'
539 as_ln_s='cp -pR'
484540 fi
485541 else
486 as_ln_s='cp -p'
542 as_ln_s='cp -pR'
487543 fi
488544 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
489545 rmdir conf$$.dir 2>/dev/null
495551 as_mkdir_p=false
496552 fi
497553
498 if test -x / >/dev/null 2>&1; then
499 as_test_x='test -x'
500 else
501 if ls -dL / >/dev/null 2>&1; then
502 as_ls_L_option=L
503 else
504 as_ls_L_option=
505 fi
506 as_test_x='
507 eval sh -c '\''
508 if test -d "$1"; then
509 test -d "$1/.";
510 else
511 case $1 in #(
512 -*)set "./$1";;
513 esac;
514 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
515 ???[sx]*):;;*)false;;esac;fi
516 '\'' sh
517 '
518 fi
519 as_executable_p=$as_test_x
554 as_test_x='test -x'
555 as_executable_p=as_fn_executable_p
520556
521557 # Sed expression to map a string onto a valid CPP name.
522558 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
524560 # Sed expression to map a string onto a valid variable name.
525561 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
526562
527
528
529 # Check that we are running under the correct shell.
530563 SHELL=${CONFIG_SHELL-/bin/sh}
531
532 case X$lt_ECHO in
533 X*--fallback-echo)
534 # Remove one level of quotation (which was required for Make).
535 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
536 ;;
537 esac
538
539 ECHO=${lt_ECHO-echo}
540 if test "X$1" = X--no-reexec; then
541 # Discard the --no-reexec flag, and continue.
542 shift
543 elif test "X$1" = X--fallback-echo; then
544 # Avoid inline document here, it may be left over
545 :
546 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
547 # Yippee, $ECHO works!
548 :
549 else
550 # Restart under the correct shell.
551 exec $SHELL "$0" --no-reexec ${1+"$@"}
552 fi
553
554 if test "X$1" = X--fallback-echo; then
555 # used as fallback echo
556 shift
557 cat <<_LT_EOF
558 $*
559 _LT_EOF
560 exit 0
561 fi
562
563 # The HP-UX ksh and POSIX shell print the target directory to stdout
564 # if CDPATH is set.
565 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
566
567 if test -z "$lt_ECHO"; then
568 if test "X${echo_test_string+set}" != Xset; then
569 # find a string as large as possible, as long as the shell can cope with it
570 for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
571 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
572 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
573 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
574 then
575 break
576 fi
577 done
578 fi
579
580 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
581 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
582 test "X$echo_testing_string" = "X$echo_test_string"; then
583 :
584 else
585 # The Solaris, AIX, and Digital Unix default echo programs unquote
586 # backslashes. This makes it impossible to quote backslashes using
587 # echo "$something" | sed 's/\\/\\\\/g'
588 #
589 # So, first we look for a working echo in the user's PATH.
590
591 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
592 for dir in $PATH /usr/ucb; do
593 IFS="$lt_save_ifs"
594 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
595 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
596 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
597 test "X$echo_testing_string" = "X$echo_test_string"; then
598 ECHO="$dir/echo"
599 break
600 fi
601 done
602 IFS="$lt_save_ifs"
603
604 if test "X$ECHO" = Xecho; then
605 # We didn't find a better echo, so look for alternatives.
606 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
607 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
608 test "X$echo_testing_string" = "X$echo_test_string"; then
609 # This shell has a builtin print -r that does the trick.
610 ECHO='print -r'
611 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
612 test "X$CONFIG_SHELL" != X/bin/ksh; then
613 # If we have ksh, try running configure again with it.
614 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
615 export ORIGINAL_CONFIG_SHELL
616 CONFIG_SHELL=/bin/ksh
617 export CONFIG_SHELL
618 exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
619 else
620 # Try using printf.
621 ECHO='printf %s\n'
622 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
623 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
624 test "X$echo_testing_string" = "X$echo_test_string"; then
625 # Cool, printf works
626 :
627 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
628 test "X$echo_testing_string" = 'X\t' &&
629 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
630 test "X$echo_testing_string" = "X$echo_test_string"; then
631 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
632 export CONFIG_SHELL
633 SHELL="$CONFIG_SHELL"
634 export SHELL
635 ECHO="$CONFIG_SHELL $0 --fallback-echo"
636 elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
637 test "X$echo_testing_string" = 'X\t' &&
638 echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
639 test "X$echo_testing_string" = "X$echo_test_string"; then
640 ECHO="$CONFIG_SHELL $0 --fallback-echo"
641 else
642 # maybe with a smaller string...
643 prev=:
644
645 for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
646 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
647 then
648 break
649 fi
650 prev="$cmd"
651 done
652
653 if test "$prev" != 'sed 50q "$0"'; then
654 echo_test_string=`eval $prev`
655 export echo_test_string
656 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
657 else
658 # Oops. We lost completely, so just stick with echo.
659 ECHO=echo
660 fi
661 fi
662 fi
663 fi
664 fi
665 fi
666
667 # Copy echo and quote the copy suitably for passing to libtool from
668 # the Makefile, instead of quoting the original, which is used later.
669 lt_ECHO=$ECHO
670 if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
671 lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
672 fi
673
674
675564
676565
677566 test -n "$DJDIR" || exec 7<&0 </dev/null
749638 LIPO
750639 NMEDIT
751640 DSYMUTIL
752 lt_ECHO
641 MANIFEST_TOOL
753642 RANLIB
643 ac_ct_AR
754644 AR
645 DLLTOOL
755646 OBJDUMP
756647 LN_S
757648 NM
774665 am__fastdepCC_FALSE
775666 am__fastdepCC_TRUE
776667 CCDEPMODE
668 am__nodep
777669 AMDEPBACKSLASH
778670 AMDEP_FALSE
779671 AMDEP_TRUE
861753 with_pic
862754 enable_fast_install
863755 with_gnu_ld
756 with_sysroot
864757 enable_libtool_lock
865758 '
866759 ac_precious_vars='build_alias
12761169 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
12771170 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
12781171 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1279 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1172 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
12801173 ;;
12811174
12821175 esac
13271220 if test "x$host_alias" != x; then
13281221 if test "x$build_alias" = x; then
13291222 cross_compiling=maybe
1330 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1331 If a cross compiler is detected then cross compile mode will be used" >&2
13321223 elif test "x$build_alias" != "x$host_alias"; then
13331224 cross_compiling=yes
13341225 fi
15031394 Optional Packages:
15041395 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
15051396 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1506 --with-pic try to use only PIC/non-PIC objects [default=use
1397 --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
15071398 both]
15081399 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1400 --with-sysroot=DIR Search for dependent libraries within DIR
1401 (or the compiler's sysroot if not specified).
15091402
15101403 Some influential environment variables:
15111404 CC C compiler command
15841477 if $ac_init_version; then
15851478 cat <<\_ACEOF
15861479 configure
1587 generated by GNU Autoconf 2.67
1588
1589 Copyright (C) 2010 Free Software Foundation, Inc.
1480 generated by GNU Autoconf 2.69
1481
1482 Copyright (C) 2012 Free Software Foundation, Inc.
15901483 This configure script is free software; the Free Software Foundation
15911484 gives unlimited permission to copy, distribute and modify it.
15921485 _ACEOF
16301523
16311524 ac_retval=1
16321525 fi
1633 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1526 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
16341527 as_fn_set_status $ac_retval
16351528
16361529 } # ac_fn_c_try_compile
16621555 test ! -s conftest.err
16631556 } && test -s conftest$ac_exeext && {
16641557 test "$cross_compiling" = yes ||
1665 $as_test_x conftest$ac_exeext
1558 test -x conftest$ac_exeext
16661559 }; then :
16671560 ac_retval=0
16681561 else
16761569 # interfere with the next link command; also delete a directory that is
16771570 # left behind by Apple's compiler. We do this before executing the actions.
16781571 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1679 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1572 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
16801573 as_fn_set_status $ac_retval
16811574
16821575 } # ac_fn_c_try_link
16901583 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16911584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
16921585 $as_echo_n "checking for $2... " >&6; }
1693 if eval "test \"\${$3+set}\"" = set; then :
1586 if eval \${$3+:} false; then :
16941587 $as_echo_n "(cached) " >&6
16951588 else
16961589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17081601 eval ac_res=\$$3
17091602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17101603 $as_echo "$ac_res" >&6; }
1711 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1604 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
17121605
17131606 } # ac_fn_c_check_header_compile
17141607
17441637
17451638 ac_retval=1
17461639 fi
1747 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1640 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
17481641 as_fn_set_status $ac_retval
17491642
17501643 } # ac_fn_c_try_cpp
17861679 ac_retval=$ac_status
17871680 fi
17881681 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1789 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1682 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
17901683 as_fn_set_status $ac_retval
17911684
17921685 } # ac_fn_c_try_run
17991692 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18001693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
18011694 $as_echo_n "checking for $2... " >&6; }
1802 if eval "test \"\${$3+set}\"" = set; then :
1695 if eval \${$3+:} false; then :
18031696 $as_echo_n "(cached) " >&6
18041697 else
18051698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18541747 eval ac_res=\$$3
18551748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18561749 $as_echo "$ac_res" >&6; }
1857 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1750 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
18581751
18591752 } # ac_fn_c_check_func
18601753
18661759 ac_fn_c_check_header_mongrel ()
18671760 {
18681761 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1869 if eval "test \"\${$3+set}\"" = set; then :
1762 if eval \${$3+:} false; then :
18701763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
18711764 $as_echo_n "checking for $2... " >&6; }
1872 if eval "test \"\${$3+set}\"" = set; then :
1765 if eval \${$3+:} false; then :
18731766 $as_echo_n "(cached) " >&6
18741767 fi
18751768 eval ac_res=\$$3
19321825 esac
19331826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
19341827 $as_echo_n "checking for $2... " >&6; }
1935 if eval "test \"\${$3+set}\"" = set; then :
1828 if eval \${$3+:} false; then :
19361829 $as_echo_n "(cached) " >&6
19371830 else
19381831 eval "$3=\$ac_header_compiler"
19411834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19421835 $as_echo "$ac_res" >&6; }
19431836 fi
1944 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1837 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
19451838
19461839 } # ac_fn_c_check_header_mongrel
19471840 cat >config.log <<_ACEOF
19491842 running configure, to aid debugging if configure makes a mistake.
19501843
19511844 It was created by $as_me, which was
1952 generated by GNU Autoconf 2.67. Invocation command line was
1845 generated by GNU Autoconf 2.69. Invocation command line was
19531846
19541847 $ $0 $@
19551848
22072100 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
22082101 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
22092102 as_fn_error $? "failed to load site script $ac_site_file
2210 See \`config.log' for more details" "$LINENO" 5 ; }
2103 See \`config.log' for more details" "$LINENO" 5; }
22112104 fi
22122105 done
22132106
22972190
22982191
22992192
2193 orig_CFLAGS="$CFLAGS"
2194
2195
23002196
23012197 am__api_version='1.11'
23022198
23462242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
23472243 $as_echo_n "checking for a BSD-compatible install... " >&6; }
23482244 if test -z "$INSTALL"; then
2349 if test "${ac_cv_path_install+set}" = set; then :
2245 if ${ac_cv_path_install+:} false; then :
23502246 $as_echo_n "(cached) " >&6
23512247 else
23522248 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23662262 # by default.
23672263 for ac_prog in ginstall scoinst install; do
23682264 for ac_exec_ext in '' $ac_executable_extensions; do
2369 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
2265 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
23702266 if test $ac_prog = install &&
23712267 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
23722268 # AIX install. It has an incompatible calling convention.
24332329 '
24342330 case `pwd` in
24352331 *[\\\"\#\$\&\'\`$am_lf]*)
2436 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
2332 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
24372333 esac
24382334 case $srcdir in
24392335 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
2440 as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
2336 as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
24412337 esac
24422338
24432339 # Do `set' in a subshell so we don't clobber the current shell's
25232419 set dummy ${ac_tool_prefix}strip; ac_word=$2
25242420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25252421 $as_echo_n "checking for $ac_word... " >&6; }
2526 if test "${ac_cv_prog_STRIP+set}" = set; then :
2422 if ${ac_cv_prog_STRIP+:} false; then :
25272423 $as_echo_n "(cached) " >&6
25282424 else
25292425 if test -n "$STRIP"; then
25352431 IFS=$as_save_IFS
25362432 test -z "$as_dir" && as_dir=.
25372433 for ac_exec_ext in '' $ac_executable_extensions; do
2538 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2434 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25392435 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25402436 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25412437 break 2
25632459 set dummy strip; ac_word=$2
25642460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25652461 $as_echo_n "checking for $ac_word... " >&6; }
2566 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
2462 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
25672463 $as_echo_n "(cached) " >&6
25682464 else
25692465 if test -n "$ac_ct_STRIP"; then
25752471 IFS=$as_save_IFS
25762472 test -z "$as_dir" && as_dir=.
25772473 for ac_exec_ext in '' $ac_executable_extensions; do
2578 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2474 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25792475 ac_cv_prog_ac_ct_STRIP="strip"
25802476 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25812477 break 2
26162512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
26172513 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
26182514 if test -z "$MKDIR_P"; then
2619 if test "${ac_cv_path_mkdir+set}" = set; then :
2515 if ${ac_cv_path_mkdir+:} false; then :
26202516 $as_echo_n "(cached) " >&6
26212517 else
26222518 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26262522 test -z "$as_dir" && as_dir=.
26272523 for ac_prog in mkdir gmkdir; do
26282524 for ac_exec_ext in '' $ac_executable_extensions; do
2629 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
2525 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
26302526 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
26312527 'mkdir (GNU coreutils) '* | \
26322528 'mkdir (coreutils) '* | \
26672563 set dummy $ac_prog; ac_word=$2
26682564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26692565 $as_echo_n "checking for $ac_word... " >&6; }
2670 if test "${ac_cv_prog_AWK+set}" = set; then :
2566 if ${ac_cv_prog_AWK+:} false; then :
26712567 $as_echo_n "(cached) " >&6
26722568 else
26732569 if test -n "$AWK"; then
26792575 IFS=$as_save_IFS
26802576 test -z "$as_dir" && as_dir=.
26812577 for ac_exec_ext in '' $ac_executable_extensions; do
2682 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2578 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26832579 ac_cv_prog_AWK="$ac_prog"
26842580 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26852581 break 2
27072603 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
27082604 set x ${MAKE-make}
27092605 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2710 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
2606 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
27112607 $as_echo_n "(cached) " >&6
27122608 else
27132609 cat >conftest.make <<\_ACEOF
27652661
27662662 # Define the identity of the package.
27672663 PACKAGE=libev
2768 VERSION=4.11
2664 VERSION=4.15
27692665
27702666
27712667 cat >>confdefs.h <<_ACEOF
27952691
27962692 # We need awk for the "check" target. The system "awk" is bad on
27972693 # some platforms.
2798 # Always define AMTAR for backward compatibility.
2799
2800 AMTAR=${AMTAR-"${am_missing_run}tar"}
2801
2802 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
2694 # Always define AMTAR for backward compatibility. Yes, it's still used
2695 # in the wild :-( We should find a proper way to deprecate it ...
2696 AMTAR='$${TAR-tar}'
2697
2698 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
28032699
28042700
28052701
28402736 set dummy ${ac_tool_prefix}gcc; ac_word=$2
28412737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28422738 $as_echo_n "checking for $ac_word... " >&6; }
2843 if test "${ac_cv_prog_CC+set}" = set; then :
2739 if ${ac_cv_prog_CC+:} false; then :
28442740 $as_echo_n "(cached) " >&6
28452741 else
28462742 if test -n "$CC"; then
28522748 IFS=$as_save_IFS
28532749 test -z "$as_dir" && as_dir=.
28542750 for ac_exec_ext in '' $ac_executable_extensions; do
2855 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2751 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28562752 ac_cv_prog_CC="${ac_tool_prefix}gcc"
28572753 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28582754 break 2
28802776 set dummy gcc; ac_word=$2
28812777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28822778 $as_echo_n "checking for $ac_word... " >&6; }
2883 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2779 if ${ac_cv_prog_ac_ct_CC+:} false; then :
28842780 $as_echo_n "(cached) " >&6
28852781 else
28862782 if test -n "$ac_ct_CC"; then
28922788 IFS=$as_save_IFS
28932789 test -z "$as_dir" && as_dir=.
28942790 for ac_exec_ext in '' $ac_executable_extensions; do
2895 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2791 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28962792 ac_cv_prog_ac_ct_CC="gcc"
28972793 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28982794 break 2
29332829 set dummy ${ac_tool_prefix}cc; ac_word=$2
29342830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29352831 $as_echo_n "checking for $ac_word... " >&6; }
2936 if test "${ac_cv_prog_CC+set}" = set; then :
2832 if ${ac_cv_prog_CC+:} false; then :
29372833 $as_echo_n "(cached) " >&6
29382834 else
29392835 if test -n "$CC"; then
29452841 IFS=$as_save_IFS
29462842 test -z "$as_dir" && as_dir=.
29472843 for ac_exec_ext in '' $ac_executable_extensions; do
2948 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2844 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29492845 ac_cv_prog_CC="${ac_tool_prefix}cc"
29502846 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29512847 break 2
29732869 set dummy cc; ac_word=$2
29742870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29752871 $as_echo_n "checking for $ac_word... " >&6; }
2976 if test "${ac_cv_prog_CC+set}" = set; then :
2872 if ${ac_cv_prog_CC+:} false; then :
29772873 $as_echo_n "(cached) " >&6
29782874 else
29792875 if test -n "$CC"; then
29862882 IFS=$as_save_IFS
29872883 test -z "$as_dir" && as_dir=.
29882884 for ac_exec_ext in '' $ac_executable_extensions; do
2989 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2885 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29902886 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
29912887 ac_prog_rejected=yes
29922888 continue
30322928 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30332929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30342930 $as_echo_n "checking for $ac_word... " >&6; }
3035 if test "${ac_cv_prog_CC+set}" = set; then :
2931 if ${ac_cv_prog_CC+:} false; then :
30362932 $as_echo_n "(cached) " >&6
30372933 else
30382934 if test -n "$CC"; then
30442940 IFS=$as_save_IFS
30452941 test -z "$as_dir" && as_dir=.
30462942 for ac_exec_ext in '' $ac_executable_extensions; do
3047 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2943 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30482944 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
30492945 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30502946 break 2
30762972 set dummy $ac_prog; ac_word=$2
30772973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30782974 $as_echo_n "checking for $ac_word... " >&6; }
3079 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
2975 if ${ac_cv_prog_ac_ct_CC+:} false; then :
30802976 $as_echo_n "(cached) " >&6
30812977 else
30822978 if test -n "$ac_ct_CC"; then
30882984 IFS=$as_save_IFS
30892985 test -z "$as_dir" && as_dir=.
30902986 for ac_exec_ext in '' $ac_executable_extensions; do
3091 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2987 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30922988 ac_cv_prog_ac_ct_CC="$ac_prog"
30932989 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30942990 break 2
31313027 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31323028 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31333029 as_fn_error $? "no acceptable C compiler found in \$PATH
3134 See \`config.log' for more details" "$LINENO" 5 ; }
3030 See \`config.log' for more details" "$LINENO" 5; }
31353031
31363032 # Provide some information about the compiler.
31373033 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32463142 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32473143 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32483144 as_fn_error 77 "C compiler cannot create executables
3249 See \`config.log' for more details" "$LINENO" 5 ; }
3145 See \`config.log' for more details" "$LINENO" 5; }
32503146 else
32513147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32523148 $as_echo "yes" >&6; }
32893185 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32903186 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32913187 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3292 See \`config.log' for more details" "$LINENO" 5 ; }
3188 See \`config.log' for more details" "$LINENO" 5; }
32933189 fi
32943190 rm -f conftest conftest$ac_cv_exeext
32953191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33483244 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33493245 as_fn_error $? "cannot run C compiled programs.
33503246 If you meant to cross compile, use \`--host'.
3351 See \`config.log' for more details" "$LINENO" 5 ; }
3247 See \`config.log' for more details" "$LINENO" 5; }
33523248 fi
33533249 fi
33543250 fi
33593255 ac_clean_files=$ac_clean_files_save
33603256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
33613257 $as_echo_n "checking for suffix of object files... " >&6; }
3362 if test "${ac_cv_objext+set}" = set; then :
3258 if ${ac_cv_objext+:} false; then :
33633259 $as_echo_n "(cached) " >&6
33643260 else
33653261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34003296 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34013297 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34023298 as_fn_error $? "cannot compute suffix of object files: cannot compile
3403 See \`config.log' for more details" "$LINENO" 5 ; }
3299 See \`config.log' for more details" "$LINENO" 5; }
34043300 fi
34053301 rm -f conftest.$ac_cv_objext conftest.$ac_ext
34063302 fi
34103306 ac_objext=$OBJEXT
34113307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34123308 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3413 if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3309 if ${ac_cv_c_compiler_gnu+:} false; then :
34143310 $as_echo_n "(cached) " >&6
34153311 else
34163312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34473343 ac_save_CFLAGS=$CFLAGS
34483344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34493345 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3450 if test "${ac_cv_prog_cc_g+set}" = set; then :
3346 if ${ac_cv_prog_cc_g+:} false; then :
34513347 $as_echo_n "(cached) " >&6
34523348 else
34533349 ac_save_c_werror_flag=$ac_c_werror_flag
35253421 fi
35263422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
35273423 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3528 if test "${ac_cv_prog_cc_c89+set}" = set; then :
3424 if ${ac_cv_prog_cc_c89+:} false; then :
35293425 $as_echo_n "(cached) " >&6
35303426 else
35313427 ac_cv_prog_cc_c89=no
35343430 /* end confdefs.h. */
35353431 #include <stdarg.h>
35363432 #include <stdio.h>
3537 #include <sys/types.h>
3538 #include <sys/stat.h>
3433 struct stat;
35393434 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
35403435 struct buf { int x; };
35413436 FILE * (*rcsopen) (struct buf *, struct stat *, int);
36713566 if test "x$enable_dependency_tracking" != xno; then
36723567 am_depcomp="$ac_aux_dir/depcomp"
36733568 AMDEPBACKSLASH='\'
3569 am__nodep='_no'
36743570 fi
36753571 if test "x$enable_dependency_tracking" != xno; then
36763572 AMDEP_TRUE=
36863582
36873583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
36883584 $as_echo_n "checking dependency style of $depcc... " >&6; }
3689 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
3585 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
36903586 $as_echo_n "(cached) " >&6
36913587 else
36923588 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
36953591 # instance it was reported that on HP-UX the gcc test will end up
36963592 # making a dummy file named `D' -- because `-MD' means `put the output
36973593 # in D'.
3594 rm -rf conftest.dir
36983595 mkdir conftest.dir
36993596 # Copy depcomp to subdir because otherwise we won't find it if we're
37003597 # using a relative directory.
37543651 break
37553652 fi
37563653 ;;
3757 msvisualcpp | msvcmsys)
3654 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
37583655 # This compiler won't grok `-c -o', but also, the minuso test has
37593656 # not run yet. These depmodes are late enough in the game, and
37603657 # so weak that their functioning should not be impacted.
38253722
38263723
38273724
3828 macro_version='2.2.6b'
3829 macro_revision='1.3017'
3725 macro_version='2.4.2'
3726 macro_revision='1.3337'
38303727
38313728
38323729
38483745
38493746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
38503747 $as_echo_n "checking build system type... " >&6; }
3851 if test "${ac_cv_build+set}" = set; then :
3748 if ${ac_cv_build+:} false; then :
38523749 $as_echo_n "(cached) " >&6
38533750 else
38543751 ac_build_alias=$build_alias
38643761 $as_echo "$ac_cv_build" >&6; }
38653762 case $ac_cv_build in
38663763 *-*-*) ;;
3867 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
3764 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
38683765 esac
38693766 build=$ac_cv_build
38703767 ac_save_IFS=$IFS; IFS='-'
38823779
38833780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
38843781 $as_echo_n "checking host system type... " >&6; }
3885 if test "${ac_cv_host+set}" = set; then :
3782 if ${ac_cv_host+:} false; then :
38863783 $as_echo_n "(cached) " >&6
38873784 else
38883785 if test "x$host_alias" = x; then
38973794 $as_echo "$ac_cv_host" >&6; }
38983795 case $ac_cv_host in
38993796 *-*-*) ;;
3900 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
3797 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
39013798 esac
39023799 host=$ac_cv_host
39033800 ac_save_IFS=$IFS; IFS='-'
39133810 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
39143811
39153812
3813 # Backslashify metacharacters that are still active within
3814 # double-quoted strings.
3815 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
3816
3817 # Same as above, but do not quote variable references.
3818 double_quote_subst='s/\(["`\\]\)/\\\1/g'
3819
3820 # Sed substitution to delay expansion of an escaped shell variable in a
3821 # double_quote_subst'ed string.
3822 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
3823
3824 # Sed substitution to delay expansion of an escaped single quote.
3825 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
3826
3827 # Sed substitution to avoid accidental globbing in evaled expressions
3828 no_glob_subst='s/\*/\\\*/g'
3829
3830 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3831 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3832 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3833
3834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
3835 $as_echo_n "checking how to print strings... " >&6; }
3836 # Test print first, because it will be a builtin if present.
3837 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
3838 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
3839 ECHO='print -r --'
3840 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
3841 ECHO='printf %s\n'
3842 else
3843 # Use this function as a fallback that always works.
3844 func_fallback_echo ()
3845 {
3846 eval 'cat <<_LTECHO_EOF
3847 $1
3848 _LTECHO_EOF'
3849 }
3850 ECHO='func_fallback_echo'
3851 fi
3852
3853 # func_echo_all arg...
3854 # Invoke $ECHO with all args, space-separated.
3855 func_echo_all ()
3856 {
3857 $ECHO ""
3858 }
3859
3860 case "$ECHO" in
3861 printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
3862 $as_echo "printf" >&6; } ;;
3863 print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
3864 $as_echo "print -r" >&6; } ;;
3865 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
3866 $as_echo "cat" >&6; } ;;
3867 esac
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
39163882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
39173883 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
3918 if test "${ac_cv_path_SED+set}" = set; then :
3884 if ${ac_cv_path_SED+:} false; then :
39193885 $as_echo_n "(cached) " >&6
39203886 else
39213887 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
39353901 for ac_prog in sed gsed; do
39363902 for ac_exec_ext in '' $ac_executable_extensions; do
39373903 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
3938 { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
3904 as_fn_executable_p "$ac_path_SED" || continue
39393905 # Check for GNU ac_path_SED and select it if it is found.
39403906 # Check for GNU $ac_path_SED
39413907 case `"$ac_path_SED" --version 2>&1` in
39973963
39983964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
39993965 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4000 if test "${ac_cv_path_GREP+set}" = set; then :
3966 if ${ac_cv_path_GREP+:} false; then :
40013967 $as_echo_n "(cached) " >&6
40023968 else
40033969 if test -z "$GREP"; then
40113977 for ac_prog in grep ggrep; do
40123978 for ac_exec_ext in '' $ac_executable_extensions; do
40133979 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4014 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3980 as_fn_executable_p "$ac_path_GREP" || continue
40153981 # Check for GNU ac_path_GREP and select it if it is found.
40163982 # Check for GNU $ac_path_GREP
40173983 case `"$ac_path_GREP" --version 2>&1` in
40604026
40614027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
40624028 $as_echo_n "checking for egrep... " >&6; }
4063 if test "${ac_cv_path_EGREP+set}" = set; then :
4029 if ${ac_cv_path_EGREP+:} false; then :
40644030 $as_echo_n "(cached) " >&6
40654031 else
40664032 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
40774043 for ac_prog in egrep; do
40784044 for ac_exec_ext in '' $ac_executable_extensions; do
40794045 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4080 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4046 as_fn_executable_p "$ac_path_EGREP" || continue
40814047 # Check for GNU ac_path_EGREP and select it if it is found.
40824048 # Check for GNU $ac_path_EGREP
40834049 case `"$ac_path_EGREP" --version 2>&1` in
41274093
41284094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
41294095 $as_echo_n "checking for fgrep... " >&6; }
4130 if test "${ac_cv_path_FGREP+set}" = set; then :
4096 if ${ac_cv_path_FGREP+:} false; then :
41314097 $as_echo_n "(cached) " >&6
41324098 else
41334099 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
41444110 for ac_prog in fgrep; do
41454111 for ac_exec_ext in '' $ac_executable_extensions; do
41464112 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
4147 { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
4113 as_fn_executable_p "$ac_path_FGREP" || continue
41484114 # Check for GNU ac_path_FGREP and select it if it is found.
41494115 # Check for GNU $ac_path_FGREP
41504116 case `"$ac_path_FGREP" --version 2>&1` in
42584224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
42594225 $as_echo_n "checking for non-GNU ld... " >&6; }
42604226 fi
4261 if test "${lt_cv_path_LD+set}" = set; then :
4227 if ${lt_cv_path_LD+:} false; then :
42624228 $as_echo_n "(cached) " >&6
42634229 else
42644230 if test -z "$LD"; then
42984264 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
42994265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
43004266 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
4301 if test "${lt_cv_prog_gnu_ld+set}" = set; then :
4267 if ${lt_cv_prog_gnu_ld+:} false; then :
43024268 $as_echo_n "(cached) " >&6
43034269 else
43044270 # I'd rather use --version here, but apparently some GNU lds only accept -v.
43254291
43264292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
43274293 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
4328 if test "${lt_cv_path_NM+set}" = set; then :
4294 if ${lt_cv_path_NM+:} false; then :
43294295 $as_echo_n "(cached) " >&6
43304296 else
43314297 if test -n "$NM"; then
43784344 NM="$lt_cv_path_NM"
43794345 else
43804346 # Didn't find any BSD compatible name lister, look for dumpbin.
4381 if test -n "$ac_tool_prefix"; then
4382 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
4347 if test -n "$DUMPBIN"; then :
4348 # Let the user override the test.
4349 else
4350 if test -n "$ac_tool_prefix"; then
4351 for ac_prog in dumpbin "link -dump"
43834352 do
43844353 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43854354 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43864355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43874356 $as_echo_n "checking for $ac_word... " >&6; }
4388 if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
4357 if ${ac_cv_prog_DUMPBIN+:} false; then :
43894358 $as_echo_n "(cached) " >&6
43904359 else
43914360 if test -n "$DUMPBIN"; then
43974366 IFS=$as_save_IFS
43984367 test -z "$as_dir" && as_dir=.
43994368 for ac_exec_ext in '' $ac_executable_extensions; do
4400 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4369 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44014370 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
44024371 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44034372 break 2
44234392 fi
44244393 if test -z "$DUMPBIN"; then
44254394 ac_ct_DUMPBIN=$DUMPBIN
4426 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
4395 for ac_prog in dumpbin "link -dump"
44274396 do
44284397 # Extract the first word of "$ac_prog", so it can be a program name with args.
44294398 set dummy $ac_prog; ac_word=$2
44304399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44314400 $as_echo_n "checking for $ac_word... " >&6; }
4432 if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
4401 if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
44334402 $as_echo_n "(cached) " >&6
44344403 else
44354404 if test -n "$ac_ct_DUMPBIN"; then
44414410 IFS=$as_save_IFS
44424411 test -z "$as_dir" && as_dir=.
44434412 for ac_exec_ext in '' $ac_executable_extensions; do
4444 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4413 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44454414 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
44464415 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44474416 break 2
44784447 fi
44794448 fi
44804449
4450 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4451 *COFF*)
4452 DUMPBIN="$DUMPBIN -symbols"
4453 ;;
4454 *)
4455 DUMPBIN=:
4456 ;;
4457 esac
4458 fi
44814459
44824460 if test "$DUMPBIN" != ":"; then
44834461 NM="$DUMPBIN"
44924470
44934471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
44944472 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
4495 if test "${lt_cv_nm_interface+set}" = set; then :
4473 if ${lt_cv_nm_interface+:} false; then :
44964474 $as_echo_n "(cached) " >&6
44974475 else
44984476 lt_cv_nm_interface="BSD nm"
44994477 echo "int some_variable = 0;" > conftest.$ac_ext
4500 (eval echo "\"\$as_me:4501: $ac_compile\"" >&5)
4478 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
45014479 (eval "$ac_compile" 2>conftest.err)
45024480 cat conftest.err >&5
4503 (eval echo "\"\$as_me:4504: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
4481 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
45044482 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
45054483 cat conftest.err >&5
4506 (eval echo "\"\$as_me:4507: output\"" >&5)
4484 (eval echo "\"\$as_me:$LINENO: output\"" >&5)
45074485 cat conftest.out >&5
45084486 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
45094487 lt_cv_nm_interface="MS dumpbin"
45274505 # find the maximum length of command line arguments
45284506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
45294507 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
4530 if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
4508 if ${lt_cv_sys_max_cmd_len+:} false; then :
45314509 $as_echo_n "(cached) " >&6
45324510 else
45334511 i=0
45574535 # the test eventually succeeds (with a max line length of 256k).
45584536 # Instead, let's just punt: use the minimum linelength reported by
45594537 # all of the supported platforms: 8192 (on NT/2K/XP).
4538 lt_cv_sys_max_cmd_len=8192;
4539 ;;
4540
4541 mint*)
4542 # On MiNT this can take a long time and run out of memory.
45604543 lt_cv_sys_max_cmd_len=8192;
45614544 ;;
45624545
45834566 interix*)
45844567 # We know the value 262144 and hardcode it with a safety zone (like BSD)
45854568 lt_cv_sys_max_cmd_len=196608
4569 ;;
4570
4571 os2*)
4572 # The test takes a long time on OS/2.
4573 lt_cv_sys_max_cmd_len=8192
45864574 ;;
45874575
45884576 osf*)
46244612 # If test is not a shell built-in, we'll probably end up computing a
46254613 # maximum length that is only half of the actual maximum length, but
46264614 # we can't tell.
4627 while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
4628 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
4615 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
4616 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
46294617 test $i != 17 # 1/2 MB should be enough
46304618 do
46314619 i=`expr $i + 1`
46674655 # Try some XSI features
46684656 xsi_shell=no
46694657 ( _lt_dummy="a/b/c"
4670 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
4671 = c,a/b,, \
4658 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
4659 = c,a/b,b/c, \
46724660 && eval 'test $(( 1 + 1 )) -eq 2 \
46734661 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
46744662 && xsi_shell=yes
47174705
47184706
47194707
4708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
4709 $as_echo_n "checking how to convert $build file names to $host format... " >&6; }
4710 if ${lt_cv_to_host_file_cmd+:} false; then :
4711 $as_echo_n "(cached) " >&6
4712 else
4713 case $host in
4714 *-*-mingw* )
4715 case $build in
4716 *-*-mingw* ) # actually msys
4717 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
4718 ;;
4719 *-*-cygwin* )
4720 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
4721 ;;
4722 * ) # otherwise, assume *nix
4723 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
4724 ;;
4725 esac
4726 ;;
4727 *-*-cygwin* )
4728 case $build in
4729 *-*-mingw* ) # actually msys
4730 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
4731 ;;
4732 *-*-cygwin* )
4733 lt_cv_to_host_file_cmd=func_convert_file_noop
4734 ;;
4735 * ) # otherwise, assume *nix
4736 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
4737 ;;
4738 esac
4739 ;;
4740 * ) # unhandled hosts (and "normal" native builds)
4741 lt_cv_to_host_file_cmd=func_convert_file_noop
4742 ;;
4743 esac
4744
4745 fi
4746
4747 to_host_file_cmd=$lt_cv_to_host_file_cmd
4748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
4749 $as_echo "$lt_cv_to_host_file_cmd" >&6; }
4750
4751
4752
4753
4754
4755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
4756 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
4757 if ${lt_cv_to_tool_file_cmd+:} false; then :
4758 $as_echo_n "(cached) " >&6
4759 else
4760 #assume ordinary cross tools, or native build.
4761 lt_cv_to_tool_file_cmd=func_convert_file_noop
4762 case $host in
4763 *-*-mingw* )
4764 case $build in
4765 *-*-mingw* ) # actually msys
4766 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
4767 ;;
4768 esac
4769 ;;
4770 esac
4771
4772 fi
4773
4774 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
4775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
4776 $as_echo "$lt_cv_to_tool_file_cmd" >&6; }
4777
4778
4779
4780
4781
47204782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
47214783 $as_echo_n "checking for $LD option to reload object files... " >&6; }
4722 if test "${lt_cv_ld_reload_flag+set}" = set; then :
4784 if ${lt_cv_ld_reload_flag+:} false; then :
47234785 $as_echo_n "(cached) " >&6
47244786 else
47254787 lt_cv_ld_reload_flag='-r'
47334795 esac
47344796 reload_cmds='$LD$reload_flag -o $output$reload_objs'
47354797 case $host_os in
4798 cygwin* | mingw* | pw32* | cegcc*)
4799 if test "$GCC" != yes; then
4800 reload_cmds=false
4801 fi
4802 ;;
47364803 darwin*)
47374804 if test "$GCC" = yes; then
47384805 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
47554822 set dummy ${ac_tool_prefix}objdump; ac_word=$2
47564823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47574824 $as_echo_n "checking for $ac_word... " >&6; }
4758 if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
4825 if ${ac_cv_prog_OBJDUMP+:} false; then :
47594826 $as_echo_n "(cached) " >&6
47604827 else
47614828 if test -n "$OBJDUMP"; then
47674834 IFS=$as_save_IFS
47684835 test -z "$as_dir" && as_dir=.
47694836 for ac_exec_ext in '' $ac_executable_extensions; do
4770 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4837 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47714838 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
47724839 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47734840 break 2
47954862 set dummy objdump; ac_word=$2
47964863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47974864 $as_echo_n "checking for $ac_word... " >&6; }
4798 if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
4865 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
47994866 $as_echo_n "(cached) " >&6
48004867 else
48014868 if test -n "$ac_ct_OBJDUMP"; then
48074874 IFS=$as_save_IFS
48084875 test -z "$as_dir" && as_dir=.
48094876 for ac_exec_ext in '' $ac_executable_extensions; do
4810 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4877 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48114878 ac_cv_prog_ac_ct_OBJDUMP="objdump"
48124879 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48134880 break 2
48544921
48554922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
48564923 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
4857 if test "${lt_cv_deplibs_check_method+set}" = set; then :
4924 if ${lt_cv_deplibs_check_method+:} false; then :
48584925 $as_echo_n "(cached) " >&6
48594926 else
48604927 lt_cv_file_magic_cmd='$MAGIC_CMD'
48964963 # Base MSYS/MinGW do not provide the 'file' command needed by
48974964 # func_win32_libid shell function, so use a weaker test based on 'objdump',
48984965 # unless we find 'file', for example because we are cross-compiling.
4899 if ( file / ) >/dev/null 2>&1; then
4966 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
4967 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
49004968 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
49014969 lt_cv_file_magic_cmd='func_win32_libid'
49024970 else
4903 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4971 # Keep this pattern in sync with the one in func_win32_libid.
4972 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
49044973 lt_cv_file_magic_cmd='$OBJDUMP -f'
49054974 fi
49064975 ;;
49074976
4908 cegcc)
4977 cegcc*)
49094978 # use the weaker test based on 'objdump'. See mingw*.
49104979 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
49114980 lt_cv_file_magic_cmd='$OBJDUMP -f'
49315000 fi
49325001 ;;
49335002
4934 gnu*)
5003 haiku*)
49355004 lt_cv_deplibs_check_method=pass_all
49365005 ;;
49375006
49435012 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
49445013 ;;
49455014 hppa*64*)
4946 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
5015 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
49475016 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
49485017 ;;
49495018 *)
4950 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
5019 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
49515020 lt_cv_file_magic_test_file=/usr/lib/libc.sl
49525021 ;;
49535022 esac
49685037 lt_cv_deplibs_check_method=pass_all
49695038 ;;
49705039
4971 # This must be Linux ELF.
4972 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5040 # This must be glibc/ELF.
5041 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
49735042 lt_cv_deplibs_check_method=pass_all
49745043 ;;
49755044
50505119 fi
50515120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
50525121 $as_echo "$lt_cv_deplibs_check_method" >&6; }
5122
5123 file_magic_glob=
5124 want_nocaseglob=no
5125 if test "$build" = "$host"; then
5126 case $host_os in
5127 mingw* | pw32*)
5128 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
5129 want_nocaseglob=yes
5130 else
5131 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
5132 fi
5133 ;;
5134 esac
5135 fi
5136
50535137 file_magic_cmd=$lt_cv_file_magic_cmd
50545138 deplibs_check_method=$lt_cv_deplibs_check_method
50555139 test -z "$deplibs_check_method" && deplibs_check_method=unknown
50655149
50665150
50675151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
50685162 if test -n "$ac_tool_prefix"; then
5069 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5070 set dummy ${ac_tool_prefix}ar; ac_word=$2
5163 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
5164 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
50715165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50725166 $as_echo_n "checking for $ac_word... " >&6; }
5073 if test "${ac_cv_prog_AR+set}" = set; then :
5167 if ${ac_cv_prog_DLLTOOL+:} false; then :
50745168 $as_echo_n "(cached) " >&6
50755169 else
5076 if test -n "$AR"; then
5077 ac_cv_prog_AR="$AR" # Let the user override the test.
5170 if test -n "$DLLTOOL"; then
5171 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
50785172 else
50795173 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50805174 for as_dir in $PATH
50825176 IFS=$as_save_IFS
50835177 test -z "$as_dir" && as_dir=.
50845178 for ac_exec_ext in '' $ac_executable_extensions; do
5085 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5086 ac_cv_prog_AR="${ac_tool_prefix}ar"
5179 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5180 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
50875181 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50885182 break 2
50895183 fi
50935187
50945188 fi
50955189 fi
5096 AR=$ac_cv_prog_AR
5097 if test -n "$AR"; then
5098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5099 $as_echo "$AR" >&6; }
5190 DLLTOOL=$ac_cv_prog_DLLTOOL
5191 if test -n "$DLLTOOL"; then
5192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
5193 $as_echo "$DLLTOOL" >&6; }
51005194 else
51015195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51025196 $as_echo "no" >&6; }
51045198
51055199
51065200 fi
5107 if test -z "$ac_cv_prog_AR"; then
5108 ac_ct_AR=$AR
5109 # Extract the first word of "ar", so it can be a program name with args.
5110 set dummy ar; ac_word=$2
5201 if test -z "$ac_cv_prog_DLLTOOL"; then
5202 ac_ct_DLLTOOL=$DLLTOOL
5203 # Extract the first word of "dlltool", so it can be a program name with args.
5204 set dummy dlltool; ac_word=$2
51115205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51125206 $as_echo_n "checking for $ac_word... " >&6; }
5113 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
5207 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
51145208 $as_echo_n "(cached) " >&6
51155209 else
5116 if test -n "$ac_ct_AR"; then
5117 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5210 if test -n "$ac_ct_DLLTOOL"; then
5211 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
51185212 else
51195213 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51205214 for as_dir in $PATH
51225216 IFS=$as_save_IFS
51235217 test -z "$as_dir" && as_dir=.
51245218 for ac_exec_ext in '' $ac_executable_extensions; do
5125 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5126 ac_cv_prog_ac_ct_AR="ar"
5219 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5220 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
51275221 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51285222 break 2
51295223 fi
51335227
51345228 fi
51355229 fi
5230 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
5231 if test -n "$ac_ct_DLLTOOL"; then
5232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
5233 $as_echo "$ac_ct_DLLTOOL" >&6; }
5234 else
5235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5236 $as_echo "no" >&6; }
5237 fi
5238
5239 if test "x$ac_ct_DLLTOOL" = x; then
5240 DLLTOOL="false"
5241 else
5242 case $cross_compiling:$ac_tool_warned in
5243 yes:)
5244 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5245 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5246 ac_tool_warned=yes ;;
5247 esac
5248 DLLTOOL=$ac_ct_DLLTOOL
5249 fi
5250 else
5251 DLLTOOL="$ac_cv_prog_DLLTOOL"
5252 fi
5253
5254 test -z "$DLLTOOL" && DLLTOOL=dlltool
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
5266 $as_echo_n "checking how to associate runtime and link libraries... " >&6; }
5267 if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
5268 $as_echo_n "(cached) " >&6
5269 else
5270 lt_cv_sharedlib_from_linklib_cmd='unknown'
5271
5272 case $host_os in
5273 cygwin* | mingw* | pw32* | cegcc*)
5274 # two different shell functions defined in ltmain.sh
5275 # decide which to use based on capabilities of $DLLTOOL
5276 case `$DLLTOOL --help 2>&1` in
5277 *--identify-strict*)
5278 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
5279 ;;
5280 *)
5281 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
5282 ;;
5283 esac
5284 ;;
5285 *)
5286 # fallback: assume linklib IS sharedlib
5287 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
5288 ;;
5289 esac
5290
5291 fi
5292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
5293 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
5294 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
5295 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
5296
5297
5298
5299
5300
5301
5302
5303
5304 if test -n "$ac_tool_prefix"; then
5305 for ac_prog in ar
5306 do
5307 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5308 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5310 $as_echo_n "checking for $ac_word... " >&6; }
5311 if ${ac_cv_prog_AR+:} false; then :
5312 $as_echo_n "(cached) " >&6
5313 else
5314 if test -n "$AR"; then
5315 ac_cv_prog_AR="$AR" # Let the user override the test.
5316 else
5317 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5318 for as_dir in $PATH
5319 do
5320 IFS=$as_save_IFS
5321 test -z "$as_dir" && as_dir=.
5322 for ac_exec_ext in '' $ac_executable_extensions; do
5323 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5324 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
5325 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5326 break 2
5327 fi
5328 done
5329 done
5330 IFS=$as_save_IFS
5331
5332 fi
5333 fi
5334 AR=$ac_cv_prog_AR
5335 if test -n "$AR"; then
5336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5337 $as_echo "$AR" >&6; }
5338 else
5339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5340 $as_echo "no" >&6; }
5341 fi
5342
5343
5344 test -n "$AR" && break
5345 done
5346 fi
5347 if test -z "$AR"; then
5348 ac_ct_AR=$AR
5349 for ac_prog in ar
5350 do
5351 # Extract the first word of "$ac_prog", so it can be a program name with args.
5352 set dummy $ac_prog; ac_word=$2
5353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5354 $as_echo_n "checking for $ac_word... " >&6; }
5355 if ${ac_cv_prog_ac_ct_AR+:} false; then :
5356 $as_echo_n "(cached) " >&6
5357 else
5358 if test -n "$ac_ct_AR"; then
5359 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5360 else
5361 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5362 for as_dir in $PATH
5363 do
5364 IFS=$as_save_IFS
5365 test -z "$as_dir" && as_dir=.
5366 for ac_exec_ext in '' $ac_executable_extensions; do
5367 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5368 ac_cv_prog_ac_ct_AR="$ac_prog"
5369 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5370 break 2
5371 fi
5372 done
5373 done
5374 IFS=$as_save_IFS
5375
5376 fi
5377 fi
51365378 ac_ct_AR=$ac_cv_prog_ac_ct_AR
51375379 if test -n "$ac_ct_AR"; then
51385380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
51415383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51425384 $as_echo "no" >&6; }
51435385 fi
5386
5387
5388 test -n "$ac_ct_AR" && break
5389 done
51445390
51455391 if test "x$ac_ct_AR" = x; then
51465392 AR="false"
51535399 esac
51545400 AR=$ac_ct_AR
51555401 fi
5156 else
5157 AR="$ac_cv_prog_AR"
5158 fi
5159
5160 test -z "$AR" && AR=ar
5161 test -z "$AR_FLAGS" && AR_FLAGS=cru
5162
5163
5164
5165
5402 fi
5403
5404 : ${AR=ar}
5405 : ${AR_FLAGS=cru}
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
5418 $as_echo_n "checking for archiver @FILE support... " >&6; }
5419 if ${lt_cv_ar_at_file+:} false; then :
5420 $as_echo_n "(cached) " >&6
5421 else
5422 lt_cv_ar_at_file=no
5423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5424 /* end confdefs.h. */
5425
5426 int
5427 main ()
5428 {
5429
5430 ;
5431 return 0;
5432 }
5433 _ACEOF
5434 if ac_fn_c_try_compile "$LINENO"; then :
5435 echo conftest.$ac_objext > conftest.lst
5436 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
5437 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
5438 (eval $lt_ar_try) 2>&5
5439 ac_status=$?
5440 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5441 test $ac_status = 0; }
5442 if test "$ac_status" -eq 0; then
5443 # Ensure the archiver fails upon bogus file names.
5444 rm -f conftest.$ac_objext libconftest.a
5445 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
5446 (eval $lt_ar_try) 2>&5
5447 ac_status=$?
5448 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5449 test $ac_status = 0; }
5450 if test "$ac_status" -ne 0; then
5451 lt_cv_ar_at_file=@
5452 fi
5453 fi
5454 rm -f conftest.* libconftest.a
5455
5456 fi
5457 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5458
5459 fi
5460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
5461 $as_echo "$lt_cv_ar_at_file" >&6; }
5462
5463 if test "x$lt_cv_ar_at_file" = xno; then
5464 archiver_list_spec=
5465 else
5466 archiver_list_spec=$lt_cv_ar_at_file
5467 fi
51665468
51675469
51685470
51755477 set dummy ${ac_tool_prefix}strip; ac_word=$2
51765478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51775479 $as_echo_n "checking for $ac_word... " >&6; }
5178 if test "${ac_cv_prog_STRIP+set}" = set; then :
5480 if ${ac_cv_prog_STRIP+:} false; then :
51795481 $as_echo_n "(cached) " >&6
51805482 else
51815483 if test -n "$STRIP"; then
51875489 IFS=$as_save_IFS
51885490 test -z "$as_dir" && as_dir=.
51895491 for ac_exec_ext in '' $ac_executable_extensions; do
5190 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5492 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51915493 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
51925494 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51935495 break 2
52155517 set dummy strip; ac_word=$2
52165518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52175519 $as_echo_n "checking for $ac_word... " >&6; }
5218 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
5520 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
52195521 $as_echo_n "(cached) " >&6
52205522 else
52215523 if test -n "$ac_ct_STRIP"; then
52275529 IFS=$as_save_IFS
52285530 test -z "$as_dir" && as_dir=.
52295531 for ac_exec_ext in '' $ac_executable_extensions; do
5230 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5532 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52315533 ac_cv_prog_ac_ct_STRIP="strip"
52325534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52335535 break 2
52745576 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
52755577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52765578 $as_echo_n "checking for $ac_word... " >&6; }
5277 if test "${ac_cv_prog_RANLIB+set}" = set; then :
5579 if ${ac_cv_prog_RANLIB+:} false; then :
52785580 $as_echo_n "(cached) " >&6
52795581 else
52805582 if test -n "$RANLIB"; then
52865588 IFS=$as_save_IFS
52875589 test -z "$as_dir" && as_dir=.
52885590 for ac_exec_ext in '' $ac_executable_extensions; do
5289 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5591 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52905592 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
52915593 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52925594 break 2
53145616 set dummy ranlib; ac_word=$2
53155617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53165618 $as_echo_n "checking for $ac_word... " >&6; }
5317 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5619 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
53185620 $as_echo_n "(cached) " >&6
53195621 else
53205622 if test -n "$ac_ct_RANLIB"; then
53265628 IFS=$as_save_IFS
53275629 test -z "$as_dir" && as_dir=.
53285630 for ac_exec_ext in '' $ac_executable_extensions; do
5329 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5631 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53305632 ac_cv_prog_ac_ct_RANLIB="ranlib"
53315633 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53325634 break 2
53765678 if test -n "$RANLIB"; then
53775679 case $host_os in
53785680 openbsd*)
5379 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
5681 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
53805682 ;;
53815683 *)
5382 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
5684 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
53835685 ;;
53845686 esac
5385 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5386 fi
5687 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
5688 fi
5689
5690 case $host_os in
5691 darwin*)
5692 lock_old_archive_extraction=yes ;;
5693 *)
5694 lock_old_archive_extraction=no ;;
5695 esac
5696
5697
5698
5699
5700
53875701
53885702
53895703
54315745 # Check for command to grab the raw symbol name followed by C symbol from nm.
54325746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
54335747 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
5434 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
5748 if ${lt_cv_sys_global_symbol_pipe+:} false; then :
54355749 $as_echo_n "(cached) " >&6
54365750 else
54375751
54925806 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
54935807
54945808 # Transform an extracted symbol line into symbol name and symbol address
5495 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
5496 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
5809 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
5810 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
54975811
54985812 # Handle CRLF in mingw tool chain
54995813 opt_cr=
55175831 # which start with @ or ?.
55185832 lt_cv_sys_global_symbol_pipe="$AWK '"\
55195833 " {last_section=section; section=\$ 3};"\
5834 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
55205835 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
55215836 " \$ 0!~/External *\|/{next};"\
55225837 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
55295844 else
55305845 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
55315846 fi
5847 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
55325848
55335849 # Check to see that the pipe works correctly.
55345850 pipe_works=no
55545870 test $ac_status = 0; }; then
55555871 # Now try to grab the symbols.
55565872 nlist=conftest.nm
5557 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
5558 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
5873 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
5874 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
55595875 ac_status=$?
55605876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55615877 test $ac_status = 0; } && test -s "$nlist"; then
55705886 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
55715887 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
55725888 cat <<_LT_EOF > conftest.$ac_ext
5889 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
5890 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
5891 /* DATA imports from DLLs on WIN32 con't be const, because runtime
5892 relocations are performed -- see ld's documentation on pseudo-relocs. */
5893 # define LT_DLSYM_CONST
5894 #elif defined(__osf__)
5895 /* This system does not cope well with relocations in const data. */
5896 # define LT_DLSYM_CONST
5897 #else
5898 # define LT_DLSYM_CONST const
5899 #endif
5900
55735901 #ifdef __cplusplus
55745902 extern "C" {
55755903 #endif
55815909 cat <<_LT_EOF >> conftest.$ac_ext
55825910
55835911 /* The mapping between symbol names and symbols. */
5584 const struct {
5912 LT_DLSYM_CONST struct {
55855913 const char *name;
55865914 void *address;
55875915 }
56075935 _LT_EOF
56085936 # Now try linking the two files.
56095937 mv conftest.$ac_objext conftstm.$ac_objext
5610 lt_save_LIBS="$LIBS"
5611 lt_save_CFLAGS="$CFLAGS"
5938 lt_globsym_save_LIBS=$LIBS
5939 lt_globsym_save_CFLAGS=$CFLAGS
56125940 LIBS="conftstm.$ac_objext"
56135941 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
56145942 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
56185946 test $ac_status = 0; } && test -s conftest${ac_exeext}; then
56195947 pipe_works=yes
56205948 fi
5621 LIBS="$lt_save_LIBS"
5622 CFLAGS="$lt_save_CFLAGS"
5949 LIBS=$lt_globsym_save_LIBS
5950 CFLAGS=$lt_globsym_save_CFLAGS
56235951 else
56245952 echo "cannot find nm_test_func in $nlist" >&5
56255953 fi
56565984 $as_echo "ok" >&6; }
56575985 fi
56585986
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5987 # Response file support.
5988 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5989 nm_file_list_spec='@'
5990 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
5991 nm_file_list_spec='@'
5992 fi
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
6021 $as_echo_n "checking for sysroot... " >&6; }
6022
6023 # Check whether --with-sysroot was given.
6024 if test "${with_sysroot+set}" = set; then :
6025 withval=$with_sysroot;
6026 else
6027 with_sysroot=no
6028 fi
6029
6030
6031 lt_sysroot=
6032 case ${with_sysroot} in #(
6033 yes)
6034 if test "$GCC" = yes; then
6035 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
6036 fi
6037 ;; #(
6038 /*)
6039 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
6040 ;; #(
6041 no|'')
6042 ;; #(
6043 *)
6044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
6045 $as_echo "${with_sysroot}" >&6; }
6046 as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
6047 ;;
6048 esac
6049
6050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
6051 $as_echo "${lt_sysroot:-no}" >&6; }
56766052
56776053
56786054
57096085 ;;
57106086 *-*-irix6*)
57116087 # Find out which ABI we are using.
5712 echo '#line 5713 "configure"' > conftest.$ac_ext
6088 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
57136089 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
57146090 (eval $ac_compile) 2>&5
57156091 ac_status=$?
58036179 CFLAGS="$CFLAGS -belf"
58046180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
58056181 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
5806 if test "${lt_cv_cc_needs_belf+set}" = set; then :
6182 if ${lt_cv_cc_needs_belf+:} false; then :
58076183 $as_echo_n "(cached) " >&6
58086184 else
58096185 ac_ext=c
58446220 CFLAGS="$SAVE_CFLAGS"
58456221 fi
58466222 ;;
5847 sparc*-*solaris*)
6223 *-*solaris*)
58486224 # Find out which ABI we are using.
58496225 echo 'int i;' > conftest.$ac_ext
58506226 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
58556231 case `/usr/bin/file conftest.o` in
58566232 *64-bit*)
58576233 case $lt_cv_prog_gnu_ld in
5858 yes*) LD="${LD-ld} -m elf64_sparc" ;;
6234 yes*)
6235 case $host in
6236 i?86-*-solaris*)
6237 LD="${LD-ld} -m elf_x86_64"
6238 ;;
6239 sparc*-*-solaris*)
6240 LD="${LD-ld} -m elf64_sparc"
6241 ;;
6242 esac
6243 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
6244 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
6245 LD="${LD-ld}_sol2"
6246 fi
6247 ;;
58596248 *)
58606249 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
58616250 LD="${LD-ld} -64"
58716260
58726261 need_locks="$enable_libtool_lock"
58736262
6263 if test -n "$ac_tool_prefix"; then
6264 # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
6265 set dummy ${ac_tool_prefix}mt; ac_word=$2
6266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6267 $as_echo_n "checking for $ac_word... " >&6; }
6268 if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
6269 $as_echo_n "(cached) " >&6
6270 else
6271 if test -n "$MANIFEST_TOOL"; then
6272 ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
6273 else
6274 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6275 for as_dir in $PATH
6276 do
6277 IFS=$as_save_IFS
6278 test -z "$as_dir" && as_dir=.
6279 for ac_exec_ext in '' $ac_executable_extensions; do
6280 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6281 ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
6282 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6283 break 2
6284 fi
6285 done
6286 done
6287 IFS=$as_save_IFS
6288
6289 fi
6290 fi
6291 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
6292 if test -n "$MANIFEST_TOOL"; then
6293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
6294 $as_echo "$MANIFEST_TOOL" >&6; }
6295 else
6296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6297 $as_echo "no" >&6; }
6298 fi
6299
6300
6301 fi
6302 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
6303 ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
6304 # Extract the first word of "mt", so it can be a program name with args.
6305 set dummy mt; ac_word=$2
6306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6307 $as_echo_n "checking for $ac_word... " >&6; }
6308 if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
6309 $as_echo_n "(cached) " >&6
6310 else
6311 if test -n "$ac_ct_MANIFEST_TOOL"; then
6312 ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
6313 else
6314 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6315 for as_dir in $PATH
6316 do
6317 IFS=$as_save_IFS
6318 test -z "$as_dir" && as_dir=.
6319 for ac_exec_ext in '' $ac_executable_extensions; do
6320 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6321 ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
6322 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6323 break 2
6324 fi
6325 done
6326 done
6327 IFS=$as_save_IFS
6328
6329 fi
6330 fi
6331 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
6332 if test -n "$ac_ct_MANIFEST_TOOL"; then
6333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
6334 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
6335 else
6336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6337 $as_echo "no" >&6; }
6338 fi
6339
6340 if test "x$ac_ct_MANIFEST_TOOL" = x; then
6341 MANIFEST_TOOL=":"
6342 else
6343 case $cross_compiling:$ac_tool_warned in
6344 yes:)
6345 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6346 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6347 ac_tool_warned=yes ;;
6348 esac
6349 MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
6350 fi
6351 else
6352 MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
6353 fi
6354
6355 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
6356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
6357 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
6358 if ${lt_cv_path_mainfest_tool+:} false; then :
6359 $as_echo_n "(cached) " >&6
6360 else
6361 lt_cv_path_mainfest_tool=no
6362 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
6363 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
6364 cat conftest.err >&5
6365 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
6366 lt_cv_path_mainfest_tool=yes
6367 fi
6368 rm -f conftest*
6369 fi
6370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
6371 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
6372 if test "x$lt_cv_path_mainfest_tool" != xyes; then
6373 MANIFEST_TOOL=:
6374 fi
6375
6376
6377
6378
6379
58746380
58756381 case $host_os in
58766382 rhapsody* | darwin*)
58796385 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
58806386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58816387 $as_echo_n "checking for $ac_word... " >&6; }
5882 if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
6388 if ${ac_cv_prog_DSYMUTIL+:} false; then :
58836389 $as_echo_n "(cached) " >&6
58846390 else
58856391 if test -n "$DSYMUTIL"; then
58916397 IFS=$as_save_IFS
58926398 test -z "$as_dir" && as_dir=.
58936399 for ac_exec_ext in '' $ac_executable_extensions; do
5894 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6400 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58956401 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
58966402 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58976403 break 2
59196425 set dummy dsymutil; ac_word=$2
59206426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59216427 $as_echo_n "checking for $ac_word... " >&6; }
5922 if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
6428 if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
59236429 $as_echo_n "(cached) " >&6
59246430 else
59256431 if test -n "$ac_ct_DSYMUTIL"; then
59316437 IFS=$as_save_IFS
59326438 test -z "$as_dir" && as_dir=.
59336439 for ac_exec_ext in '' $ac_executable_extensions; do
5934 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6440 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59356441 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
59366442 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59376443 break 2
59716477 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
59726478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
59736479 $as_echo_n "checking for $ac_word... " >&6; }
5974 if test "${ac_cv_prog_NMEDIT+set}" = set; then :
6480 if ${ac_cv_prog_NMEDIT+:} false; then :
59756481 $as_echo_n "(cached) " >&6
59766482 else
59776483 if test -n "$NMEDIT"; then
59836489 IFS=$as_save_IFS
59846490 test -z "$as_dir" && as_dir=.
59856491 for ac_exec_ext in '' $ac_executable_extensions; do
5986 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6492 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
59876493 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
59886494 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
59896495 break 2
60116517 set dummy nmedit; ac_word=$2
60126518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60136519 $as_echo_n "checking for $ac_word... " >&6; }
6014 if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
6520 if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
60156521 $as_echo_n "(cached) " >&6
60166522 else
60176523 if test -n "$ac_ct_NMEDIT"; then
60236529 IFS=$as_save_IFS
60246530 test -z "$as_dir" && as_dir=.
60256531 for ac_exec_ext in '' $ac_executable_extensions; do
6026 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6532 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60276533 ac_cv_prog_ac_ct_NMEDIT="nmedit"
60286534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60296535 break 2
60636569 set dummy ${ac_tool_prefix}lipo; ac_word=$2
60646570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
60656571 $as_echo_n "checking for $ac_word... " >&6; }
6066 if test "${ac_cv_prog_LIPO+set}" = set; then :
6572 if ${ac_cv_prog_LIPO+:} false; then :
60676573 $as_echo_n "(cached) " >&6
60686574 else
60696575 if test -n "$LIPO"; then
60756581 IFS=$as_save_IFS
60766582 test -z "$as_dir" && as_dir=.
60776583 for ac_exec_ext in '' $ac_executable_extensions; do
6078 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6584 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
60796585 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
60806586 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
60816587 break 2
61036609 set dummy lipo; ac_word=$2
61046610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61056611 $as_echo_n "checking for $ac_word... " >&6; }
6106 if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
6612 if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
61076613 $as_echo_n "(cached) " >&6
61086614 else
61096615 if test -n "$ac_ct_LIPO"; then
61156621 IFS=$as_save_IFS
61166622 test -z "$as_dir" && as_dir=.
61176623 for ac_exec_ext in '' $ac_executable_extensions; do
6118 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61196625 ac_cv_prog_ac_ct_LIPO="lipo"
61206626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61216627 break 2
61556661 set dummy ${ac_tool_prefix}otool; ac_word=$2
61566662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61576663 $as_echo_n "checking for $ac_word... " >&6; }
6158 if test "${ac_cv_prog_OTOOL+set}" = set; then :
6664 if ${ac_cv_prog_OTOOL+:} false; then :
61596665 $as_echo_n "(cached) " >&6
61606666 else
61616667 if test -n "$OTOOL"; then
61676673 IFS=$as_save_IFS
61686674 test -z "$as_dir" && as_dir=.
61696675 for ac_exec_ext in '' $ac_executable_extensions; do
6170 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6676 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
61716677 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
61726678 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
61736679 break 2
61956701 set dummy otool; ac_word=$2
61966702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
61976703 $as_echo_n "checking for $ac_word... " >&6; }
6198 if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
6704 if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
61996705 $as_echo_n "(cached) " >&6
62006706 else
62016707 if test -n "$ac_ct_OTOOL"; then
62076713 IFS=$as_save_IFS
62086714 test -z "$as_dir" && as_dir=.
62096715 for ac_exec_ext in '' $ac_executable_extensions; do
6210 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6716 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62116717 ac_cv_prog_ac_ct_OTOOL="otool"
62126718 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62136719 break 2
62476753 set dummy ${ac_tool_prefix}otool64; ac_word=$2
62486754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62496755 $as_echo_n "checking for $ac_word... " >&6; }
6250 if test "${ac_cv_prog_OTOOL64+set}" = set; then :
6756 if ${ac_cv_prog_OTOOL64+:} false; then :
62516757 $as_echo_n "(cached) " >&6
62526758 else
62536759 if test -n "$OTOOL64"; then
62596765 IFS=$as_save_IFS
62606766 test -z "$as_dir" && as_dir=.
62616767 for ac_exec_ext in '' $ac_executable_extensions; do
6262 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6768 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62636769 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
62646770 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62656771 break 2
62876793 set dummy otool64; ac_word=$2
62886794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62896795 $as_echo_n "checking for $ac_word... " >&6; }
6290 if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
6796 if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
62916797 $as_echo_n "(cached) " >&6
62926798 else
62936799 if test -n "$ac_ct_OTOOL64"; then
62996805 IFS=$as_save_IFS
63006806 test -z "$as_dir" && as_dir=.
63016807 for ac_exec_ext in '' $ac_executable_extensions; do
6302 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6808 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63036809 ac_cv_prog_ac_ct_OTOOL64="otool64"
63046810 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63056811 break 2
63626868
63636869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
63646870 $as_echo_n "checking for -single_module linker flag... " >&6; }
6365 if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
6871 if ${lt_cv_apple_cc_single_mod+:} false; then :
63666872 $as_echo_n "(cached) " >&6
63676873 else
63686874 lt_cv_apple_cc_single_mod=no
63786884 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
63796885 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
63806886 _lt_result=$?
6381 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
6887 # If there is a non-empty error log, and "single_module"
6888 # appears in it, assume the flag caused a linker warning
6889 if test -s conftest.err && $GREP single_module conftest.err; then
6890 cat conftest.err >&5
6891 # Otherwise, if the output was created with a 0 exit code from
6892 # the compiler, it worked.
6893 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
63826894 lt_cv_apple_cc_single_mod=yes
63836895 else
63846896 cat conftest.err >&5
63896901 fi
63906902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
63916903 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
6904
63926905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
63936906 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
6394 if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
6907 if ${lt_cv_ld_exported_symbols_list+:} false; then :
63956908 $as_echo_n "(cached) " >&6
63966909 else
63976910 lt_cv_ld_exported_symbols_list=no
64216934 fi
64226935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
64236936 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
6937
6938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
6939 $as_echo_n "checking for -force_load linker flag... " >&6; }
6940 if ${lt_cv_ld_force_load+:} false; then :
6941 $as_echo_n "(cached) " >&6
6942 else
6943 lt_cv_ld_force_load=no
6944 cat > conftest.c << _LT_EOF
6945 int forced_loaded() { return 2;}
6946 _LT_EOF
6947 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
6948 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
6949 echo "$AR cru libconftest.a conftest.o" >&5
6950 $AR cru libconftest.a conftest.o 2>&5
6951 echo "$RANLIB libconftest.a" >&5
6952 $RANLIB libconftest.a 2>&5
6953 cat > conftest.c << _LT_EOF
6954 int main() { return 0;}
6955 _LT_EOF
6956 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
6957 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
6958 _lt_result=$?
6959 if test -s conftest.err && $GREP force_load conftest.err; then
6960 cat conftest.err >&5
6961 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
6962 lt_cv_ld_force_load=yes
6963 else
6964 cat conftest.err >&5
6965 fi
6966 rm -f conftest.err libconftest.a conftest conftest.c
6967 rm -rf conftest.dSYM
6968
6969 fi
6970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
6971 $as_echo "$lt_cv_ld_force_load" >&6; }
64246972 case $host_os in
64256973 rhapsody* | darwin1.[012])
64266974 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
64486996 else
64496997 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
64506998 fi
6451 if test "$DSYMUTIL" != ":"; then
6999 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
64527000 _lt_dsymutil='~$DSYMUTIL $lib || :'
64537001 else
64547002 _lt_dsymutil=
64687016 CPP=
64697017 fi
64707018 if test -z "$CPP"; then
6471 if test "${ac_cv_prog_CPP+set}" = set; then :
7019 if ${ac_cv_prog_CPP+:} false; then :
64727020 $as_echo_n "(cached) " >&6
64737021 else
64747022 # Double quotes because CPP needs to be expanded
65847132 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
65857133 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
65867134 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6587 See \`config.log' for more details" "$LINENO" 5 ; }
7135 See \`config.log' for more details" "$LINENO" 5; }
65887136 fi
65897137
65907138 ac_ext=c
65967144
65977145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
65987146 $as_echo_n "checking for ANSI C header files... " >&6; }
6599 if test "${ac_cv_header_stdc+set}" = set; then :
7147 if ${ac_cv_header_stdc+:} false; then :
66007148 $as_echo_n "(cached) " >&6
66017149 else
66027150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67277275 do :
67287276 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
67297277 "
6730 if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
7278 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
67317279 cat >>confdefs.h <<_ACEOF
67327280 #define HAVE_DLFCN_H 1
67337281 _ACEOF
67357283 fi
67367284
67377285 done
7286
7287
67387288
67397289
67407290
68137363
68147364 # Check whether --with-pic was given.
68157365 if test "${with_pic+set}" = set; then :
6816 withval=$with_pic; pic_mode="$withval"
7366 withval=$with_pic; lt_p=${PACKAGE-default}
7367 case $withval in
7368 yes|no) pic_mode=$withval ;;
7369 *)
7370 pic_mode=default
7371 # Look at the argument we got. We use all the common list separators.
7372 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7373 for lt_pkg in $withval; do
7374 IFS="$lt_save_ifs"
7375 if test "X$lt_pkg" = "X$lt_p"; then
7376 pic_mode=yes
7377 fi
7378 done
7379 IFS="$lt_save_ifs"
7380 ;;
7381 esac
68177382 else
68187383 pic_mode=default
68197384 fi
68907455
68917456
68927457
7458
7459
7460
7461
7462
68937463 test -z "$LN_S" && LN_S="ln -s"
68947464
68957465
69117481
69127482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
69137483 $as_echo_n "checking for objdir... " >&6; }
6914 if test "${lt_cv_objdir+set}" = set; then :
7484 if ${lt_cv_objdir+:} false; then :
69157485 $as_echo_n "(cached) " >&6
69167486 else
69177487 rm -f .libs 2>/dev/null
69357505 cat >>confdefs.h <<_ACEOF
69367506 #define LT_OBJDIR "$lt_cv_objdir/"
69377507 _ACEOF
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
69517508
69527509
69537510
69647521 ;;
69657522 esac
69667523
6967 # Sed substitution that helps us do robust quoting. It backslashifies
6968 # metacharacters that are still active within double-quoted strings.
6969 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
6970
6971 # Same as above, but do not quote variable references.
6972 double_quote_subst='s/\(["`\\]\)/\\\1/g'
6973
6974 # Sed substitution to delay expansion of an escaped shell variable in a
6975 # double_quote_subst'ed string.
6976 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6977
6978 # Sed substitution to delay expansion of an escaped single quote.
6979 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
6980
6981 # Sed substitution to avoid accidental globbing in evaled expressions
6982 no_glob_subst='s/\*/\\\*/g'
6983
69847524 # Global variables:
69857525 ofile=libtool
69867526 can_build_shared=yes
70097549 *) break;;
70107550 esac
70117551 done
7012 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
7552 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
70137553
70147554
70157555 # Only perform the check for file, if the check method requires it
70197559 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
70207560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
70217561 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
7022 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
7562 if ${lt_cv_path_MAGIC_CMD+:} false; then :
70237563 $as_echo_n "(cached) " >&6
70247564 else
70257565 case $MAGIC_CMD in
70857625 if test -n "$ac_tool_prefix"; then
70867626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
70877627 $as_echo_n "checking for file... " >&6; }
7088 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
7628 if ${lt_cv_path_MAGIC_CMD+:} false; then :
70897629 $as_echo_n "(cached) " >&6
70907630 else
70917631 case $MAGIC_CMD in
72147754 lt_prog_compiler_no_builtin_flag=
72157755
72167756 if test "$GCC" = yes; then
7217 lt_prog_compiler_no_builtin_flag=' -fno-builtin'
7757 case $cc_basename in
7758 nvcc*)
7759 lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
7760 *)
7761 lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
7762 esac
72187763
72197764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
72207765 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
7221 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
7766 if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
72227767 $as_echo_n "(cached) " >&6
72237768 else
72247769 lt_cv_prog_compiler_rtti_exceptions=no
72347779 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
72357780 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
72367781 -e 's:$: $lt_compiler_flag:'`
7237 (eval echo "\"\$as_me:7238: $lt_compile\"" >&5)
7782 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
72387783 (eval "$lt_compile" 2>conftest.err)
72397784 ac_status=$?
72407785 cat conftest.err >&5
7241 echo "$as_me:7242: \$? = $ac_status" >&5
7786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
72427787 if (exit $ac_status) && test -s "$ac_outfile"; then
72437788 # The compiler can only warn and ignore the option if not recognized
72447789 # So say no if there are warnings other than the usual output.
7245 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
7790 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
72467791 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
72477792 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
72487793 lt_cv_prog_compiler_rtti_exceptions=yes
72717816 lt_prog_compiler_pic=
72727817 lt_prog_compiler_static=
72737818
7274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
7275 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
72767819
72777820 if test "$GCC" = yes; then
72787821 lt_prog_compiler_wl='-Wl,'
73207863 lt_prog_compiler_pic='-fno-common'
73217864 ;;
73227865
7866 haiku*)
7867 # PIC is the default for Haiku.
7868 # The "-static" flag exists, but is broken.
7869 lt_prog_compiler_static=
7870 ;;
7871
73237872 hpux*)
73247873 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
73257874 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
73607909
73617910 *)
73627911 lt_prog_compiler_pic='-fPIC'
7912 ;;
7913 esac
7914
7915 case $cc_basename in
7916 nvcc*) # Cuda Compiler Driver 2.2
7917 lt_prog_compiler_wl='-Xlinker '
7918 if test -n "$lt_prog_compiler_pic"; then
7919 lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
7920 fi
73637921 ;;
73647922 esac
73657923 else
74037961 lt_prog_compiler_static='-non_shared'
74047962 ;;
74057963
7406 linux* | k*bsd*-gnu | kopensolaris*-gnu)
7964 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
74077965 case $cc_basename in
74087966 # old Intel for x86_64 which still supported -KPIC.
74097967 ecc*)
74247982 lt_prog_compiler_pic='--shared'
74257983 lt_prog_compiler_static='--static'
74267984 ;;
7427 pgcc* | pgf77* | pgf90* | pgf95*)
7985 nagfor*)
7986 # NAG Fortran compiler
7987 lt_prog_compiler_wl='-Wl,-Wl,,'
7988 lt_prog_compiler_pic='-PIC'
7989 lt_prog_compiler_static='-Bstatic'
7990 ;;
7991 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
74287992 # Portland Group compilers (*not* the Pentium gcc compiler,
74297993 # which looks to be a dead project)
74307994 lt_prog_compiler_wl='-Wl,'
74368000 # All Alpha code is PIC.
74378001 lt_prog_compiler_static='-non_shared'
74388002 ;;
7439 xl*)
7440 # IBM XL C 8.0/Fortran 10.1 on PPC
8003 xl* | bgxl* | bgf* | mpixl*)
8004 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
74418005 lt_prog_compiler_wl='-Wl,'
74428006 lt_prog_compiler_pic='-qpic'
74438007 lt_prog_compiler_static='-qstaticlink'
74448008 ;;
74458009 *)
74468010 case `$CC -V 2>&1 | sed 5q` in
8011 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
8012 # Sun Fortran 8.3 passes all unrecognized flags to the linker
8013 lt_prog_compiler_pic='-KPIC'
8014 lt_prog_compiler_static='-Bstatic'
8015 lt_prog_compiler_wl=''
8016 ;;
8017 *Sun\ F* | *Sun*Fortran*)
8018 lt_prog_compiler_pic='-KPIC'
8019 lt_prog_compiler_static='-Bstatic'
8020 lt_prog_compiler_wl='-Qoption ld '
8021 ;;
74478022 *Sun\ C*)
74488023 # Sun C 5.9
74498024 lt_prog_compiler_pic='-KPIC'
74508025 lt_prog_compiler_static='-Bstatic'
74518026 lt_prog_compiler_wl='-Wl,'
74528027 ;;
7453 *Sun\ F*)
7454 # Sun Fortran 8.3 passes all unrecognized flags to the linker
7455 lt_prog_compiler_pic='-KPIC'
8028 *Intel*\ [CF]*Compiler*)
8029 lt_prog_compiler_wl='-Wl,'
8030 lt_prog_compiler_pic='-fPIC'
8031 lt_prog_compiler_static='-static'
8032 ;;
8033 *Portland\ Group*)
8034 lt_prog_compiler_wl='-Wl,'
8035 lt_prog_compiler_pic='-fpic'
74568036 lt_prog_compiler_static='-Bstatic'
7457 lt_prog_compiler_wl=''
74588037 ;;
74598038 esac
74608039 ;;
74868065 lt_prog_compiler_pic='-KPIC'
74878066 lt_prog_compiler_static='-Bstatic'
74888067 case $cc_basename in
7489 f77* | f90* | f95*)
8068 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
74908069 lt_prog_compiler_wl='-Qoption ld ';;
74918070 *)
74928071 lt_prog_compiler_wl='-Wl,';;
75438122 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
75448123 ;;
75458124 esac
7546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
7547 $as_echo "$lt_prog_compiler_pic" >&6; }
7548
7549
7550
7551
7552
8125
8126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
8127 $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
8128 if ${lt_cv_prog_compiler_pic+:} false; then :
8129 $as_echo_n "(cached) " >&6
8130 else
8131 lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
8132 fi
8133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
8134 $as_echo "$lt_cv_prog_compiler_pic" >&6; }
8135 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
75538136
75548137 #
75558138 # Check to make sure the PIC flag actually works.
75578140 if test -n "$lt_prog_compiler_pic"; then
75588141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
75598142 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
7560 if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
8143 if ${lt_cv_prog_compiler_pic_works+:} false; then :
75618144 $as_echo_n "(cached) " >&6
75628145 else
75638146 lt_cv_prog_compiler_pic_works=no
75738156 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
75748157 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
75758158 -e 's:$: $lt_compiler_flag:'`
7576 (eval echo "\"\$as_me:7577: $lt_compile\"" >&5)
8159 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
75778160 (eval "$lt_compile" 2>conftest.err)
75788161 ac_status=$?
75798162 cat conftest.err >&5
7580 echo "$as_me:7581: \$? = $ac_status" >&5
8163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
75818164 if (exit $ac_status) && test -s "$ac_outfile"; then
75828165 # The compiler can only warn and ignore the option if not recognized
75838166 # So say no if there are warnings other than the usual output.
7584 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
8167 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
75858168 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
75868169 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
75878170 lt_cv_prog_compiler_pic_works=yes
76108193
76118194
76128195
8196
8197
8198
8199
8200
76138201 #
76148202 # Check to make sure the static flag actually works.
76158203 #
76168204 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
76178205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
76188206 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
7619 if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
8207 if ${lt_cv_prog_compiler_static_works+:} false; then :
76208208 $as_echo_n "(cached) " >&6
76218209 else
76228210 lt_cv_prog_compiler_static_works=no
76298217 if test -s conftest.err; then
76308218 # Append any errors to the config.log.
76318219 cat conftest.err 1>&5
7632 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
8220 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
76338221 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
76348222 if diff conftest.exp conftest.er2 >/dev/null; then
76358223 lt_cv_prog_compiler_static_works=yes
76598247
76608248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
76618249 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
7662 if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
8250 if ${lt_cv_prog_compiler_c_o+:} false; then :
76638251 $as_echo_n "(cached) " >&6
76648252 else
76658253 lt_cv_prog_compiler_c_o=no
76788266 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
76798267 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
76808268 -e 's:$: $lt_compiler_flag:'`
7681 (eval echo "\"\$as_me:7682: $lt_compile\"" >&5)
8269 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
76828270 (eval "$lt_compile" 2>out/conftest.err)
76838271 ac_status=$?
76848272 cat out/conftest.err >&5
7685 echo "$as_me:7686: \$? = $ac_status" >&5
8273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
76868274 if (exit $ac_status) && test -s out/conftest2.$ac_objext
76878275 then
76888276 # The compiler can only warn and ignore the option if not recognized
76898277 # So say no if there are warnings
7690 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
8278 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
76918279 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
76928280 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
76938281 lt_cv_prog_compiler_c_o=yes
77148302
77158303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
77168304 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
7717 if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
8305 if ${lt_cv_prog_compiler_c_o+:} false; then :
77188306 $as_echo_n "(cached) " >&6
77198307 else
77208308 lt_cv_prog_compiler_c_o=no
77338321 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
77348322 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
77358323 -e 's:$: $lt_compiler_flag:'`
7736 (eval echo "\"\$as_me:7737: $lt_compile\"" >&5)
8324 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
77378325 (eval "$lt_compile" 2>out/conftest.err)
77388326 ac_status=$?
77398327 cat out/conftest.err >&5
7740 echo "$as_me:7741: \$? = $ac_status" >&5
8328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
77418329 if (exit $ac_status) && test -s out/conftest2.$ac_objext
77428330 then
77438331 # The compiler can only warn and ignore the option if not recognized
77448332 # So say no if there are warnings
7745 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
8333 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
77468334 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
77478335 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
77488336 lt_cv_prog_compiler_c_o=yes
78088396 hardcode_direct=no
78098397 hardcode_direct_absolute=no
78108398 hardcode_libdir_flag_spec=
7811 hardcode_libdir_flag_spec_ld=
78128399 hardcode_libdir_separator=
78138400 hardcode_minus_L=no
78148401 hardcode_shlibpath_var=unsupported
78528439 openbsd*)
78538440 with_gnu_ld=no
78548441 ;;
7855 linux* | k*bsd*-gnu)
8442 linux* | k*bsd*-gnu | gnu*)
78568443 link_all_deplibs=no
78578444 ;;
78588445 esac
78598446
78608447 ld_shlibs=yes
8448
8449 # On some targets, GNU ld is compatible enough with the native linker
8450 # that we're better off using the native interface for both.
8451 lt_use_gnu_ld_interface=no
78618452 if test "$with_gnu_ld" = yes; then
8453 case $host_os in
8454 aix*)
8455 # The AIX port of GNU ld has always aspired to compatibility
8456 # with the native linker. However, as the warning in the GNU ld
8457 # block says, versions before 2.19.5* couldn't really create working
8458 # shared libraries, regardless of the interface used.
8459 case `$LD -v 2>&1` in
8460 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
8461 *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
8462 *\ \(GNU\ Binutils\)\ [3-9]*) ;;
8463 *)
8464 lt_use_gnu_ld_interface=yes
8465 ;;
8466 esac
8467 ;;
8468 *)
8469 lt_use_gnu_ld_interface=yes
8470 ;;
8471 esac
8472 fi
8473
8474 if test "$lt_use_gnu_ld_interface" = yes; then
78628475 # If archive_cmds runs LD, not CC, wlarc should be empty
78638476 wlarc='${wl}'
78648477
78928505 ld_shlibs=no
78938506 cat <<_LT_EOF 1>&2
78948507
7895 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
8508 *** Warning: the GNU linker, at least up to release 2.19, is reported
78968509 *** to be unable to reliably create shared libraries on AIX.
78978510 *** Therefore, libtool is disabling shared libraries support. If you
7898 *** really care for shared libraries, you may want to modify your PATH
7899 *** so that a non-GNU linker is found, and then restart.
8511 *** really care for shared libraries, you may want to install binutils
8512 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
8513 *** You will then need to restart the configuration process.
79008514
79018515 _LT_EOF
79028516 fi
79328546 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
79338547 # as there is no search path for DLLs.
79348548 hardcode_libdir_flag_spec='-L$libdir'
8549 export_dynamic_flag_spec='${wl}--export-all-symbols'
79358550 allow_undefined_flag=unsupported
79368551 always_export_symbols=no
79378552 enable_shared_with_static_runtimes=yes
7938 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
8553 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
8554 exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
79398555
79408556 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
79418557 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
79538569 fi
79548570 ;;
79558571
8572 haiku*)
8573 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8574 link_all_deplibs=yes
8575 ;;
8576
79568577 interix[3-9]*)
79578578 hardcode_direct=no
79588579 hardcode_shlibpath_var=no
79788599 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
79798600 && test "$tmp_diet" = no
79808601 then
7981 tmp_addflag=
8602 tmp_addflag=' $pic_flag'
79828603 tmp_sharedflag='-shared'
79838604 case $cc_basename,$host_cpu in
79848605 pgcc*) # Portland Group C compiler
7985 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
8606 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
79868607 tmp_addflag=' $pic_flag'
79878608 ;;
7988 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
7989 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
8609 pgf77* | pgf90* | pgf95* | pgfortran*)
8610 # Portland Group f77 and f90 compilers
8611 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
79908612 tmp_addflag=' $pic_flag -Mnomain' ;;
79918613 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
79928614 tmp_addflag=' -i_dynamic' ;;
79978619 lf95*) # Lahey Fortran 8.1
79988620 whole_archive_flag_spec=
79998621 tmp_sharedflag='--shared' ;;
8000 xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
8622 xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
80018623 tmp_sharedflag='-qmkshrobj'
80028624 tmp_addflag= ;;
8625 nvcc*) # Cuda Compiler Driver 2.2
8626 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
8627 compiler_needs_object=yes
8628 ;;
80038629 esac
80048630 case `$CC -V 2>&1 | sed 5q` in
80058631 *Sun\ C*) # Sun C 5.9
8006 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
8632 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
80078633 compiler_needs_object=yes
80088634 tmp_sharedflag='-G' ;;
80098635 *Sun\ F*) # Sun Fortran 8.3
80198645 fi
80208646
80218647 case $cc_basename in
8022 xlf*)
8648 xlf* | bgf* | bgxlf* | mpixlf*)
80238649 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
80248650 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
8025 hardcode_libdir_flag_spec=
8026 hardcode_libdir_flag_spec_ld='-rpath $libdir'
8027 archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
8651 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8652 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
80288653 if test "x$supports_anon_versioning" = xyes; then
80298654 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
80308655 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
80318656 echo "local: *; };" >> $output_objdir/$libname.ver~
8032 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
8657 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
80338658 fi
80348659 ;;
80358660 esac
80438668 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
80448669 wlarc=
80458670 else
8046 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8047 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8671 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8672 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
80488673 fi
80498674 ;;
80508675
80628687
80638688 _LT_EOF
80648689 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8065 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8066 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8690 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8691 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
80678692 else
80688693 ld_shlibs=no
80698694 fi
81098734
81108735 *)
81118736 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8112 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8113 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8737 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8738 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
81148739 else
81158740 ld_shlibs=no
81168741 fi
81508775 else
81518776 # If we're using GNU nm, then we don't want the "-C" option.
81528777 # -C means demangle to AIX nm, but means don't demangle with GNU nm
8778 # Also, AIX nm treats weak defined symbols like other global
8779 # defined symbols, whereas GNU nm marks them as "W".
81538780 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
8154 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
8781 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
81558782 else
81568783 export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
81578784 fi
82398866 allow_undefined_flag='-berok'
82408867 # Determine the default libpath from the value encoded in an
82418868 # empty executable.
8242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8869 if test "${lt_cv_aix_libpath+set}" = set; then
8870 aix_libpath=$lt_cv_aix_libpath
8871 else
8872 if ${lt_cv_aix_libpath_+:} false; then :
8873 $as_echo_n "(cached) " >&6
8874 else
8875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
82438876 /* end confdefs.h. */
82448877
82458878 int
82528885 _ACEOF
82538886 if ac_fn_c_try_link "$LINENO"; then :
82548887
8255 lt_aix_libpath_sed='
8256 /Import File Strings/,/^$/ {
8257 /^0/ {
8258 s/^0 *\(.*\)$/\1/
8259 p
8260 }
8261 }'
8262 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8263 # Check for a 64-bit object if we didn't find anything.
8264 if test -z "$aix_libpath"; then
8265 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8266 fi
8888 lt_aix_libpath_sed='
8889 /Import File Strings/,/^$/ {
8890 /^0/ {
8891 s/^0 *\([^ ]*\) *$/\1/
8892 p
8893 }
8894 }'
8895 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8896 # Check for a 64-bit object if we didn't find anything.
8897 if test -z "$lt_cv_aix_libpath_"; then
8898 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8899 fi
82678900 fi
82688901 rm -f core conftest.err conftest.$ac_objext \
82698902 conftest$ac_exeext conftest.$ac_ext
8270 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8903 if test -z "$lt_cv_aix_libpath_"; then
8904 lt_cv_aix_libpath_="/usr/lib:/lib"
8905 fi
8906
8907 fi
8908
8909 aix_libpath=$lt_cv_aix_libpath_
8910 fi
82718911
82728912 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8273 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8913 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
82748914 else
82758915 if test "$host_cpu" = ia64; then
82768916 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
82798919 else
82808920 # Determine the default libpath from the value encoded in an
82818921 # empty executable.
8282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8922 if test "${lt_cv_aix_libpath+set}" = set; then
8923 aix_libpath=$lt_cv_aix_libpath
8924 else
8925 if ${lt_cv_aix_libpath_+:} false; then :
8926 $as_echo_n "(cached) " >&6
8927 else
8928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
82838929 /* end confdefs.h. */
82848930
82858931 int
82928938 _ACEOF
82938939 if ac_fn_c_try_link "$LINENO"; then :
82948940
8295 lt_aix_libpath_sed='
8296 /Import File Strings/,/^$/ {
8297 /^0/ {
8298 s/^0 *\(.*\)$/\1/
8299 p
8300 }
8301 }'
8302 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8303 # Check for a 64-bit object if we didn't find anything.
8304 if test -z "$aix_libpath"; then
8305 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8306 fi
8941 lt_aix_libpath_sed='
8942 /Import File Strings/,/^$/ {
8943 /^0/ {
8944 s/^0 *\([^ ]*\) *$/\1/
8945 p
8946 }
8947 }'
8948 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8949 # Check for a 64-bit object if we didn't find anything.
8950 if test -z "$lt_cv_aix_libpath_"; then
8951 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8952 fi
83078953 fi
83088954 rm -f core conftest.err conftest.$ac_objext \
83098955 conftest$ac_exeext conftest.$ac_ext
8310 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8956 if test -z "$lt_cv_aix_libpath_"; then
8957 lt_cv_aix_libpath_="/usr/lib:/lib"
8958 fi
8959
8960 fi
8961
8962 aix_libpath=$lt_cv_aix_libpath_
8963 fi
83118964
83128965 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
83138966 # Warning - without using the other run time loading flags,
83148967 # -berok will link without error, but may produce a broken library.
83158968 no_undefined_flag=' ${wl}-bernotok'
83168969 allow_undefined_flag=' ${wl}-berok'
8317 # Exported symbols can be pulled into shared objects from archives
8318 whole_archive_flag_spec='$convenience'
8970 if test "$with_gnu_ld" = yes; then
8971 # We only use this code for GNU lds that support --whole-archive.
8972 whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8973 else
8974 # Exported symbols can be pulled into shared objects from archives
8975 whole_archive_flag_spec='$convenience'
8976 fi
83198977 archive_cmds_need_lc=yes
83208978 # This is similar to how AIX traditionally builds its shared libraries.
83218979 archive_expsym_cmds="\$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'
83479005 # Microsoft Visual C++.
83489006 # hardcode_libdir_flag_spec is actually meaningless, as there is
83499007 # no search path for DLLs.
8350 hardcode_libdir_flag_spec=' '
8351 allow_undefined_flag=unsupported
8352 # Tell ltmain to make .lib files, not .a files.
8353 libext=lib
8354 # Tell ltmain to make .dll files, not .so files.
8355 shrext_cmds=".dll"
8356 # FIXME: Setting linknames here is a bad hack.
8357 archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
8358 # The linker will automatically build a .lib file if we build a DLL.
8359 old_archive_from_new_cmds='true'
8360 # FIXME: Should let the user specify the lib program.
8361 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
8362 fix_srcfile_path='`cygpath -w "$srcfile"`'
8363 enable_shared_with_static_runtimes=yes
9008 case $cc_basename in
9009 cl*)
9010 # Native MSVC
9011 hardcode_libdir_flag_spec=' '
9012 allow_undefined_flag=unsupported
9013 always_export_symbols=yes
9014 file_list_spec='@'
9015 # Tell ltmain to make .lib files, not .a files.
9016 libext=lib
9017 # Tell ltmain to make .dll files, not .so files.
9018 shrext_cmds=".dll"
9019 # FIXME: Setting linknames here is a bad hack.
9020 archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
9021 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
9022 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
9023 else
9024 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
9025 fi~
9026 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
9027 linknames='
9028 # The linker will not automatically build a static lib if we build a DLL.
9029 # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
9030 enable_shared_with_static_runtimes=yes
9031 exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
9032 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
9033 # Don't use ranlib
9034 old_postinstall_cmds='chmod 644 $oldlib'
9035 postlink_cmds='lt_outputfile="@OUTPUT@"~
9036 lt_tool_outputfile="@TOOL_OUTPUT@"~
9037 case $lt_outputfile in
9038 *.exe|*.EXE) ;;
9039 *)
9040 lt_outputfile="$lt_outputfile.exe"
9041 lt_tool_outputfile="$lt_tool_outputfile.exe"
9042 ;;
9043 esac~
9044 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
9045 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
9046 $RM "$lt_outputfile.manifest";
9047 fi'
9048 ;;
9049 *)
9050 # Assume MSVC wrapper
9051 hardcode_libdir_flag_spec=' '
9052 allow_undefined_flag=unsupported
9053 # Tell ltmain to make .lib files, not .a files.
9054 libext=lib
9055 # Tell ltmain to make .dll files, not .so files.
9056 shrext_cmds=".dll"
9057 # FIXME: Setting linknames here is a bad hack.
9058 archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
9059 # The linker will automatically build a .lib file if we build a DLL.
9060 old_archive_from_new_cmds='true'
9061 # FIXME: Should let the user specify the lib program.
9062 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
9063 enable_shared_with_static_runtimes=yes
9064 ;;
9065 esac
83649066 ;;
83659067
83669068 darwin* | rhapsody*)
83709072 hardcode_direct=no
83719073 hardcode_automatic=yes
83729074 hardcode_shlibpath_var=unsupported
8373 whole_archive_flag_spec=''
9075 if test "$lt_cv_ld_force_load" = "yes"; then
9076 whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
9077
9078 else
9079 whole_archive_flag_spec=''
9080 fi
83749081 link_all_deplibs=yes
83759082 allow_undefined_flag="$_lt_dar_allow_undefined"
83769083 case $cc_basename in
83789085 *) _lt_dar_can_shared=$GCC ;;
83799086 esac
83809087 if test "$_lt_dar_can_shared" = "yes"; then
8381 output_verbose_link_cmd=echo
9088 output_verbose_link_cmd=func_echo_all
83829089 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
83839090 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
83849091 archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
83949101 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
83959102 hardcode_libdir_flag_spec='-L$libdir'
83969103 hardcode_shlibpath_var=no
8397 ;;
8398
8399 freebsd1*)
8400 ld_shlibs=no
84019104 ;;
84029105
84039106 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
84129115 ;;
84139116
84149117 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
8415 freebsd2*)
9118 freebsd2.*)
84169119 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
84179120 hardcode_direct=yes
84189121 hardcode_minus_L=yes
84219124
84229125 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
84239126 freebsd* | dragonfly*)
8424 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
9127 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
84259128 hardcode_libdir_flag_spec='-R$libdir'
84269129 hardcode_direct=yes
84279130 hardcode_shlibpath_var=no
84299132
84309133 hpux9*)
84319134 if test "$GCC" = yes; then
8432 archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
9135 archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
84339136 else
84349137 archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
84359138 fi
84449147 ;;
84459148
84469149 hpux10*)
8447 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8448 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9150 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
9151 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
84499152 else
84509153 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
84519154 fi
84529155 if test "$with_gnu_ld" = no; then
84539156 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8454 hardcode_libdir_flag_spec_ld='+b $libdir'
84559157 hardcode_libdir_separator=:
84569158 hardcode_direct=yes
84579159 hardcode_direct_absolute=yes
84639165 ;;
84649166
84659167 hpux11*)
8466 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
9168 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
84679169 case $host_cpu in
84689170 hppa*64*)
84699171 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
84709172 ;;
84719173 ia64*)
8472 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
9174 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
84739175 ;;
84749176 *)
8475 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9177 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
84769178 ;;
84779179 esac
84789180 else
84849186 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
84859187 ;;
84869188 *)
8487 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9189
9190 # Older versions of the 11.00 compiler do not understand -b yet
9191 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
9192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
9193 $as_echo_n "checking if $CC understands -b... " >&6; }
9194 if ${lt_cv_prog_compiler__b+:} false; then :
9195 $as_echo_n "(cached) " >&6
9196 else
9197 lt_cv_prog_compiler__b=no
9198 save_LDFLAGS="$LDFLAGS"
9199 LDFLAGS="$LDFLAGS -b"
9200 echo "$lt_simple_link_test_code" > conftest.$ac_ext
9201 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
9202 # The linker can only warn and ignore the option if not recognized
9203 # So say no if there are warnings
9204 if test -s conftest.err; then
9205 # Append any errors to the config.log.
9206 cat conftest.err 1>&5
9207 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
9208 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
9209 if diff conftest.exp conftest.er2 >/dev/null; then
9210 lt_cv_prog_compiler__b=yes
9211 fi
9212 else
9213 lt_cv_prog_compiler__b=yes
9214 fi
9215 fi
9216 $RM -r conftest*
9217 LDFLAGS="$save_LDFLAGS"
9218
9219 fi
9220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
9221 $as_echo "$lt_cv_prog_compiler__b" >&6; }
9222
9223 if test x"$lt_cv_prog_compiler__b" = xyes; then
9224 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9225 else
9226 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9227 fi
9228
84889229 ;;
84899230 esac
84909231 fi
85129253
85139254 irix5* | irix6* | nonstopux*)
85149255 if test "$GCC" = yes; then
8515 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9256 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
85169257 # Try to use the -exported_symbol ld option, if it does not
85179258 # work, assume that -exports_file does not work either and
85189259 # implicitly export all symbols.
8519 save_LDFLAGS="$LDFLAGS"
8520 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
8521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9260 # This should be the same for all languages, so no per-tag cache variable.
9261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
9262 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
9263 if ${lt_cv_irix_exported_symbol+:} false; then :
9264 $as_echo_n "(cached) " >&6
9265 else
9266 save_LDFLAGS="$LDFLAGS"
9267 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
9268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
85229269 /* end confdefs.h. */
8523 int foo(void) {}
9270 int foo (void) { return 0; }
85249271 _ACEOF
85259272 if ac_fn_c_try_link "$LINENO"; then :
8526 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
8527
9273 lt_cv_irix_exported_symbol=yes
9274 else
9275 lt_cv_irix_exported_symbol=no
85289276 fi
85299277 rm -f core conftest.err conftest.$ac_objext \
85309278 conftest$ac_exeext conftest.$ac_ext
8531 LDFLAGS="$save_LDFLAGS"
9279 LDFLAGS="$save_LDFLAGS"
9280 fi
9281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
9282 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
9283 if test "$lt_cv_irix_exported_symbol" = yes; then
9284 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
9285 fi
85329286 else
8533 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
8534 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
9287 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
9288 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
85359289 fi
85369290 archive_cmds_need_lc='no'
85379291 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
85939347 hardcode_libdir_flag_spec='-L$libdir'
85949348 hardcode_minus_L=yes
85959349 allow_undefined_flag=unsupported
8596 archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
9350 archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
85979351 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
85989352 ;;
85999353
86009354 osf3*)
86019355 if test "$GCC" = yes; then
86029356 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8603 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9357 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
86049358 else
86059359 allow_undefined_flag=' -expect_unresolved \*'
8606 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
9360 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
86079361 fi
86089362 archive_cmds_need_lc='no'
86099363 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
86139367 osf4* | osf5*) # as osf3* with the addition of -msym flag
86149368 if test "$GCC" = yes; then
86159369 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8616 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9370 archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
86179371 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
86189372 else
86199373 allow_undefined_flag=' -expect_unresolved \*'
8620 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
9374 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
86219375 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
8622 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
9376 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
86239377
86249378 # Both c and cxx compiler support -rpath directly
86259379 hardcode_libdir_flag_spec='-rpath $libdir'
86329386 no_undefined_flag=' -z defs'
86339387 if test "$GCC" = yes; then
86349388 wlarc='${wl}'
8635 archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9389 archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
86369390 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8637 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
9391 $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
86389392 else
86399393 case `$CC -V 2>&1` in
86409394 *"Compilers 5.0"*)
88229576 # to ld, don't add -lc before -lgcc.
88239577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
88249578 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
8825 $RM conftest*
8826 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8827
8828 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9579 if ${lt_cv_archive_cmds_need_lc+:} false; then :
9580 $as_echo_n "(cached) " >&6
9581 else
9582 $RM conftest*
9583 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9584
9585 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
88299586 (eval $ac_compile) 2>&5
88309587 ac_status=$?
88319588 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
88329589 test $ac_status = 0; } 2>conftest.err; then
8833 soname=conftest
8834 lib=conftest
8835 libobjs=conftest.$ac_objext
8836 deplibs=
8837 wl=$lt_prog_compiler_wl
8838 pic_flag=$lt_prog_compiler_pic
8839 compiler_flags=-v
8840 linker_flags=-v
8841 verstring=
8842 output_objdir=.
8843 libname=conftest
8844 lt_save_allow_undefined_flag=$allow_undefined_flag
8845 allow_undefined_flag=
8846 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
9590 soname=conftest
9591 lib=conftest
9592 libobjs=conftest.$ac_objext
9593 deplibs=
9594 wl=$lt_prog_compiler_wl
9595 pic_flag=$lt_prog_compiler_pic
9596 compiler_flags=-v
9597 linker_flags=-v
9598 verstring=
9599 output_objdir=.
9600 libname=conftest
9601 lt_save_allow_undefined_flag=$allow_undefined_flag
9602 allow_undefined_flag=
9603 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
88479604 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
88489605 ac_status=$?
88499606 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
88509607 test $ac_status = 0; }
8851 then
8852 archive_cmds_need_lc=no
8853 else
8854 archive_cmds_need_lc=yes
8855 fi
8856 allow_undefined_flag=$lt_save_allow_undefined_flag
8857 else
8858 cat conftest.err 1>&5
8859 fi
8860 $RM conftest*
8861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
8862 $as_echo "$archive_cmds_need_lc" >&6; }
9608 then
9609 lt_cv_archive_cmds_need_lc=no
9610 else
9611 lt_cv_archive_cmds_need_lc=yes
9612 fi
9613 allow_undefined_flag=$lt_save_allow_undefined_flag
9614 else
9615 cat conftest.err 1>&5
9616 fi
9617 $RM conftest*
9618
9619 fi
9620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
9621 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
9622 archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
88639623 ;;
88649624 esac
88659625 fi
90179777
90189778
90199779
9020
9021
9022
9023
9024
90259780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
90269781 $as_echo_n "checking dynamic linker characteristics... " >&6; }
90279782
90309785 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
90319786 *) lt_awk_arg="/^libraries:/" ;;
90329787 esac
9033 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9034 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
9788 case $host_os in
9789 mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
9790 *) lt_sed_strip_eq="s,=/,/,g" ;;
9791 esac
9792 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
9793 case $lt_search_path_spec in
9794 *\;*)
90359795 # if the path contains ";" then we assume it to be the separator
90369796 # otherwise default to the standard path separator (i.e. ":") - it is
90379797 # assumed that no part of a normal pathname contains ";" but that should
90389798 # okay in the real world where ";" in dirpaths is itself problematic.
9039 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
9040 else
9041 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
9042 fi
9799 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
9800 ;;
9801 *)
9802 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
9803 ;;
9804 esac
90439805 # Ok, now we have the path, separated by spaces, we can step through it
90449806 # and add multilib dir if necessary.
90459807 lt_tmp_lt_search_path_spec=
90529814 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
90539815 fi
90549816 done
9055 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
9817 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
90569818 BEGIN {RS=" "; FS="/|\n";} {
90579819 lt_foo="";
90589820 lt_count=0;
90729834 if (lt_foo != "") { lt_freq[lt_foo]++; }
90739835 if (lt_freq[lt_foo] == 1) { print lt_foo; }
90749836 }'`
9075 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
9837 # AWK program above erroneously prepends '/' to C:/dos/paths
9838 # for these hosts.
9839 case $host_os in
9840 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
9841 $SED 's,/\([A-Za-z]:\),\1,g'` ;;
9842 esac
9843 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
90769844 else
90779845 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
90789846 fi
90989866
90999867 case $host_os in
91009868 aix3*)
9101 version_type=linux
9869 version_type=linux # correct to gnu/linux during the next big refactor
91029870 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
91039871 shlibpath_var=LIBPATH
91049872
91079875 ;;
91089876
91099877 aix[4-9]*)
9110 version_type=linux
9878 version_type=linux # correct to gnu/linux during the next big refactor
91119879 need_lib_prefix=no
91129880 need_version=no
91139881 hardcode_into_libs=yes
91609928 m68k)
91619929 library_names_spec='$libname.ixlibrary $libname.a'
91629930 # Create ${libname}_ixlibrary.a entries in /sys/libs.
9163 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
9931 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
91649932 ;;
91659933 esac
91669934 ;;
91729940 ;;
91739941
91749942 bsdi[45]*)
9175 version_type=linux
9943 version_type=linux # correct to gnu/linux during the next big refactor
91769944 need_version=no
91779945 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
91789946 soname_spec='${libname}${release}${shared_ext}$major'
91919959 need_version=no
91929960 need_lib_prefix=no
91939961
9194 case $GCC,$host_os in
9195 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
9962 case $GCC,$cc_basename in
9963 yes,*)
9964 # gcc
91969965 library_names_spec='$libname.dll.a'
91979966 # DLL is installed to $(libdir)/../bin by postinstall_cmds
91989967 postinstall_cmds='base_file=`basename \${file}`~
92139982 cygwin*)
92149983 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
92159984 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9216 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
9985
9986 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
92179987 ;;
92189988 mingw* | cegcc*)
92199989 # MinGW DLLs use traditional 'lib' prefix
92209990 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9221 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9222 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
9223 # It is most probably a Windows format PATH printed by
9224 # mingw gcc, but we are running on Cygwin. Gcc prints its search
9225 # path with ; separators, and with drive letters. We can handle the
9226 # drive letters (cygwin fileutils understands them), so leave them,
9227 # especially as we might pass files found there to a mingw objdump,
9228 # which wouldn't understand a cygwinified path. Ahh.
9229 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9230 else
9231 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
9232 fi
92339991 ;;
92349992 pw32*)
92359993 # pw32 DLLs use 'pw' prefix rather than 'lib'
92369994 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
92379995 ;;
92389996 esac
9997 dynamic_linker='Win32 ld.exe'
92399998 ;;
92409999
10000 *,cl*)
10001 # Native MSVC
10002 libname_spec='$name'
10003 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10004 library_names_spec='${libname}.dll.lib'
10005
10006 case $build_os in
10007 mingw*)
10008 sys_lib_search_path_spec=
10009 lt_save_ifs=$IFS
10010 IFS=';'
10011 for lt_path in $LIB
10012 do
10013 IFS=$lt_save_ifs
10014 # Let DOS variable expansion print the short 8.3 style file name.
10015 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
10016 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
10017 done
10018 IFS=$lt_save_ifs
10019 # Convert to MSYS style.
10020 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
10021 ;;
10022 cygwin*)
10023 # Convert to unix form, then to dos form, then back to unix form
10024 # but this time dos style (no spaces!) so that the unix form looks
10025 # like /cygdrive/c/PROGRA~1:/cygdr...
10026 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
10027 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
10028 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
10029 ;;
10030 *)
10031 sys_lib_search_path_spec="$LIB"
10032 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
10033 # It is most probably a Windows format PATH.
10034 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
10035 else
10036 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
10037 fi
10038 # FIXME: find the short name or the path components, as spaces are
10039 # common. (e.g. "Program Files" -> "PROGRA~1")
10040 ;;
10041 esac
10042
10043 # DLL is installed to $(libdir)/../bin by postinstall_cmds
10044 postinstall_cmds='base_file=`basename \${file}`~
10045 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
10046 dldir=$destdir/`dirname \$dlpath`~
10047 test -d \$dldir || mkdir -p \$dldir~
10048 $install_prog $dir/$dlname \$dldir/$dlname'
10049 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
10050 dlpath=$dir/\$dldll~
10051 $RM \$dlpath'
10052 shlibpath_overrides_runpath=yes
10053 dynamic_linker='Win32 link.exe'
10054 ;;
10055
924110056 *)
10057 # Assume MSVC wrapper
924210058 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
10059 dynamic_linker='Win32 ld.exe'
924310060 ;;
924410061 esac
9245 dynamic_linker='Win32 ld.exe'
924610062 # FIXME: first we should search . and the directory the executable is in
924710063 shlibpath_var=PATH
924810064 ;;
926310079 ;;
926410080
926510081 dgux*)
9266 version_type=linux
10082 version_type=linux # correct to gnu/linux during the next big refactor
926710083 need_lib_prefix=no
926810084 need_version=no
926910085 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
927010086 soname_spec='${libname}${release}${shared_ext}$major'
927110087 shlibpath_var=LD_LIBRARY_PATH
9272 ;;
9273
9274 freebsd1*)
9275 dynamic_linker=no
927610088 ;;
927710089
927810090 freebsd* | dragonfly*)
928210094 objformat=`/usr/bin/objformat`
928310095 else
928410096 case $host_os in
9285 freebsd[123]*) objformat=aout ;;
10097 freebsd[23].*) objformat=aout ;;
928610098 *) objformat=elf ;;
928710099 esac
928810100 fi
930010112 esac
930110113 shlibpath_var=LD_LIBRARY_PATH
930210114 case $host_os in
9303 freebsd2*)
10115 freebsd2.*)
930410116 shlibpath_overrides_runpath=yes
930510117 ;;
930610118 freebsd3.[01]* | freebsdelf3.[01]*)
931910131 esac
932010132 ;;
932110133
9322 gnu*)
9323 version_type=linux
10134 haiku*)
10135 version_type=linux # correct to gnu/linux during the next big refactor
932410136 need_lib_prefix=no
932510137 need_version=no
10138 dynamic_linker="$host_os runtime_loader"
932610139 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
932710140 soname_spec='${libname}${release}${shared_ext}$major'
9328 shlibpath_var=LD_LIBRARY_PATH
10141 shlibpath_var=LIBRARY_PATH
10142 shlibpath_overrides_runpath=yes
10143 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
932910144 hardcode_into_libs=yes
933010145 ;;
933110146
937110186 soname_spec='${libname}${release}${shared_ext}$major'
937210187 ;;
937310188 esac
9374 # HP-UX runs *really* slowly unless shared libraries are mode 555.
10189 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
937510190 postinstall_cmds='chmod 555 $lib'
10191 # or fails outright, so override atomically:
10192 install_override_mode=555
937610193 ;;
937710194
937810195 interix[3-9]*)
9379 version_type=linux
10196 version_type=linux # correct to gnu/linux during the next big refactor
938010197 need_lib_prefix=no
938110198 need_version=no
938210199 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
939210209 nonstopux*) version_type=nonstopux ;;
939310210 *)
939410211 if test "$lt_cv_prog_gnu_ld" = yes; then
9395 version_type=linux
10212 version_type=linux # correct to gnu/linux during the next big refactor
939610213 else
939710214 version_type=irix
939810215 fi ;;
942910246 dynamic_linker=no
943010247 ;;
943110248
9432 # This must be Linux ELF.
9433 linux* | k*bsd*-gnu | kopensolaris*-gnu)
9434 version_type=linux
10249 # This must be glibc/ELF.
10250 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
10251 version_type=linux # correct to gnu/linux during the next big refactor
943510252 need_lib_prefix=no
943610253 need_version=no
943710254 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
943910256 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
944010257 shlibpath_var=LD_LIBRARY_PATH
944110258 shlibpath_overrides_runpath=no
10259
944210260 # Some binutils ld are patched to set DT_RUNPATH
9443 save_LDFLAGS=$LDFLAGS
9444 save_libdir=$libdir
9445 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
9446 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
9447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10261 if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
10262 $as_echo_n "(cached) " >&6
10263 else
10264 lt_cv_shlibpath_overrides_runpath=no
10265 save_LDFLAGS=$LDFLAGS
10266 save_libdir=$libdir
10267 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
10268 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
10269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
944810270 /* end confdefs.h. */
944910271
945010272 int
945710279 _ACEOF
945810280 if ac_fn_c_try_link "$LINENO"; then :
945910281 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
9460 shlibpath_overrides_runpath=yes
10282 lt_cv_shlibpath_overrides_runpath=yes
946110283 fi
946210284 fi
946310285 rm -f core conftest.err conftest.$ac_objext \
946410286 conftest$ac_exeext conftest.$ac_ext
9465 LDFLAGS=$save_LDFLAGS
9466 libdir=$save_libdir
10287 LDFLAGS=$save_LDFLAGS
10288 libdir=$save_libdir
10289
10290 fi
10291
10292 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
946710293
946810294 # This implies no fast_install, which is unacceptable.
946910295 # Some rework will be needed to allow for fast_install
947210298
947310299 # Append ld.so.conf contents to the search path
947410300 if test -f /etc/ld.so.conf; then
9475 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
10301 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
947610302 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
947710303 fi
947810304
951610342 ;;
951710343
951810344 newsos6)
9519 version_type=linux
10345 version_type=linux # correct to gnu/linux during the next big refactor
952010346 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
952110347 shlibpath_var=LD_LIBRARY_PATH
952210348 shlibpath_overrides_runpath=yes
958510411 ;;
958610412
958710413 solaris*)
9588 version_type=linux
10414 version_type=linux # correct to gnu/linux during the next big refactor
958910415 need_lib_prefix=no
959010416 need_version=no
959110417 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
961010436 ;;
961110437
961210438 sysv4 | sysv4.3*)
9613 version_type=linux
10439 version_type=linux # correct to gnu/linux during the next big refactor
961410440 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
961510441 soname_spec='${libname}${release}${shared_ext}$major'
961610442 shlibpath_var=LD_LIBRARY_PATH
963410460
963510461 sysv4*MP*)
963610462 if test -d /usr/nec ;then
9637 version_type=linux
10463 version_type=linux # correct to gnu/linux during the next big refactor
963810464 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
963910465 soname_spec='$libname${shared_ext}.$major'
964010466 shlibpath_var=LD_LIBRARY_PATH
966510491
966610492 tpf*)
966710493 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
9668 version_type=linux
10494 version_type=linux # correct to gnu/linux during the next big refactor
966910495 need_lib_prefix=no
967010496 need_version=no
967110497 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
967510501 ;;
967610502
967710503 uts4*)
9678 version_type=linux
10504 version_type=linux # correct to gnu/linux during the next big refactor
967910505 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
968010506 soname_spec='${libname}${release}${shared_ext}$major'
968110507 shlibpath_var=LD_LIBRARY_PATH
970010526 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
970110527 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
970210528 fi
10529
10530
10531
10532
10533
970310534
970410535
970510536
985910690 # if libdl is installed we need to link against it
986010691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
986110692 $as_echo_n "checking for dlopen in -ldl... " >&6; }
9862 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
10693 if ${ac_cv_lib_dl_dlopen+:} false; then :
986310694 $as_echo_n "(cached) " >&6
986410695 else
986510696 ac_check_lib_save_LIBS=$LIBS
989310724 fi
989410725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
989510726 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
9896 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
10727 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
989710728 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
989810729 else
989910730
990710738
990810739 *)
990910740 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
9910 if test "x$ac_cv_func_shl_load" = x""yes; then :
10741 if test "x$ac_cv_func_shl_load" = xyes; then :
991110742 lt_cv_dlopen="shl_load"
991210743 else
991310744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
991410745 $as_echo_n "checking for shl_load in -ldld... " >&6; }
9915 if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
10746 if ${ac_cv_lib_dld_shl_load+:} false; then :
991610747 $as_echo_n "(cached) " >&6
991710748 else
991810749 ac_check_lib_save_LIBS=$LIBS
994610777 fi
994710778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
994810779 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
9949 if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
10780 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
995010781 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
995110782 else
995210783 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
9953 if test "x$ac_cv_func_dlopen" = x""yes; then :
10784 if test "x$ac_cv_func_dlopen" = xyes; then :
995410785 lt_cv_dlopen="dlopen"
995510786 else
995610787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
995710788 $as_echo_n "checking for dlopen in -ldl... " >&6; }
9958 if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
10789 if ${ac_cv_lib_dl_dlopen+:} false; then :
995910790 $as_echo_n "(cached) " >&6
996010791 else
996110792 ac_check_lib_save_LIBS=$LIBS
998910820 fi
999010821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
999110822 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
9992 if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
10823 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
999310824 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
999410825 else
999510826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
999610827 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
9997 if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
10828 if ${ac_cv_lib_svld_dlopen+:} false; then :
999810829 $as_echo_n "(cached) " >&6
999910830 else
1000010831 ac_check_lib_save_LIBS=$LIBS
1002810859 fi
1002910860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
1003010861 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
10031 if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
10862 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
1003210863 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
1003310864 else
1003410865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
1003510866 $as_echo_n "checking for dld_link in -ldld... " >&6; }
10036 if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
10867 if ${ac_cv_lib_dld_dld_link+:} false; then :
1003710868 $as_echo_n "(cached) " >&6
1003810869 else
1003910870 ac_check_lib_save_LIBS=$LIBS
1006710898 fi
1006810899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
1006910900 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
10070 if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
10901 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
1007110902 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
1007210903 fi
1007310904
1010810939
1010910940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
1011010941 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
10111 if test "${lt_cv_dlopen_self+set}" = set; then :
10942 if ${lt_cv_dlopen_self+:} false; then :
1011210943 $as_echo_n "(cached) " >&6
1011310944 else
1011410945 if test "$cross_compiling" = yes; then :
1011710948 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1011810949 lt_status=$lt_dlunknown
1011910950 cat > conftest.$ac_ext <<_LT_EOF
10120 #line 10121 "configure"
10951 #line $LINENO "configure"
1012110952 #include "confdefs.h"
1012210953
1012310954 #if HAVE_DLFCN_H
1015810989 # endif
1015910990 #endif
1016010991
10161 void fnord() { int i=42;}
10992 /* When -fvisbility=hidden is used, assume the code has been annotated
10993 correspondingly for the symbols needed. */
10994 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
10995 int fnord () __attribute__((visibility("default")));
10996 #endif
10997
10998 int fnord () { return 42; }
1016210999 int main ()
1016311000 {
1016411001 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1016711004 if (self)
1016811005 {
1016911006 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
10170 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11007 else
11008 {
11009 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11010 else puts (dlerror ());
11011 }
1017111012 /* dlclose (self); */
1017211013 }
1017311014 else
1020411045 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1020511046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
1020611047 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
10207 if test "${lt_cv_dlopen_self_static+set}" = set; then :
11048 if ${lt_cv_dlopen_self_static+:} false; then :
1020811049 $as_echo_n "(cached) " >&6
1020911050 else
1021011051 if test "$cross_compiling" = yes; then :
1021311054 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1021411055 lt_status=$lt_dlunknown
1021511056 cat > conftest.$ac_ext <<_LT_EOF
10216 #line 10217 "configure"
11057 #line $LINENO "configure"
1021711058 #include "confdefs.h"
1021811059
1021911060 #if HAVE_DLFCN_H
1025411095 # endif
1025511096 #endif
1025611097
10257 void fnord() { int i=42;}
11098 /* When -fvisbility=hidden is used, assume the code has been annotated
11099 correspondingly for the symbols needed. */
11100 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
11101 int fnord () __attribute__((visibility("default")));
11102 #endif
11103
11104 int fnord () { return 42; }
1025811105 int main ()
1025911106 {
1026011107 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1026311110 if (self)
1026411111 {
1026511112 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
10266 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11113 else
11114 {
11115 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
11116 else puts (dlerror ());
11117 }
1026711118 /* dlclose (self); */
1026811119 }
1026911120 else
1043211283
1043311284
1043411285
11286
11287
1043511288 ac_config_commands="$ac_config_commands libtool"
1043611289
1043711290
1047211325 for ac_func in clock_gettime
1047311326 do :
1047411327 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
10475 if test "x$ac_cv_func_clock_gettime" = x""yes; then :
11328 if test "x$ac_cv_func_clock_gettime" = xyes; then :
1047611329 cat >>confdefs.h <<_ACEOF
1047711330 #define HAVE_CLOCK_GETTIME 1
1047811331 _ACEOF
1051211365 if test -z "$LIBEV_M4_AVOID_LIBRT" && test -z "$ac_have_clock_syscall"; then
1051311366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
1051411367 $as_echo_n "checking for clock_gettime in -lrt... " >&6; }
10515 if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then :
11368 if ${ac_cv_lib_rt_clock_gettime+:} false; then :
1051611369 $as_echo_n "(cached) " >&6
1051711370 else
1051811371 ac_check_lib_save_LIBS=$LIBS
1054611399 fi
1054711400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
1054811401 $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
10549 if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then :
11402 if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
1055011403 cat >>confdefs.h <<_ACEOF
1055111404 #define HAVE_LIBRT 1
1055211405 _ACEOF
1055911412 for ac_func in clock_gettime
1056011413 do :
1056111414 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
10562 if test "x$ac_cv_func_clock_gettime" = x""yes; then :
11415 if test "x$ac_cv_func_clock_gettime" = xyes; then :
1056311416 cat >>confdefs.h <<_ACEOF
1056411417 #define HAVE_CLOCK_GETTIME 1
1056511418 _ACEOF
1057611429 for ac_func in nanosleep
1057711430 do :
1057811431 ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
10579 if test "x$ac_cv_func_nanosleep" = x""yes; then :
11432 if test "x$ac_cv_func_nanosleep" = xyes; then :
1058011433 cat >>confdefs.h <<_ACEOF
1058111434 #define HAVE_NANOSLEEP 1
1058211435 _ACEOF
1058611439 if test -z "$LIBEV_M4_AVOID_LIBRT"; then
1058711440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5
1058811441 $as_echo_n "checking for nanosleep in -lrt... " >&6; }
10589 if test "${ac_cv_lib_rt_nanosleep+set}" = set; then :
11442 if ${ac_cv_lib_rt_nanosleep+:} false; then :
1059011443 $as_echo_n "(cached) " >&6
1059111444 else
1059211445 ac_check_lib_save_LIBS=$LIBS
1062011473 fi
1062111474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5
1062211475 $as_echo "$ac_cv_lib_rt_nanosleep" >&6; }
10623 if test "x$ac_cv_lib_rt_nanosleep" = x""yes; then :
11476 if test "x$ac_cv_lib_rt_nanosleep" = xyes; then :
1062411477 cat >>confdefs.h <<_ACEOF
1062511478 #define HAVE_LIBRT 1
1062611479 _ACEOF
1063311486 for ac_func in nanosleep
1063411487 do :
1063511488 ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
10636 if test "x$ac_cv_func_nanosleep" = x""yes; then :
11489 if test "x$ac_cv_func_nanosleep" = xyes; then :
1063711490 cat >>confdefs.h <<_ACEOF
1063811491 #define HAVE_NANOSLEEP 1
1063911492 _ACEOF
1065211505 fi
1065311506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing floor" >&5
1065411507 $as_echo_n "checking for library containing floor... " >&6; }
10655 if test "${ac_cv_search_floor+set}" = set; then :
11508 if ${ac_cv_search_floor+:} false; then :
1065611509 $as_echo_n "(cached) " >&6
1065711510 else
1065811511 ac_func_search_save_LIBS=$LIBS
1068611539 fi
1068711540 rm -f core conftest.err conftest.$ac_objext \
1068811541 conftest$ac_exeext
10689 if test "${ac_cv_search_floor+set}" = set; then :
11542 if ${ac_cv_search_floor+:} false; then :
1069011543 break
1069111544 fi
1069211545 done
10693 if test "${ac_cv_search_floor+set}" = set; then :
11546 if ${ac_cv_search_floor+:} false; then :
1069411547
1069511548 else
1069611549 ac_cv_search_floor=no
1077711630 :end' >>confcache
1077811631 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
1077911632 if test -w "$cache_file"; then
10780 test "x$cache_file" != "x/dev/null" &&
11633 if test "x$cache_file" != "x/dev/null"; then
1078111634 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
1078211635 $as_echo "$as_me: updating cache $cache_file" >&6;}
10783 cat confcache >$cache_file
11636 if test ! -f "$cache_file" || test -h "$cache_file"; then
11637 cat confcache >"$cache_file"
11638 else
11639 case $cache_file in #(
11640 */* | ?:*)
11641 mv -f confcache "$cache_file"$$ &&
11642 mv -f "$cache_file"$$ "$cache_file" ;; #(
11643 *)
11644 mv -f confcache "$cache_file" ;;
11645 esac
11646 fi
11647 fi
1078411648 else
1078511649 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
1078611650 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
1083211696 Usually this means the macro was only invoked conditionally." "$LINENO" 5
1083311697 fi
1083411698
10835 : ${CONFIG_STATUS=./config.status}
11699 : "${CONFIG_STATUS=./config.status}"
1083611700 ac_write_fail=0
1083711701 ac_clean_files_save=$ac_clean_files
1083811702 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
1093311797 IFS=" "" $as_nl"
1093411798
1093511799 # Find who we are. Look in the path if we contain no directory separator.
11800 as_myself=
1093611801 case $0 in #((
1093711802 *[\\/]* ) as_myself=$0 ;;
1093811803 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1112811993 # ... but there are two gotchas:
1112911994 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
1113011995 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
11131 # In both cases, we have to default to `cp -p'.
11996 # In both cases, we have to default to `cp -pR'.
1113211997 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
11133 as_ln_s='cp -p'
11998 as_ln_s='cp -pR'
1113411999 elif ln conf$$.file conf$$ 2>/dev/null; then
1113512000 as_ln_s=ln
1113612001 else
11137 as_ln_s='cp -p'
12002 as_ln_s='cp -pR'
1113812003 fi
1113912004 else
11140 as_ln_s='cp -p'
12005 as_ln_s='cp -pR'
1114112006 fi
1114212007 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
1114312008 rmdir conf$$.dir 2>/dev/null
1119712062 as_mkdir_p=false
1119812063 fi
1119912064
11200 if test -x / >/dev/null 2>&1; then
11201 as_test_x='test -x'
11202 else
11203 if ls -dL / >/dev/null 2>&1; then
11204 as_ls_L_option=L
11205 else
11206 as_ls_L_option=
11207 fi
11208 as_test_x='
11209 eval sh -c '\''
11210 if test -d "$1"; then
11211 test -d "$1/.";
11212 else
11213 case $1 in #(
11214 -*)set "./$1";;
11215 esac;
11216 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
11217 ???[sx]*):;;*)false;;esac;fi
11218 '\'' sh
11219 '
11220 fi
11221 as_executable_p=$as_test_x
12065
12066 # as_fn_executable_p FILE
12067 # -----------------------
12068 # Test if FILE is an executable regular file.
12069 as_fn_executable_p ()
12070 {
12071 test -f "$1" && test -x "$1"
12072 } # as_fn_executable_p
12073 as_test_x='test -x'
12074 as_executable_p=as_fn_executable_p
1122212075
1122312076 # Sed expression to map a string onto a valid CPP name.
1122412077 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
1124012093 # values after options handling.
1124112094 ac_log="
1124212095 This file was extended by $as_me, which was
11243 generated by GNU Autoconf 2.67. Invocation command line was
12096 generated by GNU Autoconf 2.69. Invocation command line was
1124412097
1124512098 CONFIG_FILES = $CONFIG_FILES
1124612099 CONFIG_HEADERS = $CONFIG_HEADERS
1130612159 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1130712160 ac_cs_version="\\
1130812161 config.status
11309 configured by $0, generated by GNU Autoconf 2.67,
12162 configured by $0, generated by GNU Autoconf 2.69,
1131012163 with options \\"\$ac_cs_config\\"
1131112164
11312 Copyright (C) 2010 Free Software Foundation, Inc.
12165 Copyright (C) 2012 Free Software Foundation, Inc.
1131312166 This config.status script is free software; the Free Software Foundation
1131412167 gives unlimited permission to copy, distribute and modify it."
1131512168
1140012253 _ACEOF
1140112254 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1140212255 if \$ac_cs_recheck; then
11403 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
12256 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
1140412257 shift
1140512258 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
1140612259 CONFIG_SHELL='$SHELL'
1143412287 sed_quote_subst='$sed_quote_subst'
1143512288 double_quote_subst='$double_quote_subst'
1143612289 delay_variable_subst='$delay_variable_subst'
11437 macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
11438 macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
11439 enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
11440 enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
11441 pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
11442 enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
11443 host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
11444 host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
11445 host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
11446 build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
11447 build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
11448 build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
11449 SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
11450 Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
11451 GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
11452 EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
11453 FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
11454 LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
11455 NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
11456 LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
11457 max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
11458 ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
11459 exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
11460 lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
11461 lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
11462 lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
11463 reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
11464 reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
11465 OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
11466 deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
11467 file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
11468 AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
11469 AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
11470 STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
11471 RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
11472 old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
11473 old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
11474 old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
11475 CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
11476 CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
11477 compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
11478 GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
11479 lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
11480 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
11481 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
11482 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
11483 objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
11484 SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
11485 ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
11486 MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
11487 lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
11488 lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
11489 lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
11490 lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
11491 lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
11492 need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
11493 DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
11494 NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
11495 LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
11496 OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
11497 OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
11498 libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
11499 shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
11500 extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
11501 archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
11502 enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
11503 export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
11504 whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
11505 compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
11506 old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
11507 old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
11508 archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
11509 archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
11510 module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
11511 module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
11512 with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
11513 allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
11514 no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
11515 hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
11516 hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
11517 hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
11518 hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
11519 hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
11520 hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
11521 hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
11522 hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
11523 inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
11524 link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
11525 fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
11526 always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
11527 export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
11528 exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
11529 include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
11530 prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
11531 file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
11532 variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
11533 need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
11534 need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
11535 version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
11536 runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
11537 shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
11538 shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
11539 libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
11540 library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
11541 soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
11542 postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
11543 postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
11544 finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
11545 finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
11546 hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
11547 sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
11548 sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
11549 hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
11550 enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
11551 enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
11552 enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
11553 old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
11554 striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
12290 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
12291 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
12292 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
12293 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
12294 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
12295 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
12296 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
12297 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
12298 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
12299 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
12300 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
12301 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
12302 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
12303 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
12304 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
12305 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
12306 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
12307 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
12308 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
12309 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
12310 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
12311 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
12312 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
12313 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
12314 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
12315 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
12316 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
12317 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
12318 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
12319 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
12320 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
12321 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
12322 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
12323 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
12324 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
12325 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
12326 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
12327 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
12328 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
12329 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
12330 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
12331 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
12332 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
12333 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
12334 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
12335 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
12336 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
12337 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
12338 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
12339 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
12340 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
12341 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
12342 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
12343 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
12344 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
12345 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
12346 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
12347 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
12348 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
12349 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
12350 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
12351 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
12352 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
12353 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
12354 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
12355 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
12356 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
12357 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
12358 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
12359 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
12360 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
12361 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
12362 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
12363 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
12364 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
12365 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
12366 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
12367 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
12368 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
12369 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
12370 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
12371 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
12372 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
12373 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
12374 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
12375 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
12376 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
12377 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
12378 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
12379 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
12380 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
12381 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
12382 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
12383 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
12384 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
12385 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
12386 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
12387 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
12388 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
12389 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
12390 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
12391 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
12392 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
12393 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
12394 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
12395 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
12396 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
12397 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
12398 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
12399 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
12400 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
12401 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
12402 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
12403 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
12404 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
12405 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
12406 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
12407 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
12408 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
12409 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
12410 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
12411 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
12412 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
12413 sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
12414 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
12415 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
12416 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
12417 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
12418 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
12419 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
1155512420
1155612421 LTCC='$LTCC'
1155712422 LTCFLAGS='$LTCFLAGS'
1155812423 compiler='$compiler_DEFAULT'
1155912424
12425 # A function that is used when there is no print builtin or printf.
12426 func_fallback_echo ()
12427 {
12428 eval 'cat <<_LTECHO_EOF
12429 \$1
12430 _LTECHO_EOF'
12431 }
12432
1156012433 # Quote evaled strings.
11561 for var in SED \
12434 for var in SHELL \
12435 ECHO \
12436 PATH_SEPARATOR \
12437 SED \
1156212438 GREP \
1156312439 EGREP \
1156412440 FGREP \
1157112447 OBJDUMP \
1157212448 deplibs_check_method \
1157312449 file_magic_cmd \
12450 file_magic_glob \
12451 want_nocaseglob \
12452 DLLTOOL \
12453 sharedlib_from_linklib_cmd \
1157412454 AR \
1157512455 AR_FLAGS \
12456 archiver_list_spec \
1157612457 STRIP \
1157712458 RANLIB \
1157812459 CC \
1158212463 lt_cv_sys_global_symbol_to_cdecl \
1158312464 lt_cv_sys_global_symbol_to_c_name_address \
1158412465 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
11585 SHELL \
11586 ECHO \
12466 nm_file_list_spec \
1158712467 lt_prog_compiler_no_builtin_flag \
12468 lt_prog_compiler_pic \
1158812469 lt_prog_compiler_wl \
11589 lt_prog_compiler_pic \
1159012470 lt_prog_compiler_static \
1159112471 lt_cv_prog_compiler_c_o \
1159212472 need_locks \
12473 MANIFEST_TOOL \
1159312474 DSYMUTIL \
1159412475 NMEDIT \
1159512476 LIPO \
1160312484 allow_undefined_flag \
1160412485 no_undefined_flag \
1160512486 hardcode_libdir_flag_spec \
11606 hardcode_libdir_flag_spec_ld \
1160712487 hardcode_libdir_separator \
11608 fix_srcfile_path \
1160912488 exclude_expsyms \
1161012489 include_expsyms \
1161112490 file_list_spec \
1161312492 libname_spec \
1161412493 library_names_spec \
1161512494 soname_spec \
12495 install_override_mode \
1161612496 finish_eval \
1161712497 old_striplib \
1161812498 striplib; do
11619 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
12499 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1162012500 *[\\\\\\\`\\"\\\$]*)
11621 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
12501 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1162212502 ;;
1162312503 *)
1162412504 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1164012520 module_expsym_cmds \
1164112521 export_symbols_cmds \
1164212522 prelink_cmds \
12523 postlink_cmds \
1164312524 postinstall_cmds \
1164412525 postuninstall_cmds \
1164512526 finish_cmds \
1164612527 sys_lib_search_path_spec \
1164712528 sys_lib_dlsearch_path_spec; do
11648 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
12529 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1164912530 *[\\\\\\\`\\"\\\$]*)
11650 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
12531 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1165112532 ;;
1165212533 *)
1165312534 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1165412535 ;;
1165512536 esac
1165612537 done
11657
11658 # Fix-up fallback echo if it was mangled by the above quoting rules.
11659 case \$lt_ECHO in
11660 *'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
11661 ;;
11662 esac
1166312538
1166412539 ac_aux_dir='$ac_aux_dir'
1166512540 xsi_shell='$xsi_shell'
1169412569 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
1169512570 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
1169612571
11697 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
12572 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
1169812573 esac
1169912574 done
1170012575
1171712592 # after its creation but before its name has been assigned to `$tmp'.
1171812593 $debug ||
1171912594 {
11720 tmp=
12595 tmp= ac_tmp=
1172112596 trap 'exit_status=$?
11722 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
12597 : "${ac_tmp:=$tmp}"
12598 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
1172312599 ' 0
1172412600 trap 'as_fn_exit 1' 1 2 13 15
1172512601 }
1172712603
1172812604 {
1172912605 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
11730 test -n "$tmp" && test -d "$tmp"
12606 test -d "$tmp"
1173112607 } ||
1173212608 {
1173312609 tmp=./conf$$-$RANDOM
1173412610 (umask 077 && mkdir "$tmp")
1173512611 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
12612 ac_tmp=$tmp
1173612613
1173712614 # Set up the scripts for CONFIG_FILES section.
1173812615 # No need to generate them if there are no CONFIG_FILES.
1175412631 ac_cs_awk_cr=$ac_cr
1175512632 fi
1175612633
11757 echo 'BEGIN {' >"$tmp/subs1.awk" &&
12634 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
1175812635 _ACEOF
1175912636
1176012637
1178212659 rm -f conf$$subs.sh
1178312660
1178412661 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11785 cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
12662 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
1178612663 _ACEOF
1178712664 sed -n '
1178812665 h
1183012707 rm -f conf$$subs.awk
1183112708 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1183212709 _ACAWK
11833 cat >>"\$tmp/subs1.awk" <<_ACAWK &&
12710 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
1183412711 for (key in S) S_is_set[key] = 1
1183512712 FS = ""
1183612713
1186212739 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
1186312740 else
1186412741 cat
11865 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
12742 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
1186612743 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
1186712744 _ACEOF
1186812745
1189612773 # No need to generate them if there are no CONFIG_HEADERS.
1189712774 # This happens for instance with `./config.status Makefile'.
1189812775 if test -n "$CONFIG_HEADERS"; then
11899 cat >"$tmp/defines.awk" <<\_ACAWK ||
12776 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
1190012777 BEGIN {
1190112778 _ACEOF
1190212779
1190812785 # handling of long lines.
1190912786 ac_delim='%!_!# '
1191012787 for ac_last_try in false false :; do
11911 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
11912 if test -z "$ac_t"; then
12788 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
12789 if test -z "$ac_tt"; then
1191312790 break
1191412791 elif $ac_last_try; then
1191512792 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
1201012887 esac
1201112888 case $ac_mode$ac_tag in
1201212889 :[FHL]*:*);;
12013 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
12890 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
1201412891 :[FH]-) ac_tag=-:-;;
1201512892 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
1201612893 esac
1202912906 for ac_f
1203012907 do
1203112908 case $ac_f in
12032 -) ac_f="$tmp/stdin";;
12909 -) ac_f="$ac_tmp/stdin";;
1203312910 *) # Look for the file first in the build tree, then in the source tree
1203412911 # (if the path is not absolute). The absolute path cannot be DOS-style,
1203512912 # because $ac_f cannot contain `:'.
1203812915 [\\/$]*) false;;
1203912916 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
1204012917 esac ||
12041 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
12918 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
1204212919 esac
1204312920 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
1204412921 as_fn_append ac_file_inputs " '$ac_f'"
1206412941 esac
1206512942
1206612943 case $ac_tag in
12067 *:-:* | *:-) cat >"$tmp/stdin" \
12068 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
12944 *:-:* | *:-) cat >"$ac_tmp/stdin" \
12945 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
1206912946 esac
1207012947 ;;
1207112948 esac
1220113078 s&@MKDIR_P@&$ac_MKDIR_P&;t t
1220213079 $ac_datarootdir_hack
1220313080 "
12204 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
12205 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
13081 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
13082 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
1220613083
1220713084 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
12208 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
12209 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
13085 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
13086 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
13087 "$ac_tmp/out"`; test -z "$ac_out"; } &&
1221013088 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
1221113089 which seems to be undefined. Please make sure it is defined" >&5
1221213090 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
1221313091 which seems to be undefined. Please make sure it is defined" >&2;}
1221413092
12215 rm -f "$tmp/stdin"
13093 rm -f "$ac_tmp/stdin"
1221613094 case $ac_file in
12217 -) cat "$tmp/out" && rm -f "$tmp/out";;
12218 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
13095 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
13096 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
1221913097 esac \
1222013098 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
1222113099 ;;
1222613104 if test x"$ac_file" != x-; then
1222713105 {
1222813106 $as_echo "/* $configure_input */" \
12229 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
12230 } >"$tmp/config.h" \
13107 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
13108 } >"$ac_tmp/config.h" \
1223113109 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
12232 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
13110 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
1223313111 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
1223413112 $as_echo "$as_me: $ac_file is unchanged" >&6;}
1223513113 else
1223613114 rm -f "$ac_file"
12237 mv "$tmp/config.h" "$ac_file" \
13115 mv "$ac_tmp/config.h" "$ac_file" \
1223813116 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
1223913117 fi
1224013118 else
1224113119 $as_echo "/* $configure_input */" \
12242 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
13120 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
1224313121 || as_fn_error $? "could not create -" "$LINENO" 5
1224413122 fi
1224513123 # Compute "$ac_file"'s index in $config_headers.
1240113279 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
1240213280 #
1240313281 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
12404 # 2006, 2007, 2008 Free Software Foundation, Inc.
13282 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
13283 # Foundation, Inc.
1240513284 # Written by Gordon Matzigkeit, 1996
1240613285 #
1240713286 # This file is part of GNU Libtool.
1244913328 # Whether or not to optimize for fast installation.
1245013329 fast_install=$enable_fast_install
1245113330
13331 # Shell to use when invoking shell scripts.
13332 SHELL=$lt_SHELL
13333
13334 # An echo program that protects backslashes.
13335 ECHO=$lt_ECHO
13336
13337 # The PATH separator for the build system.
13338 PATH_SEPARATOR=$lt_PATH_SEPARATOR
13339
1245213340 # The host system.
1245313341 host_alias=$host_alias
1245413342 host=$host
1249813386 # turn newlines into spaces.
1249913387 NL2SP=$lt_lt_NL2SP
1250013388
12501 # How to create reloadable object files.
12502 reload_flag=$lt_reload_flag
12503 reload_cmds=$lt_reload_cmds
13389 # convert \$build file names to \$host format.
13390 to_host_file_cmd=$lt_cv_to_host_file_cmd
13391
13392 # convert \$build files to toolchain format.
13393 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
1250413394
1250513395 # An object symbol dumper.
1250613396 OBJDUMP=$lt_OBJDUMP
1250813398 # Method to check whether dependent libraries are shared objects.
1250913399 deplibs_check_method=$lt_deplibs_check_method
1251013400
12511 # Command to use when deplibs_check_method == "file_magic".
13401 # Command to use when deplibs_check_method = "file_magic".
1251213402 file_magic_cmd=$lt_file_magic_cmd
13403
13404 # How to find potential files when deplibs_check_method = "file_magic".
13405 file_magic_glob=$lt_file_magic_glob
13406
13407 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
13408 want_nocaseglob=$lt_want_nocaseglob
13409
13410 # DLL creation program.
13411 DLLTOOL=$lt_DLLTOOL
13412
13413 # Command to associate shared and link libraries.
13414 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
1251313415
1251413416 # The archiver.
1251513417 AR=$lt_AR
13418
13419 # Flags to create an archive.
1251613420 AR_FLAGS=$lt_AR_FLAGS
13421
13422 # How to feed a file listing to the archiver.
13423 archiver_list_spec=$lt_archiver_list_spec
1251713424
1251813425 # A symbol stripping program.
1251913426 STRIP=$lt_STRIP
1252313430 old_postinstall_cmds=$lt_old_postinstall_cmds
1252413431 old_postuninstall_cmds=$lt_old_postuninstall_cmds
1252513432
13433 # Whether to use a lock for old archive extraction.
13434 lock_old_archive_extraction=$lock_old_archive_extraction
13435
1252613436 # A C compiler.
1252713437 LTCC=$lt_CC
1252813438
1254113451 # Transform the output of nm in a C name address pair when lib prefix is needed.
1254213452 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
1254313453
13454 # Specify filename containing input files for \$NM.
13455 nm_file_list_spec=$lt_nm_file_list_spec
13456
13457 # The root where to search for dependent libraries,and in which our libraries should be installed.
13458 lt_sysroot=$lt_sysroot
13459
1254413460 # The name of the directory that contains temporary libtool files.
1254513461 objdir=$objdir
1254613462
12547 # Shell to use when invoking shell scripts.
12548 SHELL=$lt_SHELL
12549
12550 # An echo program that does not interpret backslashes.
12551 ECHO=$lt_ECHO
12552
1255313463 # Used to examine libraries when file_magic_cmd begins with "file".
1255413464 MAGIC_CMD=$MAGIC_CMD
1255513465
1255613466 # Must we lock files when doing compilation?
1255713467 need_locks=$lt_need_locks
13468
13469 # Manifest tool.
13470 MANIFEST_TOOL=$lt_MANIFEST_TOOL
1255813471
1255913472 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
1256013473 DSYMUTIL=$lt_DSYMUTIL
1261213525 # The coded name of the library, if different from the real name.
1261313526 soname_spec=$lt_soname_spec
1261413527
13528 # Permission mode override for installation of shared libraries.
13529 install_override_mode=$lt_install_override_mode
13530
1261513531 # Command to use after installation of a shared archive.
1261613532 postinstall_cmds=$lt_postinstall_cmds
1261713533
1265113567 # The linker used to build libraries.
1265213568 LD=$lt_LD
1265313569
13570 # How to create reloadable object files.
13571 reload_flag=$lt_reload_flag
13572 reload_cmds=$lt_reload_cmds
13573
1265413574 # Commands used to build an old-style archive.
1265513575 old_archive_cmds=$lt_old_archive_cmds
1265613576
1266313583 # Compiler flag to turn off builtin functions.
1266413584 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
1266513585
13586 # Additional compiler flags for building library objects.
13587 pic_flag=$lt_lt_prog_compiler_pic
13588
1266613589 # How to pass a linker flag through the compiler.
1266713590 wl=$lt_lt_prog_compiler_wl
12668
12669 # Additional compiler flags for building library objects.
12670 pic_flag=$lt_lt_prog_compiler_pic
1267113591
1267213592 # Compiler flag to prevent dynamic linking.
1267313593 link_static_flag=$lt_lt_prog_compiler_static
1271713637 # Flag to hardcode \$libdir into a binary during linking.
1271813638 # This must work even if \$libdir does not exist
1271913639 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
12720
12721 # If ld is used when linking, flag to hardcode \$libdir into a binary
12722 # during linking. This must work even if \$libdir does not exist.
12723 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
1272413640
1272513641 # Whether we need a single "-rpath" flag with a separated argument.
1272613642 hardcode_libdir_separator=$lt_hardcode_libdir_separator
1275513671 # Whether libtool must link a program against all its dependency libraries.
1275613672 link_all_deplibs=$link_all_deplibs
1275713673
12758 # Fix the shell variable \$srcfile for the compiler.
12759 fix_srcfile_path=$lt_fix_srcfile_path
12760
1276113674 # Set to "yes" if exported symbols are required.
1276213675 always_export_symbols=$always_export_symbols
1276313676
1277213685
1277313686 # Commands necessary for linking programs (against libraries) with templates.
1277413687 prelink_cmds=$lt_prelink_cmds
13688
13689 # Commands necessary for finishing linking programs.
13690 postlink_cmds=$lt_postlink_cmds
1277513691
1277613692 # Specify filename containing input files.
1277713693 file_list_spec=$lt_file_list_spec
1280513721 # if finds mixed CR/LF and LF-only lines. Since sed operates in
1280613722 # text mode, it properly converts lines to CR/LF. This bash problem
1280713723 # is reportedly fixed, but why not run on old versions too?
12808 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
12809 || (rm -f "$cfgfile"; exit 1)
12810
12811 case $xsi_shell in
12812 yes)
12813 cat << \_LT_EOF >> "$cfgfile"
12814
12815 # func_dirname file append nondir_replacement
12816 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
12817 # otherwise set result to NONDIR_REPLACEMENT.
12818 func_dirname ()
12819 {
12820 case ${1} in
12821 */*) func_dirname_result="${1%/*}${2}" ;;
12822 * ) func_dirname_result="${3}" ;;
12823 esac
12824 }
12825
12826 # func_basename file
12827 func_basename ()
12828 {
12829 func_basename_result="${1##*/}"
12830 }
12831
12832 # func_dirname_and_basename file append nondir_replacement
12833 # perform func_basename and func_dirname in a single function
12834 # call:
12835 # dirname: Compute the dirname of FILE. If nonempty,
12836 # add APPEND to the result, otherwise set result
12837 # to NONDIR_REPLACEMENT.
12838 # value returned in "$func_dirname_result"
12839 # basename: Compute filename of FILE.
12840 # value retuned in "$func_basename_result"
12841 # Implementation must be kept synchronized with func_dirname
12842 # and func_basename. For efficiency, we do not delegate to
12843 # those functions but instead duplicate the functionality here.
12844 func_dirname_and_basename ()
12845 {
12846 case ${1} in
12847 */*) func_dirname_result="${1%/*}${2}" ;;
12848 * ) func_dirname_result="${3}" ;;
12849 esac
12850 func_basename_result="${1##*/}"
12851 }
12852
12853 # func_stripname prefix suffix name
12854 # strip PREFIX and SUFFIX off of NAME.
12855 # PREFIX and SUFFIX must not contain globbing or regex special
12856 # characters, hashes, percent signs, but SUFFIX may contain a leading
12857 # dot (in which case that matches only a dot).
12858 func_stripname ()
12859 {
12860 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
12861 # positional parameters, so assign one to ordinary parameter first.
12862 func_stripname_result=${3}
12863 func_stripname_result=${func_stripname_result#"${1}"}
12864 func_stripname_result=${func_stripname_result%"${2}"}
12865 }
12866
12867 # func_opt_split
12868 func_opt_split ()
12869 {
12870 func_opt_split_opt=${1%%=*}
12871 func_opt_split_arg=${1#*=}
12872 }
12873
12874 # func_lo2o object
12875 func_lo2o ()
12876 {
12877 case ${1} in
12878 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
12879 *) func_lo2o_result=${1} ;;
12880 esac
12881 }
12882
12883 # func_xform libobj-or-source
12884 func_xform ()
12885 {
12886 func_xform_result=${1%.*}.lo
12887 }
12888
12889 # func_arith arithmetic-term...
12890 func_arith ()
12891 {
12892 func_arith_result=$(( $* ))
12893 }
12894
12895 # func_len string
12896 # STRING may not start with a hyphen.
12897 func_len ()
12898 {
12899 func_len_result=${#1}
12900 }
12901
12902 _LT_EOF
12903 ;;
12904 *) # Bourne compatible functions.
12905 cat << \_LT_EOF >> "$cfgfile"
12906
12907 # func_dirname file append nondir_replacement
12908 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
12909 # otherwise set result to NONDIR_REPLACEMENT.
12910 func_dirname ()
12911 {
12912 # Extract subdirectory from the argument.
12913 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
12914 if test "X$func_dirname_result" = "X${1}"; then
12915 func_dirname_result="${3}"
12916 else
12917 func_dirname_result="$func_dirname_result${2}"
12918 fi
12919 }
12920
12921 # func_basename file
12922 func_basename ()
12923 {
12924 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
12925 }
12926
12927
12928 # func_stripname prefix suffix name
12929 # strip PREFIX and SUFFIX off of NAME.
12930 # PREFIX and SUFFIX must not contain globbing or regex special
12931 # characters, hashes, percent signs, but SUFFIX may contain a leading
12932 # dot (in which case that matches only a dot).
12933 # func_strip_suffix prefix name
12934 func_stripname ()
12935 {
12936 case ${2} in
12937 .*) func_stripname_result=`$ECHO "X${3}" \
12938 | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
12939 *) func_stripname_result=`$ECHO "X${3}" \
12940 | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
12941 esac
12942 }
12943
12944 # sed scripts:
12945 my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
12946 my_sed_long_arg='1s/^-[^=]*=//'
12947
12948 # func_opt_split
12949 func_opt_split ()
12950 {
12951 func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
12952 func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
12953 }
12954
12955 # func_lo2o object
12956 func_lo2o ()
12957 {
12958 func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
12959 }
12960
12961 # func_xform libobj-or-source
12962 func_xform ()
12963 {
12964 func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
12965 }
12966
12967 # func_arith arithmetic-term...
12968 func_arith ()
12969 {
12970 func_arith_result=`expr "$@"`
12971 }
12972
12973 # func_len string
12974 # STRING may not start with a hyphen.
12975 func_len ()
12976 {
12977 func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
12978 }
12979
12980 _LT_EOF
12981 esac
12982
12983 case $lt_shell_append in
12984 yes)
12985 cat << \_LT_EOF >> "$cfgfile"
12986
12987 # func_append var value
12988 # Append VALUE to the end of shell variable VAR.
12989 func_append ()
12990 {
12991 eval "$1+=\$2"
12992 }
12993 _LT_EOF
12994 ;;
12995 *)
12996 cat << \_LT_EOF >> "$cfgfile"
12997
12998 # func_append var value
12999 # Append VALUE to the end of shell variable VAR.
13000 func_append ()
13001 {
13002 eval "$1=\$$1\$2"
13003 }
13004
13005 _LT_EOF
13006 ;;
13007 esac
13008
13009
13010 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
13011 || (rm -f "$cfgfile"; exit 1)
13012
13013 mv -f "$cfgfile" "$ofile" ||
13724 sed '$q' "$ltmain" >> "$cfgfile" \
13725 || (rm -f "$cfgfile"; exit 1)
13726
13727 if test x"$xsi_shell" = xyes; then
13728 sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
13729 func_dirname ()\
13730 {\
13731 \ case ${1} in\
13732 \ */*) func_dirname_result="${1%/*}${2}" ;;\
13733 \ * ) func_dirname_result="${3}" ;;\
13734 \ esac\
13735 } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
13736 && mv -f "$cfgfile.tmp" "$cfgfile" \
13737 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
13738 test 0 -eq $? || _lt_function_replace_fail=:
13739
13740
13741 sed -e '/^func_basename ()$/,/^} # func_basename /c\
13742 func_basename ()\
13743 {\
13744 \ func_basename_result="${1##*/}"\
13745 } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
13746 && mv -f "$cfgfile.tmp" "$cfgfile" \
13747 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
13748 test 0 -eq $? || _lt_function_replace_fail=:
13749
13750
13751 sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
13752 func_dirname_and_basename ()\
13753 {\
13754 \ case ${1} in\
13755 \ */*) func_dirname_result="${1%/*}${2}" ;;\
13756 \ * ) func_dirname_result="${3}" ;;\
13757 \ esac\
13758 \ func_basename_result="${1##*/}"\
13759 } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
13760 && mv -f "$cfgfile.tmp" "$cfgfile" \
13761 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
13762 test 0 -eq $? || _lt_function_replace_fail=:
13763
13764
13765 sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
13766 func_stripname ()\
13767 {\
13768 \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
13769 \ # positional parameters, so assign one to ordinary parameter first.\
13770 \ func_stripname_result=${3}\
13771 \ func_stripname_result=${func_stripname_result#"${1}"}\
13772 \ func_stripname_result=${func_stripname_result%"${2}"}\
13773 } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
13774 && mv -f "$cfgfile.tmp" "$cfgfile" \
13775 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
13776 test 0 -eq $? || _lt_function_replace_fail=:
13777
13778
13779 sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
13780 func_split_long_opt ()\
13781 {\
13782 \ func_split_long_opt_name=${1%%=*}\
13783 \ func_split_long_opt_arg=${1#*=}\
13784 } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
13785 && mv -f "$cfgfile.tmp" "$cfgfile" \
13786 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
13787 test 0 -eq $? || _lt_function_replace_fail=:
13788
13789
13790 sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
13791 func_split_short_opt ()\
13792 {\
13793 \ func_split_short_opt_arg=${1#??}\
13794 \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
13795 } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
13796 && mv -f "$cfgfile.tmp" "$cfgfile" \
13797 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
13798 test 0 -eq $? || _lt_function_replace_fail=:
13799
13800
13801 sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
13802 func_lo2o ()\
13803 {\
13804 \ case ${1} in\
13805 \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
13806 \ *) func_lo2o_result=${1} ;;\
13807 \ esac\
13808 } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
13809 && mv -f "$cfgfile.tmp" "$cfgfile" \
13810 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
13811 test 0 -eq $? || _lt_function_replace_fail=:
13812
13813
13814 sed -e '/^func_xform ()$/,/^} # func_xform /c\
13815 func_xform ()\
13816 {\
13817 func_xform_result=${1%.*}.lo\
13818 } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
13819 && mv -f "$cfgfile.tmp" "$cfgfile" \
13820 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
13821 test 0 -eq $? || _lt_function_replace_fail=:
13822
13823
13824 sed -e '/^func_arith ()$/,/^} # func_arith /c\
13825 func_arith ()\
13826 {\
13827 func_arith_result=$(( $* ))\
13828 } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
13829 && mv -f "$cfgfile.tmp" "$cfgfile" \
13830 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
13831 test 0 -eq $? || _lt_function_replace_fail=:
13832
13833
13834 sed -e '/^func_len ()$/,/^} # func_len /c\
13835 func_len ()\
13836 {\
13837 func_len_result=${#1}\
13838 } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
13839 && mv -f "$cfgfile.tmp" "$cfgfile" \
13840 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
13841 test 0 -eq $? || _lt_function_replace_fail=:
13842
13843 fi
13844
13845 if test x"$lt_shell_append" = xyes; then
13846 sed -e '/^func_append ()$/,/^} # func_append /c\
13847 func_append ()\
13848 {\
13849 eval "${1}+=\\${2}"\
13850 } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
13851 && mv -f "$cfgfile.tmp" "$cfgfile" \
13852 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
13853 test 0 -eq $? || _lt_function_replace_fail=:
13854
13855
13856 sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
13857 func_append_quoted ()\
13858 {\
13859 \ func_quote_for_eval "${2}"\
13860 \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
13861 } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
13862 && mv -f "$cfgfile.tmp" "$cfgfile" \
13863 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
13864 test 0 -eq $? || _lt_function_replace_fail=:
13865
13866
13867 # Save a `func_append' function call where possible by direct use of '+='
13868 sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
13869 && mv -f "$cfgfile.tmp" "$cfgfile" \
13870 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
13871 test 0 -eq $? || _lt_function_replace_fail=:
13872 else
13873 # Save a `func_append' function call even when '+=' is not available
13874 sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
13875 && mv -f "$cfgfile.tmp" "$cfgfile" \
13876 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
13877 test 0 -eq $? || _lt_function_replace_fail=:
13878 fi
13879
13880 if test x"$_lt_function_replace_fail" = x":"; then
13881 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
13882 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
13883 fi
13884
13885
13886 mv -f "$cfgfile" "$ofile" ||
1301413887 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1301513888 chmod +x "$ofile"
1301613889
0 AC_INIT
1
02 orig_CFLAGS="$CFLAGS"
13
2 AC_INIT
34 AC_CONFIG_SRCDIR([ev_epoll.c])
45
5 AM_INIT_AUTOMAKE(libev,4.11) dnl also update ev.h!
6 AM_INIT_AUTOMAKE(libev,4.15) dnl also update ev.h!
67 AC_CONFIG_HEADERS([config.h])
78 AM_MAINTAINER_MODE
89
285285 template<class K, void (K::*method)(int)>
286286 static void method_thunk (int revents, void *arg)
287287 {
288 static_cast<K *>(arg)->*method
288 (static_cast<K *>(arg)->*method)
289289 (revents);
290290 }
291291
299299 template<class K, void (K::*method)()>
300300 static void method_noargs_thunk (int revents, void *arg)
301301 {
302 static_cast<K *>(arg)->*method
302 (static_cast<K *>(arg)->*method)
303303 ();
304304 }
305305
512512
513513 void feed_event (int revents) throw ()
514514 {
515 ev_feed_event (EV_A_ static_cast<const ev_watcher *>(this), revents);
515 ev_feed_event (EV_A_ static_cast<ev_watcher *>(this), revents);
516516 }
517517 };
518518
551551 return ev_embeddable_backends ();
552552 }
553553
554 inline void set_allocator (void *(*cb)(void *ptr, long size)) throw ()
554 inline void set_allocator (void *(*cb)(void *ptr, long size) throw ()) throw ()
555555 {
556556 ev_set_allocator (cb);
557557 }
558558
559 inline void set_syserr_cb (void (*cb)(const char *msg)) throw ()
559 inline void set_syserr_cb (void (*cb)(const char *msg) throw ()) throw ()
560560 {
561561 ev_set_syserr_cb (cb);
562562 }
763763
764764 #if EV_EMBED_ENABLE
765765 EV_BEGIN_WATCHER (embed, embed)
766 void set (struct ev_loop *embedded_loop) throw ()
766 void set_embed (struct ev_loop *embedded_loop) throw ()
767767 {
768768 int active = is_active ();
769769 if (active) stop ();
+180
-70
ev.3 less more
0 .\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
0 .\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
11 .\"
22 .\" Standard preamble:
33 .\" ========================================================================
123123 .\" ========================================================================
124124 .\"
125125 .IX Title "LIBEV 3"
126 .TH LIBEV 3 "2012-02-04" "libev-4.11" "libev - high performance full featured event loop"
126 .TH LIBEV 3 "2013-02-28" "libev-4.11" "libev - high performance full featured event loop"
127127 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
128128 .\" way too many mistakes in technical documents.
129129 .if n .ad l
368368 & ev_supported_backends ()\*(C'\fR, likewise for recommended ones.
369369 .Sp
370370 See the description of \f(CW\*(C`ev_embed\*(C'\fR watchers for more info.
371 .IP "ev_set_allocator (void *(*cb)(void *ptr, long size))" 4
372 .IX Item "ev_set_allocator (void *(*cb)(void *ptr, long size))"
371 .IP "ev_set_allocator (void *(*cb)(void *ptr, long size) throw ())" 4
372 .IX Item "ev_set_allocator (void *(*cb)(void *ptr, long size) throw ())"
373373 Sets the allocation function to use (the prototype is similar \- the
374374 semantics are identical to the \f(CW\*(C`realloc\*(C'\fR C89/SuS/POSIX function). It is
375375 used to allocate and free memory (no surprises here). If it returns zero
405405 \& ...
406406 \& ev_set_allocator (persistent_realloc);
407407 .Ve
408 .IP "ev_set_syserr_cb (void (*cb)(const char *msg))" 4
409 .IX Item "ev_set_syserr_cb (void (*cb)(const char *msg))"
408 .IP "ev_set_syserr_cb (void (*cb)(const char *msg) throw ())" 4
409 .IX Item "ev_set_syserr_cb (void (*cb)(const char *msg) throw ())"
410410 Set the callback function to call on a retryable system call error (such
411411 as failed select, poll, epoll_wait). The message is a printable string
412412 indicating the system call or subsystem causing the problem. If this
686686 kernel is more efficient (which says nothing about its actual speed, of
687687 course). While stopping, setting and starting an I/O watcher does never
688688 cause an extra system call as with \f(CW\*(C`EVBACKEND_EPOLL\*(C'\fR, it still adds up to
689 two event changes per incident. Support for \f(CW\*(C`fork ()\*(C'\fR is very bad (but
690 sane, unlike epoll) and it drops fds silently in similarly hard-to-detect
691 cases
689 two event changes per incident. Support for \f(CW\*(C`fork ()\*(C'\fR is very bad (you
690 might have to leak fd's on fork, but it's more sane than epoll) and it
691 drops fds silently in similarly hard-to-detect cases.
692692 .Sp
693693 This backend usually performs well under most conditions.
694694 .Sp
910910 .Sp
911911 Calling \f(CW\*(C`ev_suspend\*(C'\fR/\f(CW\*(C`ev_resume\*(C'\fR has the side effect of updating the
912912 event loop time (see \f(CW\*(C`ev_now_update\*(C'\fR).
913 .IP "ev_run (loop, int flags)" 4
914 .IX Item "ev_run (loop, int flags)"
913 .IP "bool ev_run (loop, int flags)" 4
914 .IX Item "bool ev_run (loop, int flags)"
915915 Finally, this is it, the event handler. This function usually is called
916916 after you have initialised all your watchers and you want to start
917917 handling events. It will ask the operating system for any new events, call
918 the watcher callbacks, an then repeat the whole process indefinitely: This
918 the watcher callbacks, and then repeat the whole process indefinitely: This
919919 is why event loops are called \fIloops\fR.
920920 .Sp
921921 If the flags argument is specified as \f(CW0\fR, it will keep handling events
922922 until either no event watchers are active anymore or \f(CW\*(C`ev_break\*(C'\fR was
923923 called.
924 .Sp
925 The return value is false if there are no more active watchers (which
926 usually means \*(L"all jobs done\*(R" or \*(L"deadlock\*(R"), and true in all other cases
927 (which usually means " you should call \f(CW\*(C`ev_run\*(C'\fR again").
924928 .Sp
925929 Please note that an explicit \f(CW\*(C`ev_break\*(C'\fR is usually better than
926930 relying on all watchers to be stopped when deciding when a program has
929933 of relying on its watchers stopping correctly, that is truly a thing of
930934 beauty.
931935 .Sp
932 This function is also \fImostly\fR exception-safe \- you can break out of
933 a \f(CW\*(C`ev_run\*(C'\fR call by calling \f(CW\*(C`longjmp\*(C'\fR in a callback, throwing a \*(C+
936 This function is \fImostly\fR exception-safe \- you can break out of a
937 \&\f(CW\*(C`ev_run\*(C'\fR call by calling \f(CW\*(C`longjmp\*(C'\fR in a callback, throwing a \*(C+
934938 exception and so on. This does not decrement the \f(CW\*(C`ev_depth\*(C'\fR value, nor
935939 will it clear any outstanding \f(CW\*(C`EVBREAK_ONE\*(C'\fR breaks.
936940 .Sp
11371141 .Sp
11381142 If you want to reset the callback, use \f(CW\*(C`ev_invoke_pending\*(C'\fR as new
11391143 callback.
1140 .IP "ev_set_loop_release_cb (loop, void (*release)(\s-1EV_P\s0), void (*acquire)(\s-1EV_P\s0))" 4
1141 .IX Item "ev_set_loop_release_cb (loop, void (*release)(EV_P), void (*acquire)(EV_P))"
1144 .IP "ev_set_loop_release_cb (loop, void (*release)(\s-1EV_P\s0) throw (), void (*acquire)(\s-1EV_P\s0) throw ())" 4
1145 .IX Item "ev_set_loop_release_cb (loop, void (*release)(EV_P) throw (), void (*acquire)(EV_P) throw ())"
11421146 Sometimes you want to share the same loop between multiple threads. This
11431147 can be done relatively simply by putting mutex_lock/unlock calls around
11441148 each call to a libev function.
12961300 .el .IP "\f(CWEV_CHECK\fR" 4
12971301 .IX Item "EV_CHECK"
12981302 .PD
1299 All \f(CW\*(C`ev_prepare\*(C'\fR watchers are invoked just \fIbefore\fR \f(CW\*(C`ev_run\*(C'\fR starts
1300 to gather new events, and all \f(CW\*(C`ev_check\*(C'\fR watchers are invoked just after
1301 \&\f(CW\*(C`ev_run\*(C'\fR has gathered them, but before it invokes any callbacks for any
1302 received events. Callbacks of both watcher types can start and stop as
1303 many watchers as they want, and all of them will be taken into account
1304 (for example, a \f(CW\*(C`ev_prepare\*(C'\fR watcher might start an idle watcher to keep
1305 \&\f(CW\*(C`ev_run\*(C'\fR from blocking).
1303 All \f(CW\*(C`ev_prepare\*(C'\fR watchers are invoked just \fIbefore\fR \f(CW\*(C`ev_run\*(C'\fR starts to
1304 gather new events, and all \f(CW\*(C`ev_check\*(C'\fR watchers are queued (not invoked)
1305 just after \f(CW\*(C`ev_run\*(C'\fR has gathered them, but before it queues any callbacks
1306 for any received events. That means \f(CW\*(C`ev_prepare\*(C'\fR watchers are the last
1307 watchers invoked before the event loop sleeps or polls for new events, and
1308 \&\f(CW\*(C`ev_check\*(C'\fR watchers will be invoked before any other watchers of the same
1309 or lower priority within an event loop iteration.
1310 .Sp
1311 Callbacks of both watcher types can start and stop as many watchers as
1312 they want, and all of them will be taken into account (for example, a
1313 \&\f(CW\*(C`ev_prepare\*(C'\fR watcher might start an idle watcher to keep \f(CW\*(C`ev_run\*(C'\fR from
1314 blocking).
13061315 .ie n .IP """EV_EMBED""" 4
13071316 .el .IP "\f(CWEV_EMBED\fR" 4
13081317 .IX Item "EV_EMBED"
14331442 .IP "callback ev_cb (ev_TYPE *watcher)" 4
14341443 .IX Item "callback ev_cb (ev_TYPE *watcher)"
14351444 Returns the callback currently set on the watcher.
1436 .IP "ev_cb_set (ev_TYPE *watcher, callback)" 4
1437 .IX Item "ev_cb_set (ev_TYPE *watcher, callback)"
1445 .IP "ev_set_cb (ev_TYPE *watcher, callback)" 4
1446 .IX Item "ev_set_cb (ev_TYPE *watcher, callback)"
14381447 Change the callback. You can change the callback at virtually any time
14391448 (modulo threads).
14401449 .IP "ev_set_priority (ev_TYPE *watcher, int priority)" 4
15001509 active, pending and so on. In this section these states and the rules to
15011510 transition between them will be described in more detail \- and while these
15021511 rules might look complicated, they usually do \*(L"the right thing\*(R".
1503 .IP "initialiased" 4
1504 .IX Item "initialiased"
1512 .IP "initialised" 4
1513 .IX Item "initialised"
15051514 Before a watcher can be registered with the event loop it has to be
15061515 initialised. This can be done with a call to \f(CW\*(C`ev_TYPE_init\*(C'\fR, or calls to
15071516 \&\f(CW\*(C`ev_init\*(C'\fR followed by the watcher-specific \f(CW\*(C`ev_TYPE_set\*(C'\fR function.
19912000 \& // calculate when the timeout would happen
19922001 \& ev_tstamp after = last_activity \- ev_now (EV_A) + timeout;
19932002 \&
1994 \& // if negative, it means we the timeout already occured
2003 \& // if negative, it means we the timeout already occurred
19952004 \& if (after < 0.)
19962005 \& {
19972006 \& // timeout occurred, take action
20202029 and simply start the timer with this timeout value.
20212030 .Sp
20222031 In other words, each time the callback is invoked it will check whether
2023 the timeout cocured. If not, it will simply reschedule itself to check
2032 the timeout occurred. If not, it will simply reschedule itself to check
20242033 again at the earliest time it could time out. Rinse. Repeat.
20252034 .Sp
20262035 This scheme causes more callback invocations (about one every 60 seconds
20482057 .Sp
20492058 When your timeout value changes, then the timeout can be changed by simply
20502059 providing a new value, stopping the timer and calling the callback, which
2051 will agaion do the right thing (for example, time out immediately :).
2060 will again do the right thing (for example, time out immediately :).
20522061 .Sp
20532062 .Vb 3
20542063 \& timeout = new_value;
27322741 .IX Subsection "ev_stat - did the file attributes just change?"
27332742 This watches a file system path for attribute changes. That is, it calls
27342743 \&\f(CW\*(C`stat\*(C'\fR on that path in regular intervals (or when the \s-1OS\s0 says it changed)
2735 and sees if it changed compared to the last time, invoking the callback if
2736 it did.
2744 and sees if it changed compared to the last time, invoking the callback
2745 if it did. Starting the watcher \f(CW\*(C`stat\*(C'\fR's the file, so only changes that
2746 happen after the watcher has been started will be reported.
27372747 .PP
27382748 The path does not need to exist: changing from \*(L"path exists\*(R" to \*(L"path does
27392749 not exist\*(R" is a status change like any other. The condition \*(L"path does not
29742984 \&\*(L"pseudo-background processing\*(R", or delay processing stuff to after the
29752985 event loop has handled all outstanding events.
29762986 .PP
2987 \fIAbusing an \f(CI\*(C`ev_idle\*(C'\fI watcher for its side-effect\fR
2988 .IX Subsection "Abusing an ev_idle watcher for its side-effect"
2989 .PP
2990 As long as there is at least one active idle watcher, libev will never
2991 sleep unnecessarily. Or in other words, it will loop as fast as possible.
2992 For this to work, the idle watcher doesn't need to be invoked at all \- the
2993 lowest priority will do.
2994 .PP
2995 This mode of operation can be useful together with an \f(CW\*(C`ev_check\*(C'\fR watcher,
2996 to do something on each event loop iteration \- for example to balance load
2997 between different connections.
2998 .PP
2999 See \*(L"Abusing an ev_check watcher for its side-effect\*(R" for a longer
3000 example.
3001 .PP
29773002 \fIWatcher-Specific Functions and Data Members\fR
29783003 .IX Subsection "Watcher-Specific Functions and Data Members"
29793004 .IP "ev_idle_init (ev_idle *, callback)" 4
29883013 Example: Dynamically allocate an \f(CW\*(C`ev_idle\*(C'\fR watcher, start it, and in the
29893014 callback, free it. Also, use no error checking, as usual.
29903015 .PP
2991 .Vb 7
3016 .Vb 5
29923017 \& static void
29933018 \& idle_cb (struct ev_loop *loop, ev_idle *w, int revents)
29943019 \& {
3020 \& // stop the watcher
3021 \& ev_idle_stop (loop, w);
3022 \&
3023 \& // now we can free it
29953024 \& free (w);
3025 \&
29963026 \& // now do something you wanted to do when the program has
29973027 \& // no longer anything immediate to do.
29983028 \& }
30043034 .ie n .SS """ev_prepare"" and ""ev_check"" \- customise your event loop!"
30053035 .el .SS "\f(CWev_prepare\fP and \f(CWev_check\fP \- customise your event loop!"
30063036 .IX Subsection "ev_prepare and ev_check - customise your event loop!"
3007 Prepare and check watchers are usually (but not always) used in pairs:
3037 Prepare and check watchers are often (but not always) used in pairs:
30083038 prepare watchers get invoked before the process blocks and check watchers
30093039 afterwards.
30103040 .PP
30423072 loop from blocking if lower-priority coroutines are active, thus mapping
30433073 low-priority coroutines to idle/background tasks).
30443074 .PP
3045 It is recommended to give \f(CW\*(C`ev_check\*(C'\fR watchers highest (\f(CW\*(C`EV_MAXPRI\*(C'\fR)
3046 priority, to ensure that they are being run before any other watchers
3047 after the poll (this doesn't matter for \f(CW\*(C`ev_prepare\*(C'\fR watchers).
3075 When used for this purpose, it is recommended to give \f(CW\*(C`ev_check\*(C'\fR watchers
3076 highest (\f(CW\*(C`EV_MAXPRI\*(C'\fR) priority, to ensure that they are being run before
3077 any other watchers after the poll (this doesn't matter for \f(CW\*(C`ev_prepare\*(C'\fR
3078 watchers).
30483079 .PP
30493080 Also, \f(CW\*(C`ev_check\*(C'\fR watchers (and \f(CW\*(C`ev_prepare\*(C'\fR watchers, too) should not
30503081 activate (\*(L"feed\*(R") events into libev. While libev fully supports this, they
30533084 loops those other event loops might be in an unusable state until their
30543085 \&\f(CW\*(C`ev_check\*(C'\fR watcher ran (always remind yourself to coexist peacefully with
30553086 others).
3087 .PP
3088 \fIAbusing an \f(CI\*(C`ev_check\*(C'\fI watcher for its side-effect\fR
3089 .IX Subsection "Abusing an ev_check watcher for its side-effect"
3090 .PP
3091 \&\f(CW\*(C`ev_check\*(C'\fR (and less often also \f(CW\*(C`ev_prepare\*(C'\fR) watchers can also be
3092 useful because they are called once per event loop iteration. For
3093 example, if you want to handle a large number of connections fairly, you
3094 normally only do a bit of work for each active connection, and if there
3095 is more work to do, you wait for the next event loop iteration, so other
3096 connections have a chance of making progress.
3097 .PP
3098 Using an \f(CW\*(C`ev_check\*(C'\fR watcher is almost enough: it will be called on the
3099 next event loop iteration. However, that isn't as soon as possible \-
3100 without external events, your \f(CW\*(C`ev_check\*(C'\fR watcher will not be invoked.
3101 .PP
3102 This is where \f(CW\*(C`ev_idle\*(C'\fR watchers come in handy \- all you need is a
3103 single global idle watcher that is active as long as you have one active
3104 \&\f(CW\*(C`ev_check\*(C'\fR watcher. The \f(CW\*(C`ev_idle\*(C'\fR watcher makes sure the event loop
3105 will not sleep, and the \f(CW\*(C`ev_check\*(C'\fR watcher makes sure a callback gets
3106 invoked. Neither watcher alone can do that.
30563107 .PP
30573108 \fIWatcher-Specific Functions and Data Members\fR
30583109 .IX Subsection "Watcher-Specific Functions and Data Members"
32673318 .IP "ev_embed_init (ev_embed *, callback, struct ev_loop *embedded_loop)" 4
32683319 .IX Item "ev_embed_init (ev_embed *, callback, struct ev_loop *embedded_loop)"
32693320 .PD 0
3270 .IP "ev_embed_set (ev_embed *, callback, struct ev_loop *embedded_loop)" 4
3271 .IX Item "ev_embed_set (ev_embed *, callback, struct ev_loop *embedded_loop)"
3321 .IP "ev_embed_set (ev_embed *, struct ev_loop *embedded_loop)" 4
3322 .IX Item "ev_embed_set (ev_embed *, struct ev_loop *embedded_loop)"
32723323 .PD
32733324 Configures the watcher to embed the given loop, which must be
32743325 embeddable. If the callback is \f(CW0\fR, then \f(CW\*(C`ev_embed_sweep\*(C'\fR will be
33413392 .IX Subsection "ev_fork - the audacity to resume the event loop after a fork"
33423393 Fork watchers are called when a \f(CW\*(C`fork ()\*(C'\fR was detected (usually because
33433394 whoever is a good citizen cared to tell libev about it by calling
3344 \&\f(CW\*(C`ev_default_fork\*(C'\fR or \f(CW\*(C`ev_loop_fork\*(C'\fR). The invocation is done before the
3345 event loop blocks next and before \f(CW\*(C`ev_check\*(C'\fR watchers are being called,
3346 and only in the child after the fork. If whoever good citizen calling
3347 \&\f(CW\*(C`ev_default_fork\*(C'\fR cheats and calls it in the wrong process, the fork
3348 handlers will be invoked, too, of course.
3395 \&\f(CW\*(C`ev_loop_fork\*(C'\fR). The invocation is done before the event loop blocks next
3396 and before \f(CW\*(C`ev_check\*(C'\fR watchers are being called, and only in the child
3397 after the fork. If whoever good citizen calling \f(CW\*(C`ev_default_fork\*(C'\fR cheats
3398 and calls it in the wrong process, the fork handlers will be invoked, too,
3399 of course.
33493400 .PP
33503401 \fIThe special problem of life after fork \- how is it possible?\fR
33513402 .IX Subsection "The special problem of life after fork - how is it possible?"
34413492 This functionality is very similar to \f(CW\*(C`ev_signal\*(C'\fR watchers, as signals,
34423493 too, are asynchronous in nature, and signals, too, will be compressed
34433494 (i.e. the number of callback invocations may be less than the number of
3444 \&\f(CW\*(C`ev_async_sent\*(C'\fR calls). In fact, you could use signal watchers as a kind
3495 \&\f(CW\*(C`ev_async_send\*(C'\fR calls). In fact, you could use signal watchers as a kind
34453496 of \*(L"global async watchers\*(R" by using a watcher on an otherwise unused
34463497 signal, and \f(CW\*(C`ev_feed_signal\*(C'\fR to signal this watcher from another thread,
34473498 even without knowing which loop owns the signal.
37323783 A common way around all these issues is to make sure that
37333784 \&\f(CW\*(C`start_new_request\*(C'\fR \fIalways\fR returns before the callback is invoked. If
37343785 \&\f(CW\*(C`start_new_request\*(C'\fR immediately knows the result, it can artificially
3735 delay invoking the callback by e.g. using a \f(CW\*(C`prepare\*(C'\fR or \f(CW\*(C`idle\*(C'\fR watcher
3736 for example, or more sneakily, by reusing an existing (stopped) watcher
3737 and pushing it into the pending queue:
3786 delay invoking the callback by using a \f(CW\*(C`prepare\*(C'\fR or \f(CW\*(C`idle\*(C'\fR watcher for
3787 example, or more sneakily, by reusing an existing (stopped) watcher and
3788 pushing it into the pending queue:
37383789 .PP
37393790 .Vb 2
37403791 \& ev_set_cb (watcher, callback);
37533804 main \f(CW\*(C`ev_run\*(C'\fR call, but not the nested one (e.g. user clicked \*(L"Quit\*(R", but
37543805 a modal \*(L"Are you sure?\*(R" dialog is still waiting), or just the nested one
37553806 and not the main one (e.g. user clocked \*(L"Ok\*(R" in a modal dialog), or some
3756 other combination: In these cases, \f(CW\*(C`ev_break\*(C'\fR will not work alone.
3807 other combination: In these cases, a simple \f(CW\*(C`ev_break\*(C'\fR will not work.
37573808 .PP
37583809 The solution is to maintain \*(L"break this loop\*(R" variable for each \f(CW\*(C`ev_run\*(C'\fR
37593810 invocation, and use a loop around \f(CW\*(C`ev_run\*(C'\fR until the condition is
39684019 \& void
39694020 \& wait_for_event (ev_watcher *w)
39704021 \& {
3971 \& ev_cb_set (w) = current_coro;
4022 \& ev_set_cb (w, current_coro);
39724023 \& switch_to (libev_coro);
39734024 \& }
39744025 .Ve
39824033 switching to a coroutine, you push the watcher onto the queue and notify
39834034 any waiters.
39844035 .PP
3985 To embed libev, see \s-1EMBEDDING\s0, but in short, it's easiest to create two
4036 To embed libev, see \*(L"\s-1EMBEDDING\s0\*(R", but in short, it's easiest to create two
39864037 files, \fImy_ev.h\fR and \fImy_ev.c\fR that include the respective libev files:
39874038 .PP
39884039 .Vb 4
40314082 to use the libev header file and library.
40324083 .SH "\*(C+ SUPPORT"
40334084 .IX Header " SUPPORT"
4085 .SS "C \s-1API\s0"
4086 .IX Subsection "C API"
4087 The normal C \s-1API\s0 should work fine when used from \*(C+: both ev.h and the
4088 libev sources can be compiled as \*(C+. Therefore, code that uses the C \s-1API\s0
4089 will work fine.
4090 .PP
4091 Proper exception specifications might have to be added to callbacks passed
4092 to libev: exceptions may be thrown only from watcher callbacks, all
4093 other callbacks (allocator, syserr, loop acquire/release and periodic
4094 reschedule callbacks) must not throw exceptions, and might need a \f(CW\*(C`throw
4095 ()\*(C'\fR specification. If you have code that needs to be compiled as both C
4096 and \*(C+ you can use the \f(CW\*(C`EV_THROW\*(C'\fR macro for this:
4097 .PP
4098 .Vb 6
4099 \& static void
4100 \& fatal_error (const char *msg) EV_THROW
4101 \& {
4102 \& perror (msg);
4103 \& abort ();
4104 \& }
4105 \&
4106 \& ...
4107 \& ev_set_syserr_cb (fatal_error);
4108 .Ve
4109 .PP
4110 The only \s-1API\s0 functions that can currently throw exceptions are \f(CW\*(C`ev_run\*(C'\fR,
4111 \&\f(CW\*(C`ev_invoke\*(C'\fR, \f(CW\*(C`ev_invoke_pending\*(C'\fR and \f(CW\*(C`ev_loop_destroy\*(C'\fR (the latter
4112 because it runs cleanup watchers).
4113 .PP
4114 Throwing exceptions in watcher callbacks is only supported if libev itself
4115 is compiled with a \*(C+ compiler or your C and \*(C+ environments allow
4116 throwing exceptions through C libraries (most do).
4117 .SS "\*(C+ \s-1API\s0"
4118 .IX Subsection " API"
40344119 Libev comes with some simplistic wrapper classes for \*(C+ that mainly allow
40354120 you to use some convenience methods to start/stop watchers and also change
40364121 the callback model to a model using method callbacks on objects.
40564141 to add as long as they only need one additional pointer for context. If
40574142 you need support for other types of functors please contact the author
40584143 (preferably after implementing it).
4144 .PP
4145 For all this to work, your \*(C+ compiler either has to use the same calling
4146 conventions as your C compiler (for static member functions), or you have
4147 to embed libev and compile libev itself as \*(C+.
40594148 .PP
40604149 Here is a list of things available in the \f(CW\*(C`ev\*(C'\fR namespace:
40614150 .ie n .IP """ev::READ"", ""ev::WRITE"" etc." 4
41744263 do this when the watcher is inactive (and not pending either).
41754264 .IP "w\->set ([arguments])" 4
41764265 .IX Item "w->set ([arguments])"
4177 Basically the same as \f(CW\*(C`ev_TYPE_set\*(C'\fR, with the same arguments. Either this
4178 method or a suitable start method must be called at least once. Unlike the
4179 C counterpart, an active watcher gets automatically stopped and restarted
4180 when reconfiguring it with this method.
4266 Basically the same as \f(CW\*(C`ev_TYPE_set\*(C'\fR (except for \f(CW\*(C`ev::embed\*(C'\fR watchers>),
4267 with the same arguments. Either this method or a suitable start method
4268 must be called at least once. Unlike the C counterpart, an active watcher
4269 gets automatically stopped and restarted when reconfiguring it with this
4270 method.
4271 .Sp
4272 For \f(CW\*(C`ev::embed\*(C'\fR watchers this method is called \f(CW\*(C`set_embed\*(C'\fR, to avoid
4273 clashing with the \f(CW\*(C`set (loop)\*(C'\fR method.
41814274 .IP "w\->start ()" 4
41824275 .IX Item "w->start ()"
41834276 Starts the watcher. Note that there is no \f(CW\*(C`loop\*(C'\fR argument, as the
42774370 Brian Maher has written a partial interface to libev for lua (at the
42784371 time of this writing, only \f(CW\*(C`ev_io\*(C'\fR and \f(CW\*(C`ev_timer\*(C'\fR), to be found at
42794372 http://github.com/brimworks/lua\-ev <http://github.com/brimworks/lua-ev>.
4373 .IP "Javascript" 4
4374 .IX Item "Javascript"
4375 Node.js (<http://nodejs.org>) uses libev as the underlying event library.
4376 .IP "Others" 4
4377 .IX Item "Others"
4378 There are others, and I stopped counting.
42804379 .SH "MACRO MAGIC"
42814380 .IX Header "MACRO MAGIC"
42824381 Libev can be compiled with a variety of options, the most fundamental
45814680 macro can be used to override the \f(CW\*(C`close\*(C'\fR function, useful to unregister
45824681 file descriptors again. Note that the replacement function has to close
45834682 the underlying \s-1OS\s0 handle.
4683 .IP "\s-1EV_USE_WSASOCKET\s0" 4
4684 .IX Item "EV_USE_WSASOCKET"
4685 If defined to be \f(CW1\fR, libev will use \f(CW\*(C`WSASocket\*(C'\fR to create its internal
4686 communication socket, which works better in some environments. Otherwise,
4687 the normal \f(CW\*(C`socket\*(C'\fR function will be used, which works better in other
4688 environments.
45844689 .IP "\s-1EV_USE_POLL\s0" 4
45854690 .IX Item "EV_USE_POLL"
45864691 If defined to be \f(CW1\fR, libev will compile in support for the \f(CW\*(C`poll\*(C'\fR(2)
46274732 and makes libev faster.
46284733 .IP "\s-1EV_NO_THREADS\s0" 4
46294734 .IX Item "EV_NO_THREADS"
4630 If defined to be \f(CW1\fR, libev will assume that it will never be called
4631 from different threads, which is a stronger assumption than \f(CW\*(C`EV_NO_SMP\*(C'\fR,
4632 above. This reduces dependencies and makes libev faster.
4735 If defined to be \f(CW1\fR, libev will assume that it will never be called from
4736 different threads (that includes signal handlers), which is a stronger
4737 assumption than \f(CW\*(C`EV_NO_SMP\*(C'\fR, above. This reduces dependencies and makes
4738 libev faster.
46334739 .IP "\s-1EV_ATOMIC_T\s0" 4
46344740 .IX Item "EV_ATOMIC_T"
46354741 Libev requires an integer type (suitable for storing \f(CW0\fR or \f(CW1\fR) whose
4636 access is atomic and serialised with respect to other threads or signal
4637 contexts. No such type is easily found in the C language, so you can
4638 provide your own type that you know is safe for your purposes. It is used
4639 both for signal handler \*(L"locking\*(R" as well as for signal and thread safety
4640 in \f(CW\*(C`ev_async\*(C'\fR watchers.
4742 access is atomic with respect to other threads or signal contexts. No
4743 such type is easily found in the C language, so you can provide your own
4744 type that you know is safe for your purposes. It is used both for signal
4745 handler \*(L"locking\*(R" as well as for signal and thread safety in \f(CW\*(C`ev_async\*(C'\fR
4746 watchers.
46414747 .Sp
46424748 In the absence of this define, libev will use \f(CW\*(C`sig_atomic_t volatile\*(C'\fR
4643 (from \fIsignal.h\fR), which is usually good enough on most platforms,
4644 although strictly speaking using a type that also implies a memory fence
4645 is required.
4749 (from \fIsignal.h\fR), which is usually good enough on most platforms.
46464750 .IP "\s-1EV_H\s0 (h)" 4
46474751 .IX Item "EV_H (h)"
46484752 The name of the \fIev.h\fR header file used to include it. The default if
47194823 .Ve
47204824 .Sp
47214825 The actual value is a bitset, it can be a combination of the following
4722 values:
4826 values (by default, all of these are enabled):
47234827 .RS 4
47244828 .ie n .IP "1 \- faster/larger code" 4
47254829 .el .IP "\f(CW1\fR \- faster/larger code" 4
47324836 When optimising for size, use of compiler flags such as \f(CW\*(C`\-Os\*(C'\fR with
47334837 gcc is recommended, as well as \f(CW\*(C`\-DNDEBUG\*(C'\fR, as libev contains a number of
47344838 assertions.
4839 .Sp
4840 The default is off when \f(CW\*(C`_\|_OPTIMIZE_SIZE_\|_\*(C'\fR is defined by your compiler
4841 (e.g. gcc with \f(CW\*(C`\-Os\*(C'\fR).
47354842 .ie n .IP "2 \- faster/larger data structures" 4
47364843 .el .IP "\f(CW2\fR \- faster/larger data structures" 4
47374844 .IX Item "2 - faster/larger data structures"
47394846 hash table sizes and so on. This will usually further increase code size
47404847 and can additionally have an effect on the size of data structures at
47414848 runtime.
4849 .Sp
4850 The default is off when \f(CW\*(C`_\|_OPTIMIZE_SIZE_\|_\*(C'\fR is defined by your compiler
4851 (e.g. gcc with \f(CW\*(C`\-Os\*(C'\fR).
47424852 .ie n .IP "4 \- full \s-1API\s0 configuration" 4
47434853 .el .IP "\f(CW4\fR \- full \s-1API\s0 configuration" 4
47444854 .IX Item "4 - full API configuration"
53085418 \&\f(CW\*(C`pthread_sigmask\*(C'\fR could complicate things, however.
53095419 .Sp
53105420 The most portable way to handle signals is to block signals in all threads
5311 except the initial one, and run the default loop in the initial thread as
5312 well.
5421 except the initial one, and run the signal handling loop in the initial
5422 thread as well.
53135423 .ie n .IP """long"" must be large enough for common memory allocation sizes" 4
53145424 .el .IP "\f(CWlong\fR must be large enough for common memory allocation sizes" 4
53155425 .IX Item "long must be large enough for common memory allocation sizes"
54095519 .el .IP "\f(CWEV_COMPAT3\fR backwards compatibility mechanism" 4
54105520 .IX Item "EV_COMPAT3 backwards compatibility mechanism"
54115521 The backward compatibility mechanism can be controlled by
5412 \&\f(CW\*(C`EV_COMPAT3\*(C'\fR. See \*(L"\s-1MACROS\s0\*(R" in \s-1PREPROCESSOR\s0 \s-1SYMBOLS\s0 in the \s-1EMBEDDING\s0
5522 \&\f(CW\*(C`EV_COMPAT3\*(C'\fR. See \*(L"\s-1PREPROCESSOR\s0 \s-1SYMBOLS/MACROS\s0\*(R" in the \*(L"\s-1EMBEDDING\s0\*(R"
54135523 section.
54145524 .ie n .IP """ev_default_destroy"" and ""ev_default_fork"" have been removed" 4
54155525 .el .IP "\f(CWev_default_destroy\fR and \f(CWev_default_fork\fR have been removed" 4
+587
-260
ev.c less more
00 /*
11 * libev event processing core, watcher management
22 *
3 * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libev@schmorp.de>
3 * Copyright (c) 2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann <libev@schmorp.de>
44 * All rights reserved.
55 *
66 * Redistribution and use in source and binary forms, with or without modifica-
6060 # define EV_USE_MONOTONIC 1
6161 # endif
6262 # endif
63 # elif !defined(EV_USE_CLOCK_SYSCALL)
63 # elif !defined EV_USE_CLOCK_SYSCALL
6464 # define EV_USE_CLOCK_SYSCALL 0
6565 # endif
6666
202202 #else
203203 # include <io.h>
204204 # define WIN32_LEAN_AND_MEAN
205 # include <winsock2.h>
205206 # include <windows.h>
206207 # ifndef EV_SELECT_IS_WINSOCKET
207208 # define EV_SELECT_IS_WINSOCKET 1
220221 /* this block tries to deduce configuration from header-defined symbols and defaults */
221222
222223 /* try to deduce the maximum number of signals on this platform */
223 #if defined (EV_NSIG)
224 #if defined EV_NSIG
224225 /* use what's provided */
225 #elif defined (NSIG)
226 #elif defined NSIG
226227 # define EV_NSIG (NSIG)
227 #elif defined(_NSIG)
228 #elif defined _NSIG
228229 # define EV_NSIG (_NSIG)
229 #elif defined (SIGMAX)
230 #elif defined SIGMAX
230231 # define EV_NSIG (SIGMAX+1)
231 #elif defined (SIG_MAX)
232 #elif defined SIG_MAX
232233 # define EV_NSIG (SIG_MAX+1)
233 #elif defined (_SIG_MAX)
234 #elif defined _SIG_MAX
234235 # define EV_NSIG (_SIG_MAX+1)
235 #elif defined (MAXSIG)
236 #elif defined MAXSIG
236237 # define EV_NSIG (MAXSIG+1)
237 #elif defined (MAX_SIG)
238 #elif defined MAX_SIG
238239 # define EV_NSIG (MAX_SIG+1)
239 #elif defined (SIGARRAYSIZE)
240 #elif defined SIGARRAYSIZE
240241 # define EV_NSIG (SIGARRAYSIZE) /* Assume ary[SIGARRAYSIZE] */
241 #elif defined (_sys_nsig)
242 #elif defined _sys_nsig
242243 # define EV_NSIG (_sys_nsig) /* Solaris 2.5 */
243244 #else
244245 # error "unable to find value for NSIG, please report"
260261 #endif
261262
262263 #ifndef EV_USE_MONOTONIC
263 # if defined (_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0
264 # if defined _POSIX_MONOTONIC_CLOCK && _POSIX_MONOTONIC_CLOCK >= 0
264265 # define EV_USE_MONOTONIC EV_FEATURE_OS
265266 # else
266267 # define EV_USE_MONOTONIC 0
357358 # define EV_HEAP_CACHE_AT EV_FEATURE_DATA
358359 #endif
359360
361 #ifdef ANDROID
362 /* supposedly, android doesn't typedef fd_mask */
363 # undef EV_USE_SELECT
364 # define EV_USE_SELECT 0
365 /* supposedly, we need to include syscall.h, not sys/syscall.h, so just disable */
366 # undef EV_USE_CLOCK_SYSCALL
367 # define EV_USE_CLOCK_SYSCALL 0
368 #endif
369
370 /* aix's poll.h seems to cause lots of trouble */
371 #ifdef _AIX
372 /* AIX has a completely broken poll.h header */
373 # undef EV_USE_POLL
374 # define EV_USE_POLL 0
375 #endif
376
360377 /* on linux, we can use a (slow) syscall to avoid a dependency on pthread, */
361378 /* which makes programs even slower. might work on other unices, too. */
362379 #if EV_USE_CLOCK_SYSCALL
363 # include <syscall.h>
380 # include <sys/syscall.h>
364381 # ifdef SYS_clock_gettime
365382 # define clock_gettime(id, ts) syscall (SYS_clock_gettime, (id), (ts))
366383 # undef EV_USE_MONOTONIC
373390
374391 /* this block fixes any misconfiguration where we know we run into trouble otherwise */
375392
376 #ifdef _AIX
377 /* AIX has a completely broken poll.h header */
378 # undef EV_USE_POLL
379 # define EV_USE_POLL 0
380 #endif
381
382393 #ifndef CLOCK_MONOTONIC
383394 # undef EV_USE_MONOTONIC
384395 # define EV_USE_MONOTONIC 0
396407
397408 #if !EV_USE_NANOSLEEP
398409 /* hp-ux has it in sys/time.h, which we unconditionally include above */
399 # if !defined(_WIN32) && !defined(__hpux)
410 # if !defined _WIN32 && !defined __hpux
400411 # include <sys/select.h>
401412 # endif
402413 #endif
409420 # undef EV_USE_INOTIFY
410421 # define EV_USE_INOTIFY 0
411422 # endif
412 #endif
413
414 #if EV_SELECT_IS_WINSOCKET
415 # include <winsock.h>
416423 #endif
417424
418425 #if EV_USE_EVENTFD
508515 #ifndef ECB_H
509516 #define ECB_H
510517
518 /* 16 bits major, 16 bits minor */
519 #define ECB_VERSION 0x00010003
520
511521 #ifdef _WIN32
512522 typedef signed char int8_t;
513523 typedef unsigned char uint8_t;
522532 typedef signed __int64 int64_t;
523533 typedef unsigned __int64 uint64_t;
524534 #endif
535 #ifdef _WIN64
536 #define ECB_PTRSIZE 8
537 typedef uint64_t uintptr_t;
538 typedef int64_t intptr_t;
539 #else
540 #define ECB_PTRSIZE 4
541 typedef uint32_t uintptr_t;
542 typedef int32_t intptr_t;
543 #endif
525544 #else
526545 #include <inttypes.h>
546 #if UINTMAX_MAX > 0xffffffffU
547 #define ECB_PTRSIZE 8
548 #else
549 #define ECB_PTRSIZE 4
550 #endif
551 #endif
552
553 /* work around x32 idiocy by defining proper macros */
554 #if __x86_64 || _M_AMD64
555 #if __ILP32
556 #define ECB_AMD64_X32 1
557 #else
558 #define ECB_AMD64 1
559 #endif
527560 #endif
528561
529562 /* many compilers define _GNUC_ to some versions but then only implement
534567 * an issue with that they should have done it right in the first place.
535568 */
536569 #ifndef ECB_GCC_VERSION
537 #if !defined(__GNUC_MINOR__) || defined(__INTEL_COMPILER) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) || defined(__llvm__) || defined(__clang__)
570 #if !defined __GNUC_MINOR__ || defined __INTEL_COMPILER || defined __SUNPRO_C || defined __SUNPRO_CC || defined __llvm__ || defined __clang__
538571 #define ECB_GCC_VERSION(major,minor) 0
539572 #else
540573 #define ECB_GCC_VERSION(major,minor) (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))
541574 #endif
542575 #endif
543576
577 #define ECB_C (__STDC__+0) /* this assumes that __STDC__ is either empty or a number */
578 #define ECB_C99 (__STDC_VERSION__ >= 199901L)
579 #define ECB_C11 (__STDC_VERSION__ >= 201112L)
580 #define ECB_CPP (__cplusplus+0)
581 #define ECB_CPP11 (__cplusplus >= 201103L)
582
583 #if ECB_CPP
584 #define ECB_EXTERN_C extern "C"
585 #define ECB_EXTERN_C_BEG ECB_EXTERN_C {
586 #define ECB_EXTERN_C_END }
587 #else
588 #define ECB_EXTERN_C extern
589 #define ECB_EXTERN_C_BEG
590 #define ECB_EXTERN_C_END
591 #endif
592
544593 /*****************************************************************************/
545594
546595 /* ECB_NO_THREADS - ecb is not used by multiple threads, ever */
547596 /* ECB_NO_SMP - ecb might be used in multiple threads, but only on a single cpu */
548597
549598 #if ECB_NO_THREADS
550 # define ECB_NO_SMP 1
551 #endif
552
553 #if ECB_NO_THREADS || ECB_NO_SMP
599 #define ECB_NO_SMP 1
600 #endif
601
602 #if ECB_NO_SMP
554603 #define ECB_MEMORY_FENCE do { } while (0)
555604 #endif
556605
557606 #ifndef ECB_MEMORY_FENCE
558 #if ECB_GCC_VERSION(2,5) || defined(__INTEL_COMPILER) || (__llvm__ && __GNUC__) || __SUNPRO_C >= 0x5110 || __SUNPRO_CC >= 0x5110
607 #if ECB_GCC_VERSION(2,5) || defined __INTEL_COMPILER || (__llvm__ && __GNUC__) || __SUNPRO_C >= 0x5110 || __SUNPRO_CC >= 0x5110
559608 #if __i386 || __i386__
560609 #define ECB_MEMORY_FENCE __asm__ __volatile__ ("lock; orb $0, -1(%%esp)" : : : "memory")
561 #define ECB_MEMORY_FENCE_ACQUIRE ECB_MEMORY_FENCE /* non-lock xchg might be enough */
562 #define ECB_MEMORY_FENCE_RELEASE do { } while (0) /* unlikely to change in future cpus */
610 #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("" : : : "memory")
611 #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("")
563612 #elif __amd64 || __amd64__ || __x86_64 || __x86_64__
564 #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mfence" : : : "memory")
565 #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("lfence" : : : "memory")
566 #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("sfence") /* play safe - not needed in any current cpu */
613 #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mfence" : : : "memory")
614 #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("" : : : "memory")
615 #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("")
567616 #elif __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__
568 #define ECB_MEMORY_FENCE __asm__ __volatile__ ("sync" : : : "memory")
569 #elif defined(__ARM_ARCH_6__ ) || defined(__ARM_ARCH_6J__ ) \
570 || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6ZK__)
571 #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mcr p15,0,%0,c7,c10,5" : : "r" (0) : "memory")
572 #elif defined(__ARM_ARCH_7__ ) || defined(__ARM_ARCH_7A__ ) \
573 || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7R__ )
574 #define ECB_MEMORY_FENCE __asm__ __volatile__ ("dmb" : : : "memory")
617 #define ECB_MEMORY_FENCE __asm__ __volatile__ ("sync" : : : "memory")
618 #elif defined __ARM_ARCH_6__ || defined __ARM_ARCH_6J__ \
619 || defined __ARM_ARCH_6K__ || defined __ARM_ARCH_6ZK__
620 #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mcr p15,0,%0,c7,c10,5" : : "r" (0) : "memory")
621 #elif defined __ARM_ARCH_7__ || defined __ARM_ARCH_7A__ \
622 || defined __ARM_ARCH_7M__ || defined __ARM_ARCH_7R__
623 #define ECB_MEMORY_FENCE __asm__ __volatile__ ("dmb" : : : "memory")
575624 #elif __sparc || __sparc__
576 #define ECB_MEMORY_FENCE __asm__ __volatile__ ("membar #LoadStore | #LoadLoad | #StoreStore | #StoreLoad | " : : : "memory")
577 #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("membar #LoadStore | #LoadLoad" : : : "memory")
578 #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("membar #LoadStore | #StoreStore")
579 #elif defined(__s390__) || defined(__s390x__)
625 #define ECB_MEMORY_FENCE __asm__ __volatile__ ("membar #LoadStore | #LoadLoad | #StoreStore | #StoreLoad" : : : "memory")
626 #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("membar #LoadStore | #LoadLoad" : : : "memory")
627 #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("membar #LoadStore | #StoreStore")
628 #elif defined __s390__ || defined __s390x__
580629 #define ECB_MEMORY_FENCE __asm__ __volatile__ ("bcr 15,0" : : : "memory")
630 #elif defined __mips__
631 #define ECB_MEMORY_FENCE __asm__ __volatile__ ("sync" : : : "memory")
632 #elif defined __alpha__
633 #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mb" : : : "memory")
634 #elif defined __hppa__
635 #define ECB_MEMORY_FENCE __asm__ __volatile__ ("" : : : "memory")
636 #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("")
637 #elif defined __ia64__
638 #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mf" : : : "memory")
581639 #endif
582640 #endif
583641 #endif
584642
585643 #ifndef ECB_MEMORY_FENCE
586 #if ECB_GCC_VERSION(4,4) || defined(__INTEL_COMPILER) || defined(__clang__)
644 #if ECB_GCC_VERSION(4,7)
645 /* see comment below (stdatomic.h) about the C11 memory model. */
646 #define ECB_MEMORY_FENCE __atomic_thread_fence (__ATOMIC_SEQ_CST)
647
648 /* The __has_feature syntax from clang is so misdesigned that we cannot use it
649 * without risking compile time errors with other compilers. We *could*
650 * define our own ecb_clang_has_feature, but I just can't be bothered to work
651 * around this shit time and again.
652 * #elif defined __clang && __has_feature (cxx_atomic)
653 * // see comment below (stdatomic.h) about the C11 memory model.
654 * #define ECB_MEMORY_FENCE __c11_atomic_thread_fence (__ATOMIC_SEQ_CST)
655 */
656
657 #elif ECB_GCC_VERSION(4,4) || defined __INTEL_COMPILER || defined __clang__
587658 #define ECB_MEMORY_FENCE __sync_synchronize ()
588 /*#define ECB_MEMORY_FENCE_ACQUIRE ({ char dummy = 0; __sync_lock_test_and_set (&dummy, 1); }) */
589 /*#define ECB_MEMORY_FENCE_RELEASE ({ char dummy = 1; __sync_lock_release (&dummy ); }) */
590659 #elif _MSC_VER >= 1400 /* VC++ 2005 */
591660 #pragma intrinsic(_ReadBarrier,_WriteBarrier,_ReadWriteBarrier)
592661 #define ECB_MEMORY_FENCE _ReadWriteBarrier ()
593662 #define ECB_MEMORY_FENCE_ACQUIRE _ReadWriteBarrier () /* according to msdn, _ReadBarrier is not a load fence */
594663 #define ECB_MEMORY_FENCE_RELEASE _WriteBarrier ()
595 #elif defined(_WIN32)
664 #elif defined _WIN32
596665 #include <WinNT.h>
597666 #define ECB_MEMORY_FENCE MemoryBarrier () /* actually just xchg on x86... scary */
598667 #elif __SUNPRO_C >= 0x5110 || __SUNPRO_CC >= 0x5110
600669 #define ECB_MEMORY_FENCE __machine_rw_barrier ()
601670 #define ECB_MEMORY_FENCE_ACQUIRE __machine_r_barrier ()
602671 #define ECB_MEMORY_FENCE_RELEASE __machine_w_barrier ()
672 #elif __xlC__
673 #define ECB_MEMORY_FENCE __sync ()
674 #endif
675 #endif
676
677 #ifndef ECB_MEMORY_FENCE
678 #if ECB_C11 && !defined __STDC_NO_ATOMICS__
679 /* we assume that these memory fences work on all variables/all memory accesses, */
680 /* not just C11 atomics and atomic accesses */
681 #include <stdatomic.h>
682 /* Unfortunately, neither gcc 4.7 nor clang 3.1 generate any instructions for */
683 /* any fence other than seq_cst, which isn't very efficient for us. */
684 /* Why that is, we don't know - either the C11 memory model is quite useless */
685 /* for most usages, or gcc and clang have a bug */
686 /* I *currently* lean towards the latter, and inefficiently implement */
687 /* all three of ecb's fences as a seq_cst fence */
688 #define ECB_MEMORY_FENCE atomic_thread_fence (memory_order_seq_cst)
603689 #endif
604690 #endif
605691
621707 #endif
622708 #endif
623709
624 #if !defined(ECB_MEMORY_FENCE_ACQUIRE) && defined(ECB_MEMORY_FENCE)
710 #if !defined ECB_MEMORY_FENCE_ACQUIRE && defined ECB_MEMORY_FENCE
625711 #define ECB_MEMORY_FENCE_ACQUIRE ECB_MEMORY_FENCE
626712 #endif
627713
628 #if !defined(ECB_MEMORY_FENCE_RELEASE) && defined(ECB_MEMORY_FENCE)
714 #if !defined ECB_MEMORY_FENCE_RELEASE && defined ECB_MEMORY_FENCE
629715 #define ECB_MEMORY_FENCE_RELEASE ECB_MEMORY_FENCE
630716 #endif
631717
632718 /*****************************************************************************/
633
634 #define ECB_C99 (__STDC_VERSION__ >= 199901L)
635719
636720 #if __cplusplus
637721 #define ecb_inline static inline
680764 #endif
681765
682766 #define ecb_noinline ecb_attribute ((__noinline__))
683 #define ecb_noreturn ecb_attribute ((__noreturn__))
684767 #define ecb_unused ecb_attribute ((__unused__))
685768 #define ecb_const ecb_attribute ((__const__))
686769 #define ecb_pure ecb_attribute ((__pure__))
770
771 #if ECB_C11
772 #define ecb_noreturn _Noreturn
773 #else
774 #define ecb_noreturn ecb_attribute ((__noreturn__))
775 #endif
687776
688777 #if ECB_GCC_VERSION(4,3)
689778 #define ecb_artificial ecb_attribute ((__artificial__))
784873 }
785874 #endif
786875
876 ecb_function_ ecb_bool ecb_is_pot32 (uint32_t x) ecb_const;
877 ecb_function_ ecb_bool ecb_is_pot32 (uint32_t x) { return !(x & (x - 1)); }
878 ecb_function_ ecb_bool ecb_is_pot64 (uint64_t x) ecb_const;
879 ecb_function_ ecb_bool ecb_is_pot64 (uint64_t x) { return !(x & (x - 1)); }
880
787881 ecb_function_ uint8_t ecb_bitrev8 (uint8_t x) ecb_const;
788882 ecb_function_ uint8_t ecb_bitrev8 (uint8_t x)
789883 {
877971 #endif
878972
879973 /* try to tell the compiler that some condition is definitely true */
880 #define ecb_assume(cond) do { if (!(cond)) ecb_unreachable (); } while (0)
974 #define ecb_assume(cond) if (!(cond)) ecb_unreachable (); else 0
881975
882976 ecb_inline unsigned char ecb_byteorder_helper (void) ecb_const;
883977 ecb_inline unsigned char
884978 ecb_byteorder_helper (void)
885979 {
886 const uint32_t u = 0x11223344;
887 return *(unsigned char *)&u;
980 /* the union code still generates code under pressure in gcc, */
981 /* but less than using pointers, and always seems to */
982 /* successfully return a constant. */
983 /* the reason why we have this horrible preprocessor mess */
984 /* is to avoid it in all cases, at least on common architectures */
985 /* or when using a recent enough gcc version (>= 4.6) */
986 #if __i386 || __i386__ || _M_X86 || __amd64 || __amd64__ || _M_X64
987 return 0x44;
988 #elif __BYTE_ORDER__ && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
989 return 0x44;
990 #elif __BYTE_ORDER__ && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
991 return 0x11;
992 #else
993 union
994 {
995 uint32_t i;
996 uint8_t c;
997 } u = { 0x11223344 };
998 return u.c;
999 #endif
8881000 }
8891001
8901002 ecb_inline ecb_bool ecb_big_endian (void) ecb_const;
9251037 #define ecb_array_length(name) (sizeof (name) / sizeof (name [0]))
9261038 #endif
9271039
1040 /*******************************************************************************/
1041 /* floating point stuff, can be disabled by defining ECB_NO_LIBM */
1042
1043 /* basically, everything uses "ieee pure-endian" floating point numbers */
1044 /* the only noteworthy exception is ancient armle, which uses order 43218765 */
1045 #if 0 \
1046 || __i386 || __i386__ \
1047 || __amd64 || __amd64__ || __x86_64 || __x86_64__ \
1048 || __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ \
1049 || defined __arm__ && defined __ARM_EABI__ \
1050 || defined __s390__ || defined __s390x__ \
1051 || defined __mips__ \
1052 || defined __alpha__ \
1053 || defined __hppa__ \
1054 || defined __ia64__ \
1055 || defined _M_IX86 || defined _M_AMD64 || defined _M_IA64
1056 #define ECB_STDFP 1
1057 #include <string.h> /* for memcpy */
1058 #else
1059 #define ECB_STDFP 0
1060 #include <math.h> /* for frexp*, ldexp* */
1061 #endif
1062
1063 #ifndef ECB_NO_LIBM
1064
1065 /* convert a float to ieee single/binary32 */
1066 ecb_function_ uint32_t ecb_float_to_binary32 (float x) ecb_const;
1067 ecb_function_ uint32_t
1068 ecb_float_to_binary32 (float x)
1069 {
1070 uint32_t r;
1071
1072 #if ECB_STDFP
1073 memcpy (&r, &x, 4);
1074 #else
1075 /* slow emulation, works for anything but -0 */
1076 uint32_t m;
1077 int e;
1078
1079 if (x == 0e0f ) return 0x00000000U;
1080 if (x > +3.40282346638528860e+38f) return 0x7f800000U;
1081 if (x < -3.40282346638528860e+38f) return 0xff800000U;
1082 if (x != x ) return 0x7fbfffffU;
1083
1084 m = frexpf (x, &e) * 0x1000000U;
1085
1086 r = m & 0x80000000U;
1087
1088 if (r)
1089 m = -m;
1090
1091 if (e <= -126)
1092 {
1093 m &= 0xffffffU;
1094 m >>= (-125 - e);
1095 e = -126;
1096 }
1097
1098 r |= (e + 126) << 23;
1099 r |= m & 0x7fffffU;
1100 #endif
1101
1102 return r;
1103 }
1104
1105 /* converts an ieee single/binary32 to a float */
1106 ecb_function_ float ecb_binary32_to_float (uint32_t x) ecb_const;
1107 ecb_function_ float
1108 ecb_binary32_to_float (uint32_t x)
1109 {
1110 float r;
1111
1112 #if ECB_STDFP
1113 memcpy (&r, &x, 4);
1114 #else
1115 /* emulation, only works for normals and subnormals and +0 */
1116 int neg = x >> 31;
1117 int e = (x >> 23) & 0xffU;
1118
1119 x &= 0x7fffffU;
1120
1121 if (e)
1122 x |= 0x800000U;
1123 else
1124 e = 1;
1125
1126 /* we distrust ldexpf a bit and do the 2**-24 scaling by an extra multiply */
1127 r = ldexpf (x * (0.5f / 0x800000U), e - 126);
1128
1129 r = neg ? -r : r;
1130 #endif
1131
1132 return r;
1133 }
1134
1135 /* convert a double to ieee double/binary64 */
1136 ecb_function_ uint64_t ecb_double_to_binary64 (double x) ecb_const;
1137 ecb_function_ uint64_t
1138 ecb_double_to_binary64 (double x)
1139 {
1140 uint64_t r;
1141
1142 #if ECB_STDFP
1143 memcpy (&r, &x, 8);
1144 #else
1145 /* slow emulation, works for anything but -0 */
1146 uint64_t m;
1147 int e;
1148
1149 if (x == 0e0 ) return 0x0000000000000000U;
1150 if (x > +1.79769313486231470e+308) return 0x7ff0000000000000U;
1151 if (x < -1.79769313486231470e+308) return 0xfff0000000000000U;
1152 if (x != x ) return 0X7ff7ffffffffffffU;
1153
1154 m = frexp (x, &e) * 0x20000000000000U;
1155
1156 r = m & 0x8000000000000000;;
1157
1158 if (r)
1159 m = -m;
1160
1161 if (e <= -1022)
1162 {
1163 m &= 0x1fffffffffffffU;
1164 m >>= (-1021 - e);
1165 e = -1022;
1166 }
1167
1168 r |= ((uint64_t)(e + 1022)) << 52;
1169 r |= m & 0xfffffffffffffU;
1170 #endif
1171
1172 return r;
1173 }
1174
1175 /* converts an ieee double/binary64 to a double */
1176 ecb_function_ double ecb_binary64_to_double (uint64_t x) ecb_const;
1177 ecb_function_ double
1178 ecb_binary64_to_double (uint64_t x)
1179 {
1180 double r;
1181
1182 #if ECB_STDFP
1183 memcpy (&r, &x, 8);
1184 #else
1185 /* emulation, only works for normals and subnormals and +0 */
1186 int neg = x >> 63;
1187 int e = (x >> 52) & 0x7ffU;
1188
1189 x &= 0xfffffffffffffU;
1190
1191 if (e)
1192 x |= 0x10000000000000U;
1193 else
1194 e = 1;
1195
1196 /* we distrust ldexp a bit and do the 2**-53 scaling by an extra multiply */
1197 r = ldexp (x * (0.5 / 0x10000000000000U), e - 1022);
1198
1199 r = neg ? -r : r;
1200 #endif
1201
1202 return r;
1203 }
1204
1205 #endif
1206
9281207 #endif
9291208
9301209 /* ECB.H END */
11001379 }
11011380 #endif
11021381
1103 static void (*syserr_cb)(const char *msg);
1382 static void (*syserr_cb)(const char *msg) EV_THROW;
11041383
11051384 void ecb_cold
1106 ev_set_syserr_cb (void (*cb)(const char *msg))
1385 ev_set_syserr_cb (void (*cb)(const char *msg) EV_THROW) EV_THROW
11071386 {
11081387 syserr_cb = cb;
11091388 }
11311410 }
11321411
11331412 static void *
1134 ev_realloc_emul (void *ptr, long size)
1135 {
1136 #if __GLIBC__
1137 return realloc (ptr, size);
1138 #else
1413 ev_realloc_emul (void *ptr, long size) EV_THROW
1414 {
11391415 /* some systems, notably openbsd and darwin, fail to properly
11401416 * implement realloc (x, 0) (as required by both ansi c-89 and
11411417 * the single unix specification, so work around them here.
1418 * recently, also (at least) fedora and debian started breaking it,
1419 * despite documenting it otherwise.
11421420 */
11431421
11441422 if (size)
11461424
11471425 free (ptr);
11481426 return 0;
1149 #endif
1150 }
1151
1152 static void *(*alloc)(void *ptr, long size) = ev_realloc_emul;
1427 }
1428
1429 static void *(*alloc)(void *ptr, long size) EV_THROW = ev_realloc_emul;
11531430
11541431 void ecb_cold
1155 ev_set_allocator (void *(*cb)(void *ptr, long size))
1432 ev_set_allocator (void *(*cb)(void *ptr, long size) EV_THROW) EV_THROW
11561433 {
11571434 alloc = cb;
11581435 }
12791556
12801557 #ifndef EV_HAVE_EV_TIME
12811558 ev_tstamp
1282 ev_time (void)
1559 ev_time (void) EV_THROW
12831560 {
12841561 #if EV_USE_REALTIME
12851562 if (expect_true (have_realtime))
13131590
13141591 #if EV_MULTIPLICITY
13151592 ev_tstamp
1316 ev_now (EV_P)
1593 ev_now (EV_P) EV_THROW
13171594 {
13181595 return ev_rt_now;
13191596 }
13201597 #endif
13211598
13221599 void
1323 ev_sleep (ev_tstamp delay)
1600 ev_sleep (ev_tstamp delay) EV_THROW
13241601 {
13251602 if (delay > 0.)
13261603 {
13291606
13301607 EV_TS_SET (ts, delay);
13311608 nanosleep (&ts, 0);
1332 #elif defined(_WIN32)
1609 #elif defined _WIN32
13331610 Sleep ((unsigned long)(delay * 1e3));
13341611 #else
13351612 struct timeval tv;
14111688 }
14121689
14131690 void noinline
1414 ev_feed_event (EV_P_ void *w, int revents)
1691 ev_feed_event (EV_P_ void *w, int revents) EV_THROW
14151692 {
14161693 W w_ = (W)w;
14171694 int pri = ABSPRI (w_);
14251702 pendings [pri][w_->pending - 1].w = w_;
14261703 pendings [pri][w_->pending - 1].events = revents;
14271704 }
1705
1706 pendingpri = NUMPRI - 1;
14281707 }
14291708
14301709 inline_speed void
14801759 }
14811760
14821761 void
1483 ev_feed_fd_event (EV_P_ int fd, int revents)
1762 ev_feed_fd_event (EV_P_ int fd, int revents) EV_THROW
14841763 {
14851764 if (fd >= 0 && fd < anfdmax)
14861765 fd_event_nocheck (EV_A_ fd, revents);
18092088 {
18102089 if (!ev_is_active (&pipe_w))
18112090 {
2091 int fds [2];
2092
18122093 # if EV_USE_EVENTFD
1813 evfd = eventfd (0, EFD_NONBLOCK | EFD_CLOEXEC);
1814 if (evfd < 0 && errno == EINVAL)
1815 evfd = eventfd (0, 0);
1816
1817 if (evfd >= 0)
2094 fds [0] = -1;
2095 fds [1] = eventfd (0, EFD_NONBLOCK | EFD_CLOEXEC);
2096 if (fds [1] < 0 && errno == EINVAL)
2097 fds [1] = eventfd (0, 0);
2098
2099 if (fds [1] < 0)
2100 # endif
18182101 {
1819 evpipe [0] = -1;
1820 fd_intern (evfd); /* doing it twice doesn't hurt */
1821 ev_io_set (&pipe_w, evfd, EV_READ);
2102 while (pipe (fds))
2103 ev_syserr ("(libev) error creating signal/async pipe");
2104
2105 fd_intern (fds [0]);
2106 }
2107
2108 fd_intern (fds [1]);
2109
2110 evpipe [0] = fds [0];
2111
2112 if (evpipe [1] < 0)
2113 evpipe [1] = fds [1]; /* first call, set write fd */
2114 else
2115 {
2116 /* on subsequent calls, do not change evpipe [1] */
2117 /* so that evpipe_write can always rely on its value. */
2118 /* this branch does not do anything sensible on windows, */
2119 /* so must not be executed on windows */
2120
2121 dup2 (fds [1], evpipe [1]);
2122 close (fds [1]);
2123 }
2124
2125 ev_io_set (&pipe_w, evpipe [0] < 0 ? evpipe [1] : evpipe [0], EV_READ);
2126 ev_io_start (EV_A_ &pipe_w);
2127 ev_unref (EV_A); /* watcher should not keep loop alive */
2128 }
2129 }
2130
2131 inline_speed void
2132 evpipe_write (EV_P_ EV_ATOMIC_T *flag)
2133 {
2134 ECB_MEMORY_FENCE; /* push out the write before this function was called, acquire flag */
2135
2136 if (expect_true (*flag))
2137 return;
2138
2139 *flag = 1;
2140 ECB_MEMORY_FENCE_RELEASE; /* make sure flag is visible before the wakeup */
2141
2142 pipe_write_skipped = 1;
2143
2144 ECB_MEMORY_FENCE; /* make sure pipe_write_skipped is visible before we check pipe_write_wanted */
2145
2146 if (pipe_write_wanted)
2147 {
2148 int old_errno;
2149
2150 pipe_write_skipped = 0;
2151 ECB_MEMORY_FENCE_RELEASE;
2152
2153 old_errno = errno; /* save errno because write will clobber it */
2154
2155 #if EV_USE_EVENTFD
2156 if (evpipe [0] < 0)
2157 {
2158 uint64_t counter = 1;
2159 write (evpipe [1], &counter, sizeof (uint64_t));
18222160 }
18232161 else
1824 # endif
2162 #endif
18252163 {
1826 while (pipe (evpipe))
1827 ev_syserr ("(libev) error creating signal/async pipe");
1828
1829 fd_intern (evpipe [0]);
1830 fd_intern (evpipe [1]);
1831 ev_io_set (&pipe_w, evpipe [0], EV_READ);
1832 }
1833
1834 ev_io_start (EV_A_ &pipe_w);
1835 ev_unref (EV_A); /* watcher should not keep loop alive */
1836 }
1837 }
1838
1839 inline_speed void
1840 evpipe_write (EV_P_ EV_ATOMIC_T *flag)
1841 {
1842 if (expect_true (*flag))
1843 return;
1844
1845 *flag = 1;
1846
1847 ECB_MEMORY_FENCE_RELEASE; /* make sure flag is visible before the wakeup */
1848
1849 pipe_write_skipped = 1;
1850
1851 ECB_MEMORY_FENCE; /* make sure pipe_write_skipped is visible before we check pipe_write_wanted */
1852
1853 if (pipe_write_wanted)
1854 {
1855 int old_errno;
1856
1857 pipe_write_skipped = 0; /* just an optimisation, no fence needed */
1858
1859 old_errno = errno; /* save errno because write will clobber it */
1860
1861 #if EV_USE_EVENTFD
1862 if (evfd >= 0)
1863 {
1864 uint64_t counter = 1;
1865 write (evfd, &counter, sizeof (uint64_t));
1866 }
1867 else
1868 #endif
1869 {
1870 /* win32 people keep sending patches that change this write() to send() */
1871 /* and then run away. but send() is wrong, it wants a socket handle on win32 */
1872 /* so when you think this write should be a send instead, please find out */
1873 /* where your send() is from - it's definitely not the microsoft send, and */
1874 /* tell me. thank you. */
2164 #ifdef _WIN32
2165 WSABUF buf;
2166 DWORD sent;
2167 buf.buf = &buf;
2168 buf.len = 1;
2169 WSASend (EV_FD_TO_WIN32_HANDLE (evpipe [1]), &buf, 1, &sent, 0, 0, 0);
2170 #else
18752171 write (evpipe [1], &(evpipe [1]), 1);
2172 #endif
18762173 }
18772174
18782175 errno = old_errno;
18892186 if (revents & EV_READ)
18902187 {
18912188 #if EV_USE_EVENTFD
1892 if (evfd >= 0)
2189 if (evpipe [0] < 0)
18932190 {
18942191 uint64_t counter;
1895 read (evfd, &counter, sizeof (uint64_t));
2192 read (evpipe [1], &counter, sizeof (uint64_t));
18962193 }
18972194 else
18982195 #endif
18992196 {
1900 char dummy;
1901 /* see discussion in evpipe_write when you think this read should be recv in win32 */
1902 read (evpipe [0], &dummy, 1);
2197 char dummy[4];
2198 #ifdef _WIN32
2199 WSABUF buf;
2200 DWORD recvd;
2201 DWORD flags = 0;
2202 buf.buf = dummy;
2203 buf.len = sizeof (dummy);
2204 WSARecv (EV_FD_TO_WIN32_HANDLE (evpipe [0]), &buf, 1, &recvd, &flags, 0, 0);
2205 #else
2206 read (evpipe [0], &dummy, sizeof (dummy));
2207 #endif
19032208 }
19042209 }
19052210
19062211 pipe_write_skipped = 0;
2212
2213 ECB_MEMORY_FENCE; /* push out skipped, acquire flags */
19072214
19082215 #if EV_SIGNAL_ENABLE
19092216 if (sig_pending)
19102217 {
19112218 sig_pending = 0;
2219
2220 ECB_MEMORY_FENCE;
19122221
19132222 for (i = EV_NSIG - 1; i--; )
19142223 if (expect_false (signals [i].pending))
19202229 if (async_pending)
19212230 {
19222231 async_pending = 0;
2232
2233 ECB_MEMORY_FENCE;
19232234
19242235 for (i = asynccnt; i--; )
19252236 if (asyncs [i]->sent)
19262237 {
19272238 asyncs [i]->sent = 0;
2239 ECB_MEMORY_FENCE_RELEASE;
19282240 ev_feed_event (EV_A_ asyncs [i], EV_ASYNC);
19292241 }
19302242 }
19342246 /*****************************************************************************/
19352247
19362248 void
1937 ev_feed_signal (int signum)
2249 ev_feed_signal (int signum) EV_THROW
19382250 {
19392251 #if EV_MULTIPLICITY
1940 EV_P = signals [signum - 1].loop;
2252 EV_P;
2253 ECB_MEMORY_FENCE_ACQUIRE;
2254 EV_A = signals [signum - 1].loop;
19412255
19422256 if (!EV_A)
19432257 return;
19442258 #endif
19452259
1946 if (!ev_active (&pipe_w))
1947 return;
1948
19492260 signals [signum - 1].pending = 1;
19502261 evpipe_write (EV_A_ &sig_pending);
19512262 }
19612272 }
19622273
19632274 void noinline
1964 ev_feed_signal_event (EV_P_ int signum)
2275 ev_feed_signal_event (EV_P_ int signum) EV_THROW
19652276 {
19662277 WL w;
19672278
1968 if (expect_false (signum <= 0 || signum > EV_NSIG))
2279 if (expect_false (signum <= 0 || signum >= EV_NSIG))
19692280 return;
19702281
19712282 --signum;
19792290 #endif
19802291
19812292 signals [signum].pending = 0;
2293 ECB_MEMORY_FENCE_RELEASE;
19822294
19832295 for (w = signals [signum].head; w; w = w->next)
19842296 ev_feed_event (EV_A_ (W)w, EV_SIGNAL);
20872399 #endif
20882400
20892401 int ecb_cold
2090 ev_version_major (void)
2402 ev_version_major (void) EV_THROW
20912403 {
20922404 return EV_VERSION_MAJOR;
20932405 }
20942406
20952407 int ecb_cold
2096 ev_version_minor (void)
2408 ev_version_minor (void) EV_THROW
20972409 {
20982410 return EV_VERSION_MINOR;
20992411 }
21112423 }
21122424
21132425 unsigned int ecb_cold
2114 ev_supported_backends (void)
2426 ev_supported_backends (void) EV_THROW
21152427 {
21162428 unsigned int flags = 0;
21172429
21252437 }
21262438
21272439 unsigned int ecb_cold
2128 ev_recommended_backends (void)
2440 ev_recommended_backends (void) EV_THROW
21292441 {
21302442 unsigned int flags = ev_supported_backends ();
21312443
21472459 }
21482460
21492461 unsigned int ecb_cold
2150 ev_embeddable_backends (void)
2462 ev_embeddable_backends (void) EV_THROW
21512463 {
21522464 int flags = EVBACKEND_EPOLL | EVBACKEND_KQUEUE | EVBACKEND_PORT;
21532465
21592471 }
21602472
21612473 unsigned int
2162 ev_backend (EV_P)
2474 ev_backend (EV_P) EV_THROW
21632475 {
21642476 return backend;
21652477 }
21662478
21672479 #if EV_FEATURE_API
21682480 unsigned int
2169 ev_iteration (EV_P)
2481 ev_iteration (EV_P) EV_THROW
21702482 {
21712483 return loop_count;
21722484 }
21732485
21742486 unsigned int
2175 ev_depth (EV_P)
2487 ev_depth (EV_P) EV_THROW
21762488 {
21772489 return loop_depth;
21782490 }
21792491
21802492 void
2181 ev_set_io_collect_interval (EV_P_ ev_tstamp interval)
2493 ev_set_io_collect_interval (EV_P_ ev_tstamp interval) EV_THROW
21822494 {
21832495 io_blocktime = interval;
21842496 }
21852497
21862498 void
2187 ev_set_timeout_collect_interval (EV_P_ ev_tstamp interval)
2499 ev_set_timeout_collect_interval (EV_P_ ev_tstamp interval) EV_THROW
21882500 {
21892501 timeout_blocktime = interval;
21902502 }
21912503
21922504 void
2193 ev_set_userdata (EV_P_ void *data)
2505 ev_set_userdata (EV_P_ void *data) EV_THROW
21942506 {
21952507 userdata = data;
21962508 }
21972509
21982510 void *
2199 ev_userdata (EV_P)
2511 ev_userdata (EV_P) EV_THROW
22002512 {
22012513 return userdata;
22022514 }
22032515
22042516 void
2205 ev_set_invoke_pending_cb (EV_P_ void (*invoke_pending_cb)(EV_P))
2517 ev_set_invoke_pending_cb (EV_P_ void (*invoke_pending_cb)(EV_P)) EV_THROW
22062518 {
22072519 invoke_cb = invoke_pending_cb;
22082520 }
22092521
22102522 void
2211 ev_set_loop_release_cb (EV_P_ void (*release)(EV_P), void (*acquire)(EV_P))
2523 ev_set_loop_release_cb (EV_P_ void (*release)(EV_P) EV_THROW, void (*acquire)(EV_P) EV_THROW) EV_THROW
22122524 {
22132525 release_cb = release;
22142526 acquire_cb = acquire;
22172529
22182530 /* initialise a loop structure, must be zero-initialised */
22192531 static void noinline ecb_cold
2220 loop_init (EV_P_ unsigned int flags)
2532 loop_init (EV_P_ unsigned int flags) EV_THROW
22212533 {
22222534 if (!backend)
22232535 {
22722584 #endif
22732585 pipe_write_skipped = 0;
22742586 pipe_write_wanted = 0;
2587 evpipe [0] = -1;
2588 evpipe [1] = -1;
22752589 #if EV_USE_INOTIFY
22762590 fs_fd = flags & EVFLAG_NOINOTIFY ? -1 : -2;
22772591 #endif
23322646 #endif
23332647
23342648 #if EV_CHILD_ENABLE
2335 if (ev_is_active (&childev))
2649 if (ev_is_default_loop (EV_A) && ev_is_active (&childev))
23362650 {
23372651 ev_ref (EV_A); /* child watcher */
23382652 ev_signal_stop (EV_A_ &childev);
23442658 /*ev_ref (EV_A);*/
23452659 /*ev_io_stop (EV_A_ &pipe_w);*/
23462660
2347 #if EV_USE_EVENTFD
2348 if (evfd >= 0)
2349 close (evfd);
2350 #endif
2351
2352 if (evpipe [0] >= 0)
2353 {
2354 EV_WIN32_CLOSE_FD (evpipe [0]);
2355 EV_WIN32_CLOSE_FD (evpipe [1]);
2356 }
2661 if (evpipe [0] >= 0) EV_WIN32_CLOSE_FD (evpipe [0]);
2662 if (evpipe [1] >= 0) EV_WIN32_CLOSE_FD (evpipe [1]);
23572663 }
23582664
23592665 #if EV_USE_SIGNALFD
24492755 infy_fork (EV_A);
24502756 #endif
24512757
2758 #if EV_SIGNAL_ENABLE || EV_ASYNC_ENABLE
24522759 if (ev_is_active (&pipe_w))
24532760 {
24542761 /* pipe_write_wanted must be false now, so modifying fd vars should be safe */
24562763 ev_ref (EV_A);
24572764 ev_io_stop (EV_A_ &pipe_w);
24582765
2459 #if EV_USE_EVENTFD
2460 if (evfd >= 0)
2461 close (evfd);
2462 #endif
2463
24642766 if (evpipe [0] >= 0)
2465 {
2466 EV_WIN32_CLOSE_FD (evpipe [0]);
2467 EV_WIN32_CLOSE_FD (evpipe [1]);
2468 }
2469
2470 #if EV_SIGNAL_ENABLE || EV_ASYNC_ENABLE
2767 EV_WIN32_CLOSE_FD (evpipe [0]);
2768
24712769 evpipe_init (EV_A);
2472 /* now iterate over everything, in case we missed something */
2473 pipecb (EV_A_ &pipe_w, EV_READ);
2474 #endif
2475 }
2770 /* iterate over everything, in case we missed something before */
2771 ev_feed_event (EV_A_ &pipe_w, EV_CUSTOM);
2772 }
2773 #endif
24762774
24772775 postfork = 0;
24782776 }
24802778 #if EV_MULTIPLICITY
24812779
24822780 struct ev_loop * ecb_cold
2483 ev_loop_new (unsigned int flags)
2781 ev_loop_new (unsigned int flags) EV_THROW
24842782 {
24852783 EV_P = (struct ev_loop *)ev_malloc (sizeof (struct ev_loop));
24862784
25342832
25352833 #if EV_FEATURE_API
25362834 void ecb_cold
2537 ev_verify (EV_P)
2835 ev_verify (EV_P) EV_THROW
25382836 {
25392837 #if EV_VERIFY
25402838 int i;
2541 WL w;
2839 WL w, w2;
25422840
25432841 assert (activecnt >= -1);
25442842
25482846
25492847 assert (anfdmax >= 0);
25502848 for (i = 0; i < anfdmax; ++i)
2551 for (w = anfds [i].head; w; w = w->next)
2552 {
2553 verify_watcher (EV_A_ (W)w);
2554 assert (("libev: inactive fd watcher on anfd list", ev_active (w) == 1));
2555 assert (("libev: fd mismatch between watcher and anfd", ((ev_io *)w)->fd == i));
2556 }
2849 {
2850 int j = 0;
2851
2852 for (w = w2 = anfds [i].head; w; w = w->next)
2853 {
2854 verify_watcher (EV_A_ (W)w);
2855
2856 if (j++ & 1)
2857 {
2858 assert (("libev: io watcher list contains a loop", w != w2));
2859 w2 = w2->next;
2860 }
2861
2862 assert (("libev: inactive fd watcher on anfd list", ev_active (w) == 1));
2863 assert (("libev: fd mismatch between watcher and anfd", ((ev_io *)w)->fd == i));
2864 }
2865 }
25572866
25582867 assert (timermax >= timercnt);
25592868 verify_heap (EV_A_ timers, timercnt);
26132922 #else
26142923 int
26152924 #endif
2616 ev_default_loop (unsigned int flags)
2925 ev_default_loop (unsigned int flags) EV_THROW
26172926 {
26182927 if (!ev_default_loop_ptr)
26192928 {
26422951 }
26432952
26442953 void
2645 ev_loop_fork (EV_P)
2646 {
2647 postfork = 1; /* must be in line with ev_default_fork */
2954 ev_loop_fork (EV_P) EV_THROW
2955 {
2956 postfork = 1;
26482957 }
26492958
26502959 /*****************************************************************************/
26562965 }
26572966
26582967 unsigned int
2659 ev_pending_count (EV_P)
2968 ev_pending_count (EV_P) EV_THROW
26602969 {
26612970 int pri;
26622971 unsigned int count = 0;
26702979 void noinline
26712980 ev_invoke_pending (EV_P)
26722981 {
2673 int pri;
2674
2675 for (pri = NUMPRI; pri--; )
2676 while (pendingcnt [pri])
2677 {
2678 ANPENDING *p = pendings [pri] + --pendingcnt [pri];
2679
2680 p->w->pending = 0;
2681 EV_CB_INVOKE (p->w, p->events);
2682 EV_FREQUENT_CHECK;
2683 }
2982 pendingpri = NUMPRI;
2983
2984 while (pendingpri) /* pendingpri possibly gets modified in the inner loop */
2985 {
2986 --pendingpri;
2987
2988 while (pendingcnt [pendingpri])
2989 {
2990 ANPENDING *p = pendings [pendingpri] + --pendingcnt [pendingpri];
2991
2992 p->w->pending = 0;
2993 EV_CB_INVOKE (p->w, p->events);
2994 EV_FREQUENT_CHECK;
2995 }
2996 }
26842997 }
26852998
26862999 #if EV_IDLE_ENABLE
27803093
27813094 while (periodiccnt && ANHE_at (periodics [HEAP0]) < ev_rt_now)
27823095 {
2783 int feed_count = 0;
2784
27853096 do
27863097 {
27873098 ev_periodic *w = (ev_periodic *)ANHE_w (periodics [HEAP0]);
29253236 }
29263237 }
29273238
2928 void
3239 int
29293240 ev_run (EV_P_ int flags)
29303241 {
29313242 #if EV_FEATURE_API
30503361
30513362 pipe_write_wanted = 0; /* just an optimisation, no fence needed */
30523363
3364 ECB_MEMORY_FENCE_ACQUIRE;
30533365 if (pipe_write_skipped)
30543366 {
30553367 assert (("libev: pipe_w not active, but pipe not written", ev_is_active (&pipe_w)));
30923404 #if EV_FEATURE_API
30933405 --loop_depth;
30943406 #endif
3407
3408 return activecnt;
30953409 }
30963410
30973411 void
3098 ev_break (EV_P_ int how)
3412 ev_break (EV_P_ int how) EV_THROW
30993413 {
31003414 loop_done = how;
31013415 }
31023416
31033417 void
3104 ev_ref (EV_P)
3418 ev_ref (EV_P) EV_THROW
31053419 {
31063420 ++activecnt;
31073421 }
31083422
31093423 void
3110 ev_unref (EV_P)
3424 ev_unref (EV_P) EV_THROW
31113425 {
31123426 --activecnt;
31133427 }
31143428
31153429 void
3116 ev_now_update (EV_P)
3430 ev_now_update (EV_P) EV_THROW
31173431 {
31183432 time_update (EV_A_ 1e100);
31193433 }
31203434
31213435 void
3122 ev_suspend (EV_P)
3436 ev_suspend (EV_P) EV_THROW
31233437 {
31243438 ev_now_update (EV_A);
31253439 }
31263440
31273441 void
3128 ev_resume (EV_P)
3442 ev_resume (EV_P) EV_THROW
31293443 {
31303444 ev_tstamp mn_prev = mn_now;
31313445
31743488 }
31753489
31763490 int
3177 ev_clear_pending (EV_P_ void *w)
3491 ev_clear_pending (EV_P_ void *w) EV_THROW
31783492 {
31793493 W w_ = (W)w;
31803494 int pending = w_->pending;
32173531 /*****************************************************************************/
32183532
32193533 void noinline
3220 ev_io_start (EV_P_ ev_io *w)
3534 ev_io_start (EV_P_ ev_io *w) EV_THROW
32213535 {
32223536 int fd = w->fd;
32233537
32333547 array_needsize (ANFD, anfds, anfdmax, fd + 1, array_init_zero);
32343548 wlist_add (&anfds[fd].head, (WL)w);
32353549
3550 /* common bug, apparently */
3551 assert (("libev: ev_io_start called with corrupted watcher", ((WL)w)->next != (WL)w));
3552
32363553 fd_change (EV_A_ fd, w->events & EV__IOFDSET | EV_ANFD_REIFY);
32373554 w->events &= ~EV__IOFDSET;
32383555
32403557 }
32413558
32423559 void noinline
3243 ev_io_stop (EV_P_ ev_io *w)
3560 ev_io_stop (EV_P_ ev_io *w) EV_THROW
32443561 {
32453562 clear_pending (EV_A_ (W)w);
32463563 if (expect_false (!ev_is_active (w)))
32593576 }
32603577
32613578 void noinline
3262 ev_timer_start (EV_P_ ev_timer *w)
3579 ev_timer_start (EV_P_ ev_timer *w) EV_THROW
32633580 {
32643581 if (expect_false (ev_is_active (w)))
32653582 return;
32833600 }
32843601
32853602 void noinline
3286 ev_timer_stop (EV_P_ ev_timer *w)
3603 ev_timer_stop (EV_P_ ev_timer *w) EV_THROW
32873604 {
32883605 clear_pending (EV_A_ (W)w);
32893606 if (expect_false (!ev_is_active (w)))
33133630 }
33143631
33153632 void noinline
3316 ev_timer_again (EV_P_ ev_timer *w)
3633 ev_timer_again (EV_P_ ev_timer *w) EV_THROW
33173634 {
33183635 EV_FREQUENT_CHECK;
33193636
33403657 }
33413658
33423659 ev_tstamp
3343 ev_timer_remaining (EV_P_ ev_timer *w)
3660 ev_timer_remaining (EV_P_ ev_timer *w) EV_THROW
33443661 {
33453662 return ev_at (w) - (ev_is_active (w) ? mn_now : 0.);
33463663 }
33473664
33483665 #if EV_PERIODIC_ENABLE
33493666 void noinline
3350 ev_periodic_start (EV_P_ ev_periodic *w)
3667 ev_periodic_start (EV_P_ ev_periodic *w) EV_THROW
33513668 {
33523669 if (expect_false (ev_is_active (w)))
33533670 return;
33773694 }
33783695
33793696 void noinline
3380 ev_periodic_stop (EV_P_ ev_periodic *w)
3697 ev_periodic_stop (EV_P_ ev_periodic *w) EV_THROW
33813698 {
33823699 clear_pending (EV_A_ (W)w);
33833700 if (expect_false (!ev_is_active (w)))
34053722 }
34063723
34073724 void noinline
3408 ev_periodic_again (EV_P_ ev_periodic *w)
3725 ev_periodic_again (EV_P_ ev_periodic *w) EV_THROW
34093726 {
34103727 /* TODO: use adjustheap and recalculation */
34113728 ev_periodic_stop (EV_A_ w);
34203737 #if EV_SIGNAL_ENABLE
34213738
34223739 void noinline
3423 ev_signal_start (EV_P_ ev_signal *w)
3740 ev_signal_start (EV_P_ ev_signal *w) EV_THROW
34243741 {
34253742 if (expect_false (ev_is_active (w)))
34263743 return;
34323749 !signals [w->signum - 1].loop || signals [w->signum - 1].loop == loop));
34333750
34343751 signals [w->signum - 1].loop = EV_A;
3752 ECB_MEMORY_FENCE_RELEASE;
34353753 #endif
34363754
34373755 EV_FREQUENT_CHECK;
35013819 }
35023820
35033821 void noinline
3504 ev_signal_stop (EV_P_ ev_signal *w)
3822 ev_signal_stop (EV_P_ ev_signal *w) EV_THROW
35053823 {
35063824 clear_pending (EV_A_ (W)w);
35073825 if (expect_false (!ev_is_active (w)))
35423860 #if EV_CHILD_ENABLE
35433861
35443862 void
3545 ev_child_start (EV_P_ ev_child *w)
3863 ev_child_start (EV_P_ ev_child *w) EV_THROW
35463864 {
35473865 #if EV_MULTIPLICITY
35483866 assert (("libev: child watchers are only supported in the default loop", loop == ev_default_loop_ptr));
35593877 }
35603878
35613879 void
3562 ev_child_stop (EV_P_ ev_child *w)
3880 ev_child_stop (EV_P_ ev_child *w) EV_THROW
35633881 {
35643882 clear_pending (EV_A_ (W)w);
35653883 if (expect_false (!ev_is_active (w)))
35963914 static void noinline
35973915 infy_add (EV_P_ ev_stat *w)
35983916 {
3599 w->wd = inotify_add_watch (fs_fd, w->path, IN_ATTRIB | IN_DELETE_SELF | IN_MOVE_SELF | IN_MODIFY | IN_DONT_FOLLOW | IN_MASK_ADD);
3917 w->wd = inotify_add_watch (fs_fd, w->path,
3918 IN_ATTRIB | IN_DELETE_SELF | IN_MOVE_SELF | IN_MODIFY
3919 | IN_CREATE | IN_DELETE | IN_MOVED_FROM | IN_MOVED_TO
3920 | IN_DONT_FOLLOW | IN_MASK_ADD);
36003921
36013922 if (w->wd >= 0)
36023923 {
36103931 w->timer.repeat = w->interval ? w->interval : DEF_STAT_INTERVAL;
36113932 else if (!statfs (w->path, &sfs)
36123933 && (sfs.f_type == 0x1373 /* devfs */
3934 || sfs.f_type == 0x4006 /* fat */
3935 || sfs.f_type == 0x4d44 /* msdos */
36133936 || sfs.f_type == 0xEF53 /* ext2/3 */
3937 || sfs.f_type == 0x72b6 /* jffs2 */
3938 || sfs.f_type == 0x858458f6 /* ramfs */
3939 || sfs.f_type == 0x5346544e /* ntfs */
36143940 || sfs.f_type == 0x3153464a /* jfs */
3941 || sfs.f_type == 0x9123683e /* btrfs */
36153942 || sfs.f_type == 0x52654973 /* reiser3 */
3616 || sfs.f_type == 0x01021994 /* tempfs */
3943 || sfs.f_type == 0x01021994 /* tmpfs */
36173944 || sfs.f_type == 0x58465342 /* xfs */))
36183945 w->timer.repeat = 0.; /* filesystem is local, kernel new enough */
36193946 else
37364063 inline_size int
37374064 infy_newfd (void)
37384065 {
3739 #if defined (IN_CLOEXEC) && defined (IN_NONBLOCK)
4066 #if defined IN_CLOEXEC && defined IN_NONBLOCK
37404067 int fd = inotify_init1 (IN_CLOEXEC | IN_NONBLOCK);
37414068 if (fd >= 0)
37424069 return fd;
38214148 #endif
38224149
38234150 void
3824 ev_stat_stat (EV_P_ ev_stat *w)
4151 ev_stat_stat (EV_P_ ev_stat *w) EV_THROW
38254152 {
38264153 if (lstat (w->path, &w->attr) < 0)
38274154 w->attr.st_nlink = 0;
38704197 }
38714198
38724199 void
3873 ev_stat_start (EV_P_ ev_stat *w)
4200 ev_stat_start (EV_P_ ev_stat *w) EV_THROW
38744201 {
38754202 if (expect_false (ev_is_active (w)))
38764203 return;
39014228 }
39024229
39034230 void
3904 ev_stat_stop (EV_P_ ev_stat *w)
4231 ev_stat_stop (EV_P_ ev_stat *w) EV_THROW
39054232 {
39064233 clear_pending (EV_A_ (W)w);
39074234 if (expect_false (!ev_is_active (w)))
39274254
39284255 #if EV_IDLE_ENABLE
39294256 void
3930 ev_idle_start (EV_P_ ev_idle *w)
4257 ev_idle_start (EV_P_ ev_idle *w) EV_THROW
39314258 {
39324259 if (expect_false (ev_is_active (w)))
39334260 return;
39504277 }
39514278
39524279 void
3953 ev_idle_stop (EV_P_ ev_idle *w)
4280 ev_idle_stop (EV_P_ ev_idle *w) EV_THROW
39544281 {
39554282 clear_pending (EV_A_ (W)w);
39564283 if (expect_false (!ev_is_active (w)))
39744301
39754302 #if EV_PREPARE_ENABLE
39764303 void
3977 ev_prepare_start (EV_P_ ev_prepare *w)
4304 ev_prepare_start (EV_P_ ev_prepare *w) EV_THROW
39784305 {
39794306 if (expect_false (ev_is_active (w)))
39804307 return;
39894316 }
39904317
39914318 void
3992 ev_prepare_stop (EV_P_ ev_prepare *w)
4319 ev_prepare_stop (EV_P_ ev_prepare *w) EV_THROW
39934320 {
39944321 clear_pending (EV_A_ (W)w);
39954322 if (expect_false (!ev_is_active (w)))
40124339
40134340 #if EV_CHECK_ENABLE
40144341 void
4015 ev_check_start (EV_P_ ev_check *w)
4342 ev_check_start (EV_P_ ev_check *w) EV_THROW
40164343 {
40174344 if (expect_false (ev_is_active (w)))
40184345 return;
40274354 }
40284355
40294356 void
4030 ev_check_stop (EV_P_ ev_check *w)
4357 ev_check_stop (EV_P_ ev_check *w) EV_THROW
40314358 {
40324359 clear_pending (EV_A_ (W)w);
40334360 if (expect_false (!ev_is_active (w)))
40504377
40514378 #if EV_EMBED_ENABLE
40524379 void noinline
4053 ev_embed_sweep (EV_P_ ev_embed *w)
4380 ev_embed_sweep (EV_P_ ev_embed *w) EV_THROW
40544381 {
40554382 ev_run (w->other, EVRUN_NOWAIT);
40564383 }
41084435 #endif
41094436
41104437 void
4111 ev_embed_start (EV_P_ ev_embed *w)
4438 ev_embed_start (EV_P_ ev_embed *w) EV_THROW
41124439 {
41134440 if (expect_false (ev_is_active (w)))
41144441 return;
41394466 }
41404467
41414468 void
4142 ev_embed_stop (EV_P_ ev_embed *w)
4469 ev_embed_stop (EV_P_ ev_embed *w) EV_THROW
41434470 {
41444471 clear_pending (EV_A_ (W)w);
41454472 if (expect_false (!ev_is_active (w)))
41594486
41604487 #if EV_FORK_ENABLE
41614488 void
4162 ev_fork_start (EV_P_ ev_fork *w)
4489 ev_fork_start (EV_P_ ev_fork *w) EV_THROW
41634490 {
41644491 if (expect_false (ev_is_active (w)))
41654492 return;
41744501 }
41754502
41764503 void
4177 ev_fork_stop (EV_P_ ev_fork *w)
4504 ev_fork_stop (EV_P_ ev_fork *w) EV_THROW
41784505 {
41794506 clear_pending (EV_A_ (W)w);
41804507 if (expect_false (!ev_is_active (w)))
41974524
41984525 #if EV_CLEANUP_ENABLE
41994526 void
4200 ev_cleanup_start (EV_P_ ev_cleanup *w)
4527 ev_cleanup_start (EV_P_ ev_cleanup *w) EV_THROW
42014528 {
42024529 if (expect_false (ev_is_active (w)))
42034530 return;
42144541 }
42154542
42164543 void
4217 ev_cleanup_stop (EV_P_ ev_cleanup *w)
4544 ev_cleanup_stop (EV_P_ ev_cleanup *w) EV_THROW
42184545 {
42194546 clear_pending (EV_A_ (W)w);
42204547 if (expect_false (!ev_is_active (w)))
42384565
42394566 #if EV_ASYNC_ENABLE
42404567 void
4241 ev_async_start (EV_P_ ev_async *w)
4568 ev_async_start (EV_P_ ev_async *w) EV_THROW
42424569 {
42434570 if (expect_false (ev_is_active (w)))
42444571 return;
42574584 }
42584585
42594586 void
4260 ev_async_stop (EV_P_ ev_async *w)
4587 ev_async_stop (EV_P_ ev_async *w) EV_THROW
42614588 {
42624589 clear_pending (EV_A_ (W)w);
42634590 if (expect_false (!ev_is_active (w)))
42784605 }
42794606
42804607 void
4281 ev_async_send (EV_P_ ev_async *w)
4608 ev_async_send (EV_P_ ev_async *w) EV_THROW
42824609 {
42834610 w->sent = 1;
42844611 evpipe_write (EV_A_ &async_pending);
43254652 }
43264653
43274654 void
4328 ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg)
4655 ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg) EV_THROW
43294656 {
43304657 struct ev_once *once = (struct ev_once *)ev_malloc (sizeof (struct ev_once));
43314658
43574684
43584685 #if EV_WALK_ENABLE
43594686 void ecb_cold
4360 ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w))
4687 ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w)) EV_THROW
43614688 {
43624689 int i, j;
43634690 ev_watcher_list *wl, *wn;
+115
-109
ev.h less more
4545 # define EV_CPP(x)
4646 #endif
4747
48 #define EV_THROW EV_CPP(throw())
49
4850 EV_CPP(extern "C" {)
4951
5052 /*****************************************************************************/
5557 #endif
5658
5759 #ifndef EV_FEATURES
58 # define EV_FEATURES 0x7f
60 # if defined __OPTIMIZE_SIZE__
61 # define EV_FEATURES 0x7c
62 # else
63 # define EV_FEATURES 0x7f
64 # endif
5965 #endif
6066
6167 #define EV_FEATURE_CODE ((EV_FEATURES) & 1)
198204 /*****************************************************************************/
199205
200206 #define EV_VERSION_MAJOR 4
201 #define EV_VERSION_MINOR 11
207 #define EV_VERSION_MINOR 15
202208
203209 /* eventmask, revents, events... */
204210 enum {
205 EV_UNDEF = 0xFFFFFFFF, /* guaranteed to be invalid */
206 EV_NONE = 0x00, /* no events */
207 EV_READ = 0x01, /* ev_io detected read will not block */
208 EV_WRITE = 0x02, /* ev_io detected write will not block */
209 EV__IOFDSET = 0x80, /* internal use only */
210 EV_IO = EV_READ, /* alias for type-detection */
211 EV_TIMER = 0x00000100, /* timer timed out */
211 EV_UNDEF = (int)0xFFFFFFFF, /* guaranteed to be invalid */
212 EV_NONE = 0x00, /* no events */
213 EV_READ = 0x01, /* ev_io detected read will not block */
214 EV_WRITE = 0x02, /* ev_io detected write will not block */
215 EV__IOFDSET = 0x80, /* internal use only */
216 EV_IO = EV_READ, /* alias for type-detection */
217 EV_TIMER = 0x00000100, /* timer timed out */
212218 #if EV_COMPAT3
213 EV_TIMEOUT = EV_TIMER, /* pre 4.0 API compatibility */
214 #endif
215 EV_PERIODIC = 0x00000200, /* periodic timer timed out */
216 EV_SIGNAL = 0x00000400, /* signal was received */
217 EV_CHILD = 0x00000800, /* child/pid had status change */
218 EV_STAT = 0x00001000, /* stat data changed */
219 EV_IDLE = 0x00002000, /* event loop is idling */
220 EV_PREPARE = 0x00004000, /* event loop about to poll */
221 EV_CHECK = 0x00008000, /* event loop finished poll */
222 EV_EMBED = 0x00010000, /* embedded event loop needs sweep */
223 EV_FORK = 0x00020000, /* event loop resumed in child */
224 EV_CLEANUP = 0x00040000, /* event loop resumed in child */
225 EV_ASYNC = 0x00080000, /* async intra-loop signal */
226 EV_CUSTOM = 0x01000000, /* for use by user code */
227 EV_ERROR = 0x80000000 /* sent when an error occurs */
219 EV_TIMEOUT = EV_TIMER, /* pre 4.0 API compatibility */
220 #endif
221 EV_PERIODIC = 0x00000200, /* periodic timer timed out */
222 EV_SIGNAL = 0x00000400, /* signal was received */
223 EV_CHILD = 0x00000800, /* child/pid had status change */
224 EV_STAT = 0x00001000, /* stat data changed */
225 EV_IDLE = 0x00002000, /* event loop is idling */
226 EV_PREPARE = 0x00004000, /* event loop about to poll */
227 EV_CHECK = 0x00008000, /* event loop finished poll */
228 EV_EMBED = 0x00010000, /* embedded event loop needs sweep */
229 EV_FORK = 0x00020000, /* event loop resumed in child */
230 EV_CLEANUP = 0x00040000, /* event loop resumed in child */
231 EV_ASYNC = 0x00080000, /* async intra-loop signal */
232 EV_CUSTOM = 0x01000000, /* for use by user code */
233 EV_ERROR = (int)0x80000000 /* sent when an error occurs */
228234 };
229235
230236 /* can be used to add custom fields to all watchers, while losing binary compatibility */
326332
327333 ev_tstamp offset; /* rw */
328334 ev_tstamp interval; /* rw */
329 ev_tstamp (*reschedule_cb)(struct ev_periodic *w, ev_tstamp now); /* rw */
335 ev_tstamp (*reschedule_cb)(struct ev_periodic *w, ev_tstamp now) EV_THROW; /* rw */
330336 } ev_periodic;
331337
332338 /* invoked when the given signal has been received */
513519 };
514520
515521 #if EV_PROTOTYPES
516 EV_API_DECL int ev_version_major (void);
517 EV_API_DECL int ev_version_minor (void);
518
519 EV_API_DECL unsigned int ev_supported_backends (void);
520 EV_API_DECL unsigned int ev_recommended_backends (void);
521 EV_API_DECL unsigned int ev_embeddable_backends (void);
522
523 EV_API_DECL ev_tstamp ev_time (void);
524 EV_API_DECL void ev_sleep (ev_tstamp delay); /* sleep for a while */
522 EV_API_DECL int ev_version_major (void) EV_THROW;
523 EV_API_DECL int ev_version_minor (void) EV_THROW;
524
525 EV_API_DECL unsigned int ev_supported_backends (void) EV_THROW;
526 EV_API_DECL unsigned int ev_recommended_backends (void) EV_THROW;
527 EV_API_DECL unsigned int ev_embeddable_backends (void) EV_THROW;
528
529 EV_API_DECL ev_tstamp ev_time (void) EV_THROW;
530 EV_API_DECL void ev_sleep (ev_tstamp delay) EV_THROW; /* sleep for a while */
525531
526532 /* Sets the allocation function to use, works like realloc.
527533 * It is used to allocate and free memory.
529535 * or take some potentially destructive action.
530536 * The default is your system realloc function.
531537 */
532 EV_API_DECL void ev_set_allocator (void *(*cb)(void *ptr, long size));
538 EV_API_DECL void ev_set_allocator (void *(*cb)(void *ptr, long size) EV_THROW) EV_THROW;
533539
534540 /* set the callback function to call on a
535541 * retryable syscall error
536542 * (such as failed select, poll, epoll_wait)
537543 */
538 EV_API_DECL void ev_set_syserr_cb (void (*cb)(const char *msg));
544 EV_API_DECL void ev_set_syserr_cb (void (*cb)(const char *msg) EV_THROW) EV_THROW;
539545
540546 #if EV_MULTIPLICITY
541547
542548 /* the default loop is the only one that handles signals and child watchers */
543549 /* you can call this as often as you like */
544 EV_API_DECL struct ev_loop *ev_default_loop (unsigned int flags EV_CPP (= 0));
550 EV_API_DECL struct ev_loop *ev_default_loop (unsigned int flags EV_CPP (= 0)) EV_THROW;
545551
546552 #ifdef EV_API_STATIC
547553 EV_API_DECL struct ev_loop *ev_default_loop_ptr;
548554 #endif
549555
550556 EV_INLINE struct ev_loop *
551 ev_default_loop_uc_ (void)
557 ev_default_loop_uc_ (void) EV_THROW
552558 {
553559 extern struct ev_loop *ev_default_loop_ptr;
554560
556562 }
557563
558564 EV_INLINE int
559 ev_is_default_loop (EV_P)
565 ev_is_default_loop (EV_P) EV_THROW
560566 {
561567 return EV_A == EV_DEFAULT_UC;
562568 }
563569
564570 /* create and destroy alternative loops that don't handle signals */
565 EV_API_DECL struct ev_loop *ev_loop_new (unsigned int flags EV_CPP (= 0));
566
567 EV_API_DECL ev_tstamp ev_now (EV_P); /* time w.r.t. timers and the eventloop, updated after each poll */
571 EV_API_DECL struct ev_loop *ev_loop_new (unsigned int flags EV_CPP (= 0)) EV_THROW;
572
573 EV_API_DECL ev_tstamp ev_now (EV_P) EV_THROW; /* time w.r.t. timers and the eventloop, updated after each poll */
568574
569575 #else
570576
571 EV_API_DECL int ev_default_loop (unsigned int flags EV_CPP (= 0)); /* returns true when successful */
577 EV_API_DECL int ev_default_loop (unsigned int flags EV_CPP (= 0)) EV_THROW; /* returns true when successful */
572578
573579 EV_API_DECL ev_tstamp ev_rt_now;
574580
575581 EV_INLINE ev_tstamp
576 ev_now (void)
582 ev_now (void) EV_THROW
577583 {
578584 return ev_rt_now;
579585 }
580586
581587 /* looks weird, but ev_is_default_loop (EV_A) still works if this exists */
582588 EV_INLINE int
583 ev_is_default_loop (void)
589 ev_is_default_loop (void) EV_THROW
584590 {
585591 return 1;
586592 }
594600 /* when you want to re-use it in the child */
595601 /* you can call it in either the parent or the child */
596602 /* you can actually call it at any time, anywhere :) */
597 EV_API_DECL void ev_loop_fork (EV_P);
598
599 EV_API_DECL unsigned int ev_backend (EV_P); /* backend in use by loop */
600
601 EV_API_DECL void ev_now_update (EV_P); /* update event loop time */
603 EV_API_DECL void ev_loop_fork (EV_P) EV_THROW;
604
605 EV_API_DECL unsigned int ev_backend (EV_P) EV_THROW; /* backend in use by loop */
606
607 EV_API_DECL void ev_now_update (EV_P) EV_THROW; /* update event loop time */
602608
603609 #if EV_WALK_ENABLE
604610 /* walk (almost) all watchers in the loop of a given type, invoking the */
605611 /* callback on every such watcher. The callback might stop the watcher, */
606612 /* but do nothing else with the loop */
607 EV_API_DECL void ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w));
613 EV_API_DECL void ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w)) EV_THROW;
608614 #endif
609615
610616 #endif /* prototypes */
623629 };
624630
625631 #if EV_PROTOTYPES
626 EV_API_DECL void ev_run (EV_P_ int flags EV_CPP (= 0));
627 EV_API_DECL void ev_break (EV_P_ int how EV_CPP (= EVBREAK_ONE)); /* break out of the loop */
632 EV_API_DECL int ev_run (EV_P_ int flags EV_CPP (= 0));
633 EV_API_DECL void ev_break (EV_P_ int how EV_CPP (= EVBREAK_ONE)) EV_THROW; /* break out of the loop */
628634
629635 /*
630636 * ref/unref can be used to add or remove a refcount on the mainloop. every watcher
631637 * keeps one reference. if you have a long-running watcher you never unregister that
632638 * should not keep ev_loop from running, unref() after starting, and ref() before stopping.
633639 */
634 EV_API_DECL void ev_ref (EV_P);
635 EV_API_DECL void ev_unref (EV_P);
640 EV_API_DECL void ev_ref (EV_P) EV_THROW;
641 EV_API_DECL void ev_unref (EV_P) EV_THROW;
636642
637643 /*
638644 * convenience function, wait for a single event, without registering an event watcher
639645 * if timeout is < 0, do wait indefinitely
640646 */
641 EV_API_DECL void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg);
647 EV_API_DECL void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg) EV_THROW;
642648
643649 # if EV_FEATURE_API
644 EV_API_DECL unsigned int ev_iteration (EV_P); /* number of loop iterations */
645 EV_API_DECL unsigned int ev_depth (EV_P); /* #ev_loop enters - #ev_loop leaves */
646 EV_API_DECL void ev_verify (EV_P); /* abort if loop data corrupted */
647
648 EV_API_DECL void ev_set_io_collect_interval (EV_P_ ev_tstamp interval); /* sleep at least this time, default 0 */
649 EV_API_DECL void ev_set_timeout_collect_interval (EV_P_ ev_tstamp interval); /* sleep at least this time, default 0 */
650 EV_API_DECL unsigned int ev_iteration (EV_P) EV_THROW; /* number of loop iterations */
651 EV_API_DECL unsigned int ev_depth (EV_P) EV_THROW; /* #ev_loop enters - #ev_loop leaves */
652 EV_API_DECL void ev_verify (EV_P) EV_THROW; /* abort if loop data corrupted */
653
654 EV_API_DECL void ev_set_io_collect_interval (EV_P_ ev_tstamp interval) EV_THROW; /* sleep at least this time, default 0 */
655 EV_API_DECL void ev_set_timeout_collect_interval (EV_P_ ev_tstamp interval) EV_THROW; /* sleep at least this time, default 0 */
650656
651657 /* advanced stuff for threading etc. support, see docs */
652 EV_API_DECL void ev_set_userdata (EV_P_ void *data);
653 EV_API_DECL void *ev_userdata (EV_P);
654 EV_API_DECL void ev_set_invoke_pending_cb (EV_P_ void (*invoke_pending_cb)(EV_P));
655 EV_API_DECL void ev_set_loop_release_cb (EV_P_ void (*release)(EV_P), void (*acquire)(EV_P));
656
657 EV_API_DECL unsigned int ev_pending_count (EV_P); /* number of pending events, if any */
658 EV_API_DECL void ev_set_userdata (EV_P_ void *data) EV_THROW;
659 EV_API_DECL void *ev_userdata (EV_P) EV_THROW;
660 EV_API_DECL void ev_set_invoke_pending_cb (EV_P_ void (*invoke_pending_cb)(EV_P)) EV_THROW;
661 EV_API_DECL void ev_set_loop_release_cb (EV_P_ void (*release)(EV_P), void (*acquire)(EV_P) EV_THROW) EV_THROW;
662
663 EV_API_DECL unsigned int ev_pending_count (EV_P) EV_THROW; /* number of pending events, if any */
658664 EV_API_DECL void ev_invoke_pending (EV_P); /* invoke all pending watchers */
659665
660666 /*
661667 * stop/start the timer handling.
662668 */
663 EV_API_DECL void ev_suspend (EV_P);
664 EV_API_DECL void ev_resume (EV_P);
669 EV_API_DECL void ev_suspend (EV_P) EV_THROW;
670 EV_API_DECL void ev_resume (EV_P) EV_THROW;
665671 #endif
666672
667673 #endif
728734
729735 /* feeds an event into a watcher as if the event actually occurred */
730736 /* accepts any ev_watcher type */
731 EV_API_DECL void ev_feed_event (EV_P_ void *w, int revents);
732 EV_API_DECL void ev_feed_fd_event (EV_P_ int fd, int revents);
737 EV_API_DECL void ev_feed_event (EV_P_ void *w, int revents) EV_THROW;
738 EV_API_DECL void ev_feed_fd_event (EV_P_ int fd, int revents) EV_THROW;
733739 #if EV_SIGNAL_ENABLE
734 EV_API_DECL void ev_feed_signal (int signum);
735 EV_API_DECL void ev_feed_signal_event (EV_P_ int signum);
740 EV_API_DECL void ev_feed_signal (int signum) EV_THROW;
741 EV_API_DECL void ev_feed_signal_event (EV_P_ int signum) EV_THROW;
736742 #endif
737743 EV_API_DECL void ev_invoke (EV_P_ void *w, int revents);
738 EV_API_DECL int ev_clear_pending (EV_P_ void *w);
739
740 EV_API_DECL void ev_io_start (EV_P_ ev_io *w);
741 EV_API_DECL void ev_io_stop (EV_P_ ev_io *w);
742
743 EV_API_DECL void ev_timer_start (EV_P_ ev_timer *w);
744 EV_API_DECL void ev_timer_stop (EV_P_ ev_timer *w);
744 EV_API_DECL int ev_clear_pending (EV_P_ void *w) EV_THROW;
745
746 EV_API_DECL void ev_io_start (EV_P_ ev_io *w) EV_THROW;
747 EV_API_DECL void ev_io_stop (EV_P_ ev_io *w) EV_THROW;
748
749 EV_API_DECL void ev_timer_start (EV_P_ ev_timer *w) EV_THROW;
750 EV_API_DECL void ev_timer_stop (EV_P_ ev_timer *w) EV_THROW;
745751 /* stops if active and no repeat, restarts if active and repeating, starts if inactive and repeating */
746 EV_API_DECL void ev_timer_again (EV_P_ ev_timer *w);
752 EV_API_DECL void ev_timer_again (EV_P_ ev_timer *w) EV_THROW;
747753 /* return remaining time */
748 EV_API_DECL ev_tstamp ev_timer_remaining (EV_P_ ev_timer *w);
754 EV_API_DECL ev_tstamp ev_timer_remaining (EV_P_ ev_timer *w) EV_THROW;
749755
750756 #if EV_PERIODIC_ENABLE
751 EV_API_DECL void ev_periodic_start (EV_P_ ev_periodic *w);
752 EV_API_DECL void ev_periodic_stop (EV_P_ ev_periodic *w);
753 EV_API_DECL void ev_periodic_again (EV_P_ ev_periodic *w);
757 EV_API_DECL void ev_periodic_start (EV_P_ ev_periodic *w) EV_THROW;
758 EV_API_DECL void ev_periodic_stop (EV_P_ ev_periodic *w) EV_THROW;
759 EV_API_DECL void ev_periodic_again (EV_P_ ev_periodic *w) EV_THROW;
754760 #endif
755761
756762 /* only supported in the default loop */
757763 #if EV_SIGNAL_ENABLE
758 EV_API_DECL void ev_signal_start (EV_P_ ev_signal *w);
759 EV_API_DECL void ev_signal_stop (EV_P_ ev_signal *w);
764 EV_API_DECL void ev_signal_start (EV_P_ ev_signal *w) EV_THROW;
765 EV_API_DECL void ev_signal_stop (EV_P_ ev_signal *w) EV_THROW;
760766 #endif
761767
762768 /* only supported in the default loop */
763769 # if EV_CHILD_ENABLE
764 EV_API_DECL void ev_child_start (EV_P_ ev_child *w);
765 EV_API_DECL void ev_child_stop (EV_P_ ev_child *w);
770 EV_API_DECL void ev_child_start (EV_P_ ev_child *w) EV_THROW;
771 EV_API_DECL void ev_child_stop (EV_P_ ev_child *w) EV_THROW;
766772 # endif
767773
768774 # if EV_STAT_ENABLE
769 EV_API_DECL void ev_stat_start (EV_P_ ev_stat *w);
770 EV_API_DECL void ev_stat_stop (EV_P_ ev_stat *w);
771 EV_API_DECL void ev_stat_stat (EV_P_ ev_stat *w);
775 EV_API_DECL void ev_stat_start (EV_P_ ev_stat *w) EV_THROW;
776 EV_API_DECL void ev_stat_stop (EV_P_ ev_stat *w) EV_THROW;
777 EV_API_DECL void ev_stat_stat (EV_P_ ev_stat *w) EV_THROW;
772778 # endif
773779
774780 # if EV_IDLE_ENABLE
775 EV_API_DECL void ev_idle_start (EV_P_ ev_idle *w);
776 EV_API_DECL void ev_idle_stop (EV_P_ ev_idle *w);
781 EV_API_DECL void ev_idle_start (EV_P_ ev_idle *w) EV_THROW;
782 EV_API_DECL void ev_idle_stop (EV_P_ ev_idle *w) EV_THROW;
777783 # endif
778784
779785 #if EV_PREPARE_ENABLE
780 EV_API_DECL void ev_prepare_start (EV_P_ ev_prepare *w);
781 EV_API_DECL void ev_prepare_stop (EV_P_ ev_prepare *w);
786 EV_API_DECL void ev_prepare_start (EV_P_ ev_prepare *w) EV_THROW;
787 EV_API_DECL void ev_prepare_stop (EV_P_ ev_prepare *w) EV_THROW;
782788 #endif
783789
784790 #if EV_CHECK_ENABLE
785 EV_API_DECL void ev_check_start (EV_P_ ev_check *w);
786 EV_API_DECL void ev_check_stop (EV_P_ ev_check *w);
791 EV_API_DECL void ev_check_start (EV_P_ ev_check *w) EV_THROW;
792 EV_API_DECL void ev_check_stop (EV_P_ ev_check *w) EV_THROW;
787793 #endif
788794
789795 # if EV_FORK_ENABLE
790 EV_API_DECL void ev_fork_start (EV_P_ ev_fork *w);
791 EV_API_DECL void ev_fork_stop (EV_P_ ev_fork *w);
796 EV_API_DECL void ev_fork_start (EV_P_ ev_fork *w) EV_THROW;
797 EV_API_DECL void ev_fork_stop (EV_P_ ev_fork *w) EV_THROW;
792798 # endif
793799
794800 # if EV_CLEANUP_ENABLE
795 EV_API_DECL void ev_cleanup_start (EV_P_ ev_cleanup *w);
796 EV_API_DECL void ev_cleanup_stop (EV_P_ ev_cleanup *w);
801 EV_API_DECL void ev_cleanup_start (EV_P_ ev_cleanup *w) EV_THROW;
802 EV_API_DECL void ev_cleanup_stop (EV_P_ ev_cleanup *w) EV_THROW;
797803 # endif
798804
799805 # if EV_EMBED_ENABLE
800806 /* only supported when loop to be embedded is in fact embeddable */
801 EV_API_DECL void ev_embed_start (EV_P_ ev_embed *w);
802 EV_API_DECL void ev_embed_stop (EV_P_ ev_embed *w);
803 EV_API_DECL void ev_embed_sweep (EV_P_ ev_embed *w);
807 EV_API_DECL void ev_embed_start (EV_P_ ev_embed *w) EV_THROW;
808 EV_API_DECL void ev_embed_stop (EV_P_ ev_embed *w) EV_THROW;
809 EV_API_DECL void ev_embed_sweep (EV_P_ ev_embed *w) EV_THROW;
804810 # endif
805811
806812 # if EV_ASYNC_ENABLE
807 EV_API_DECL void ev_async_start (EV_P_ ev_async *w);
808 EV_API_DECL void ev_async_stop (EV_P_ ev_async *w);
809 EV_API_DECL void ev_async_send (EV_P_ ev_async *w);
813 EV_API_DECL void ev_async_start (EV_P_ ev_async *w) EV_THROW;
814 EV_API_DECL void ev_async_stop (EV_P_ ev_async *w) EV_THROW;
815 EV_API_DECL void ev_async_send (EV_P_ ev_async *w) EV_THROW;
810816 # endif
811817
812818 #if EV_COMPAT3
+180
-70
ev.pod less more
8383
8484 This manual tries to be very detailed, but unfortunately, this also makes
8585 it very long. If you just want to know the basics of libev, I suggest
86 reading L<ANATOMY OF A WATCHER>, then the L<EXAMPLE PROGRAM> above and
87 look up the missing functions in L<GLOBAL FUNCTIONS> and the C<ev_io> and
88 C<ev_timer> sections in L<WATCHER TYPES>.
86 reading L</ANATOMY OF A WATCHER>, then the L</EXAMPLE PROGRAM> above and
87 look up the missing functions in L</GLOBAL FUNCTIONS> and the C<ev_io> and
88 C<ev_timer> sections in L</WATCHER TYPES>.
8989
9090 =head1 ABOUT LIBEV
9191
248248
249249 See the description of C<ev_embed> watchers for more info.
250250
251 =item ev_set_allocator (void *(*cb)(void *ptr, long size))
251 =item ev_set_allocator (void *(*cb)(void *ptr, long size) throw ())
252252
253253 Sets the allocation function to use (the prototype is similar - the
254254 semantics are identical to the C<realloc> C89/SuS/POSIX function). It is
284284 ...
285285 ev_set_allocator (persistent_realloc);
286286
287 =item ev_set_syserr_cb (void (*cb)(const char *msg))
287 =item ev_set_syserr_cb (void (*cb)(const char *msg) throw ())
288288
289289 Set the callback function to call on a retryable system call error (such
290290 as failed select, poll, epoll_wait). The message is a printable string
568568 kernel is more efficient (which says nothing about its actual speed, of
569569 course). While stopping, setting and starting an I/O watcher does never
570570 cause an extra system call as with C<EVBACKEND_EPOLL>, it still adds up to
571 two event changes per incident. Support for C<fork ()> is very bad (but
572 sane, unlike epoll) and it drops fds silently in similarly hard-to-detect
573 cases
571 two event changes per incident. Support for C<fork ()> is very bad (you
572 might have to leak fd's on fork, but it's more sane than epoll) and it
573 drops fds silently in similarly hard-to-detect cases.
574574
575575 This backend usually performs well under most conditions.
576576
765765 very long time without entering the event loop, updating libev's idea of
766766 the current time is a good idea.
767767
768 See also L<The special problem of time updates> in the C<ev_timer> section.
768 See also L</The special problem of time updates> in the C<ev_timer> section.
769769
770770 =item ev_suspend (loop)
771771
793793 Calling C<ev_suspend>/C<ev_resume> has the side effect of updating the
794794 event loop time (see C<ev_now_update>).
795795
796 =item ev_run (loop, int flags)
796 =item bool ev_run (loop, int flags)
797797
798798 Finally, this is it, the event handler. This function usually is called
799799 after you have initialised all your watchers and you want to start
800800 handling events. It will ask the operating system for any new events, call
801 the watcher callbacks, an then repeat the whole process indefinitely: This
801 the watcher callbacks, and then repeat the whole process indefinitely: This
802802 is why event loops are called I<loops>.
803803
804804 If the flags argument is specified as C<0>, it will keep handling events
805805 until either no event watchers are active anymore or C<ev_break> was
806806 called.
807
808 The return value is false if there are no more active watchers (which
809 usually means "all jobs done" or "deadlock"), and true in all other cases
810 (which usually means " you should call C<ev_run> again").
807811
808812 Please note that an explicit C<ev_break> is usually better than
809813 relying on all watchers to be stopped when deciding when a program has
812816 of relying on its watchers stopping correctly, that is truly a thing of
813817 beauty.
814818
815 This function is also I<mostly> exception-safe - you can break out of
816 a C<ev_run> call by calling C<longjmp> in a callback, throwing a C++
819 This function is I<mostly> exception-safe - you can break out of a
820 C<ev_run> call by calling C<longjmp> in a callback, throwing a C++
817821 exception and so on. This does not decrement the C<ev_depth> value, nor
818822 will it clear any outstanding C<EVBREAK_ONE> breaks.
819823
10131017 If you want to reset the callback, use C<ev_invoke_pending> as new
10141018 callback.
10151019
1016 =item ev_set_loop_release_cb (loop, void (*release)(EV_P), void (*acquire)(EV_P))
1020 =item ev_set_loop_release_cb (loop, void (*release)(EV_P) throw (), void (*acquire)(EV_P) throw ())
10171021
10181022 Sometimes you want to share the same loop between multiple threads. This
10191023 can be done relatively simply by putting mutex_lock/unlock calls around
11711175
11721176 =item C<EV_CHECK>
11731177
1174 All C<ev_prepare> watchers are invoked just I<before> C<ev_run> starts
1175 to gather new events, and all C<ev_check> watchers are invoked just after
1176 C<ev_run> has gathered them, but before it invokes any callbacks for any
1177 received events. Callbacks of both watcher types can start and stop as
1178 many watchers as they want, and all of them will be taken into account
1179 (for example, a C<ev_prepare> watcher might start an idle watcher to keep
1180 C<ev_run> from blocking).
1178 All C<ev_prepare> watchers are invoked just I<before> C<ev_run> starts to
1179 gather new events, and all C<ev_check> watchers are queued (not invoked)
1180 just after C<ev_run> has gathered them, but before it queues any callbacks
1181 for any received events. That means C<ev_prepare> watchers are the last
1182 watchers invoked before the event loop sleeps or polls for new events, and
1183 C<ev_check> watchers will be invoked before any other watchers of the same
1184 or lower priority within an event loop iteration.
1185
1186 Callbacks of both watcher types can start and stop as many watchers as
1187 they want, and all of them will be taken into account (for example, a
1188 C<ev_prepare> watcher might start an idle watcher to keep C<ev_run> from
1189 blocking).
11811190
11821191 =item C<EV_EMBED>
11831192
13101319
13111320 Returns the callback currently set on the watcher.
13121321
1313 =item ev_cb_set (ev_TYPE *watcher, callback)
1322 =item ev_set_cb (ev_TYPE *watcher, callback)
13141323
13151324 Change the callback. You can change the callback at virtually any time
13161325 (modulo threads).
13381347 The default priority used by watchers when no priority has been set is
13391348 always C<0>, which is supposed to not be too high and not be too low :).
13401349
1341 See L<WATCHER PRIORITY MODELS>, below, for a more thorough treatment of
1350 See L</WATCHER PRIORITY MODELS>, below, for a more thorough treatment of
13421351 priorities.
13431352
13441353 =item ev_invoke (loop, ev_TYPE *watcher, int revents)
13731382
13741383 =back
13751384
1376 See also the L<ASSOCIATING CUSTOM DATA WITH A WATCHER> and L<BUILDING YOUR
1385 See also the L</ASSOCIATING CUSTOM DATA WITH A WATCHER> and L</BUILDING YOUR
13771386 OWN COMPOSITE WATCHERS> idioms.
13781387
13791388 =head2 WATCHER STATES
13851394
13861395 =over 4
13871396
1388 =item initialiased
1397 =item initialised
13891398
13901399 Before a watcher can be registered with the event loop it has to be
13911400 initialised. This can be done with a call to C<ev_TYPE_init>, or calls to
18711880 // calculate when the timeout would happen
18721881 ev_tstamp after = last_activity - ev_now (EV_A) + timeout;
18731882
1874 // if negative, it means we the timeout already occured
1883 // if negative, it means we the timeout already occurred
18751884 if (after < 0.)
18761885 {
18771886 // timeout occurred, take action
18991908 and simply start the timer with this timeout value.
19001909
19011910 In other words, each time the callback is invoked it will check whether
1902 the timeout cocured. If not, it will simply reschedule itself to check
1911 the timeout occurred. If not, it will simply reschedule itself to check
19031912 again at the earliest time it could time out. Rinse. Repeat.
19041913
19051914 This scheme causes more callback invocations (about one every 60 seconds
19231932
19241933 When your timeout value changes, then the timeout can be changed by simply
19251934 providing a new value, stopping the timer and calling the callback, which
1926 will agaion do the right thing (for example, time out immediately :).
1935 will again do the right thing (for example, time out immediately :).
19271936
19281937 timeout = new_value;
19291938 ev_timer_stop (EV_A_ &timer);
21282137
21292138 =back
21302139
2131 This sounds a bit complicated, see L<Be smart about timeouts>, above, for a
2140 This sounds a bit complicated, see L</Be smart about timeouts>, above, for a
21322141 usage example.
21332142
21342143 =item ev_tstamp ev_timer_remaining (loop, ev_timer *)
25982607
25992608 This watches a file system path for attribute changes. That is, it calls
26002609 C<stat> on that path in regular intervals (or when the OS says it changed)
2601 and sees if it changed compared to the last time, invoking the callback if
2602 it did.
2610 and sees if it changed compared to the last time, invoking the callback
2611 if it did. Starting the watcher C<stat>'s the file, so only changes that
2612 happen after the watcher has been started will be reported.
26032613
26042614 The path does not need to exist: changing from "path exists" to "path does
26052615 not exist" is a status change like any other. The condition "path does not
28392849 "pseudo-background processing", or delay processing stuff to after the
28402850 event loop has handled all outstanding events.
28412851
2852 =head3 Abusing an C<ev_idle> watcher for its side-effect
2853
2854 As long as there is at least one active idle watcher, libev will never
2855 sleep unnecessarily. Or in other words, it will loop as fast as possible.
2856 For this to work, the idle watcher doesn't need to be invoked at all - the
2857 lowest priority will do.
2858
2859 This mode of operation can be useful together with an C<ev_check> watcher,
2860 to do something on each event loop iteration - for example to balance load
2861 between different connections.
2862
2863 See L</Abusing an ev_check watcher for its side-effect> for a longer
2864 example.
2865
28422866 =head3 Watcher-Specific Functions and Data Members
28432867
28442868 =over 4
28592883 static void
28602884 idle_cb (struct ev_loop *loop, ev_idle *w, int revents)
28612885 {
2886 // stop the watcher
2887 ev_idle_stop (loop, w);
2888
2889 // now we can free it
28622890 free (w);
2891
28632892 // now do something you wanted to do when the program has
28642893 // no longer anything immediate to do.
28652894 }
28712900
28722901 =head2 C<ev_prepare> and C<ev_check> - customise your event loop!
28732902
2874 Prepare and check watchers are usually (but not always) used in pairs:
2903 Prepare and check watchers are often (but not always) used in pairs:
28752904 prepare watchers get invoked before the process blocks and check watchers
28762905 afterwards.
28772906
29092938 loop from blocking if lower-priority coroutines are active, thus mapping
29102939 low-priority coroutines to idle/background tasks).
29112940
2912 It is recommended to give C<ev_check> watchers highest (C<EV_MAXPRI>)
2913 priority, to ensure that they are being run before any other watchers
2914 after the poll (this doesn't matter for C<ev_prepare> watchers).
2941 When used for this purpose, it is recommended to give C<ev_check> watchers
2942 highest (C<EV_MAXPRI>) priority, to ensure that they are being run before
2943 any other watchers after the poll (this doesn't matter for C<ev_prepare>
2944 watchers).
29152945
29162946 Also, C<ev_check> watchers (and C<ev_prepare> watchers, too) should not
29172947 activate ("feed") events into libev. While libev fully supports this, they
29202950 loops those other event loops might be in an unusable state until their
29212951 C<ev_check> watcher ran (always remind yourself to coexist peacefully with
29222952 others).
2953
2954 =head3 Abusing an C<ev_check> watcher for its side-effect
2955
2956 C<ev_check> (and less often also C<ev_prepare>) watchers can also be
2957 useful because they are called once per event loop iteration. For
2958 example, if you want to handle a large number of connections fairly, you
2959 normally only do a bit of work for each active connection, and if there
2960 is more work to do, you wait for the next event loop iteration, so other
2961 connections have a chance of making progress.
2962
2963 Using an C<ev_check> watcher is almost enough: it will be called on the
2964 next event loop iteration. However, that isn't as soon as possible -
2965 without external events, your C<ev_check> watcher will not be invoked.
2966
2967 This is where C<ev_idle> watchers come in handy - all you need is a
2968 single global idle watcher that is active as long as you have one active
2969 C<ev_check> watcher. The C<ev_idle> watcher makes sure the event loop
2970 will not sleep, and the C<ev_check> watcher makes sure a callback gets
2971 invoked. Neither watcher alone can do that.
29232972
29242973 =head3 Watcher-Specific Functions and Data Members
29252974
31303179
31313180 =item ev_embed_init (ev_embed *, callback, struct ev_loop *embedded_loop)
31323181
3133 =item ev_embed_set (ev_embed *, callback, struct ev_loop *embedded_loop)
3182 =item ev_embed_set (ev_embed *, struct ev_loop *embedded_loop)
31343183
31353184 Configures the watcher to embed the given loop, which must be
31363185 embeddable. If the callback is C<0>, then C<ev_embed_sweep> will be
32033252
32043253 Fork watchers are called when a C<fork ()> was detected (usually because
32053254 whoever is a good citizen cared to tell libev about it by calling
3206 C<ev_default_fork> or C<ev_loop_fork>). The invocation is done before the
3207 event loop blocks next and before C<ev_check> watchers are being called,
3208 and only in the child after the fork. If whoever good citizen calling
3209 C<ev_default_fork> cheats and calls it in the wrong process, the fork
3210 handlers will be invoked, too, of course.
3255 C<ev_loop_fork>). The invocation is done before the event loop blocks next
3256 and before C<ev_check> watchers are being called, and only in the child
3257 after the fork. If whoever good citizen calling C<ev_default_fork> cheats
3258 and calls it in the wrong process, the fork handlers will be invoked, too,
3259 of course.
32113260
32123261 =head3 The special problem of life after fork - how is it possible?
32133262
33103359 This functionality is very similar to C<ev_signal> watchers, as signals,
33113360 too, are asynchronous in nature, and signals, too, will be compressed
33123361 (i.e. the number of callback invocations may be less than the number of
3313 C<ev_async_sent> calls). In fact, you could use signal watchers as a kind
3362 C<ev_async_send> calls). In fact, you could use signal watchers as a kind
33143363 of "global async watchers" by using a watcher on an otherwise unused
33153364 signal, and C<ev_feed_signal> to signal this watcher from another thread,
33163365 even without knowing which loop owns the signal.
36113660 A common way around all these issues is to make sure that
36123661 C<start_new_request> I<always> returns before the callback is invoked. If
36133662 C<start_new_request> immediately knows the result, it can artificially
3614 delay invoking the callback by e.g. using a C<prepare> or C<idle> watcher
3615 for example, or more sneakily, by reusing an existing (stopped) watcher
3616 and pushing it into the pending queue:
3663 delay invoking the callback by using a C<prepare> or C<idle> watcher for
3664 example, or more sneakily, by reusing an existing (stopped) watcher and
3665 pushing it into the pending queue:
36173666
36183667 ev_set_cb (watcher, callback);
36193668 ev_feed_event (EV_A_ watcher, 0);
36313680 main C<ev_run> call, but not the nested one (e.g. user clicked "Quit", but
36323681 a modal "Are you sure?" dialog is still waiting), or just the nested one
36333682 and not the main one (e.g. user clocked "Ok" in a modal dialog), or some
3634 other combination: In these cases, C<ev_break> will not work alone.
3683 other combination: In these cases, a simple C<ev_break> will not work.
36353684
36363685 The solution is to maintain "break this loop" variable for each C<ev_run>
36373686 invocation, and use a loop around C<ev_run> until the condition is
38273876 void
38283877 wait_for_event (ev_watcher *w)
38293878 {
3830 ev_cb_set (w) = current_coro;
3879 ev_set_cb (w, current_coro);
38313880 switch_to (libev_coro);
38323881 }
38333882
38403889 switching to a coroutine, you push the watcher onto the queue and notify
38413890 any waiters.
38423891
3843 To embed libev, see L<EMBEDDING>, but in short, it's easiest to create two
3892 To embed libev, see L</EMBEDDING>, but in short, it's easiest to create two
38443893 files, F<my_ev.h> and F<my_ev.c> that include the respective libev files:
38453894
38463895 // my_ev.h
38933942 =back
38943943
38953944 =head1 C++ SUPPORT
3945
3946 =head2 C API
3947
3948 The normal C API should work fine when used from C++: both ev.h and the
3949 libev sources can be compiled as C++. Therefore, code that uses the C API
3950 will work fine.
3951
3952 Proper exception specifications might have to be added to callbacks passed
3953 to libev: exceptions may be thrown only from watcher callbacks, all
3954 other callbacks (allocator, syserr, loop acquire/release and periodic
3955 reschedule callbacks) must not throw exceptions, and might need a C<throw
3956 ()> specification. If you have code that needs to be compiled as both C
3957 and C++ you can use the C<EV_THROW> macro for this:
3958
3959 static void
3960 fatal_error (const char *msg) EV_THROW
3961 {
3962 perror (msg);
3963 abort ();
3964 }
3965
3966 ...
3967 ev_set_syserr_cb (fatal_error);
3968
3969 The only API functions that can currently throw exceptions are C<ev_run>,
3970 C<ev_invoke>, C<ev_invoke_pending> and C<ev_loop_destroy> (the latter
3971 because it runs cleanup watchers).
3972
3973 Throwing exceptions in watcher callbacks is only supported if libev itself
3974 is compiled with a C++ compiler or your C and C++ environments allow
3975 throwing exceptions through C libraries (most do).
3976
3977 =head2 C++ API
38963978
38973979 Libev comes with some simplistic wrapper classes for C++ that mainly allow
38983980 you to use some convenience methods to start/stop watchers and also change
39173999 to add as long as they only need one additional pointer for context. If
39184000 you need support for other types of functors please contact the author
39194001 (preferably after implementing it).
4002
4003 For all this to work, your C++ compiler either has to use the same calling
4004 conventions as your C compiler (for static member functions), or you have
4005 to embed libev and compile libev itself as C++.
39204006
39214007 Here is a list of things available in the C<ev> namespace:
39224008
40364122
40374123 =item w->set ([arguments])
40384124
4039 Basically the same as C<ev_TYPE_set>, with the same arguments. Either this
4040 method or a suitable start method must be called at least once. Unlike the
4041 C counterpart, an active watcher gets automatically stopped and restarted
4042 when reconfiguring it with this method.
4125 Basically the same as C<ev_TYPE_set> (except for C<ev::embed> watchers>),
4126 with the same arguments. Either this method or a suitable start method
4127 must be called at least once. Unlike the C counterpart, an active watcher
4128 gets automatically stopped and restarted when reconfiguring it with this
4129 method.
4130
4131 For C<ev::embed> watchers this method is called C<set_embed>, to avoid
4132 clashing with the C<set (loop)> method.
40434133
40444134 =item w->start ()
40454135
41524242 Brian Maher has written a partial interface to libev for lua (at the
41534243 time of this writing, only C<ev_io> and C<ev_timer>), to be found at
41544244 L<http://github.com/brimworks/lua-ev>.
4245
4246 =item Javascript
4247
4248 Node.js (L<http://nodejs.org>) uses libev as the underlying event library.
4249
4250 =item Others
4251
4252 There are others, and I stopped counting.
41554253
41564254 =back
41574255
44604558 macro can be used to override the C<close> function, useful to unregister
44614559 file descriptors again. Note that the replacement function has to close
44624560 the underlying OS handle.
4561
4562 =item EV_USE_WSASOCKET
4563
4564 If defined to be C<1>, libev will use C<WSASocket> to create its internal
4565 communication socket, which works better in some environments. Otherwise,
4566 the normal C<socket> function will be used, which works better in other
4567 environments.
44634568
44644569 =item EV_USE_POLL
44654570
45144619
45154620 =item EV_NO_THREADS
45164621
4517 If defined to be C<1>, libev will assume that it will never be called
4518 from different threads, which is a stronger assumption than C<EV_NO_SMP>,
4519 above. This reduces dependencies and makes libev faster.
4622 If defined to be C<1>, libev will assume that it will never be called from
4623 different threads (that includes signal handlers), which is a stronger
4624 assumption than C<EV_NO_SMP>, above. This reduces dependencies and makes
4625 libev faster.
45204626
45214627 =item EV_ATOMIC_T
45224628
45234629 Libev requires an integer type (suitable for storing C<0> or C<1>) whose
4524 access is atomic and serialised with respect to other threads or signal
4525 contexts. No such type is easily found in the C language, so you can
4526 provide your own type that you know is safe for your purposes. It is used
4527 both for signal handler "locking" as well as for signal and thread safety
4528 in C<ev_async> watchers.
4630 access is atomic with respect to other threads or signal contexts. No
4631 such type is easily found in the C language, so you can provide your own
4632 type that you know is safe for your purposes. It is used both for signal
4633 handler "locking" as well as for signal and thread safety in C<ev_async>
4634 watchers.
45294635
45304636 In the absence of this define, libev will use C<sig_atomic_t volatile>
4531 (from F<signal.h>), which is usually good enough on most platforms,
4532 although strictly speaking using a type that also implies a memory fence
4533 is required.
4637 (from F<signal.h>), which is usually good enough on most platforms.
45344638
45354639 =item EV_H (h)
45364640
46134717 #define EV_ASYNC_ENABLE 1
46144718
46154719 The actual value is a bitset, it can be a combination of the following
4616 values:
4720 values (by default, all of these are enabled):
46174721
46184722 =over 4
46194723
46274731 When optimising for size, use of compiler flags such as C<-Os> with
46284732 gcc is recommended, as well as C<-DNDEBUG>, as libev contains a number of
46294733 assertions.
4734
4735 The default is off when C<__OPTIMIZE_SIZE__> is defined by your compiler
4736 (e.g. gcc with C<-Os>).
46304737
46314738 =item C<2> - faster/larger data structures
46324739
46344741 hash table sizes and so on. This will usually further increase code size
46354742 and can additionally have an effect on the size of data structures at
46364743 runtime.
4744
4745 The default is off when C<__OPTIMIZE_SIZE__> is defined by your compiler
4746 (e.g. gcc with C<-Os>).
46374747
46384748 =item C<4> - full API configuration
46394749
49025012
49035013 =back
49045014
4905 See also L<THREAD LOCKING EXAMPLE>.
5015 See also L</THREAD LOCKING EXAMPLE>.
49065016
49075017 =head3 COROUTINES
49085018
52035313 C<pthread_sigmask> could complicate things, however.
52045314
52055315 The most portable way to handle signals is to block signals in all threads
5206 except the initial one, and run the default loop in the initial thread as
5207 well.
5316 except the initial one, and run the signal handling loop in the initial
5317 thread as well.
52085318
52095319 =item C<long> must be large enough for common memory allocation sizes
52105320
53185428 =item C<EV_COMPAT3> backwards compatibility mechanism
53195429
53205430 The backward compatibility mechanism can be controlled by
5321 C<EV_COMPAT3>. See L<PREPROCESSOR SYMBOLS/MACROS> in the L<EMBEDDING>
5431 C<EV_COMPAT3>. See L</PREPROCESSOR SYMBOLS/MACROS> in the L</EMBEDDING>
53225432 section.
53235433
53245434 =item C<ev_default_destroy> and C<ev_default_fork> have been removed
53715481 =item active
53725482
53735483 A watcher is active as long as it has been started and not yet stopped.
5374 See L<WATCHER STATES> for details.
5484 See L</WATCHER STATES> for details.
53755485
53765486 =item application
53775487
54175527 =item pending
54185528
54195529 A watcher is pending as soon as the corresponding event has been
5420 detected. See L<WATCHER STATES> for details.
5530 detected. See L</WATCHER STATES> for details.
54215531
54225532 =item real time
54235533
237237 #ifdef EPOLL_CLOEXEC
238238 backend_fd = epoll_create1 (EPOLL_CLOEXEC);
239239
240 if (backend_fd < 0)
240 if (backend_fd < 0 && (errno == EINVAL || errno == ENOSYS))
241241 #endif
242242 backend_fd = epoll_create (256);
243243
00 /*
11 * libev kqueue backend
22 *
3 * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libev@schmorp.de>
3 * Copyright (c) 2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann <libev@schmorp.de>
44 * All rights reserved.
55 *
66 * Redistribution and use in source and binary forms, with or without modifica-
154154 int inline_size
155155 kqueue_init (EV_P_ int flags)
156156 {
157 /* Initialize the kernel queue */
157 /* initialize the kernel queue */
158 kqueue_fd_pid = getpid ();
158159 if ((backend_fd = kqueue ()) < 0)
159160 return 0;
160161
184185 void inline_size
185186 kqueue_fork (EV_P)
186187 {
187 close (backend_fd);
188
188 /* some BSD kernels don't just destroy the kqueue itself,
189 * but also close the fd, which isn't documented, and
190 * impossible to support properly.
191 * we remember the pid of the kqueue call and only close
192 * the fd if the pid is still the same.
193 * this leaks fds on sane kernels, but BSD interfaces are
194 * notoriously buggy and rarely get fixed.
195 */
196 pid_t newpid = getpid ();
197
198 if (newpid == kqueue_fd_pid)
199 close (backend_fd);
200
201 kqueue_fd_pid = newpid;
189202 while ((backend_fd = kqueue ()) < 0)
190203 ev_syserr ("(libev) kqueue");
191204
195208 fd_rearm_all (EV_A);
196209 }
197210
211 /* sys/event.h defines EV_ERROR */
212 #undef EV_ERROR
213
00 /*
11 * loop member variable declarations
22 *
3 * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libev@schmorp.de>
3 * Copyright (c) 2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann <libev@schmorp.de>
44 * All rights reserved.
55 *
66 * Redistribution and use in source and binary forms, with or without modifica-
4242 VARx(ev_tstamp, mn_now) /* monotonic clock "now" */
4343 VARx(ev_tstamp, rtmn_diff) /* difference realtime - monotonic time */
4444
45 /* for reverse feeding of events */
46 VARx(W *, rfeeds)
47 VARx(int, rfeedmax)
48 VARx(int, rfeedcnt)
49
50 VAR (pendings, ANPENDING *pendings [NUMPRI])
51 VAR (pendingmax, int pendingmax [NUMPRI])
52 VAR (pendingcnt, int pendingcnt [NUMPRI])
53 VARx(int, pendingpri) /* highest priority currently pending */
54 VARx(ev_prepare, pending_w) /* dummy pending watcher */
55
4556 VARx(ev_tstamp, io_blocktime)
4657 VARx(ev_tstamp, timeout_blocktime)
4758
5768 VARx(ANFD *, anfds)
5869 VARx(int, anfdmax)
5970
60 VAR (pendings, ANPENDING *pendings [NUMPRI])
61 VAR (pendingmax, int pendingmax [NUMPRI])
62 VAR (pendingcnt, int pendingcnt [NUMPRI])
63 VARx(ev_prepare, pending_w) /* dummy pending watcher */
64
65 /* for reverse feeding of events */
66 VARx(W *, rfeeds)
67 VARx(int, rfeedmax)
68 VARx(int, rfeedcnt)
69
70 #if EV_USE_EVENTFD || EV_GENWRAP
71 VARx(int, evfd)
72 #endif
7371 VAR (evpipe, int evpipe [2])
7472 VARx(ev_io, pipe_w)
7573 VARx(EV_ATOMIC_T, pipe_write_wanted)
109107 #endif
110108
111109 #if EV_USE_KQUEUE || EV_GENWRAP
110 VARx(pid_t, kqueue_fd_pid)
112111 VARx(struct kevent *, kqueue_changes)
113112 VARx(int, kqueue_changemax)
114113 VARx(int, kqueue_changecnt)
194193 VARx(unsigned int, loop_depth) /* #ev_run enters - #ev_run leaves */
195194
196195 VARx(void *, userdata)
197 VAR (release_cb, void (*release_cb)(EV_P))
198 VAR (acquire_cb, void (*acquire_cb)(EV_P))
196 VAR (release_cb, void (*release_cb)(EV_P) EV_THROW)
197 VAR (acquire_cb, void (*acquire_cb)(EV_P) EV_THROW)
199198 VAR (invoke_cb , void (*invoke_cb) (EV_P))
200199 #endif
201200
4747 /* for the crt to do something about it */
4848 volatile double SIGFPE_REQ = 0.0f;
4949
50 static SOCKET
51 ev_tcp_socket (void)
52 {
53 #if EV_USE_WSASOCKET
54 return WSASocket (AF_INET, SOCK_STREAM, 0, 0, 0, 0);
55 #else
56 return socket (AF_INET, SOCK_STREAM, 0);
57 #endif
58 }
59
5060 /* oh, the humanity! */
5161 static int
5262 ev_pipe (int filedes [2])
5868 SOCKET listener;
5969 SOCKET sock [2] = { -1, -1 };
6070
61 if ((listener = socket (AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
71 if ((listener = ev_tcp_socket ()) == INVALID_SOCKET)
6272 return -1;
6373
6474 addr.sin_family = AF_INET;
7484 if (listen (listener, 1))
7585 goto fail;
7686
77 if ((sock [0] = socket (AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
87 if ((sock [0] = ev_tcp_socket ()) == INVALID_SOCKET)
7888 goto fail;
7989
8090 if (connect (sock [0], (struct sockaddr *)&addr, addr_size))
00 /* DO NOT EDIT, automatically generated by update_ev_wrap */
11 #ifndef EV_WRAP_H
22 #define EV_WRAP_H
3 #define now_floor ((loop)->now_floor)
4 #define mn_now ((loop)->mn_now)
5 #define rtmn_diff ((loop)->rtmn_diff)
6 #define io_blocktime ((loop)->io_blocktime)
7 #define timeout_blocktime ((loop)->timeout_blocktime)
3 #define acquire_cb ((loop)->acquire_cb)
4 #define activecnt ((loop)->activecnt)
5 #define anfdmax ((loop)->anfdmax)
6 #define anfds ((loop)->anfds)
7 #define async_pending ((loop)->async_pending)
8 #define asynccnt ((loop)->asynccnt)
9 #define asyncmax ((loop)->asyncmax)
10 #define asyncs ((loop)->asyncs)
811 #define backend ((loop)->backend)
9 #define activecnt ((loop)->activecnt)
10 #define loop_done ((loop)->loop_done)
1112 #define backend_fd ((loop)->backend_fd)
1213 #define backend_mintime ((loop)->backend_mintime)
1314 #define backend_modify ((loop)->backend_modify)
1415 #define backend_poll ((loop)->backend_poll)
15 #define anfds ((loop)->anfds)
16 #define anfdmax ((loop)->anfdmax)
16 #define checkcnt ((loop)->checkcnt)
17 #define checkmax ((loop)->checkmax)
18 #define checks ((loop)->checks)
19 #define cleanupcnt ((loop)->cleanupcnt)
20 #define cleanupmax ((loop)->cleanupmax)
21 #define cleanups ((loop)->cleanups)
22 #define curpid ((loop)->curpid)
23 #define epoll_epermcnt ((loop)->epoll_epermcnt)
24 #define epoll_epermmax ((loop)->epoll_epermmax)
25 #define epoll_eperms ((loop)->epoll_eperms)
26 #define epoll_eventmax ((loop)->epoll_eventmax)
27 #define epoll_events ((loop)->epoll_events)
28 #define evpipe ((loop)->evpipe)
29 #define fdchangecnt ((loop)->fdchangecnt)
30 #define fdchangemax ((loop)->fdchangemax)
31 #define fdchanges ((loop)->fdchanges)
32 #define forkcnt ((loop)->forkcnt)
33 #define forkmax ((loop)->forkmax)
34 #define forks ((loop)->forks)
35 #define fs_2625 ((loop)->fs_2625)
36 #define fs_fd ((loop)->fs_fd)
37 #define fs_hash ((loop)->fs_hash)
38 #define fs_w ((loop)->fs_w)
39 #define idleall ((loop)->idleall)
40 #define idlecnt ((loop)->idlecnt)
41 #define idlemax ((loop)->idlemax)
42 #define idles ((loop)->idles)
43 #define invoke_cb ((loop)->invoke_cb)
44 #define io_blocktime ((loop)->io_blocktime)
45 #define iocp ((loop)->iocp)
46 #define kqueue_changecnt ((loop)->kqueue_changecnt)
47 #define kqueue_changemax ((loop)->kqueue_changemax)
48 #define kqueue_changes ((loop)->kqueue_changes)
49 #define kqueue_eventmax ((loop)->kqueue_eventmax)
50 #define kqueue_events ((loop)->kqueue_events)
51 #define kqueue_fd_pid ((loop)->kqueue_fd_pid)
52 #define loop_count ((loop)->loop_count)
53 #define loop_depth ((loop)->loop_depth)
54 #define loop_done ((loop)->loop_done)
55 #define mn_now ((loop)->mn_now)
56 #define now_floor ((loop)->now_floor)
57 #define origflags ((loop)->origflags)
58 #define pending_w ((loop)->pending_w)
59 #define pendingcnt ((loop)->pendingcnt)
60 #define pendingmax ((loop)->pendingmax)
61 #define pendingpri ((loop)->pendingpri)
1762 #define pendings ((loop)->pendings)
18 #define pendingmax ((loop)->pendingmax)
19 #define pendingcnt ((loop)->pendingcnt)
20 #define pending_w ((loop)->pending_w)
63 #define periodiccnt ((loop)->periodiccnt)
64 #define periodicmax ((loop)->periodicmax)
65 #define periodics ((loop)->periodics)
66 #define pipe_w ((loop)->pipe_w)
67 #define pipe_write_skipped ((loop)->pipe_write_skipped)
68 #define pipe_write_wanted ((loop)->pipe_write_wanted)
69 #define pollcnt ((loop)->pollcnt)
70 #define pollidxmax ((loop)->pollidxmax)
71 #define pollidxs ((loop)->pollidxs)
72 #define pollmax ((loop)->pollmax)
73 #define polls ((loop)->polls)
74 #define port_eventmax ((loop)->port_eventmax)
75 #define port_events ((loop)->port_events)
76 #define postfork ((loop)->postfork)
77 #define preparecnt ((loop)->preparecnt)
78 #define preparemax ((loop)->preparemax)
79 #define prepares ((loop)->prepares)
80 #define release_cb ((loop)->release_cb)
81 #define rfeedcnt ((loop)->rfeedcnt)
82 #define rfeedmax ((loop)->rfeedmax)
2183 #define rfeeds ((loop)->rfeeds)
22 #define rfeedmax ((loop)->rfeedmax)
23 #define rfeedcnt ((loop)->rfeedcnt)
24 #define evfd ((loop)->evfd)
25 #define evpipe ((loop)->evpipe)
26 #define pipe_w ((loop)->pipe_w)
27 #define pipe_write_wanted ((loop)->pipe_write_wanted)
28 #define pipe_write_skipped ((loop)->pipe_write_skipped)
29 #define curpid ((loop)->curpid)
30 #define postfork ((loop)->postfork)
84 #define rtmn_diff ((loop)->rtmn_diff)
85 #define sig_pending ((loop)->sig_pending)
86 #define sigfd ((loop)->sigfd)
87 #define sigfd_set ((loop)->sigfd_set)
88 #define sigfd_w ((loop)->sigfd_w)
89 #define timeout_blocktime ((loop)->timeout_blocktime)
90 #define timercnt ((loop)->timercnt)
91 #define timermax ((loop)->timermax)
92 #define timers ((loop)->timers)
93 #define userdata ((loop)->userdata)
94 #define vec_eo ((loop)->vec_eo)
95 #define vec_max ((loop)->vec_max)
3196 #define vec_ri ((loop)->vec_ri)
3297 #define vec_ro ((loop)->vec_ro)
3398 #define vec_wi ((loop)->vec_wi)
3499 #define vec_wo ((loop)->vec_wo)
35 #define vec_eo ((loop)->vec_eo)
36 #define vec_max ((loop)->vec_max)
37 #define polls ((loop)->polls)
38 #define pollmax ((loop)->pollmax)
39 #define pollcnt ((loop)->pollcnt)
40 #define pollidxs ((loop)->pollidxs)
41 #define pollidxmax ((loop)->pollidxmax)
42 #define epoll_events ((loop)->epoll_events)
43 #define epoll_eventmax ((loop)->epoll_eventmax)
44 #define epoll_eperms ((loop)->epoll_eperms)
45 #define epoll_epermcnt ((loop)->epoll_epermcnt)
46 #define epoll_epermmax ((loop)->epoll_epermmax)
47 #define kqueue_changes ((loop)->kqueue_changes)
48 #define kqueue_changemax ((loop)->kqueue_changemax)
49 #define kqueue_changecnt ((loop)->kqueue_changecnt)
50 #define kqueue_events ((loop)->kqueue_events)
51 #define kqueue_eventmax ((loop)->kqueue_eventmax)
52 #define port_events ((loop)->port_events)
53 #define port_eventmax ((loop)->port_eventmax)
54 #define iocp ((loop)->iocp)
55 #define fdchanges ((loop)->fdchanges)
56 #define fdchangemax ((loop)->fdchangemax)
57 #define fdchangecnt ((loop)->fdchangecnt)
58 #define timers ((loop)->timers)
59 #define timermax ((loop)->timermax)
60 #define timercnt ((loop)->timercnt)
61 #define periodics ((loop)->periodics)
62 #define periodicmax ((loop)->periodicmax)
63 #define periodiccnt ((loop)->periodiccnt)
64 #define idles ((loop)->idles)
65 #define idlemax ((loop)->idlemax)
66 #define idlecnt ((loop)->idlecnt)
67 #define idleall ((loop)->idleall)
68 #define prepares ((loop)->prepares)
69 #define preparemax ((loop)->preparemax)
70 #define preparecnt ((loop)->preparecnt)
71 #define checks ((loop)->checks)
72 #define checkmax ((loop)->checkmax)
73 #define checkcnt ((loop)->checkcnt)
74 #define forks ((loop)->forks)
75 #define forkmax ((loop)->forkmax)
76 #define forkcnt ((loop)->forkcnt)
77 #define cleanups ((loop)->cleanups)
78 #define cleanupmax ((loop)->cleanupmax)
79 #define cleanupcnt ((loop)->cleanupcnt)
80 #define async_pending ((loop)->async_pending)
81 #define asyncs ((loop)->asyncs)
82 #define asyncmax ((loop)->asyncmax)
83 #define asynccnt ((loop)->asynccnt)
84 #define fs_fd ((loop)->fs_fd)
85 #define fs_w ((loop)->fs_w)
86 #define fs_2625 ((loop)->fs_2625)
87 #define fs_hash ((loop)->fs_hash)
88 #define sig_pending ((loop)->sig_pending)
89 #define sigfd ((loop)->sigfd)
90 #define sigfd_w ((loop)->sigfd_w)
91 #define sigfd_set ((loop)->sigfd_set)
92 #define origflags ((loop)->origflags)
93 #define loop_count ((loop)->loop_count)
94 #define loop_depth ((loop)->loop_depth)
95 #define userdata ((loop)->userdata)
96 #define release_cb ((loop)->release_cb)
97 #define acquire_cb ((loop)->acquire_cb)
98 #define invoke_cb ((loop)->invoke_cb)
99100 #else
100101 #undef EV_WRAP_H
101 #undef now_floor
102 #undef mn_now
103 #undef rtmn_diff
104 #undef io_blocktime
105 #undef timeout_blocktime
102 #undef acquire_cb
103 #undef activecnt
104 #undef anfdmax
105 #undef anfds
106 #undef async_pending
107 #undef asynccnt
108 #undef asyncmax
109 #undef asyncs
106110 #undef backend
107 #undef activecnt
108 #undef loop_done
109111 #undef backend_fd
110112 #undef backend_mintime
111113 #undef backend_modify
112114 #undef backend_poll
113 #undef anfds
114 #undef anfdmax
115 #undef checkcnt
116 #undef checkmax
117 #undef checks
118 #undef cleanupcnt
119 #undef cleanupmax
120 #undef cleanups
121 #undef curpid
122 #undef epoll_epermcnt
123 #undef epoll_epermmax
124 #undef epoll_eperms
125 #undef epoll_eventmax
126 #undef epoll_events
127 #undef evpipe
128 #undef fdchangecnt
129 #undef fdchangemax
130 #undef fdchanges
131 #undef forkcnt
132 #undef forkmax
133 #undef forks
134 #undef fs_2625
135 #undef fs_fd
136 #undef fs_hash
137 #undef fs_w
138 #undef idleall
139 #undef idlecnt
140 #undef idlemax
141 #undef idles
142 #undef invoke_cb
143 #undef io_blocktime
144 #undef iocp
145 #undef kqueue_changecnt
146 #undef kqueue_changemax
147 #undef kqueue_changes
148 #undef kqueue_eventmax
149 #undef kqueue_events
150 #undef kqueue_fd_pid
151 #undef loop_count
152 #undef loop_depth
153 #undef loop_done
154 #undef mn_now
155 #undef now_floor
156 #undef origflags
157 #undef pending_w
158 #undef pendingcnt
159 #undef pendingmax
160 #undef pendingpri
115161 #undef pendings
116 #undef pendingmax
117 #undef pendingcnt
118 #undef pending_w
162 #undef periodiccnt
163 #undef periodicmax
164 #undef periodics
165 #undef pipe_w
166 #undef pipe_write_skipped
167 #undef pipe_write_wanted
168 #undef pollcnt
169 #undef pollidxmax
170 #undef pollidxs
171 #undef pollmax
172 #undef polls
173 #undef port_eventmax
174 #undef port_events
175 #undef postfork
176 #undef preparecnt
177 #undef preparemax
178 #undef prepares
179 #undef release_cb
180 #undef rfeedcnt
181 #undef rfeedmax
119182 #undef rfeeds
120 #undef rfeedmax
121 #undef rfeedcnt
122 #undef evfd
123 #undef evpipe
124 #undef pipe_w
125 #undef pipe_write_wanted
126 #undef pipe_write_skipped
127 #undef curpid
128 #undef postfork
183 #undef rtmn_diff
184 #undef sig_pending
185 #undef sigfd
186 #undef sigfd_set
187 #undef sigfd_w
188 #undef timeout_blocktime
189 #undef timercnt
190 #undef timermax
191 #undef timers
192 #undef userdata
193 #undef vec_eo
194 #undef vec_max
129195 #undef vec_ri
130196 #undef vec_ro
131197 #undef vec_wi
132198 #undef vec_wo
133 #undef vec_eo
134 #undef vec_max
135 #undef polls
136 #undef pollmax
137 #undef pollcnt
138 #undef pollidxs
139 #undef pollidxmax
140 #undef epoll_events
141 #undef epoll_eventmax
142 #undef epoll_eperms
143 #undef epoll_epermcnt
144 #undef epoll_epermmax
145 #undef kqueue_changes
146 #undef kqueue_changemax
147 #undef kqueue_changecnt
148 #undef kqueue_events
149 #undef kqueue_eventmax
150 #undef port_events
151 #undef port_eventmax
152 #undef iocp
153 #undef fdchanges
154 #undef fdchangemax
155 #undef fdchangecnt
156 #undef timers
157 #undef timermax
158 #undef timercnt
159 #undef periodics
160 #undef periodicmax
161 #undef periodiccnt
162 #undef idles
163 #undef idlemax
164 #undef idlecnt
165 #undef idleall
166 #undef prepares
167 #undef preparemax
168 #undef preparecnt
169 #undef checks
170 #undef checkmax
171 #undef checkcnt
172 #undef forks
173 #undef forkmax
174 #undef forkcnt
175 #undef cleanups
176 #undef cleanupmax
177 #undef cleanupcnt
178 #undef async_pending
179 #undef asyncs
180 #undef asyncmax
181 #undef asynccnt
182 #undef fs_fd
183 #undef fs_w
184 #undef fs_2625
185 #undef fs_hash
186 #undef sig_pending
187 #undef sigfd
188 #undef sigfd_w
189 #undef sigfd_set
190 #undef origflags
191 #undef loop_count
192 #undef loop_depth
193 #undef userdata
194 #undef release_cb
195 #undef acquire_cb
196 #undef invoke_cb
197199 #endif
00 /*
11 * libevent compatibility layer
22 *
3 * Copyright (c) 2007,2008,2009,2010 Marc Alexander Lehmann <libev@schmorp.de>
3 * Copyright (c) 2007,2008,2009,2010,2012 Marc Alexander Lehmann <libev@schmorp.de>
44 * All rights reserved.
55 *
66 * Redistribution and use in source and binary forms, with or without modifica-
7777 #define EVENT_STRINGIFY(s) # s
7878 #define EVENT_VERSION(a,b) EVENT_STRINGIFY (a) "." EVENT_STRINGIFY (b)
7979
80 const char *event_get_version (void)
80 const char *
81 event_get_version (void)
8182 {
8283 /* returns ABI, not API or library, version */
8384 return EVENT_VERSION (EV_VERSION_MAJOR, EV_VERSION_MINOR);
8485 }
8586
86 const char *event_get_method (void)
87 const char *
88 event_get_method (void)
8789 {
8890 return "libev";
8991 }
104106 return ev_x_cur;
105107 }
106108
109 const char *
110 event_base_get_method (const struct event_base *base)
111 {
112 return "libev";
113 }
114
115 struct event_base *
116 event_base_new (void)
117 {
118 #if EV_MULTIPLICITY
119 return (struct event_base *)ev_loop_new (EVFLAG_AUTO);
120 #else
121 assert (("libev: multiple event bases not supported when not compiled with EV_MULTIPLICITY"));
122 return NULL;
123 #endif
124 }
125
107126 void event_base_free (struct event_base *base)
108127 {
109128 dLOOPbase;
134153 int event_loopexit (struct timeval *tv)
135154 {
136155 return event_base_loopexit (ev_x_cur, tv);
156 }
157
158 event_callback_fn event_get_callback
159 (const struct event *ev)
160 {
161 return ev->ev_callback;
137162 }
138163
139164 static void
331356 {
332357 dLOOPbase;
333358
334 ev_run (EV_A_ flags);
335
336 return 0;
359 return !ev_run (EV_A_ flags);
337360 }
338361
339362 int event_base_dispatch (struct event_base *base)
00 /*
11 * libevent compatibility header, only core events supported
22 *
3 * Copyright (c) 2007,2008,2010 Marc Alexander Lehmann <libev@schmorp.de>
3 * Copyright (c) 2007,2008,2010,2012 Marc Alexander Lehmann <libev@schmorp.de>
44 * All rights reserved.
55 *
66 * Redistribution and use in source and binary forms, with or without modifica-
7474 #define EVLIST_INTERNAL 0x10
7575 #define EVLIST_INIT 0x80
7676
77 typedef void (*event_callback_fn)(int, short, void *);
78
7779 struct event
7880 {
7981 /* libev watchers we map onto */
8587
8688 /* compatibility slots */
8789 struct event_base *ev_base;
88 void (*ev_callback)(int, short, void *arg);
90 event_callback_fn ev_callback;
8991 void *ev_arg;
9092 int ev_fd;
9193 int ev_pri;
9496 short ev_events;
9597 };
9698
99 event_callback_fn event_get_callback (const struct event *ev);
100
97101 #define EV_READ EV_READ
98102 #define EV_WRITE EV_WRITE
99103 #define EV_PERSIST 0x10
104 #define EV_ET 0x20 /* nop */
100105
101106 #define EVENT_SIGNAL(ev) ((int) (ev)->ev_fd)
102107 #define EVENT_FD(ev) ((int) (ev)->ev_fd)
151156 int event_priority_init (int npri);
152157 int event_priority_set (struct event *ev, int pri);
153158
159 struct event_base *event_base_new (void);
160 const char *event_base_get_method (const struct event_base *);
154161 int event_base_set (struct event_base *base, struct event *ev);
155162 int event_base_loop (struct event_base *base, int);
156163 int event_base_loopexit (struct event_base *base, struct timeval *tv);
+2790
-1542
ltmain.sh less more
0 # Generated from ltmain.m4sh.
1
2 # ltmain.sh (GNU libtool) 2.2.6b
0
1 # libtool (GNU libtool) 2.4.2
32 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
43
5 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
5 # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
66 # This is free software; see the source for copying conditions. There is NO
77 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
88
3131 #
3232 # Provide generalized library-building support services.
3333 #
34 # --config show all configuration variables
35 # --debug enable verbose shell tracing
36 # -n, --dry-run display commands without modifying any files
37 # --features display basic configuration information and exit
38 # --mode=MODE use operation mode MODE
39 # --preserve-dup-deps don't remove duplicate dependency libraries
40 # --quiet, --silent don't print informational messages
41 # --tag=TAG use configuration variables from tag TAG
42 # -v, --verbose print informational messages (default)
43 # --version print version information
44 # -h, --help print short or long help message
34 # --config show all configuration variables
35 # --debug enable verbose shell tracing
36 # -n, --dry-run display commands without modifying any files
37 # --features display basic configuration information and exit
38 # --mode=MODE use operation mode MODE
39 # --preserve-dup-deps don't remove duplicate dependency libraries
40 # --quiet, --silent don't print informational messages
41 # --no-quiet, --no-silent
42 # print informational messages (default)
43 # --no-warn don't display warning messages
44 # --tag=TAG use configuration variables from tag TAG
45 # -v, --verbose print more informational messages than default
46 # --no-verbose don't print the extra informational messages
47 # --version print version information
48 # -h, --help, --help-all print short, long, or detailed help message
4549 #
4650 # MODE must be one of the following:
4751 #
48 # clean remove files from the build directory
49 # compile compile a source file into a libtool object
50 # execute automatically set library path, then run a program
51 # finish complete the installation of libtool libraries
52 # install install libraries or executables
53 # link create a library or an executable
54 # uninstall remove libraries from an installed directory
52 # clean remove files from the build directory
53 # compile compile a source file into a libtool object
54 # execute automatically set library path, then run a program
55 # finish complete the installation of libtool libraries
56 # install install libraries or executables
57 # link create a library or an executable
58 # uninstall remove libraries from an installed directory
5559 #
56 # MODE-ARGS vary depending on the MODE.
60 # MODE-ARGS vary depending on the MODE. When passed as first option,
61 # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
5762 # Try `$progname --help --mode=MODE' for a more detailed description of MODE.
5863 #
5964 # When reporting a bug, please describe a test case to reproduce it and
6065 # include the following information:
6166 #
62 # host-triplet: $host
63 # shell: $SHELL
64 # compiler: $LTCC
65 # compiler flags: $LTCFLAGS
66 # linker: $LD (gnu? $with_gnu_ld)
67 # $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2
68 # automake: $automake_version
69 # autoconf: $autoconf_version
67 # host-triplet: $host
68 # shell: $SHELL
69 # compiler: $LTCC
70 # compiler flags: $LTCFLAGS
71 # linker: $LD (gnu? $with_gnu_ld)
72 # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.1
73 # automake: $automake_version
74 # autoconf: $autoconf_version
7075 #
7176 # Report bugs to <bug-libtool@gnu.org>.
72
73 PROGRAM=ltmain.sh
77 # GNU libtool home page: <http://www.gnu.org/software/libtool/>.
78 # General help using GNU software: <http://www.gnu.org/gethelp/>.
79
80 PROGRAM=libtool
7481 PACKAGE=libtool
75 VERSION="2.2.6b Debian-2.2.6b-2"
82 VERSION="2.4.2 Debian-2.4.2-1.1"
7683 TIMESTAMP=""
77 package_revision=1.3017
84 package_revision=1.3337
7885
7986 # Be Bourne compatible
8087 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
9097 BIN_SH=xpg4; export BIN_SH # for Tru64
9198 DUALCASE=1; export DUALCASE # for MKS sh
9299
100 # A function that is used when there is no print builtin or printf.
101 func_fallback_echo ()
102 {
103 eval 'cat <<_LTECHO_EOF
104 $1
105 _LTECHO_EOF'
106 }
107
93108 # NLS nuisances: We save the old values to restore during execute mode.
94 # Only set LANG and LC_ALL to C if already set.
95 # These must not be set unconditionally because not all systems understand
96 # e.g. LANG=C (notably SCO).
97109 lt_user_locale=
98110 lt_safe_locale=
99111 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
106118 lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
107119 fi"
108120 done
121 LC_ALL=C
122 LANGUAGE=C
123 export LANGUAGE LC_ALL
109124
110125 $lt_unset CDPATH
111126
112127
128 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
129 # is ksh but when the shell is invoked as "sh" and the current value of
130 # the _XPG environment variable is not equal to 1 (one), the special
131 # positional parameter $0, within a function call, is the name of the
132 # function.
133 progpath="$0"
113134
114135
115136
116137 : ${CP="cp -f"}
117 : ${ECHO="echo"}
118 : ${EGREP="/bin/grep -E"}
119 : ${FGREP="/bin/grep -F"}
120 : ${GREP="/bin/grep"}
121 : ${LN_S="ln -s"}
138 test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
122139 : ${MAKE="make"}
123140 : ${MKDIR="mkdir"}
124141 : ${MV="mv -f"}
125142 : ${RM="rm -f"}
126 : ${SED="/bin/sed"}
127143 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
128144 : ${Xsed="$SED -e 1s/^X//"}
129145
142158
143159 dirname="s,/[^/]*$,,"
144160 basename="s,^.*/,,"
161
162 # func_dirname file append nondir_replacement
163 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
164 # otherwise set result to NONDIR_REPLACEMENT.
165 func_dirname ()
166 {
167 func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
168 if test "X$func_dirname_result" = "X${1}"; then
169 func_dirname_result="${3}"
170 else
171 func_dirname_result="$func_dirname_result${2}"
172 fi
173 } # func_dirname may be replaced by extended shell implementation
174
175
176 # func_basename file
177 func_basename ()
178 {
179 func_basename_result=`$ECHO "${1}" | $SED "$basename"`
180 } # func_basename may be replaced by extended shell implementation
181
145182
146183 # func_dirname_and_basename file append nondir_replacement
147184 # perform func_basename and func_dirname in a single function
157194 # those functions but instead duplicate the functionality here.
158195 func_dirname_and_basename ()
159196 {
160 # Extract subdirectory from the argument.
161 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
162 if test "X$func_dirname_result" = "X${1}"; then
163 func_dirname_result="${3}"
164 else
165 func_dirname_result="$func_dirname_result${2}"
197 # Extract subdirectory from the argument.
198 func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
199 if test "X$func_dirname_result" = "X${1}"; then
200 func_dirname_result="${3}"
201 else
202 func_dirname_result="$func_dirname_result${2}"
203 fi
204 func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
205 } # func_dirname_and_basename may be replaced by extended shell implementation
206
207
208 # func_stripname prefix suffix name
209 # strip PREFIX and SUFFIX off of NAME.
210 # PREFIX and SUFFIX must not contain globbing or regex special
211 # characters, hashes, percent signs, but SUFFIX may contain a leading
212 # dot (in which case that matches only a dot).
213 # func_strip_suffix prefix name
214 func_stripname ()
215 {
216 case ${2} in
217 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
218 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
219 esac
220 } # func_stripname may be replaced by extended shell implementation
221
222
223 # These SED scripts presuppose an absolute path with a trailing slash.
224 pathcar='s,^/\([^/]*\).*$,\1,'
225 pathcdr='s,^/[^/]*,,'
226 removedotparts=':dotsl
227 s@/\./@/@g
228 t dotsl
229 s,/\.$,/,'
230 collapseslashes='s@/\{1,\}@/@g'
231 finalslash='s,/*$,/,'
232
233 # func_normal_abspath PATH
234 # Remove doubled-up and trailing slashes, "." path components,
235 # and cancel out any ".." path components in PATH after making
236 # it an absolute path.
237 # value returned in "$func_normal_abspath_result"
238 func_normal_abspath ()
239 {
240 # Start from root dir and reassemble the path.
241 func_normal_abspath_result=
242 func_normal_abspath_tpath=$1
243 func_normal_abspath_altnamespace=
244 case $func_normal_abspath_tpath in
245 "")
246 # Empty path, that just means $cwd.
247 func_stripname '' '/' "`pwd`"
248 func_normal_abspath_result=$func_stripname_result
249 return
250 ;;
251 # The next three entries are used to spot a run of precisely
252 # two leading slashes without using negated character classes;
253 # we take advantage of case's first-match behaviour.
254 ///*)
255 # Unusual form of absolute path, do nothing.
256 ;;
257 //*)
258 # Not necessarily an ordinary path; POSIX reserves leading '//'
259 # and for example Cygwin uses it to access remote file shares
260 # over CIFS/SMB, so we conserve a leading double slash if found.
261 func_normal_abspath_altnamespace=/
262 ;;
263 /*)
264 # Absolute path, do nothing.
265 ;;
266 *)
267 # Relative path, prepend $cwd.
268 func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
269 ;;
270 esac
271 # Cancel out all the simple stuff to save iterations. We also want
272 # the path to end with a slash for ease of parsing, so make sure
273 # there is one (and only one) here.
274 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
275 -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
276 while :; do
277 # Processed it all yet?
278 if test "$func_normal_abspath_tpath" = / ; then
279 # If we ascended to the root using ".." the result may be empty now.
280 if test -z "$func_normal_abspath_result" ; then
281 func_normal_abspath_result=/
282 fi
283 break
284 fi
285 func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
286 -e "$pathcar"`
287 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
288 -e "$pathcdr"`
289 # Figure out what to do with it
290 case $func_normal_abspath_tcomponent in
291 "")
292 # Trailing empty path component, ignore it.
293 ;;
294 ..)
295 # Parent dir; strip last assembled component from result.
296 func_dirname "$func_normal_abspath_result"
297 func_normal_abspath_result=$func_dirname_result
298 ;;
299 *)
300 # Actual path component, append it.
301 func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
302 ;;
303 esac
304 done
305 # Restore leading double-slash if one was found on entry.
306 func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
307 }
308
309 # func_relative_path SRCDIR DSTDIR
310 # generates a relative path from SRCDIR to DSTDIR, with a trailing
311 # slash if non-empty, suitable for immediately appending a filename
312 # without needing to append a separator.
313 # value returned in "$func_relative_path_result"
314 func_relative_path ()
315 {
316 func_relative_path_result=
317 func_normal_abspath "$1"
318 func_relative_path_tlibdir=$func_normal_abspath_result
319 func_normal_abspath "$2"
320 func_relative_path_tbindir=$func_normal_abspath_result
321
322 # Ascend the tree starting from libdir
323 while :; do
324 # check if we have found a prefix of bindir
325 case $func_relative_path_tbindir in
326 $func_relative_path_tlibdir)
327 # found an exact match
328 func_relative_path_tcancelled=
329 break
330 ;;
331 $func_relative_path_tlibdir*)
332 # found a matching prefix
333 func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
334 func_relative_path_tcancelled=$func_stripname_result
335 if test -z "$func_relative_path_result"; then
336 func_relative_path_result=.
337 fi
338 break
339 ;;
340 *)
341 func_dirname $func_relative_path_tlibdir
342 func_relative_path_tlibdir=${func_dirname_result}
343 if test "x$func_relative_path_tlibdir" = x ; then
344 # Have to descend all the way to the root!
345 func_relative_path_result=../$func_relative_path_result
346 func_relative_path_tcancelled=$func_relative_path_tbindir
347 break
348 fi
349 func_relative_path_result=../$func_relative_path_result
350 ;;
351 esac
352 done
353
354 # Now calculate path; take care to avoid doubling-up slashes.
355 func_stripname '' '/' "$func_relative_path_result"
356 func_relative_path_result=$func_stripname_result
357 func_stripname '/' '/' "$func_relative_path_tcancelled"
358 if test "x$func_stripname_result" != x ; then
359 func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
166360 fi
167 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
168 }
169
170 # Generated shell functions inserted here.
171
172 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
173 # is ksh but when the shell is invoked as "sh" and the current value of
174 # the _XPG environment variable is not equal to 1 (one), the special
175 # positional parameter $0, within a function call, is the name of the
176 # function.
177 progpath="$0"
361
362 # Normalisation. If bindir is libdir, return empty string,
363 # else relative path ending with a slash; either way, target
364 # file name can be directly appended.
365 if test ! -z "$func_relative_path_result"; then
366 func_stripname './' '' "$func_relative_path_result/"
367 func_relative_path_result=$func_stripname_result
368 fi
369 }
178370
179371 # The name of this program:
180 # In the unlikely event $progname began with a '-', it would play havoc with
181 # func_echo (imagine progname=-n), so we prepend ./ in that case:
182372 func_dirname_and_basename "$progpath"
183373 progname=$func_basename_result
184 case $progname in
185 -*) progname=./$progname ;;
186 esac
187374
188375 # Make sure we have an absolute path for reexecution:
189376 case $progpath in
195382 ;;
196383 *)
197384 save_IFS="$IFS"
198 IFS=:
385 IFS=${PATH_SEPARATOR-:}
199386 for progdir in $PATH; do
200387 IFS="$save_IFS"
201388 test -x "$progdir/$progname" && break
213400
214401 # Same as above, but do not quote variable references.
215402 double_quote_subst='s/\(["`\\]\)/\\\1/g'
403
404 # Sed substitution that turns a string into a regex matching for the
405 # string literally.
406 sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
407
408 # Sed substitution that converts a w32 file name or path
409 # which contains forward slashes, into one that contains
410 # (escaped) backslashes. A very naive implementation.
411 lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
216412
217413 # Re-`\' parameter expansions in output of double_quote_subst that were
218414 # `\'-ed in input to the same. If an odd number of `\' preceded a '$'
242438 # name if it has been set yet.
243439 func_echo ()
244440 {
245 $ECHO "$progname${mode+: }$mode: $*"
441 $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
246442 }
247443
248444 # func_verbose arg...
257453 :
258454 }
259455
456 # func_echo_all arg...
457 # Invoke $ECHO with all args, space-separated.
458 func_echo_all ()
459 {
460 $ECHO "$*"
461 }
462
260463 # func_error arg...
261464 # Echo program name prefixed message to standard error.
262465 func_error ()
263466 {
264 $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
467 $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
265468 }
266469
267470 # func_warning arg...
268471 # Echo program name prefixed warning message to standard error.
269472 func_warning ()
270473 {
271 $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
474 $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
272475
273476 # bash bug again:
274477 :
325528 case $my_directory_path in */*) ;; *) break ;; esac
326529
327530 # ...otherwise throw away the child directory and loop
328 my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
531 my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
329532 done
330 my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
533 my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
331534
332535 save_mkdir_p_IFS="$IFS"; IFS=':'
333536 for my_dir in $my_dir_list; do
377580 func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
378581 fi
379582
380 $ECHO "X$my_tmpdir" | $Xsed
583 $ECHO "$my_tmpdir"
381584 }
382585
383586
391594 {
392595 case $1 in
393596 *[\\\`\"\$]*)
394 func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
597 func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
395598 *)
396599 func_quote_for_eval_unquoted_result="$1" ;;
397600 esac
418621 {
419622 case $1 in
420623 *[\\\`\"]*)
421 my_arg=`$ECHO "X$1" | $Xsed \
624 my_arg=`$ECHO "$1" | $SED \
422625 -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
423626 *)
424627 my_arg="$1" ;;
487690 fi
488691 }
489692
490
491
693 # func_tr_sh
694 # Turn $1 into a string suitable for a shell variable name.
695 # Result is stored in $func_tr_sh_result. All characters
696 # not in the set a-zA-Z0-9_ are replaced with '_'. Further,
697 # if $1 begins with a digit, a '_' is prepended as well.
698 func_tr_sh ()
699 {
700 case $1 in
701 [0-9]* | *[!a-zA-Z0-9_]*)
702 func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
703 ;;
704 * )
705 func_tr_sh_result=$1
706 ;;
707 esac
708 }
492709
493710
494711 # func_version
495712 # Echo version message to standard output and exit.
496713 func_version ()
497714 {
498 $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
715 $opt_debug
716
717 $SED -n '/(C)/!b go
718 :more
719 /\./!{
720 N
721 s/\n# / /
722 b more
723 }
724 :go
725 /^# '$PROGRAM' (GNU /,/# warranty; / {
499726 s/^# //
500727 s/^# *$//
501728 s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
508735 # Echo short help message to standard output and exit.
509736 func_usage ()
510737 {
511 $SED -n '/^# Usage:/,/# -h/ {
738 $opt_debug
739
740 $SED -n '/^# Usage:/,/^# *.*--help/ {
512741 s/^# //
513742 s/^# *$//
514743 s/\$progname/'$progname'/
515744 p
516745 }' < "$progpath"
517 $ECHO
746 echo
518747 $ECHO "run \`$progname --help | more' for full usage"
519748 exit $?
520749 }
521750
522 # func_help
523 # Echo long help message to standard output and exit.
751 # func_help [NOEXIT]
752 # Echo long help message to standard output and exit,
753 # unless 'noexit' is passed as argument.
524754 func_help ()
525755 {
756 $opt_debug
757
526758 $SED -n '/^# Usage:/,/# Report bugs to/ {
759 :print
527760 s/^# //
528761 s/^# *$//
529762 s*\$progname*'$progname'*
533766 s*\$LTCFLAGS*'"$LTCFLAGS"'*
534767 s*\$LD*'"$LD"'*
535768 s/\$with_gnu_ld/'"$with_gnu_ld"'/
536 s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
537 s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
769 s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
770 s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
538771 p
539 }' < "$progpath"
540 exit $?
772 d
773 }
774 /^# .* home page:/b print
775 /^# General help using/b print
776 ' < "$progpath"
777 ret=$?
778 if test -z "$1"; then
779 exit $ret
780 fi
541781 }
542782
543783 # func_missing_arg argname
545785 # exit_cmd.
546786 func_missing_arg ()
547787 {
548 func_error "missing argument for $1"
788 $opt_debug
789
790 func_error "missing argument for $1."
549791 exit_cmd=exit
550792 }
551793
794
795 # func_split_short_opt shortopt
796 # Set func_split_short_opt_name and func_split_short_opt_arg shell
797 # variables after splitting SHORTOPT after the 2nd character.
798 func_split_short_opt ()
799 {
800 my_sed_short_opt='1s/^\(..\).*$/\1/;q'
801 my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
802
803 func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
804 func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
805 } # func_split_short_opt may be replaced by extended shell implementation
806
807
808 # func_split_long_opt longopt
809 # Set func_split_long_opt_name and func_split_long_opt_arg shell
810 # variables after splitting LONGOPT at the `=' sign.
811 func_split_long_opt ()
812 {
813 my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
814 my_sed_long_arg='1s/^--[^=]*=//'
815
816 func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
817 func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
818 } # func_split_long_opt may be replaced by extended shell implementation
819
552820 exit_cmd=:
553821
554822
555823
556824
557
558 # Check that we have a working $ECHO.
559 if test "X$1" = X--no-reexec; then
560 # Discard the --no-reexec flag, and continue.
561 shift
562 elif test "X$1" = X--fallback-echo; then
563 # Avoid inline document here, it may be left over
564 :
565 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
566 # Yippee, $ECHO works!
567 :
568 else
569 # Restart under the correct shell, and then maybe $ECHO will work.
570 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
571 fi
572
573 if test "X$1" = X--fallback-echo; then
574 # used as fallback echo
575 shift
576 cat <<EOF
577 $*
578 EOF
579 exit $EXIT_SUCCESS
580 fi
581825
582826 magic="%%%MAGIC variable%%%"
583827 magic_exe="%%%MAGIC EXE variable%%%"
584828
585829 # Global variables.
586 # $mode is unset
587830 nonopt=
588 execute_dlfiles=
589831 preserve_args=
590832 lo2o="s/\\.lo\$/.${objext}/"
591833 o2lo="s/\\.${objext}\$/.lo/"
592834 extracted_archives=
593835 extracted_serial=0
594836
595 opt_dry_run=false
596 opt_duplicate_deps=false
597 opt_silent=false
598 opt_debug=:
599
600837 # If this variable is set in any of the actions, the command in it
601838 # will be execed at the end. This prevents here-documents from being
602839 # left over by shells.
603840 exec_cmd=
604841
842 # func_append var value
843 # Append VALUE to the end of shell variable VAR.
844 func_append ()
845 {
846 eval "${1}=\$${1}\${2}"
847 } # func_append may be replaced by extended shell implementation
848
849 # func_append_quoted var value
850 # Quote VALUE and append to the end of shell variable VAR, separated
851 # by a space.
852 func_append_quoted ()
853 {
854 func_quote_for_eval "${2}"
855 eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
856 } # func_append_quoted may be replaced by extended shell implementation
857
858
859 # func_arith arithmetic-term...
860 func_arith ()
861 {
862 func_arith_result=`expr "${@}"`
863 } # func_arith may be replaced by extended shell implementation
864
865
866 # func_len string
867 # STRING may not start with a hyphen.
868 func_len ()
869 {
870 func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
871 } # func_len may be replaced by extended shell implementation
872
873
874 # func_lo2o object
875 func_lo2o ()
876 {
877 func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
878 } # func_lo2o may be replaced by extended shell implementation
879
880
881 # func_xform libobj-or-source
882 func_xform ()
883 {
884 func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
885 } # func_xform may be replaced by extended shell implementation
886
887
605888 # func_fatal_configuration arg...
606889 # Echo program name prefixed message to standard error, followed by
607890 # a configuration failure hint, and exit.
635918 # Display the features supported by this script.
636919 func_features ()
637920 {
638 $ECHO "host: $host"
921 echo "host: $host"
639922 if test "$build_libtool_libs" = yes; then
640 $ECHO "enable shared libraries"
923 echo "enable shared libraries"
641924 else
642 $ECHO "disable shared libraries"
925 echo "disable shared libraries"
643926 fi
644927 if test "$build_old_libs" = yes; then
645 $ECHO "enable static libraries"
928 echo "enable static libraries"
646929 else
647 $ECHO "disable static libraries"
930 echo "disable static libraries"
648931 fi
649932
650933 exit $?
689972 fi
690973 ;;
691974 esac
692 }
693
694 # Parse options once, thoroughly. This comes as soon as possible in
695 # the script to make things like `libtool --version' happen quickly.
696 {
697
698 # Shorthand for --mode=foo, only valid as the first argument
699 case $1 in
700 clean|clea|cle|cl)
701 shift; set dummy --mode clean ${1+"$@"}; shift
702 ;;
703 compile|compil|compi|comp|com|co|c)
704 shift; set dummy --mode compile ${1+"$@"}; shift
705 ;;
706 execute|execut|execu|exec|exe|ex|e)
707 shift; set dummy --mode execute ${1+"$@"}; shift
708 ;;
709 finish|finis|fini|fin|fi|f)
710 shift; set dummy --mode finish ${1+"$@"}; shift
711 ;;
712 install|instal|insta|inst|ins|in|i)
713 shift; set dummy --mode install ${1+"$@"}; shift
714 ;;
715 link|lin|li|l)
716 shift; set dummy --mode link ${1+"$@"}; shift
717 ;;
718 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
719 shift; set dummy --mode uninstall ${1+"$@"}; shift
720 ;;
721 esac
722
723 # Parse non-mode specific arguments:
724 while test "$#" -gt 0; do
725 opt="$1"
726 shift
727
728 case $opt in
729 --config) func_config ;;
730
731 --debug) preserve_args="$preserve_args $opt"
732 func_echo "enabling shell trace mode"
733 opt_debug='set -x'
734 $opt_debug
735 ;;
736
737 -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
738 execute_dlfiles="$execute_dlfiles $1"
739 shift
740 ;;
741
742 --dry-run | -n) opt_dry_run=: ;;
743 --features) func_features ;;
744 --finish) mode="finish" ;;
745
746 --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
747 case $1 in
748 # Valid mode arguments:
749 clean) ;;
750 compile) ;;
751 execute) ;;
752 finish) ;;
753 install) ;;
754 link) ;;
755 relink) ;;
756 uninstall) ;;
757
758 # Catch anything else as an error
759 *) func_error "invalid argument for $opt"
760 exit_cmd=exit
761 break
762 ;;
763 esac
764
765 mode="$1"
766 shift
767 ;;
768
769 --preserve-dup-deps)
770 opt_duplicate_deps=: ;;
771
772 --quiet|--silent) preserve_args="$preserve_args $opt"
773 opt_silent=:
774 ;;
775
776 --verbose| -v) preserve_args="$preserve_args $opt"
777 opt_silent=false
778 ;;
779
780 --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
781 preserve_args="$preserve_args $opt $1"
782 func_enable_tag "$1" # tagname is set here
783 shift
784 ;;
785
786 # Separate optargs to long options:
787 -dlopen=*|--mode=*|--tag=*)
788 func_opt_split "$opt"
789 set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
790 shift
791 ;;
792
793 -\?|-h) func_usage ;;
794 --help) opt_help=: ;;
795 --version) func_version ;;
796
797 -*) func_fatal_help "unrecognized option \`$opt'" ;;
798
799 *) nonopt="$opt"
800 break
801 ;;
802 esac
803 done
804
805
806 case $host in
807 *cygwin* | *mingw* | *pw32* | *cegcc*)
808 # don't eliminate duplications in $postdeps and $predeps
809 opt_duplicate_compiler_generated_deps=:
810 ;;
811 *)
812 opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
813 ;;
814 esac
815
816 # Having warned about all mis-specified options, bail out if
817 # anything was wrong.
818 $exit_cmd $EXIT_FAILURE
819975 }
820976
821977 # func_check_version_match
8541010 }
8551011
8561012
1013 # Shorthand for --mode=foo, only valid as the first argument
1014 case $1 in
1015 clean|clea|cle|cl)
1016 shift; set dummy --mode clean ${1+"$@"}; shift
1017 ;;
1018 compile|compil|compi|comp|com|co|c)
1019 shift; set dummy --mode compile ${1+"$@"}; shift
1020 ;;
1021 execute|execut|execu|exec|exe|ex|e)
1022 shift; set dummy --mode execute ${1+"$@"}; shift
1023 ;;
1024 finish|finis|fini|fin|fi|f)
1025 shift; set dummy --mode finish ${1+"$@"}; shift
1026 ;;
1027 install|instal|insta|inst|ins|in|i)
1028 shift; set dummy --mode install ${1+"$@"}; shift
1029 ;;
1030 link|lin|li|l)
1031 shift; set dummy --mode link ${1+"$@"}; shift
1032 ;;
1033 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
1034 shift; set dummy --mode uninstall ${1+"$@"}; shift
1035 ;;
1036 esac
1037
1038
1039
1040 # Option defaults:
1041 opt_debug=:
1042 opt_dry_run=false
1043 opt_config=false
1044 opt_preserve_dup_deps=false
1045 opt_features=false
1046 opt_finish=false
1047 opt_help=false
1048 opt_help_all=false
1049 opt_silent=:
1050 opt_warning=:
1051 opt_verbose=:
1052 opt_silent=false
1053 opt_verbose=false
1054
1055
1056 # Parse options once, thoroughly. This comes as soon as possible in the
1057 # script to make things like `--version' happen as quickly as we can.
1058 {
1059 # this just eases exit handling
1060 while test $# -gt 0; do
1061 opt="$1"
1062 shift
1063 case $opt in
1064 --debug|-x) opt_debug='set -x'
1065 func_echo "enabling shell trace mode"
1066 $opt_debug
1067 ;;
1068 --dry-run|--dryrun|-n)
1069 opt_dry_run=:
1070 ;;
1071 --config)
1072 opt_config=:
1073 func_config
1074 ;;
1075 --dlopen|-dlopen)
1076 optarg="$1"
1077 opt_dlopen="${opt_dlopen+$opt_dlopen
1078 }$optarg"
1079 shift
1080 ;;
1081 --preserve-dup-deps)
1082 opt_preserve_dup_deps=:
1083 ;;
1084 --features)
1085 opt_features=:
1086 func_features
1087 ;;
1088 --finish)
1089 opt_finish=:
1090 set dummy --mode finish ${1+"$@"}; shift
1091 ;;
1092 --help)
1093 opt_help=:
1094 ;;
1095 --help-all)
1096 opt_help_all=:
1097 opt_help=': help-all'
1098 ;;
1099 --mode)
1100 test $# = 0 && func_missing_arg $opt && break
1101 optarg="$1"
1102 opt_mode="$optarg"
1103 case $optarg in
1104 # Valid mode arguments:
1105 clean|compile|execute|finish|install|link|relink|uninstall) ;;
1106
1107 # Catch anything else as an error
1108 *) func_error "invalid argument for $opt"
1109 exit_cmd=exit
1110 break
1111 ;;
1112 esac
1113 shift
1114 ;;
1115 --no-silent|--no-quiet)
1116 opt_silent=false
1117 func_append preserve_args " $opt"
1118 ;;
1119 --no-warning|--no-warn)
1120 opt_warning=false
1121 func_append preserve_args " $opt"
1122 ;;
1123 --no-verbose)
1124 opt_verbose=false
1125 func_append preserve_args " $opt"
1126 ;;
1127 --silent|--quiet)
1128 opt_silent=:
1129 func_append preserve_args " $opt"
1130 opt_verbose=false
1131 ;;
1132 --verbose|-v)
1133 opt_verbose=:
1134 func_append preserve_args " $opt"
1135 opt_silent=false
1136 ;;
1137 --tag)
1138 test $# = 0 && func_missing_arg $opt && break
1139 optarg="$1"
1140 opt_tag="$optarg"
1141 func_append preserve_args " $opt $optarg"
1142 func_enable_tag "$optarg"
1143 shift
1144 ;;
1145
1146 -\?|-h) func_usage ;;
1147 --help) func_help ;;
1148 --version) func_version ;;
1149
1150 # Separate optargs to long options:
1151 --*=*)
1152 func_split_long_opt "$opt"
1153 set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
1154 shift
1155 ;;
1156
1157 # Separate non-argument short options:
1158 -\?*|-h*|-n*|-v*)
1159 func_split_short_opt "$opt"
1160 set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
1161 shift
1162 ;;
1163
1164 --) break ;;
1165 -*) func_fatal_help "unrecognized option \`$opt'" ;;
1166 *) set dummy "$opt" ${1+"$@"}; shift; break ;;
1167 esac
1168 done
1169
1170 # Validate options:
1171
1172 # save first non-option argument
1173 if test "$#" -gt 0; then
1174 nonopt="$opt"
1175 shift
1176 fi
1177
1178 # preserve --debug
1179 test "$opt_debug" = : || func_append preserve_args " --debug"
1180
1181 case $host in
1182 *cygwin* | *mingw* | *pw32* | *cegcc*)
1183 # don't eliminate duplications in $postdeps and $predeps
1184 opt_duplicate_compiler_generated_deps=:
1185 ;;
1186 *)
1187 opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
1188 ;;
1189 esac
1190
1191 $opt_help || {
1192 # Sanity checks first:
1193 func_check_version_match
1194
1195 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
1196 func_fatal_configuration "not configured to build any kind of library"
1197 fi
1198
1199 # Darwin sucks
1200 eval std_shrext=\"$shrext_cmds\"
1201
1202 # Only execute mode is allowed to have -dlopen flags.
1203 if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
1204 func_error "unrecognized option \`-dlopen'"
1205 $ECHO "$help" 1>&2
1206 exit $EXIT_FAILURE
1207 fi
1208
1209 # Change the help message to a mode-specific one.
1210 generic_help="$help"
1211 help="Try \`$progname --help --mode=$opt_mode' for more information."
1212 }
1213
1214
1215 # Bail if the options were screwed
1216 $exit_cmd $EXIT_FAILURE
1217 }
1218
1219
1220
1221
8571222 ## ----------- ##
8581223 ## Main. ##
8591224 ## ----------- ##
860
861 $opt_help || {
862 # Sanity checks first:
863 func_check_version_match
864
865 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
866 func_fatal_configuration "not configured to build any kind of library"
867 fi
868
869 test -z "$mode" && func_fatal_error "error: you must specify a MODE."
870
871
872 # Darwin sucks
873 eval std_shrext=\"$shrext_cmds\"
874
875
876 # Only execute mode is allowed to have -dlopen flags.
877 if test -n "$execute_dlfiles" && test "$mode" != execute; then
878 func_error "unrecognized option \`-dlopen'"
879 $ECHO "$help" 1>&2
880 exit $EXIT_FAILURE
881 fi
882
883 # Change the help message to a mode-specific one.
884 generic_help="$help"
885 help="Try \`$progname --help --mode=$mode' for more information."
886 }
887
8881225
8891226 # func_lalib_p file
8901227 # True iff FILE is a libtool `.la' library or `.lo' object file.
9491286 # temporary ltwrapper_script.
9501287 func_ltwrapper_scriptname ()
9511288 {
952 func_ltwrapper_scriptname_result=""
953 if func_ltwrapper_executable_p "$1"; then
954 func_dirname_and_basename "$1" "" "."
955 func_stripname '' '.exe' "$func_basename_result"
956 func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
957 fi
1289 func_dirname_and_basename "$1" "" "."
1290 func_stripname '' '.exe' "$func_basename_result"
1291 func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
9581292 }
9591293
9601294 # func_ltwrapper_p file
10001334 }
10011335
10021336
1337 # func_resolve_sysroot PATH
1338 # Replace a leading = in PATH with a sysroot. Store the result into
1339 # func_resolve_sysroot_result
1340 func_resolve_sysroot ()
1341 {
1342 func_resolve_sysroot_result=$1
1343 case $func_resolve_sysroot_result in
1344 =*)
1345 func_stripname '=' '' "$func_resolve_sysroot_result"
1346 func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
1347 ;;
1348 esac
1349 }
1350
1351 # func_replace_sysroot PATH
1352 # If PATH begins with the sysroot, replace it with = and
1353 # store the result into func_replace_sysroot_result.
1354 func_replace_sysroot ()
1355 {
1356 case "$lt_sysroot:$1" in
1357 ?*:"$lt_sysroot"*)
1358 func_stripname "$lt_sysroot" '' "$1"
1359 func_replace_sysroot_result="=$func_stripname_result"
1360 ;;
1361 *)
1362 # Including no sysroot.
1363 func_replace_sysroot_result=$1
1364 ;;
1365 esac
1366 }
1367
10031368 # func_infer_tag arg
10041369 # Infer tagged configuration to use if any are available and
10051370 # if one wasn't chosen via the "--tag" command line option.
10121377 if test -n "$available_tags" && test -z "$tagname"; then
10131378 CC_quoted=
10141379 for arg in $CC; do
1015 func_quote_for_eval "$arg"
1016 CC_quoted="$CC_quoted $func_quote_for_eval_result"
1380 func_append_quoted CC_quoted "$arg"
10171381 done
1382 CC_expanded=`func_echo_all $CC`
1383 CC_quoted_expanded=`func_echo_all $CC_quoted`
10181384 case $@ in
10191385 # Blanks in the command may have been stripped by the calling shell,
10201386 # but not from the CC environment variable when configure was run.
1021 " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
1387 " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
1388 " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
10221389 # Blanks at the start of $base_compile will cause this to fail
10231390 # if we don't check for them as well.
10241391 *)
10291396 CC_quoted=
10301397 for arg in $CC; do
10311398 # Double-quote args containing other shell metacharacters.
1032 func_quote_for_eval "$arg"
1033 CC_quoted="$CC_quoted $func_quote_for_eval_result"
1399 func_append_quoted CC_quoted "$arg"
10341400 done
1401 CC_expanded=`func_echo_all $CC`
1402 CC_quoted_expanded=`func_echo_all $CC_quoted`
10351403 case "$@ " in
1036 " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
1404 " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
1405 " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
10371406 # The compiler in the base compile command matches
10381407 # the one in the tagged configuration.
10391408 # Assume this is the tagged configuration we want.
10961465 }
10971466 }
10981467
1468
1469 ##################################################
1470 # FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
1471 ##################################################
1472
1473 # func_convert_core_file_wine_to_w32 ARG
1474 # Helper function used by file name conversion functions when $build is *nix,
1475 # and $host is mingw, cygwin, or some other w32 environment. Relies on a
1476 # correctly configured wine environment available, with the winepath program
1477 # in $build's $PATH.
1478 #
1479 # ARG is the $build file name to be converted to w32 format.
1480 # Result is available in $func_convert_core_file_wine_to_w32_result, and will
1481 # be empty on error (or when ARG is empty)
1482 func_convert_core_file_wine_to_w32 ()
1483 {
1484 $opt_debug
1485 func_convert_core_file_wine_to_w32_result="$1"
1486 if test -n "$1"; then
1487 # Unfortunately, winepath does not exit with a non-zero error code, so we
1488 # are forced to check the contents of stdout. On the other hand, if the
1489 # command is not found, the shell will set an exit code of 127 and print
1490 # *an error message* to stdout. So we must check for both error code of
1491 # zero AND non-empty stdout, which explains the odd construction:
1492 func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
1493 if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
1494 func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
1495 $SED -e "$lt_sed_naive_backslashify"`
1496 else
1497 func_convert_core_file_wine_to_w32_result=
1498 fi
1499 fi
1500 }
1501 # end: func_convert_core_file_wine_to_w32
1502
1503
1504 # func_convert_core_path_wine_to_w32 ARG
1505 # Helper function used by path conversion functions when $build is *nix, and
1506 # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
1507 # configured wine environment available, with the winepath program in $build's
1508 # $PATH. Assumes ARG has no leading or trailing path separator characters.
1509 #
1510 # ARG is path to be converted from $build format to win32.
1511 # Result is available in $func_convert_core_path_wine_to_w32_result.
1512 # Unconvertible file (directory) names in ARG are skipped; if no directory names
1513 # are convertible, then the result may be empty.
1514 func_convert_core_path_wine_to_w32 ()
1515 {
1516 $opt_debug
1517 # unfortunately, winepath doesn't convert paths, only file names
1518 func_convert_core_path_wine_to_w32_result=""
1519 if test -n "$1"; then
1520 oldIFS=$IFS
1521 IFS=:
1522 for func_convert_core_path_wine_to_w32_f in $1; do
1523 IFS=$oldIFS
1524 func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
1525 if test -n "$func_convert_core_file_wine_to_w32_result" ; then
1526 if test -z "$func_convert_core_path_wine_to_w32_result"; then
1527 func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
1528 else
1529 func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
1530 fi
1531 fi
1532 done
1533 IFS=$oldIFS
1534 fi
1535 }
1536 # end: func_convert_core_path_wine_to_w32
1537
1538
1539 # func_cygpath ARGS...
1540 # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
1541 # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
1542 # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
1543 # (2), returns the Cygwin file name or path in func_cygpath_result (input
1544 # file name or path is assumed to be in w32 format, as previously converted
1545 # from $build's *nix or MSYS format). In case (3), returns the w32 file name
1546 # or path in func_cygpath_result (input file name or path is assumed to be in
1547 # Cygwin format). Returns an empty string on error.
1548 #
1549 # ARGS are passed to cygpath, with the last one being the file name or path to
1550 # be converted.
1551 #
1552 # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
1553 # environment variable; do not put it in $PATH.
1554 func_cygpath ()
1555 {
1556 $opt_debug
1557 if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
1558 func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
1559 if test "$?" -ne 0; then
1560 # on failure, ensure result is empty
1561 func_cygpath_result=
1562 fi
1563 else
1564 func_cygpath_result=
1565 func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
1566 fi
1567 }
1568 #end: func_cygpath
1569
1570
1571 # func_convert_core_msys_to_w32 ARG
1572 # Convert file name or path ARG from MSYS format to w32 format. Return
1573 # result in func_convert_core_msys_to_w32_result.
1574 func_convert_core_msys_to_w32 ()
1575 {
1576 $opt_debug
1577 # awkward: cmd appends spaces to result
1578 func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
1579 $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
1580 }
1581 #end: func_convert_core_msys_to_w32
1582
1583
1584 # func_convert_file_check ARG1 ARG2
1585 # Verify that ARG1 (a file name in $build format) was converted to $host
1586 # format in ARG2. Otherwise, emit an error message, but continue (resetting
1587 # func_to_host_file_result to ARG1).
1588 func_convert_file_check ()
1589 {
1590 $opt_debug
1591 if test -z "$2" && test -n "$1" ; then
1592 func_error "Could not determine host file name corresponding to"
1593 func_error " \`$1'"
1594 func_error "Continuing, but uninstalled executables may not work."
1595 # Fallback:
1596 func_to_host_file_result="$1"
1597 fi
1598 }
1599 # end func_convert_file_check
1600
1601
1602 # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
1603 # Verify that FROM_PATH (a path in $build format) was converted to $host
1604 # format in TO_PATH. Otherwise, emit an error message, but continue, resetting
1605 # func_to_host_file_result to a simplistic fallback value (see below).
1606 func_convert_path_check ()
1607 {
1608 $opt_debug
1609 if test -z "$4" && test -n "$3"; then
1610 func_error "Could not determine the host path corresponding to"
1611 func_error " \`$3'"
1612 func_error "Continuing, but uninstalled executables may not work."
1613 # Fallback. This is a deliberately simplistic "conversion" and
1614 # should not be "improved". See libtool.info.
1615 if test "x$1" != "x$2"; then
1616 lt_replace_pathsep_chars="s|$1|$2|g"
1617 func_to_host_path_result=`echo "$3" |
1618 $SED -e "$lt_replace_pathsep_chars"`
1619 else
1620 func_to_host_path_result="$3"
1621 fi
1622 fi
1623 }
1624 # end func_convert_path_check
1625
1626
1627 # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
1628 # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
1629 # and appending REPL if ORIG matches BACKPAT.
1630 func_convert_path_front_back_pathsep ()
1631 {
1632 $opt_debug
1633 case $4 in
1634 $1 ) func_to_host_path_result="$3$func_to_host_path_result"
1635 ;;
1636 esac
1637 case $4 in
1638 $2 ) func_append func_to_host_path_result "$3"
1639 ;;
1640 esac
1641 }
1642 # end func_convert_path_front_back_pathsep
1643
1644
1645 ##################################################
1646 # $build to $host FILE NAME CONVERSION FUNCTIONS #
1647 ##################################################
1648 # invoked via `$to_host_file_cmd ARG'
1649 #
1650 # In each case, ARG is the path to be converted from $build to $host format.
1651 # Result will be available in $func_to_host_file_result.
1652
1653
1654 # func_to_host_file ARG
1655 # Converts the file name ARG from $build format to $host format. Return result
1656 # in func_to_host_file_result.
1657 func_to_host_file ()
1658 {
1659 $opt_debug
1660 $to_host_file_cmd "$1"
1661 }
1662 # end func_to_host_file
1663
1664
1665 # func_to_tool_file ARG LAZY
1666 # converts the file name ARG from $build format to toolchain format. Return
1667 # result in func_to_tool_file_result. If the conversion in use is listed
1668 # in (the comma separated) LAZY, no conversion takes place.
1669 func_to_tool_file ()
1670 {
1671 $opt_debug
1672 case ,$2, in
1673 *,"$to_tool_file_cmd",*)
1674 func_to_tool_file_result=$1
1675 ;;
1676 *)
1677 $to_tool_file_cmd "$1"
1678 func_to_tool_file_result=$func_to_host_file_result
1679 ;;
1680 esac
1681 }
1682 # end func_to_tool_file
1683
1684
1685 # func_convert_file_noop ARG
1686 # Copy ARG to func_to_host_file_result.
1687 func_convert_file_noop ()
1688 {
1689 func_to_host_file_result="$1"
1690 }
1691 # end func_convert_file_noop
1692
1693
1694 # func_convert_file_msys_to_w32 ARG
1695 # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
1696 # conversion to w32 is not available inside the cwrapper. Returns result in
1697 # func_to_host_file_result.
1698 func_convert_file_msys_to_w32 ()
1699 {
1700 $opt_debug
1701 func_to_host_file_result="$1"
1702 if test -n "$1"; then
1703 func_convert_core_msys_to_w32 "$1"
1704 func_to_host_file_result="$func_convert_core_msys_to_w32_result"
1705 fi
1706 func_convert_file_check "$1" "$func_to_host_file_result"
1707 }
1708 # end func_convert_file_msys_to_w32
1709
1710
1711 # func_convert_file_cygwin_to_w32 ARG
1712 # Convert file name ARG from Cygwin to w32 format. Returns result in
1713 # func_to_host_file_result.
1714 func_convert_file_cygwin_to_w32 ()
1715 {
1716 $opt_debug
1717 func_to_host_file_result="$1"
1718 if test -n "$1"; then
1719 # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
1720 # LT_CYGPATH in this case.
1721 func_to_host_file_result=`cygpath -m "$1"`
1722 fi
1723 func_convert_file_check "$1" "$func_to_host_file_result"
1724 }
1725 # end func_convert_file_cygwin_to_w32
1726
1727
1728 # func_convert_file_nix_to_w32 ARG
1729 # Convert file name ARG from *nix to w32 format. Requires a wine environment
1730 # and a working winepath. Returns result in func_to_host_file_result.
1731 func_convert_file_nix_to_w32 ()
1732 {
1733 $opt_debug
1734 func_to_host_file_result="$1"
1735 if test -n "$1"; then
1736 func_convert_core_file_wine_to_w32 "$1"
1737 func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
1738 fi
1739 func_convert_file_check "$1" "$func_to_host_file_result"
1740 }
1741 # end func_convert_file_nix_to_w32
1742
1743
1744 # func_convert_file_msys_to_cygwin ARG
1745 # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
1746 # Returns result in func_to_host_file_result.
1747 func_convert_file_msys_to_cygwin ()
1748 {
1749 $opt_debug
1750 func_to_host_file_result="$1"
1751 if test -n "$1"; then
1752 func_convert_core_msys_to_w32 "$1"
1753 func_cygpath -u "$func_convert_core_msys_to_w32_result"
1754 func_to_host_file_result="$func_cygpath_result"
1755 fi
1756 func_convert_file_check "$1" "$func_to_host_file_result"
1757 }
1758 # end func_convert_file_msys_to_cygwin
1759
1760
1761 # func_convert_file_nix_to_cygwin ARG
1762 # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
1763 # in a wine environment, working winepath, and LT_CYGPATH set. Returns result
1764 # in func_to_host_file_result.
1765 func_convert_file_nix_to_cygwin ()
1766 {
1767 $opt_debug
1768 func_to_host_file_result="$1"
1769 if test -n "$1"; then
1770 # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
1771 func_convert_core_file_wine_to_w32 "$1"
1772 func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
1773 func_to_host_file_result="$func_cygpath_result"
1774 fi
1775 func_convert_file_check "$1" "$func_to_host_file_result"
1776 }
1777 # end func_convert_file_nix_to_cygwin
1778
1779
1780 #############################################
1781 # $build to $host PATH CONVERSION FUNCTIONS #
1782 #############################################
1783 # invoked via `$to_host_path_cmd ARG'
1784 #
1785 # In each case, ARG is the path to be converted from $build to $host format.
1786 # The result will be available in $func_to_host_path_result.
1787 #
1788 # Path separators are also converted from $build format to $host format. If
1789 # ARG begins or ends with a path separator character, it is preserved (but
1790 # converted to $host format) on output.
1791 #
1792 # All path conversion functions are named using the following convention:
1793 # file name conversion function : func_convert_file_X_to_Y ()
1794 # path conversion function : func_convert_path_X_to_Y ()
1795 # where, for any given $build/$host combination the 'X_to_Y' value is the
1796 # same. If conversion functions are added for new $build/$host combinations,
1797 # the two new functions must follow this pattern, or func_init_to_host_path_cmd
1798 # will break.
1799
1800
1801 # func_init_to_host_path_cmd
1802 # Ensures that function "pointer" variable $to_host_path_cmd is set to the
1803 # appropriate value, based on the value of $to_host_file_cmd.
1804 to_host_path_cmd=
1805 func_init_to_host_path_cmd ()
1806 {
1807 $opt_debug
1808 if test -z "$to_host_path_cmd"; then
1809 func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
1810 to_host_path_cmd="func_convert_path_${func_stripname_result}"
1811 fi
1812 }
1813
1814
1815 # func_to_host_path ARG
1816 # Converts the path ARG from $build format to $host format. Return result
1817 # in func_to_host_path_result.
1818 func_to_host_path ()
1819 {
1820 $opt_debug
1821 func_init_to_host_path_cmd
1822 $to_host_path_cmd "$1"
1823 }
1824 # end func_to_host_path
1825
1826
1827 # func_convert_path_noop ARG
1828 # Copy ARG to func_to_host_path_result.
1829 func_convert_path_noop ()
1830 {
1831 func_to_host_path_result="$1"
1832 }
1833 # end func_convert_path_noop
1834
1835
1836 # func_convert_path_msys_to_w32 ARG
1837 # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
1838 # conversion to w32 is not available inside the cwrapper. Returns result in
1839 # func_to_host_path_result.
1840 func_convert_path_msys_to_w32 ()
1841 {
1842 $opt_debug
1843 func_to_host_path_result="$1"
1844 if test -n "$1"; then
1845 # Remove leading and trailing path separator characters from ARG. MSYS
1846 # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
1847 # and winepath ignores them completely.
1848 func_stripname : : "$1"
1849 func_to_host_path_tmp1=$func_stripname_result
1850 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
1851 func_to_host_path_result="$func_convert_core_msys_to_w32_result"
1852 func_convert_path_check : ";" \
1853 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1854 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1855 fi
1856 }
1857 # end func_convert_path_msys_to_w32
1858
1859
1860 # func_convert_path_cygwin_to_w32 ARG
1861 # Convert path ARG from Cygwin to w32 format. Returns result in
1862 # func_to_host_file_result.
1863 func_convert_path_cygwin_to_w32 ()
1864 {
1865 $opt_debug
1866 func_to_host_path_result="$1"
1867 if test -n "$1"; then
1868 # See func_convert_path_msys_to_w32:
1869 func_stripname : : "$1"
1870 func_to_host_path_tmp1=$func_stripname_result
1871 func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
1872 func_convert_path_check : ";" \
1873 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1874 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1875 fi
1876 }
1877 # end func_convert_path_cygwin_to_w32
1878
1879
1880 # func_convert_path_nix_to_w32 ARG
1881 # Convert path ARG from *nix to w32 format. Requires a wine environment and
1882 # a working winepath. Returns result in func_to_host_file_result.
1883 func_convert_path_nix_to_w32 ()
1884 {
1885 $opt_debug
1886 func_to_host_path_result="$1"
1887 if test -n "$1"; then
1888 # See func_convert_path_msys_to_w32:
1889 func_stripname : : "$1"
1890 func_to_host_path_tmp1=$func_stripname_result
1891 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
1892 func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
1893 func_convert_path_check : ";" \
1894 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1895 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
1896 fi
1897 }
1898 # end func_convert_path_nix_to_w32
1899
1900
1901 # func_convert_path_msys_to_cygwin ARG
1902 # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
1903 # Returns result in func_to_host_file_result.
1904 func_convert_path_msys_to_cygwin ()
1905 {
1906 $opt_debug
1907 func_to_host_path_result="$1"
1908 if test -n "$1"; then
1909 # See func_convert_path_msys_to_w32:
1910 func_stripname : : "$1"
1911 func_to_host_path_tmp1=$func_stripname_result
1912 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
1913 func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
1914 func_to_host_path_result="$func_cygpath_result"
1915 func_convert_path_check : : \
1916 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1917 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
1918 fi
1919 }
1920 # end func_convert_path_msys_to_cygwin
1921
1922
1923 # func_convert_path_nix_to_cygwin ARG
1924 # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
1925 # a wine environment, working winepath, and LT_CYGPATH set. Returns result in
1926 # func_to_host_file_result.
1927 func_convert_path_nix_to_cygwin ()
1928 {
1929 $opt_debug
1930 func_to_host_path_result="$1"
1931 if test -n "$1"; then
1932 # Remove leading and trailing path separator characters from
1933 # ARG. msys behavior is inconsistent here, cygpath turns them
1934 # into '.;' and ';.', and winepath ignores them completely.
1935 func_stripname : : "$1"
1936 func_to_host_path_tmp1=$func_stripname_result
1937 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
1938 func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
1939 func_to_host_path_result="$func_cygpath_result"
1940 func_convert_path_check : : \
1941 "$func_to_host_path_tmp1" "$func_to_host_path_result"
1942 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
1943 fi
1944 }
1945 # end func_convert_path_nix_to_cygwin
1946
1947
10991948 # func_mode_compile arg...
11001949 func_mode_compile ()
11011950 {
11361985 ;;
11371986
11381987 -pie | -fpie | -fPIE)
1139 pie_flag="$pie_flag $arg"
1988 func_append pie_flag " $arg"
11401989 continue
11411990 ;;
11421991
11431992 -shared | -static | -prefer-pic | -prefer-non-pic)
1144 later="$later $arg"
1993 func_append later " $arg"
11451994 continue
11461995 ;;
11471996
11622011 save_ifs="$IFS"; IFS=','
11632012 for arg in $args; do
11642013 IFS="$save_ifs"
1165 func_quote_for_eval "$arg"
1166 lastarg="$lastarg $func_quote_for_eval_result"
2014 func_append_quoted lastarg "$arg"
11672015 done
11682016 IFS="$save_ifs"
11692017 func_stripname ' ' '' "$lastarg"
11702018 lastarg=$func_stripname_result
11712019
11722020 # Add the arguments to base_compile.
1173 base_compile="$base_compile $lastarg"
2021 func_append base_compile " $lastarg"
11742022 continue
11752023 ;;
11762024
11862034 esac # case $arg_mode
11872035
11882036 # Aesthetically quote the previous argument.
1189 func_quote_for_eval "$lastarg"
1190 base_compile="$base_compile $func_quote_for_eval_result"
2037 func_append_quoted base_compile "$lastarg"
11912038 done # for arg
11922039
11932040 case $arg_mode in
12122059 *.[cCFSifmso] | \
12132060 *.ada | *.adb | *.ads | *.asm | \
12142061 *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
1215 *.[fF][09]? | *.for | *.java | *.obj | *.sx)
2062 *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
12162063 func_xform "$libobj"
12172064 libobj=$func_xform_result
12182065 ;;
12872134 # Calculate the filename of the output object if compiler does
12882135 # not support -o with -c
12892136 if test "$compiler_c_o" = no; then
1290 output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
2137 output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
12912138 lockfile="$output_obj.lock"
12922139 else
12932140 output_obj=
13182165 $opt_dry_run || $RM $removelist
13192166 exit $EXIT_FAILURE
13202167 fi
1321 removelist="$removelist $output_obj"
2168 func_append removelist " $output_obj"
13222169 $ECHO "$srcfile" > "$lockfile"
13232170 fi
13242171
13252172 $opt_dry_run || $RM $removelist
1326 removelist="$removelist $lockfile"
2173 func_append removelist " $lockfile"
13272174 trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
13282175
1329 if test -n "$fix_srcfile_path"; then
1330 eval srcfile=\"$fix_srcfile_path\"
1331 fi
2176 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
2177 srcfile=$func_to_tool_file_result
13322178 func_quote_for_eval "$srcfile"
13332179 qsrcfile=$func_quote_for_eval_result
13342180
13482194
13492195 if test -z "$output_obj"; then
13502196 # Place PIC objects in $objdir
1351 command="$command -o $lobj"
2197 func_append command " -o $lobj"
13522198 fi
13532199
13542200 func_show_eval_locale "$command" \
13952241 command="$base_compile $qsrcfile $pic_flag"
13962242 fi
13972243 if test "$compiler_c_o" = yes; then
1398 command="$command -o $obj"
2244 func_append command " -o $obj"
13992245 fi
14002246
14012247 # Suppress compiler output if we already did a PIC compilation.
1402 command="$command$suppress_output"
2248 func_append command "$suppress_output"
14032249 func_show_eval_locale "$command" \
14042250 '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
14052251
14442290 }
14452291
14462292 $opt_help || {
1447 test "$mode" = compile && func_mode_compile ${1+"$@"}
2293 test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
14482294 }
14492295
14502296 func_mode_help ()
14512297 {
14522298 # We need to display help for each of the modes.
1453 case $mode in
2299 case $opt_mode in
14542300 "")
14552301 # Generic help is extracted from the usage comments
14562302 # at the start of this file.
14812327
14822328 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
14832329 -no-suppress do not suppress compiler output for multiple passes
1484 -prefer-pic try to building PIC objects only
1485 -prefer-non-pic try to building non-PIC objects only
2330 -prefer-pic try to build PIC objects only
2331 -prefer-non-pic try to build non-PIC objects only
14862332 -shared do not build a \`.o' file suitable for static linking
14872333 -static only build a \`.o' file suitable for static linking
2334 -Wc,FLAG pass FLAG directly to the compiler
14882335
14892336 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
14902337 from the given SOURCEFILE.
15372384
15382385 The following components of INSTALL-COMMAND are treated specially:
15392386
1540 -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation
2387 -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
15412388
15422389 The rest of the components are interpreted as arguments to that command (only
15432390 BSD-compatible install options are recognized)."
15572404
15582405 -all-static do not do any dynamic linking at all
15592406 -avoid-version do not add a version suffix if possible
2407 -bindir BINDIR specify path to binaries directory (for systems where
2408 libraries must be found in the PATH setting at runtime)
15602409 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
15612410 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
15622411 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
15852434 -version-info CURRENT[:REVISION[:AGE]]
15862435 specify library version info [each variable defaults to 0]
15872436 -weak LIBNAME declare that the target provides the LIBNAME interface
2437 -Wc,FLAG
2438 -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
2439 -Wl,FLAG
2440 -Xlinker FLAG pass linker-specific FLAG directly to the linker
2441 -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
15882442
15892443 All other options (arguments beginning with \`-') are ignored.
15902444
16182472 ;;
16192473
16202474 *)
1621 func_fatal_help "invalid operation mode \`$mode'"
2475 func_fatal_help "invalid operation mode \`$opt_mode'"
16222476 ;;
16232477 esac
16242478
1625 $ECHO
2479 echo
16262480 $ECHO "Try \`$progname --help' for more information about other modes."
1627
1628 exit $?
1629 }
1630
1631 # Now that we've collected a possible --mode arg, show help if necessary
1632 $opt_help && func_mode_help
2481 }
2482
2483 # Now that we've collected a possible --mode arg, show help if necessary
2484 if $opt_help; then
2485 if test "$opt_help" = :; then
2486 func_mode_help
2487 else
2488 {
2489 func_help noexit
2490 for opt_mode in compile link execute install finish uninstall clean; do
2491 func_mode_help
2492 done
2493 } | sed -n '1p; 2,$s/^Usage:/ or: /p'
2494 {
2495 func_help noexit
2496 for opt_mode in compile link execute install finish uninstall clean; do
2497 echo
2498 func_mode_help
2499 done
2500 } |
2501 sed '1d
2502 /^When reporting/,/^Report/{
2503 H
2504 d
2505 }
2506 $x
2507 /information about other modes/d
2508 /more detailed .*MODE/d
2509 s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
2510 fi
2511 exit $?
2512 fi
16332513
16342514
16352515 # func_mode_execute arg...
16422522 func_fatal_help "you must specify a COMMAND"
16432523
16442524 # Handle -dlopen flags immediately.
1645 for file in $execute_dlfiles; do
2525 for file in $opt_dlopen; do
16462526 test -f "$file" \
16472527 || func_fatal_help "\`$file' is not a file"
16482528
16492529 dir=
16502530 case $file in
16512531 *.la)
2532 func_resolve_sysroot "$file"
2533 file=$func_resolve_sysroot_result
2534
16522535 # Check to see that this really is a libtool archive.
16532536 func_lalib_unsafe_p "$file" \
16542537 || func_fatal_help "\`$lib' is not a valid libtool archive"
16702553 dir="$func_dirname_result"
16712554
16722555 if test -f "$dir/$objdir/$dlname"; then
1673 dir="$dir/$objdir"
2556 func_append dir "/$objdir"
16742557 else
16752558 if test ! -f "$dir/$dlname"; then
16762559 func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
17112594 for file
17122595 do
17132596 case $file in
1714 -*) ;;
2597 -* | *.la | *.lo ) ;;
17152598 *)
17162599 # Do a test to see if this is really a libtool program.
17172600 if func_ltwrapper_script_p "$file"; then
17272610 ;;
17282611 esac
17292612 # Quote arguments (to preserve shell metacharacters).
1730 func_quote_for_eval "$file"
1731 args="$args $func_quote_for_eval_result"
2613 func_append_quoted args "$file"
17322614 done
17332615
17342616 if test "X$opt_dry_run" = Xfalse; then
17532635 # Display what would be done.
17542636 if test -n "$shlibpath_var"; then
17552637 eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
1756 $ECHO "export $shlibpath_var"
2638 echo "export $shlibpath_var"
17572639 fi
17582640 $ECHO "$cmd$args"
17592641 exit $EXIT_SUCCESS
17602642 fi
17612643 }
17622644
1763 test "$mode" = execute && func_mode_execute ${1+"$@"}
2645 test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
17642646
17652647
17662648 # func_mode_finish arg...
17672649 func_mode_finish ()
17682650 {
17692651 $opt_debug
1770 libdirs="$nonopt"
2652 libs=
2653 libdirs=
17712654 admincmds=
17722655
2656 for opt in "$nonopt" ${1+"$@"}
2657 do
2658 if test -d "$opt"; then
2659 func_append libdirs " $opt"
2660
2661 elif test -f "$opt"; then
2662 if func_lalib_unsafe_p "$opt"; then
2663 func_append libs " $opt"
2664 else
2665 func_warning "\`$opt' is not a valid libtool archive"
2666 fi
2667
2668 else
2669 func_fatal_error "invalid argument \`$opt'"
2670 fi
2671 done
2672
2673 if test -n "$libs"; then
2674 if test -n "$lt_sysroot"; then
2675 sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
2676 sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
2677 else
2678 sysroot_cmd=
2679 fi
2680
2681 # Remove sysroot references
2682 if $opt_dry_run; then
2683 for lib in $libs; do
2684 echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
2685 done
2686 else
2687 tmpdir=`func_mktempdir`
2688 for lib in $libs; do
2689 sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
2690 > $tmpdir/tmp-la
2691 mv -f $tmpdir/tmp-la $lib
2692 done
2693 ${RM}r "$tmpdir"
2694 fi
2695 fi
2696
17732697 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
1774 for dir
1775 do
1776 libdirs="$libdirs $dir"
1777 done
1778
17792698 for libdir in $libdirs; do
17802699 if test -n "$finish_cmds"; then
17812700 # Do each command in the finish commands.
17852704 if test -n "$finish_eval"; then
17862705 # Do the single finish_eval.
17872706 eval cmds=\"$finish_eval\"
1788 $opt_dry_run || eval "$cmds" || admincmds="$admincmds
2707 $opt_dry_run || eval "$cmds" || func_append admincmds "
17892708 $cmds"
17902709 fi
17912710 done
17942713 # Exit here if they wanted silent mode.
17952714 $opt_silent && exit $EXIT_SUCCESS
17962715
1797 $ECHO "X----------------------------------------------------------------------" | $Xsed
1798 $ECHO "Libraries have been installed in:"
1799 for libdir in $libdirs; do
1800 $ECHO " $libdir"
1801 done
1802 $ECHO
1803 $ECHO "If you ever happen to want to link against installed libraries"
1804 $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
1805 $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
1806 $ECHO "flag during linking and do at least one of the following:"
1807 if test -n "$shlibpath_var"; then
1808 $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable"
1809 $ECHO " during execution"
2716 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
2717 echo "----------------------------------------------------------------------"
2718 echo "Libraries have been installed in:"
2719 for libdir in $libdirs; do
2720 $ECHO " $libdir"
2721 done
2722 echo
2723 echo "If you ever happen to want to link against installed libraries"
2724 echo "in a given directory, LIBDIR, you must either use libtool, and"
2725 echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
2726 echo "flag during linking and do at least one of the following:"
2727 if test -n "$shlibpath_var"; then
2728 echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
2729 echo " during execution"
2730 fi
2731 if test -n "$runpath_var"; then
2732 echo " - add LIBDIR to the \`$runpath_var' environment variable"
2733 echo " during linking"
2734 fi
2735 if test -n "$hardcode_libdir_flag_spec"; then
2736 libdir=LIBDIR
2737 eval flag=\"$hardcode_libdir_flag_spec\"
2738
2739 $ECHO " - use the \`$flag' linker flag"
2740 fi
2741 if test -n "$admincmds"; then
2742 $ECHO " - have your system administrator run these commands:$admincmds"
2743 fi
2744 if test -f /etc/ld.so.conf; then
2745 echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
2746 fi
2747 echo
2748
2749 echo "See any operating system documentation about shared libraries for"
2750 case $host in
2751 solaris2.[6789]|solaris2.1[0-9])
2752 echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
2753 echo "pages."
2754 ;;
2755 *)
2756 echo "more information, such as the ld(1) and ld.so(8) manual pages."
2757 ;;
2758 esac
2759 echo "----------------------------------------------------------------------"
18102760 fi
1811 if test -n "$runpath_var"; then
1812 $ECHO " - add LIBDIR to the \`$runpath_var' environment variable"
1813 $ECHO " during linking"
1814 fi
1815 if test -n "$hardcode_libdir_flag_spec"; then
1816 libdir=LIBDIR
1817 eval flag=\"$hardcode_libdir_flag_spec\"
1818
1819 $ECHO " - use the \`$flag' linker flag"
1820 fi
1821 if test -n "$admincmds"; then
1822 $ECHO " - have your system administrator run these commands:$admincmds"
1823 fi
1824 if test -f /etc/ld.so.conf; then
1825 $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
1826 fi
1827 $ECHO
1828
1829 $ECHO "See any operating system documentation about shared libraries for"
1830 case $host in
1831 solaris2.[6789]|solaris2.1[0-9])
1832 $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
1833 $ECHO "pages."
1834 ;;
1835 *)
1836 $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
1837 ;;
1838 esac
1839 $ECHO "X----------------------------------------------------------------------" | $Xsed
18402761 exit $EXIT_SUCCESS
18412762 }
18422763
1843 test "$mode" = finish && func_mode_finish ${1+"$@"}
2764 test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
18442765
18452766
18462767 # func_mode_install arg...
18512772 # install_prog (especially on Windows NT).
18522773 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
18532774 # Allow the use of GNU shtool's install command.
1854 $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
2775 case $nonopt in *shtool*) :;; *) false;; esac; then
18552776 # Aesthetically quote it.
18562777 func_quote_for_eval "$nonopt"
18572778 install_prog="$func_quote_for_eval_result "
18652786 # The real first argument should be the name of the installation program.
18662787 # Aesthetically quote it.
18672788 func_quote_for_eval "$arg"
1868 install_prog="$install_prog$func_quote_for_eval_result"
2789 func_append install_prog "$func_quote_for_eval_result"
2790 install_shared_prog=$install_prog
2791 case " $install_prog " in
2792 *[\\\ /]cp\ *) install_cp=: ;;
2793 *) install_cp=false ;;
2794 esac
18692795
18702796 # We need to accept at least all the BSD install flags.
18712797 dest=
18752801 install_type=
18762802 isdir=no
18772803 stripme=
2804 no_mode=:
18782805 for arg
18792806 do
2807 arg2=
18802808 if test -n "$dest"; then
1881 files="$files $dest"
2809 func_append files " $dest"
18822810 dest=$arg
18832811 continue
18842812 fi
18862814 case $arg in
18872815 -d) isdir=yes ;;
18882816 -f)
1889 case " $install_prog " in
1890 *[\\\ /]cp\ *) ;;
1891 *) prev=$arg ;;
1892 esac
2817 if $install_cp; then :; else
2818 prev=$arg
2819 fi
18932820 ;;
18942821 -g | -m | -o)
18952822 prev=$arg
19032830 *)
19042831 # If the previous option needed an argument, then skip it.
19052832 if test -n "$prev"; then
2833 if test "x$prev" = x-m && test -n "$install_override_mode"; then
2834 arg2=$install_override_mode
2835 no_mode=false
2836 fi
19062837 prev=
19072838 else
19082839 dest=$arg
19132844
19142845 # Aesthetically quote the argument.
19152846 func_quote_for_eval "$arg"
1916 install_prog="$install_prog $func_quote_for_eval_result"
2847 func_append install_prog " $func_quote_for_eval_result"
2848 if test -n "$arg2"; then
2849 func_quote_for_eval "$arg2"
2850 fi
2851 func_append install_shared_prog " $func_quote_for_eval_result"
19172852 done
19182853
19192854 test -z "$install_prog" && \
19212856
19222857 test -n "$prev" && \
19232858 func_fatal_help "the \`$prev' option requires an argument"
2859
2860 if test -n "$install_override_mode" && $no_mode; then
2861 if $install_cp; then :; else
2862 func_quote_for_eval "$install_override_mode"
2863 func_append install_shared_prog " -m $func_quote_for_eval_result"
2864 fi
2865 fi
19242866
19252867 if test -z "$files"; then
19262868 if test -z "$dest"; then
19762918 case $file in
19772919 *.$libext)
19782920 # Do the static libraries later.
1979 staticlibs="$staticlibs $file"
2921 func_append staticlibs " $file"
19802922 ;;
19812923
19822924 *.la)
2925 func_resolve_sysroot "$file"
2926 file=$func_resolve_sysroot_result
2927
19832928 # Check to see that this really is a libtool archive.
19842929 func_lalib_unsafe_p "$file" \
19852930 || func_fatal_help "\`$file' is not a valid libtool archive"
19932938 if test "X$destdir" = "X$libdir"; then
19942939 case "$current_libdirs " in
19952940 *" $libdir "*) ;;
1996 *) current_libdirs="$current_libdirs $libdir" ;;
2941 *) func_append current_libdirs " $libdir" ;;
19972942 esac
19982943 else
19992944 # Note the libdir as a future libdir.
20002945 case "$future_libdirs " in
20012946 *" $libdir "*) ;;
2002 *) future_libdirs="$future_libdirs $libdir" ;;
2947 *) func_append future_libdirs " $libdir" ;;
20032948 esac
20042949 fi
20052950
20062951 func_dirname "$file" "/" ""
20072952 dir="$func_dirname_result"
2008 dir="$dir$objdir"
2953 func_append dir "$objdir"
20092954
20102955 if test -n "$relink_command"; then
20112956 # Determine the prefix the user has applied to our future dir.
2012 inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
2957 inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
20132958
20142959 # Don't allow the user to place us outside of our expected
20152960 # location b/c this prevents finding dependent libraries that
20222967
20232968 if test -n "$inst_prefix_dir"; then
20242969 # Stick the inst_prefix_dir data into the link command.
2025 relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
2970 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
20262971 else
2027 relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
2972 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
20282973 fi
20292974
20302975 func_warning "relinking \`$file'"
20422987 test -n "$relink_command" && srcname="$realname"T
20432988
20442989 # Install the shared library and build the symlinks.
2045 func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
2990 func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
20462991 'exit $?'
20472992 tstripme="$stripme"
20482993 case $host_os in
20823027 func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
20833028
20843029 # Maybe install the static library, too.
2085 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
3030 test -n "$old_library" && func_append staticlibs " $dir/$old_library"
20863031 ;;
20873032
20883033 *.lo)
21823127 if test -f "$lib"; then
21833128 func_source "$lib"
21843129 fi
2185 libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
3130 libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
21863131 if test -n "$libdir" && test ! -f "$libfile"; then
21873132 func_warning "\`$lib' has not been installed in \`$libdir'"
21883133 finalize=no
22013146 file="$func_basename_result"
22023147 outputname="$tmpdir/$file"
22033148 # Replace the output file specification.
2204 relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
3149 relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
22053150
22063151 $opt_silent || {
22073152 func_quote_for_expand "$relink_command"
22203165 }
22213166 else
22223167 # Install the binary that we compiled earlier.
2223 file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
3168 file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
22243169 fi
22253170 fi
22263171
22563201
22573202 # Set up the ranlib parameters.
22583203 oldlib="$destdir/$name"
3204 func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
3205 tool_oldlib=$func_to_tool_file_result
22593206
22603207 func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
22613208
22623209 if test -n "$stripme" && test -n "$old_striplib"; then
2263 func_show_eval "$old_striplib $oldlib" 'exit $?'
3210 func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
22643211 fi
22653212
22663213 # Do each command in the postinstall commands.
22793226 fi
22803227 }
22813228
2282 test "$mode" = install && func_mode_install ${1+"$@"}
3229 test "$opt_mode" = install && func_mode_install ${1+"$@"}
22833230
22843231
22853232 # func_generate_dlsyms outputname originator pic_p
23223269 extern \"C\" {
23233270 #endif
23243271
3272 #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
3273 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
3274 #endif
3275
3276 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3277 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3278 /* DATA imports from DLLs on WIN32 con't be const, because runtime
3279 relocations are performed -- see ld's documentation on pseudo-relocs. */
3280 # define LT_DLSYM_CONST
3281 #elif defined(__osf__)
3282 /* This system does not cope well with relocations in const data. */
3283 # define LT_DLSYM_CONST
3284 #else
3285 # define LT_DLSYM_CONST const
3286 #endif
3287
23253288 /* External symbol declarations for the compiler. */\
23263289 "
23273290
23313294 $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
23323295
23333296 # Add our own program objects to the symbol list.
2334 progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3297 progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
23353298 for progfile in $progfiles; do
2336 func_verbose "extracting global C symbols from \`$progfile'"
2337 $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
3299 func_to_tool_file "$progfile" func_convert_file_msys_to_w32
3300 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
3301 $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
23383302 done
23393303
23403304 if test -n "$exclude_expsyms"; then
23703334 eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
23713335 eval '$MV "$nlist"T "$nlist"'
23723336 case $host in
2373 *cygwin | *mingw* | *cegcc* )
3337 *cygwin* | *mingw* | *cegcc* )
23743338 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
23753339 eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
23763340 ;;
23833347 func_verbose "extracting global C symbols from \`$dlprefile'"
23843348 func_basename "$dlprefile"
23853349 name="$func_basename_result"
2386 $opt_dry_run || {
2387 eval '$ECHO ": $name " >> "$nlist"'
2388 eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
2389 }
3350 case $host in
3351 *cygwin* | *mingw* | *cegcc* )
3352 # if an import library, we need to obtain dlname
3353 if func_win32_import_lib_p "$dlprefile"; then
3354 func_tr_sh "$dlprefile"
3355 eval "curr_lafile=\$libfile_$func_tr_sh_result"
3356 dlprefile_dlbasename=""
3357 if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
3358 # Use subshell, to avoid clobbering current variable values
3359 dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
3360 if test -n "$dlprefile_dlname" ; then
3361 func_basename "$dlprefile_dlname"
3362 dlprefile_dlbasename="$func_basename_result"
3363 else
3364 # no lafile. user explicitly requested -dlpreopen <import library>.
3365 $sharedlib_from_linklib_cmd "$dlprefile"
3366 dlprefile_dlbasename=$sharedlib_from_linklib_result
3367 fi
3368 fi
3369 $opt_dry_run || {
3370 if test -n "$dlprefile_dlbasename" ; then
3371 eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
3372 else
3373 func_warning "Could not compute DLL name from $name"
3374 eval '$ECHO ": $name " >> "$nlist"'
3375 fi
3376 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3377 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
3378 $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
3379 }
3380 else # not an import lib
3381 $opt_dry_run || {
3382 eval '$ECHO ": $name " >> "$nlist"'
3383 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3384 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
3385 }
3386 fi
3387 ;;
3388 *)
3389 $opt_dry_run || {
3390 eval '$ECHO ": $name " >> "$nlist"'
3391 func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
3392 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
3393 }
3394 ;;
3395 esac
23903396 done
23913397
23923398 $opt_dry_run || {
24143420 if test -f "$nlist"S; then
24153421 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
24163422 else
2417 $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
3423 echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
24183424 fi
24193425
2420 $ECHO >> "$output_objdir/$my_dlsyms" "\
3426 echo >> "$output_objdir/$my_dlsyms" "\
24213427
24223428 /* The mapping between symbol names and symbols. */
24233429 typedef struct {
24243430 const char *name;
24253431 void *address;
24263432 } lt_dlsymlist;
2427 "
2428 case $host in
2429 *cygwin* | *mingw* | *cegcc* )
2430 $ECHO >> "$output_objdir/$my_dlsyms" "\
2431 /* DATA imports from DLLs on WIN32 con't be const, because
2432 runtime relocations are performed -- see ld's documentation
2433 on pseudo-relocs. */"
2434 lt_dlsym_const= ;;
2435 *osf5*)
2436 echo >> "$output_objdir/$my_dlsyms" "\
2437 /* This system does not cope well with relocations in const data */"
2438 lt_dlsym_const= ;;
2439 *)
2440 lt_dlsym_const=const ;;
2441 esac
2442
2443 $ECHO >> "$output_objdir/$my_dlsyms" "\
2444 extern $lt_dlsym_const lt_dlsymlist
3433 extern LT_DLSYM_CONST lt_dlsymlist
24453434 lt_${my_prefix}_LTX_preloaded_symbols[];
2446 $lt_dlsym_const lt_dlsymlist
3435 LT_DLSYM_CONST lt_dlsymlist
24473436 lt_${my_prefix}_LTX_preloaded_symbols[] =
24483437 {\
24493438 { \"$my_originator\", (void *) 0 },"
24563445 eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
24573446 ;;
24583447 esac
2459 $ECHO >> "$output_objdir/$my_dlsyms" "\
3448 echo >> "$output_objdir/$my_dlsyms" "\
24603449 {0, (void *) 0}
24613450 };
24623451
24833472 # linked before any other PIC object. But we must not use
24843473 # pic_flag when linking with -static. The problem exists in
24853474 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
2486 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
3475 *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
24873476 pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
24883477 *-*-hpux*)
24893478 pic_flag_for_symtable=" $pic_flag" ;;
24993488 for arg in $LTCFLAGS; do
25003489 case $arg in
25013490 -pie | -fpie | -fPIE) ;;
2502 *) symtab_cflags="$symtab_cflags $arg" ;;
3491 *) func_append symtab_cflags " $arg" ;;
25033492 esac
25043493 done
25053494
25143503 case $host in
25153504 *cygwin* | *mingw* | *cegcc* )
25163505 if test -f "$output_objdir/$my_outputname.def"; then
2517 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
2518 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
3506 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
3507 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
25193508 else
2520 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2521 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
3509 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
3510 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
25223511 fi
25233512 ;;
25243513 *)
2525 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
2526 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
3514 compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
3515 finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
25273516 ;;
25283517 esac
25293518 ;;
25373526 # really was required.
25383527
25393528 # Nullify the symbol file.
2540 compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
2541 finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
3529 compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
3530 finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
25423531 fi
25433532 }
25443533
25483537 # Need a lot of goo to handle *both* DLLs and import libs
25493538 # Has to be a shell function in order to 'eat' the argument
25503539 # that is supplied when $file_magic_command is called.
3540 # Despite the name, also deal with 64 bit binaries.
25513541 func_win32_libid ()
25523542 {
25533543 $opt_debug
25583548 win32_libid_type="x86 archive import"
25593549 ;;
25603550 *ar\ archive*) # could be an import, or static
3551 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
25613552 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
2562 $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
2563 win32_nmres=`eval $NM -f posix -A $1 |
3553 $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
3554 func_to_tool_file "$1" func_convert_file_msys_to_w32
3555 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
25643556 $SED -n -e '
25653557 1,100{
25663558 / I /{
25893581 $ECHO "$win32_libid_type"
25903582 }
25913583
3584 # func_cygming_dll_for_implib ARG
3585 #
3586 # Platform-specific function to extract the
3587 # name of the DLL associated with the specified
3588 # import library ARG.
3589 # Invoked by eval'ing the libtool variable
3590 # $sharedlib_from_linklib_cmd
3591 # Result is available in the variable
3592 # $sharedlib_from_linklib_result
3593 func_cygming_dll_for_implib ()
3594 {
3595 $opt_debug
3596 sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
3597 }
3598
3599 # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
3600 #
3601 # The is the core of a fallback implementation of a
3602 # platform-specific function to extract the name of the
3603 # DLL associated with the specified import library LIBNAME.
3604 #
3605 # SECTION_NAME is either .idata$6 or .idata$7, depending
3606 # on the platform and compiler that created the implib.
3607 #
3608 # Echos the name of the DLL associated with the
3609 # specified import library.
3610 func_cygming_dll_for_implib_fallback_core ()
3611 {
3612 $opt_debug
3613 match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
3614 $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
3615 $SED '/^Contents of section '"$match_literal"':/{
3616 # Place marker at beginning of archive member dllname section
3617 s/.*/====MARK====/
3618 p
3619 d
3620 }
3621 # These lines can sometimes be longer than 43 characters, but
3622 # are always uninteresting
3623 /:[ ]*file format pe[i]\{,1\}-/d
3624 /^In archive [^:]*:/d
3625 # Ensure marker is printed
3626 /^====MARK====/p
3627 # Remove all lines with less than 43 characters
3628 /^.\{43\}/!d
3629 # From remaining lines, remove first 43 characters
3630 s/^.\{43\}//' |
3631 $SED -n '
3632 # Join marker and all lines until next marker into a single line
3633 /^====MARK====/ b para
3634 H
3635 $ b para
3636 b
3637 :para
3638 x
3639 s/\n//g
3640 # Remove the marker
3641 s/^====MARK====//
3642 # Remove trailing dots and whitespace
3643 s/[\. \t]*$//
3644 # Print
3645 /./p' |
3646 # we now have a list, one entry per line, of the stringified
3647 # contents of the appropriate section of all members of the
3648 # archive which possess that section. Heuristic: eliminate
3649 # all those which have a first or second character that is
3650 # a '.' (that is, objdump's representation of an unprintable
3651 # character.) This should work for all archives with less than
3652 # 0x302f exports -- but will fail for DLLs whose name actually
3653 # begins with a literal '.' or a single character followed by
3654 # a '.'.
3655 #
3656 # Of those that remain, print the first one.
3657 $SED -e '/^\./d;/^.\./d;q'
3658 }
3659
3660 # func_cygming_gnu_implib_p ARG
3661 # This predicate returns with zero status (TRUE) if
3662 # ARG is a GNU/binutils-style import library. Returns
3663 # with nonzero status (FALSE) otherwise.
3664 func_cygming_gnu_implib_p ()
3665 {
3666 $opt_debug
3667 func_to_tool_file "$1" func_convert_file_msys_to_w32
3668 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
3669 test -n "$func_cygming_gnu_implib_tmp"
3670 }
3671
3672 # func_cygming_ms_implib_p ARG
3673 # This predicate returns with zero status (TRUE) if
3674 # ARG is an MS-style import library. Returns
3675 # with nonzero status (FALSE) otherwise.
3676 func_cygming_ms_implib_p ()
3677 {
3678 $opt_debug
3679 func_to_tool_file "$1" func_convert_file_msys_to_w32
3680 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
3681 test -n "$func_cygming_ms_implib_tmp"
3682 }
3683
3684 # func_cygming_dll_for_implib_fallback ARG
3685 # Platform-specific function to extract the
3686 # name of the DLL associated with the specified
3687 # import library ARG.
3688 #
3689 # This fallback implementation is for use when $DLLTOOL
3690 # does not support the --identify-strict option.
3691 # Invoked by eval'ing the libtool variable
3692 # $sharedlib_from_linklib_cmd
3693 # Result is available in the variable
3694 # $sharedlib_from_linklib_result
3695 func_cygming_dll_for_implib_fallback ()
3696 {
3697 $opt_debug
3698 if func_cygming_gnu_implib_p "$1" ; then
3699 # binutils import library
3700 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
3701 elif func_cygming_ms_implib_p "$1" ; then
3702 # ms-generated import library
3703 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
3704 else
3705 # unknown
3706 sharedlib_from_linklib_result=""
3707 fi
3708 }
25923709
25933710
25943711 # func_extract_an_archive dir oldlib
25973714 $opt_debug
25983715 f_ex_an_ar_dir="$1"; shift
25993716 f_ex_an_ar_oldlib="$1"
2600 func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
3717 if test "$lock_old_archive_extraction" = yes; then
3718 lockfile=$f_ex_an_ar_oldlib.lock
3719 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
3720 func_echo "Waiting for $lockfile to be removed"
3721 sleep 2
3722 done
3723 fi
3724 func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
3725 'stat=$?; rm -f "$lockfile"; exit $stat'
3726 if test "$lock_old_archive_extraction" = yes; then
3727 $opt_dry_run || rm -f "$lockfile"
3728 fi
26013729 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
26023730 :
26033731 else
26683796 darwin_file=
26693797 darwin_files=
26703798 for darwin_file in $darwin_filelist; do
2671 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
3799 darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
26723800 $LIPO -create -output "$darwin_file" $darwin_files
26733801 done # $darwin_filelist
26743802 $RM -rf unfat-$$
26833811 func_extract_an_archive "$my_xdir" "$my_xabs"
26843812 ;;
26853813 esac
2686 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
3814 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
26873815 done
26883816
26893817 func_extract_archives_result="$my_oldobjs"
26903818 }
2691
2692
2693
2694 # func_emit_wrapper_part1 [arg=no]
2695 #
2696 # Emit the first part of a libtool wrapper script on stdout.
2697 # For more information, see the description associated with
2698 # func_emit_wrapper(), below.
2699 func_emit_wrapper_part1 ()
2700 {
2701 func_emit_wrapper_part1_arg1=no
2702 if test -n "$1" ; then
2703 func_emit_wrapper_part1_arg1=$1
2704 fi
2705
2706 $ECHO "\
2707 #! $SHELL
2708
2709 # $output - temporary wrapper script for $objdir/$outputname
2710 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
2711 #
2712 # The $output program cannot be directly executed until all the libtool
2713 # libraries that it depends on are installed.
2714 #
2715 # This wrapper script should never be moved out of the build directory.
2716 # If it is, it will not operate correctly.
2717
2718 # Sed substitution that helps us do robust quoting. It backslashifies
2719 # metacharacters that are still active within double-quoted strings.
2720 Xsed='${SED} -e 1s/^X//'
2721 sed_quote_subst='$sed_quote_subst'
2722
2723 # Be Bourne compatible
2724 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
2725 emulate sh
2726 NULLCMD=:
2727 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
2728 # is contrary to our usage. Disable this feature.
2729 alias -g '\${1+\"\$@\"}'='\"\$@\"'
2730 setopt NO_GLOB_SUBST
2731 else
2732 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
2733 fi
2734 BIN_SH=xpg4; export BIN_SH # for Tru64
2735 DUALCASE=1; export DUALCASE # for MKS sh
2736
2737 # The HP-UX ksh and POSIX shell print the target directory to stdout
2738 # if CDPATH is set.
2739 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2740
2741 relink_command=\"$relink_command\"
2742
2743 # This environment variable determines our operation mode.
2744 if test \"\$libtool_install_magic\" = \"$magic\"; then
2745 # install mode needs the following variables:
2746 generated_by_libtool_version='$macro_version'
2747 notinst_deplibs='$notinst_deplibs'
2748 else
2749 # When we are sourced in execute mode, \$file and \$ECHO are already set.
2750 if test \"\$libtool_execute_magic\" != \"$magic\"; then
2751 ECHO=\"$qecho\"
2752 file=\"\$0\"
2753 # Make sure echo works.
2754 if test \"X\$1\" = X--no-reexec; then
2755 # Discard the --no-reexec flag, and continue.
2756 shift
2757 elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
2758 # Yippee, \$ECHO works!
2759 :
2760 else
2761 # Restart under the correct shell, and then maybe \$ECHO will work.
2762 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
2763 fi
2764 fi\
2765 "
2766 $ECHO "\
2767
2768 # Find the directory that this script lives in.
2769 thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
2770 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
2771
2772 # Follow symbolic links until we get to the real thisdir.
2773 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
2774 while test -n \"\$file\"; do
2775 destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
2776
2777 # If there was a directory component, then change thisdir.
2778 if test \"x\$destdir\" != \"x\$file\"; then
2779 case \"\$destdir\" in
2780 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
2781 *) thisdir=\"\$thisdir/\$destdir\" ;;
2782 esac
2783 fi
2784
2785 file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
2786 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
2787 done
2788 "
2789 }
2790 # end: func_emit_wrapper_part1
2791
2792 # func_emit_wrapper_part2 [arg=no]
2793 #
2794 # Emit the second part of a libtool wrapper script on stdout.
2795 # For more information, see the description associated with
2796 # func_emit_wrapper(), below.
2797 func_emit_wrapper_part2 ()
2798 {
2799 func_emit_wrapper_part2_arg1=no
2800 if test -n "$1" ; then
2801 func_emit_wrapper_part2_arg1=$1
2802 fi
2803
2804 $ECHO "\
2805
2806 # Usually 'no', except on cygwin/mingw when embedded into
2807 # the cwrapper.
2808 WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
2809 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
2810 # special case for '.'
2811 if test \"\$thisdir\" = \".\"; then
2812 thisdir=\`pwd\`
2813 fi
2814 # remove .libs from thisdir
2815 case \"\$thisdir\" in
2816 *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
2817 $objdir ) thisdir=. ;;
2818 esac
2819 fi
2820
2821 # Try to get the absolute directory name.
2822 absdir=\`cd \"\$thisdir\" && pwd\`
2823 test -n \"\$absdir\" && thisdir=\"\$absdir\"
2824 "
2825
2826 if test "$fast_install" = yes; then
2827 $ECHO "\
2828 program=lt-'$outputname'$exeext
2829 progdir=\"\$thisdir/$objdir\"
2830
2831 if test ! -f \"\$progdir/\$program\" ||
2832 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
2833 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
2834
2835 file=\"\$\$-\$program\"
2836
2837 if test ! -d \"\$progdir\"; then
2838 $MKDIR \"\$progdir\"
2839 else
2840 $RM \"\$progdir/\$file\"
2841 fi"
2842
2843 $ECHO "\
2844
2845 # relink executable if necessary
2846 if test -n \"\$relink_command\"; then
2847 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
2848 else
2849 $ECHO \"\$relink_command_output\" >&2
2850 $RM \"\$progdir/\$file\"
2851 exit 1
2852 fi
2853 fi
2854
2855 $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
2856 { $RM \"\$progdir/\$program\";
2857 $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
2858 $RM \"\$progdir/\$file\"
2859 fi"
2860 else
2861 $ECHO "\
2862 program='$outputname'
2863 progdir=\"\$thisdir/$objdir\"
2864 "
2865 fi
2866
2867 $ECHO "\
2868
2869 if test -f \"\$progdir/\$program\"; then"
2870
2871 # Export our shlibpath_var if we have one.
2872 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
2873 $ECHO "\
2874 # Add our own library path to $shlibpath_var
2875 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
2876
2877 # Some systems cannot cope with colon-terminated $shlibpath_var
2878 # The second colon is a workaround for a bug in BeOS R4 sed
2879 $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
2880
2881 export $shlibpath_var
2882 "
2883 fi
2884
2885 # fixup the dll searchpath if we need to.
2886 if test -n "$dllsearchpath"; then
2887 $ECHO "\
2888 # Add the dll search path components to the executable PATH
2889 PATH=$dllsearchpath:\$PATH
2890 "
2891 fi
2892
2893 $ECHO "\
2894 if test \"\$libtool_execute_magic\" != \"$magic\"; then
2895 # Run the actual program with our arguments.
2896 "
2897 case $host in
2898 # Backslashes separate directories on plain windows
2899 *-*-mingw | *-*-os2* | *-cegcc*)
2900 $ECHO "\
2901 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
2902 "
2903 ;;
2904
2905 *)
2906 $ECHO "\
2907 exec \"\$progdir/\$program\" \${1+\"\$@\"}
2908 "
2909 ;;
2910 esac
2911 $ECHO "\
2912 \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
2913 exit 1
2914 fi
2915 else
2916 # The program doesn't exist.
2917 \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
2918 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
2919 $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
2920 exit 1
2921 fi
2922 fi\
2923 "
2924 }
2925 # end: func_emit_wrapper_part2
29263819
29273820
29283821 # func_emit_wrapper [arg=no]
29413834 # behavior.
29423835 func_emit_wrapper ()
29433836 {
2944 func_emit_wrapper_arg1=no
2945 if test -n "$1" ; then
2946 func_emit_wrapper_arg1=$1
2947 fi
2948
2949 # split this up so that func_emit_cwrapperexe_src
2950 # can call each part independently.
2951 func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
2952 func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
2953 }
2954
2955
2956 # func_to_host_path arg
3837 func_emit_wrapper_arg1=${1-no}
3838
3839 $ECHO "\
3840 #! $SHELL
3841
3842 # $output - temporary wrapper script for $objdir/$outputname
3843 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
29573844 #
2958 # Convert paths to host format when used with build tools.
2959 # Intended for use with "native" mingw (where libtool itself
2960 # is running under the msys shell), or in the following cross-
2961 # build environments:
2962 # $build $host
2963 # mingw (msys) mingw [e.g. native]
2964 # cygwin mingw
2965 # *nix + wine mingw
2966 # where wine is equipped with the `winepath' executable.
2967 # In the native mingw case, the (msys) shell automatically
2968 # converts paths for any non-msys applications it launches,
2969 # but that facility isn't available from inside the cwrapper.
2970 # Similar accommodations are necessary for $host mingw and
2971 # $build cygwin. Calling this function does no harm for other
2972 # $host/$build combinations not listed above.
3845 # The $output program cannot be directly executed until all the libtool
3846 # libraries that it depends on are installed.
29733847 #
2974 # ARG is the path (on $build) that should be converted to
2975 # the proper representation for $host. The result is stored
2976 # in $func_to_host_path_result.
2977 func_to_host_path ()
2978 {
2979 func_to_host_path_result="$1"
2980 if test -n "$1" ; then
2981 case $host in
2982 *mingw* )
2983 lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
2984 case $build in
2985 *mingw* ) # actually, msys
2986 # awkward: cmd appends spaces to result
2987 lt_sed_strip_trailing_spaces="s/[ ]*\$//"
2988 func_to_host_path_tmp1=`( cmd //c echo "$1" |\
2989 $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
2990 func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
2991 $SED -e "$lt_sed_naive_backslashify"`
2992 ;;
2993 *cygwin* )
2994 func_to_host_path_tmp1=`cygpath -w "$1"`
2995 func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
2996 $SED -e "$lt_sed_naive_backslashify"`
2997 ;;
2998 * )
2999 # Unfortunately, winepath does not exit with a non-zero
3000 # error code, so we are forced to check the contents of
3001 # stdout. On the other hand, if the command is not
3002 # found, the shell will set an exit code of 127 and print
3003 # *an error message* to stdout. So we must check for both
3004 # error code of zero AND non-empty stdout, which explains
3005 # the odd construction:
3006 func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
3007 if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
3008 func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
3009 $SED -e "$lt_sed_naive_backslashify"`
3010 else
3011 # Allow warning below.
3012 func_to_host_path_result=""
3013 fi
3014 ;;
3015 esac
3016 if test -z "$func_to_host_path_result" ; then
3017 func_error "Could not determine host path corresponding to"
3018 func_error " '$1'"
3019 func_error "Continuing, but uninstalled executables may not work."
3020 # Fallback:
3021 func_to_host_path_result="$1"
3022 fi
3023 ;;
3848 # This wrapper script should never be moved out of the build directory.
3849 # If it is, it will not operate correctly.
3850
3851 # Sed substitution that helps us do robust quoting. It backslashifies
3852 # metacharacters that are still active within double-quoted strings.
3853 sed_quote_subst='$sed_quote_subst'
3854
3855 # Be Bourne compatible
3856 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
3857 emulate sh
3858 NULLCMD=:
3859 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
3860 # is contrary to our usage. Disable this feature.
3861 alias -g '\${1+\"\$@\"}'='\"\$@\"'
3862 setopt NO_GLOB_SUBST
3863 else
3864 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
3865 fi
3866 BIN_SH=xpg4; export BIN_SH # for Tru64
3867 DUALCASE=1; export DUALCASE # for MKS sh
3868
3869 # The HP-UX ksh and POSIX shell print the target directory to stdout
3870 # if CDPATH is set.
3871 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3872
3873 relink_command=\"$relink_command\"
3874
3875 # This environment variable determines our operation mode.
3876 if test \"\$libtool_install_magic\" = \"$magic\"; then
3877 # install mode needs the following variables:
3878 generated_by_libtool_version='$macro_version'
3879 notinst_deplibs='$notinst_deplibs'
3880 else
3881 # When we are sourced in execute mode, \$file and \$ECHO are already set.
3882 if test \"\$libtool_execute_magic\" != \"$magic\"; then
3883 file=\"\$0\""
3884
3885 qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
3886 $ECHO "\
3887
3888 # A function that is used when there is no print builtin or printf.
3889 func_fallback_echo ()
3890 {
3891 eval 'cat <<_LTECHO_EOF
3892 \$1
3893 _LTECHO_EOF'
3894 }
3895 ECHO=\"$qECHO\"
3896 fi
3897
3898 # Very basic option parsing. These options are (a) specific to
3899 # the libtool wrapper, (b) are identical between the wrapper
3900 # /script/ and the wrapper /executable/ which is used only on
3901 # windows platforms, and (c) all begin with the string "--lt-"
3902 # (application programs are unlikely to have options which match
3903 # this pattern).
3904 #
3905 # There are only two supported options: --lt-debug and
3906 # --lt-dump-script. There is, deliberately, no --lt-help.
3907 #
3908 # The first argument to this parsing function should be the
3909 # script's $0 value, followed by "$@".
3910 lt_option_debug=
3911 func_parse_lt_options ()
3912 {
3913 lt_script_arg0=\$0
3914 shift
3915 for lt_opt
3916 do
3917 case \"\$lt_opt\" in
3918 --lt-debug) lt_option_debug=1 ;;
3919 --lt-dump-script)
3920 lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
3921 test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
3922 lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
3923 cat \"\$lt_dump_D/\$lt_dump_F\"
3924 exit 0
3925 ;;
3926 --lt-*)
3927 \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
3928 exit 1
3929 ;;
3930 esac
3931 done
3932
3933 # Print the debug banner immediately:
3934 if test -n \"\$lt_option_debug\"; then
3935 echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
3936 fi
3937 }
3938
3939 # Used when --lt-debug. Prints its arguments to stdout
3940 # (redirection is the responsibility of the caller)
3941 func_lt_dump_args ()
3942 {
3943 lt_dump_args_N=1;
3944 for lt_arg
3945 do
3946 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
3947 lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
3948 done
3949 }
3950
3951 # Core function for launching the target application
3952 func_exec_program_core ()
3953 {
3954 "
3955 case $host in
3956 # Backslashes separate directories on plain windows
3957 *-*-mingw | *-*-os2* | *-cegcc*)
3958 $ECHO "\
3959 if test -n \"\$lt_option_debug\"; then
3960 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
3961 func_lt_dump_args \${1+\"\$@\"} 1>&2
3962 fi
3963 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
3964 "
3965 ;;
3966
3967 *)
3968 $ECHO "\
3969 if test -n \"\$lt_option_debug\"; then
3970 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
3971 func_lt_dump_args \${1+\"\$@\"} 1>&2
3972 fi
3973 exec \"\$progdir/\$program\" \${1+\"\$@\"}
3974 "
3975 ;;
3976 esac
3977 $ECHO "\
3978 \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
3979 exit 1
3980 }
3981
3982 # A function to encapsulate launching the target application
3983 # Strips options in the --lt-* namespace from \$@ and
3984 # launches target application with the remaining arguments.
3985 func_exec_program ()
3986 {
3987 case \" \$* \" in
3988 *\\ --lt-*)
3989 for lt_wr_arg
3990 do
3991 case \$lt_wr_arg in
3992 --lt-*) ;;
3993 *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
3994 esac
3995 shift
3996 done ;;
3997 esac
3998 func_exec_program_core \${1+\"\$@\"}
3999 }
4000
4001 # Parse options
4002 func_parse_lt_options \"\$0\" \${1+\"\$@\"}
4003
4004 # Find the directory that this script lives in.
4005 thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
4006 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
4007
4008 # Follow symbolic links until we get to the real thisdir.
4009 file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
4010 while test -n \"\$file\"; do
4011 destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
4012
4013 # If there was a directory component, then change thisdir.
4014 if test \"x\$destdir\" != \"x\$file\"; then
4015 case \"\$destdir\" in
4016 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
4017 *) thisdir=\"\$thisdir/\$destdir\" ;;
4018 esac
4019 fi
4020
4021 file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
4022 file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
4023 done
4024
4025 # Usually 'no', except on cygwin/mingw when embedded into
4026 # the cwrapper.
4027 WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
4028 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
4029 # special case for '.'
4030 if test \"\$thisdir\" = \".\"; then
4031 thisdir=\`pwd\`
4032 fi
4033 # remove .libs from thisdir
4034 case \"\$thisdir\" in
4035 *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
4036 $objdir ) thisdir=. ;;
30244037 esac
30254038 fi
3026 }
3027 # end: func_to_host_path
3028
3029 # func_to_host_pathlist arg
3030 #
3031 # Convert pathlists to host format when used with build tools.
3032 # See func_to_host_path(), above. This function supports the
3033 # following $build/$host combinations (but does no harm for
3034 # combinations not listed here):
3035 # $build $host
3036 # mingw (msys) mingw [e.g. native]
3037 # cygwin mingw
3038 # *nix + wine mingw
3039 #
3040 # Path separators are also converted from $build format to
3041 # $host format. If ARG begins or ends with a path separator
3042 # character, it is preserved (but converted to $host format)
3043 # on output.
3044 #
3045 # ARG is a pathlist (on $build) that should be converted to
3046 # the proper representation on $host. The result is stored
3047 # in $func_to_host_pathlist_result.
3048 func_to_host_pathlist ()
3049 {
3050 func_to_host_pathlist_result="$1"
3051 if test -n "$1" ; then
3052 case $host in
3053 *mingw* )
3054 lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
3055 # Remove leading and trailing path separator characters from
3056 # ARG. msys behavior is inconsistent here, cygpath turns them
3057 # into '.;' and ';.', and winepath ignores them completely.
3058 func_to_host_pathlist_tmp2="$1"
3059 # Once set for this call, this variable should not be
3060 # reassigned. It is used in tha fallback case.
3061 func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
3062 $SED -e 's|^:*||' -e 's|:*$||'`
3063 case $build in
3064 *mingw* ) # Actually, msys.
3065 # Awkward: cmd appends spaces to result.
3066 lt_sed_strip_trailing_spaces="s/[ ]*\$//"
3067 func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
3068 $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
3069 func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
3070 $SED -e "$lt_sed_naive_backslashify"`
3071 ;;
3072 *cygwin* )
3073 func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
3074 func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
3075 $SED -e "$lt_sed_naive_backslashify"`
3076 ;;
3077 * )
3078 # unfortunately, winepath doesn't convert pathlists
3079 func_to_host_pathlist_result=""
3080 func_to_host_pathlist_oldIFS=$IFS
3081 IFS=:
3082 for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
3083 IFS=$func_to_host_pathlist_oldIFS
3084 if test -n "$func_to_host_pathlist_f" ; then
3085 func_to_host_path "$func_to_host_pathlist_f"
3086 if test -n "$func_to_host_path_result" ; then
3087 if test -z "$func_to_host_pathlist_result" ; then
3088 func_to_host_pathlist_result="$func_to_host_path_result"
3089 else
3090 func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
3091 fi
3092 fi
3093 fi
3094 IFS=:
3095 done
3096 IFS=$func_to_host_pathlist_oldIFS
3097 ;;
3098 esac
3099 if test -z "$func_to_host_pathlist_result" ; then
3100 func_error "Could not determine the host path(s) corresponding to"
3101 func_error " '$1'"
3102 func_error "Continuing, but uninstalled executables may not work."
3103 # Fallback. This may break if $1 contains DOS-style drive
3104 # specifications. The fix is not to complicate the expression
3105 # below, but for the user to provide a working wine installation
3106 # with winepath so that path translation in the cross-to-mingw
3107 # case works properly.
3108 lt_replace_pathsep_nix_to_dos="s|:|;|g"
3109 func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
3110 $SED -e "$lt_replace_pathsep_nix_to_dos"`
3111 fi
3112 # Now, add the leading and trailing path separators back
3113 case "$1" in
3114 :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
3115 ;;
3116 esac
3117 case "$1" in
3118 *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
3119 ;;
3120 esac
3121 ;;
3122 esac
4039
4040 # Try to get the absolute directory name.
4041 absdir=\`cd \"\$thisdir\" && pwd\`
4042 test -n \"\$absdir\" && thisdir=\"\$absdir\"
4043 "
4044
4045 if test "$fast_install" = yes; then
4046 $ECHO "\
4047 program=lt-'$outputname'$exeext
4048 progdir=\"\$thisdir/$objdir\"
4049
4050 if test ! -f \"\$progdir/\$program\" ||
4051 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
4052 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
4053
4054 file=\"\$\$-\$program\"
4055
4056 if test ! -d \"\$progdir\"; then
4057 $MKDIR \"\$progdir\"
4058 else
4059 $RM \"\$progdir/\$file\"
4060 fi"
4061
4062 $ECHO "\
4063
4064 # relink executable if necessary
4065 if test -n \"\$relink_command\"; then
4066 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
4067 else
4068 $ECHO \"\$relink_command_output\" >&2
4069 $RM \"\$progdir/\$file\"
4070 exit 1
4071 fi
4072 fi
4073
4074 $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
4075 { $RM \"\$progdir/\$program\";
4076 $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
4077 $RM \"\$progdir/\$file\"
4078 fi"
4079 else
4080 $ECHO "\
4081 program='$outputname'
4082 progdir=\"\$thisdir/$objdir\"
4083 "
4084 fi
4085
4086 $ECHO "\
4087
4088 if test -f \"\$progdir/\$program\"; then"
4089
4090 # fixup the dll searchpath if we need to.
4091 #
4092 # Fix the DLL searchpath if we need to. Do this before prepending
4093 # to shlibpath, because on Windows, both are PATH and uninstalled
4094 # libraries must come first.
4095 if test -n "$dllsearchpath"; then
4096 $ECHO "\
4097 # Add the dll search path components to the executable PATH
4098 PATH=$dllsearchpath:\$PATH
4099 "
4100 fi
4101
4102 # Export our shlibpath_var if we have one.
4103 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
4104 $ECHO "\
4105 # Add our own library path to $shlibpath_var
4106 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
4107
4108 # Some systems cannot cope with colon-terminated $shlibpath_var
4109 # The second colon is a workaround for a bug in BeOS R4 sed
4110 $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
4111
4112 export $shlibpath_var
4113 "
4114 fi
4115
4116 $ECHO "\
4117 if test \"\$libtool_execute_magic\" != \"$magic\"; then
4118 # Run the actual program with our arguments.
4119 func_exec_program \${1+\"\$@\"}
4120 fi
4121 else
4122 # The program doesn't exist.
4123 \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
4124 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
4125 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
4126 exit 1
31234127 fi
3124 }
3125 # end: func_to_host_pathlist
4128 fi\
4129 "
4130 }
4131
31264132
31274133 # func_emit_cwrapperexe_src
31284134 # emit the source code for a wrapper executable on stdout
31404146
31414147 This wrapper executable should never be moved out of the build directory.
31424148 If it is, it will not operate correctly.
3143
3144 Currently, it simply execs the wrapper *script* "$SHELL $output",
3145 but could eventually absorb all of the scripts functionality and
3146 exec $objdir/$outputname directly.
31474149 */
31484150 EOF
31494151 cat <<"EOF"
4152 #ifdef _MSC_VER
4153 # define _CRT_SECURE_NO_DEPRECATE 1
4154 #endif
31504155 #include <stdio.h>
31514156 #include <stdlib.h>
31524157 #ifdef _MSC_VER
31534158 # include <direct.h>
31544159 # include <process.h>
31554160 # include <io.h>
3156 # define setmode _setmode
31574161 #else
31584162 # include <unistd.h>
31594163 # include <stdint.h>
31604164 # ifdef __CYGWIN__
31614165 # include <io.h>
3162 # define HAVE_SETENV
3163 # ifdef __STRICT_ANSI__
3164 char *realpath (const char *, char *);
3165 int putenv (char *);
3166 int setenv (const char *, const char *, int);
3167 # endif
31684166 # endif
31694167 #endif
31704168 #include <malloc.h>
31764174 #include <fcntl.h>
31774175 #include <sys/stat.h>
31784176
4177 /* declarations of non-ANSI functions */
4178 #if defined(__MINGW32__)
4179 # ifdef __STRICT_ANSI__
4180 int _putenv (const char *);
4181 # endif
4182 #elif defined(__CYGWIN__)
4183 # ifdef __STRICT_ANSI__
4184 char *realpath (const char *, char *);
4185 int putenv (char *);
4186 int setenv (const char *, const char *, int);
4187 # endif
4188 /* #elif defined (other platforms) ... */
4189 #endif
4190
4191 /* portability defines, excluding path handling macros */
4192 #if defined(_MSC_VER)
4193 # define setmode _setmode
4194 # define stat _stat
4195 # define chmod _chmod
4196 # define getcwd _getcwd
4197 # define putenv _putenv
4198 # define S_IXUSR _S_IEXEC
4199 # ifndef _INTPTR_T_DEFINED
4200 # define _INTPTR_T_DEFINED
4201 # define intptr_t int
4202 # endif
4203 #elif defined(__MINGW32__)
4204 # define setmode _setmode
4205 # define stat _stat
4206 # define chmod _chmod
4207 # define getcwd _getcwd
4208 # define putenv _putenv
4209 #elif defined(__CYGWIN__)
4210 # define HAVE_SETENV
4211 # define FOPEN_WB "wb"
4212 /* #elif defined (other platforms) ... */
4213 #endif
4214
31794215 #if defined(PATH_MAX)
31804216 # define LT_PATHMAX PATH_MAX
31814217 #elif defined(MAXPATHLEN)
31914227 # define S_IXGRP 0
31924228 #endif
31934229
3194 #ifdef _MSC_VER
3195 # define S_IXUSR _S_IEXEC
3196 # define stat _stat
3197 # ifndef _INTPTR_T_DEFINED
3198 # define intptr_t int
3199 # endif
3200 #endif
3201
4230 /* path handling portability macros */
32024231 #ifndef DIR_SEPARATOR
32034232 # define DIR_SEPARATOR '/'
32044233 # define PATH_SEPARATOR ':'
32294258 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
32304259 #endif /* PATH_SEPARATOR_2 */
32314260
3232 #ifdef __CYGWIN__
3233 # define FOPEN_WB "wb"
3234 #endif
3235
32364261 #ifndef FOPEN_WB
32374262 # define FOPEN_WB "w"
32384263 #endif
32454270 if (stale) { free ((void *) stale); stale = 0; } \
32464271 } while (0)
32474272
3248 #undef LTWRAPPER_DEBUGPRINTF
3249 #if defined DEBUGWRAPPER
3250 # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
3251 static void
3252 ltwrapper_debugprintf (const char *fmt, ...)
3253 {
3254 va_list args;
3255 va_start (args, fmt);
3256 (void) vfprintf (stderr, fmt, args);
3257 va_end (args);
3258 }
4273 #if defined(LT_DEBUGWRAPPER)
4274 static int lt_debug = 1;
32594275 #else
3260 # define LTWRAPPER_DEBUGPRINTF(args)
4276 static int lt_debug = 0;
32614277 #endif
32624278
3263 const char *program_name = NULL;
4279 const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
32644280
32654281 void *xmalloc (size_t num);
32664282 char *xstrdup (const char *string);
32704286 int make_executable (const char *path);
32714287 int check_executable (const char *path);
32724288 char *strendzap (char *str, const char *pat);
3273 void lt_fatal (const char *message, ...);
4289 void lt_debugprintf (const char *file, int line, const char *fmt, ...);
4290 void lt_fatal (const char *file, int line, const char *message, ...);
4291 static const char *nonnull (const char *s);
4292 static const char *nonempty (const char *s);
32744293 void lt_setenv (const char *name, const char *value);
32754294 char *lt_extend_str (const char *orig_value, const char *add, int to_end);
3276 void lt_opt_process_env_set (const char *arg);
3277 void lt_opt_process_env_prepend (const char *arg);
3278 void lt_opt_process_env_append (const char *arg);
3279 int lt_split_name_value (const char *arg, char** name, char** value);
32804295 void lt_update_exe_path (const char *name, const char *value);
32814296 void lt_update_lib_path (const char *name, const char *value);
3282
3283 static const char *script_text_part1 =
4297 char **prepare_spawn (char **argv);
4298 void lt_dump_script (FILE *f);
32844299 EOF
32854300
3286 func_emit_wrapper_part1 yes |
3287 $SED -e 's/\([\\"]\)/\\\1/g' \
3288 -e 's/^/ "/' -e 's/$/\\n"/'
3289 echo ";"
32904301 cat <<EOF
3291
3292 static const char *script_text_part2 =
3293 EOF
3294 func_emit_wrapper_part2 yes |
3295 $SED -e 's/\([\\"]\)/\\\1/g' \
3296 -e 's/^/ "/' -e 's/$/\\n"/'
3297 echo ";"
3298
3299 cat <<EOF
3300 const char * MAGIC_EXE = "$magic_exe";
4302 volatile const char * MAGIC_EXE = "$magic_exe";
33014303 const char * LIB_PATH_VARNAME = "$shlibpath_var";
33024304 EOF
33034305
33044306 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
3305 func_to_host_pathlist "$temp_rpath"
4307 func_to_host_path "$temp_rpath"
33064308 cat <<EOF
3307 const char * LIB_PATH_VALUE = "$func_to_host_pathlist_result";
4309 const char * LIB_PATH_VALUE = "$func_to_host_path_result";
33084310 EOF
33094311 else
33104312 cat <<"EOF"
33134315 fi
33144316
33154317 if test -n "$dllsearchpath"; then
3316 func_to_host_pathlist "$dllsearchpath:"
4318 func_to_host_path "$dllsearchpath:"
33174319 cat <<EOF
33184320 const char * EXE_PATH_VARNAME = "PATH";
3319 const char * EXE_PATH_VALUE = "$func_to_host_pathlist_result";
4321 const char * EXE_PATH_VALUE = "$func_to_host_path_result";
33204322 EOF
33214323 else
33224324 cat <<"EOF"
33394341 cat <<"EOF"
33404342
33414343 #define LTWRAPPER_OPTION_PREFIX "--lt-"
3342 #define LTWRAPPER_OPTION_PREFIX_LENGTH 5
3343
3344 static const size_t opt_prefix_len = LTWRAPPER_OPTION_PREFIX_LENGTH;
4344
33454345 static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
3346
33474346 static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
3348
3349 static const size_t env_set_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
3350 static const char *env_set_opt = LTWRAPPER_OPTION_PREFIX "env-set";
3351 /* argument is putenv-style "foo=bar", value of foo is set to bar */
3352
3353 static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
3354 static const char *env_prepend_opt = LTWRAPPER_OPTION_PREFIX "env-prepend";
3355 /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
3356
3357 static const size_t env_append_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
3358 static const char *env_append_opt = LTWRAPPER_OPTION_PREFIX "env-append";
3359 /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
4347 static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
33604348
33614349 int
33624350 main (int argc, char *argv[])
33734361 int i;
33744362
33754363 program_name = (char *) xstrdup (base_name (argv[0]));
3376 LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0]));
3377 LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
3378
3379 /* very simple arg parsing; don't want to rely on getopt */
4364 newargz = XMALLOC (char *, argc + 1);
4365
4366 /* very simple arg parsing; don't want to rely on getopt
4367 * also, copy all non cwrapper options to newargz, except
4368 * argz[0], which is handled differently
4369 */
4370 newargc=0;
33804371 for (i = 1; i < argc; i++)
33814372 {
33824373 if (strcmp (argv[i], dumpscript_opt) == 0)
33904381 esac
33914382
33924383 cat <<"EOF"
3393 printf ("%s", script_text_part1);
3394 printf ("%s", script_text_part2);
4384 lt_dump_script (stdout);
33954385 return 0;
33964386 }
4387 if (strcmp (argv[i], debug_opt) == 0)
4388 {
4389 lt_debug = 1;
4390 continue;
4391 }
4392 if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
4393 {
4394 /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
4395 namespace, but it is not one of the ones we know about and
4396 have already dealt with, above (inluding dump-script), then
4397 report an error. Otherwise, targets might begin to believe
4398 they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
4399 namespace. The first time any user complains about this, we'll
4400 need to make LTWRAPPER_OPTION_PREFIX a configure-time option
4401 or a configure.ac-settable value.
4402 */
4403 lt_fatal (__FILE__, __LINE__,
4404 "unrecognized %s option: '%s'",
4405 ltwrapper_option_prefix, argv[i]);
4406 }
4407 /* otherwise ... */
4408 newargz[++newargc] = xstrdup (argv[i]);
33974409 }
3398
3399 newargz = XMALLOC (char *, argc + 1);
4410 newargz[++newargc] = NULL;
4411
4412 EOF
4413 cat <<EOF
4414 /* The GNU banner must be the first non-error debug message */
4415 lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
4416 EOF
4417 cat <<"EOF"
4418 lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
4419 lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
4420
34004421 tmp_pathspec = find_executable (argv[0]);
34014422 if (tmp_pathspec == NULL)
3402 lt_fatal ("Couldn't find %s", argv[0]);
3403 LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
3404 tmp_pathspec));
4423 lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
4424 lt_debugprintf (__FILE__, __LINE__,
4425 "(main) found exe (before symlink chase) at: %s\n",
4426 tmp_pathspec);
34054427
34064428 actual_cwrapper_path = chase_symlinks (tmp_pathspec);
3407 LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
3408 actual_cwrapper_path));
4429 lt_debugprintf (__FILE__, __LINE__,
4430 "(main) found exe (after symlink chase) at: %s\n",
4431 actual_cwrapper_path);
34094432 XFREE (tmp_pathspec);
34104433
3411 actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
4434 actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
34124435 strendzap (actual_cwrapper_path, actual_cwrapper_name);
34134436
34144437 /* wrapper name transforms */
34264449 target_name = tmp_pathspec;
34274450 tmp_pathspec = 0;
34284451
3429 LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
3430 target_name));
4452 lt_debugprintf (__FILE__, __LINE__,
4453 "(main) libtool target name: %s\n",
4454 target_name);
34314455 EOF
34324456
34334457 cat <<EOF
34774501
34784502 lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
34794503 lt_setenv ("DUALCASE", "1"); /* for MSK sh */
4504 /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
4505 be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
4506 because on Windows, both *_VARNAMEs are PATH but uninstalled
4507 libraries must come first. */
4508 lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
34804509 lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
3481 lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
3482
3483 newargc=0;
3484 for (i = 1; i < argc; i++)
3485 {
3486 if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
3487 {
3488 if (argv[i][env_set_opt_len] == '=')
3489 {
3490 const char *p = argv[i] + env_set_opt_len + 1;
3491 lt_opt_process_env_set (p);
3492 }
3493 else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
3494 {
3495 lt_opt_process_env_set (argv[++i]); /* don't copy */
3496 }
3497 else
3498 lt_fatal ("%s missing required argument", env_set_opt);
3499 continue;
3500 }
3501 if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
3502 {
3503 if (argv[i][env_prepend_opt_len] == '=')
3504 {
3505 const char *p = argv[i] + env_prepend_opt_len + 1;
3506 lt_opt_process_env_prepend (p);
3507 }
3508 else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
3509 {
3510 lt_opt_process_env_prepend (argv[++i]); /* don't copy */
3511 }
3512 else
3513 lt_fatal ("%s missing required argument", env_prepend_opt);
3514 continue;
3515 }
3516 if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
3517 {
3518 if (argv[i][env_append_opt_len] == '=')
3519 {
3520 const char *p = argv[i] + env_append_opt_len + 1;
3521 lt_opt_process_env_append (p);
3522 }
3523 else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
3524 {
3525 lt_opt_process_env_append (argv[++i]); /* don't copy */
3526 }
3527 else
3528 lt_fatal ("%s missing required argument", env_append_opt);
3529 continue;
3530 }
3531 if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
3532 {
3533 /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
3534 namespace, but it is not one of the ones we know about and
3535 have already dealt with, above (inluding dump-script), then
3536 report an error. Otherwise, targets might begin to believe
3537 they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
3538 namespace. The first time any user complains about this, we'll
3539 need to make LTWRAPPER_OPTION_PREFIX a configure-time option
3540 or a configure.ac-settable value.
3541 */
3542 lt_fatal ("Unrecognized option in %s namespace: '%s'",
3543 ltwrapper_option_prefix, argv[i]);
3544 }
3545 /* otherwise ... */
3546 newargz[++newargc] = xstrdup (argv[i]);
3547 }
3548 newargz[++newargc] = NULL;
3549
3550 LTWRAPPER_DEBUGPRINTF (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
4510
4511 lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
4512 nonnull (lt_argv_zero));
35514513 for (i = 0; i < newargc; i++)
35524514 {
3553 LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
4515 lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
4516 i, nonnull (newargz[i]));
35544517 }
35554518
35564519 EOF
35594522 mingw*)
35604523 cat <<"EOF"
35614524 /* execv doesn't actually work on mingw as expected on unix */
4525 newargz = prepare_spawn (newargz);
35624526 rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
35634527 if (rval == -1)
35644528 {
35654529 /* failed to start process */
3566 LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
4530 lt_debugprintf (__FILE__, __LINE__,
4531 "(main) failed to launch target \"%s\": %s\n",
4532 lt_argv_zero, nonnull (strerror (errno)));
35674533 return 127;
35684534 }
35694535 return rval;
35854551 {
35864552 void *p = (void *) malloc (num);
35874553 if (!p)
3588 lt_fatal ("Memory exhausted");
4554 lt_fatal (__FILE__, __LINE__, "memory exhausted");
35894555
35904556 return p;
35914557 }
36194585 {
36204586 struct stat st;
36214587
3622 LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n",
3623 path ? (*path ? path : "EMPTY!") : "NULL!"));
4588 lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
4589 nonempty (path));
36244590 if ((!path) || (!*path))
36254591 return 0;
36264592
36374603 int rval = 0;
36384604 struct stat st;
36394605
3640 LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n",
3641 path ? (*path ? path : "EMPTY!") : "NULL!"));
4606 lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
4607 nonempty (path));
36424608 if ((!path) || (!*path))
36434609 return 0;
36444610
36644630 int tmp_len;
36654631 char *concat_name;
36664632
3667 LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n",
3668 wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
4633 lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
4634 nonempty (wrapper));
36694635
36704636 if ((wrapper == NULL) || (*wrapper == '\0'))
36714637 return NULL;
37184684 {
37194685 /* empty path: current directory */
37204686 if (getcwd (tmp, LT_PATHMAX) == NULL)
3721 lt_fatal ("getcwd failed");
4687 lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
4688 nonnull (strerror (errno)));
37224689 tmp_len = strlen (tmp);
37234690 concat_name =
37244691 XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
37434710 }
37444711 /* Relative path | not found in path: prepend cwd */
37454712 if (getcwd (tmp, LT_PATHMAX) == NULL)
3746 lt_fatal ("getcwd failed");
4713 lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
4714 nonnull (strerror (errno)));
37474715 tmp_len = strlen (tmp);
37484716 concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
37494717 memcpy (concat_name, tmp, tmp_len);
37694737 int has_symlinks = 0;
37704738 while (strlen (tmp_pathspec) && !has_symlinks)
37714739 {
3772 LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
3773 tmp_pathspec));
4740 lt_debugprintf (__FILE__, __LINE__,
4741 "checking path component for symlinks: %s\n",
4742 tmp_pathspec);
37744743 if (lstat (tmp_pathspec, &s) == 0)
37754744 {
37764745 if (S_ISLNK (s.st_mode) != 0)
37924761 }
37934762 else
37944763 {
3795 char *errstr = strerror (errno);
3796 lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
4764 lt_fatal (__FILE__, __LINE__,
4765 "error accessing file \"%s\": %s",
4766 tmp_pathspec, nonnull (strerror (errno)));
37974767 }
37984768 }
37994769 XFREE (tmp_pathspec);
38064776 tmp_pathspec = realpath (pathspec, buf);
38074777 if (tmp_pathspec == 0)
38084778 {
3809 lt_fatal ("Could not follow symlinks for %s", pathspec);
4779 lt_fatal (__FILE__, __LINE__,
4780 "could not follow symlinks for %s", pathspec);
38104781 }
38114782 return xstrdup (tmp_pathspec);
38124783 #endif
38324803 return str;
38334804 }
38344805
4806 void
4807 lt_debugprintf (const char *file, int line, const char *fmt, ...)
4808 {
4809 va_list args;
4810 if (lt_debug)
4811 {
4812 (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
4813 va_start (args, fmt);
4814 (void) vfprintf (stderr, fmt, args);
4815 va_end (args);
4816 }
4817 }
4818
38354819 static void
3836 lt_error_core (int exit_status, const char *mode,
4820 lt_error_core (int exit_status, const char *file,
4821 int line, const char *mode,
38374822 const char *message, va_list ap)
38384823 {
3839 fprintf (stderr, "%s: %s: ", program_name, mode);
4824 fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
38404825 vfprintf (stderr, message, ap);
38414826 fprintf (stderr, ".\n");
38424827
38454830 }
38464831
38474832 void
3848 lt_fatal (const char *message, ...)
4833 lt_fatal (const char *file, int line, const char *message, ...)
38494834 {
38504835 va_list ap;
38514836 va_start (ap, message);
3852 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
4837 lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
38534838 va_end (ap);
4839 }
4840
4841 static const char *
4842 nonnull (const char *s)
4843 {
4844 return s ? s : "(null)";
4845 }
4846
4847 static const char *
4848 nonempty (const char *s)
4849 {
4850 return (s && !*s) ? "(empty)" : nonnull (s);
38544851 }
38554852
38564853 void
38574854 lt_setenv (const char *name, const char *value)
38584855 {
3859 LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
3860 (name ? name : "<NULL>"),
3861 (value ? value : "<NULL>")));
4856 lt_debugprintf (__FILE__, __LINE__,
4857 "(lt_setenv) setting '%s' to '%s'\n",
4858 nonnull (name), nonnull (value));
38624859 {
38634860 #ifdef HAVE_SETENV
38644861 /* always make a copy, for consistency with !HAVE_SETENV */
39034900 return new_value;
39044901 }
39054902
3906 int
3907 lt_split_name_value (const char *arg, char** name, char** value)
3908 {
3909 const char *p;
3910 int len;
3911 if (!arg || !*arg)
3912 return 1;
3913
3914 p = strchr (arg, (int)'=');
3915
3916 if (!p)
3917 return 1;
3918
3919 *value = xstrdup (++p);
3920
3921 len = strlen (arg) - strlen (*value);
3922 *name = XMALLOC (char, len);
3923 strncpy (*name, arg, len-1);
3924 (*name)[len - 1] = '\0';
3925
3926 return 0;
3927 }
3928
3929 void
3930 lt_opt_process_env_set (const char *arg)
3931 {
3932 char *name = NULL;
3933 char *value = NULL;
3934
3935 if (lt_split_name_value (arg, &name, &value) != 0)
3936 {
3937 XFREE (name);
3938 XFREE (value);
3939 lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
3940 }
3941
3942 lt_setenv (name, value);
3943 XFREE (name);
3944 XFREE (value);
3945 }
3946
3947 void
3948 lt_opt_process_env_prepend (const char *arg)
3949 {
3950 char *name = NULL;
3951 char *value = NULL;
3952 char *new_value = NULL;
3953
3954 if (lt_split_name_value (arg, &name, &value) != 0)
3955 {
3956 XFREE (name);
3957 XFREE (value);
3958 lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
3959 }
3960
3961 new_value = lt_extend_str (getenv (name), value, 0);
3962 lt_setenv (name, new_value);
3963 XFREE (new_value);
3964 XFREE (name);
3965 XFREE (value);
3966 }
3967
3968 void
3969 lt_opt_process_env_append (const char *arg)
3970 {
3971 char *name = NULL;
3972 char *value = NULL;
3973 char *new_value = NULL;
3974
3975 if (lt_split_name_value (arg, &name, &value) != 0)
3976 {
3977 XFREE (name);
3978 XFREE (value);
3979 lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
3980 }
3981
3982 new_value = lt_extend_str (getenv (name), value, 1);
3983 lt_setenv (name, new_value);
3984 XFREE (new_value);
3985 XFREE (name);
3986 XFREE (value);
3987 }
3988
39894903 void
39904904 lt_update_exe_path (const char *name, const char *value)
39914905 {
3992 LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
3993 (name ? name : "<NULL>"),
3994 (value ? value : "<NULL>")));
4906 lt_debugprintf (__FILE__, __LINE__,
4907 "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
4908 nonnull (name), nonnull (value));
39954909
39964910 if (name && *name && value && *value)
39974911 {
40104924 void
40114925 lt_update_lib_path (const char *name, const char *value)
40124926 {
4013 LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
4014 (name ? name : "<NULL>"),
4015 (value ? value : "<NULL>")));
4927 lt_debugprintf (__FILE__, __LINE__,
4928 "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
4929 nonnull (name), nonnull (value));
40164930
40174931 if (name && *name && value && *value)
40184932 {
40224936 }
40234937 }
40244938
4025
40264939 EOF
4940 case $host_os in
4941 mingw*)
4942 cat <<"EOF"
4943
4944 /* Prepares an argument vector before calling spawn().
4945 Note that spawn() does not by itself call the command interpreter
4946 (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
4947 ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
4948 GetVersionEx(&v);
4949 v.dwPlatformId == VER_PLATFORM_WIN32_NT;
4950 }) ? "cmd.exe" : "command.com").
4951 Instead it simply concatenates the arguments, separated by ' ', and calls
4952 CreateProcess(). We must quote the arguments since Win32 CreateProcess()
4953 interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
4954 special way:
4955 - Space and tab are interpreted as delimiters. They are not treated as
4956 delimiters if they are surrounded by double quotes: "...".
4957 - Unescaped double quotes are removed from the input. Their only effect is
4958 that within double quotes, space and tab are treated like normal
4959 characters.
4960 - Backslashes not followed by double quotes are not special.
4961 - But 2*n+1 backslashes followed by a double quote become
4962 n backslashes followed by a double quote (n >= 0):
4963 \" -> "
4964 \\\" -> \"
4965 \\\\\" -> \\"
4966 */
4967 #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
4968 #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
4969 char **
4970 prepare_spawn (char **argv)
4971 {
4972 size_t argc;
4973 char **new_argv;
4974 size_t i;
4975
4976 /* Count number of arguments. */
4977 for (argc = 0; argv[argc] != NULL; argc++)
4978 ;
4979
4980 /* Allocate new argument vector. */
4981 new_argv = XMALLOC (char *, argc + 1);
4982
4983 /* Put quoted arguments into the new argument vector. */
4984 for (i = 0; i < argc; i++)
4985 {
4986 const char *string = argv[i];
4987
4988 if (string[0] == '\0')
4989 new_argv[i] = xstrdup ("\"\"");
4990 else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
4991 {
4992 int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
4993 size_t length;
4994 unsigned int backslashes;
4995 const char *s;
4996 char *quoted_string;
4997 char *p;
4998
4999 length = 0;
5000 backslashes = 0;
5001 if (quote_around)
5002 length++;
5003 for (s = string; *s != '\0'; s++)
5004 {
5005 char c = *s;
5006 if (c == '"')
5007 length += backslashes + 1;
5008 length++;
5009 if (c == '\\')
5010 backslashes++;
5011 else
5012 backslashes = 0;
5013 }
5014 if (quote_around)
5015 length += backslashes + 1;
5016
5017 quoted_string = XMALLOC (char, length + 1);
5018
5019 p = quoted_string;
5020 backslashes = 0;
5021 if (quote_around)
5022 *p++ = '"';
5023 for (s = string; *s != '\0'; s++)
5024 {
5025 char c = *s;
5026 if (c == '"')
5027 {
5028 unsigned int j;
5029 for (j = backslashes + 1; j > 0; j--)
5030 *p++ = '\\';
5031 }
5032 *p++ = c;
5033 if (c == '\\')
5034 backslashes++;
5035 else
5036 backslashes = 0;
5037 }
5038 if (quote_around)
5039 {
5040 unsigned int j;
5041 for (j = backslashes; j > 0; j--)
5042 *p++ = '\\';
5043 *p++ = '"';
5044 }
5045 *p = '\0';
5046
5047 new_argv[i] = quoted_string;
5048 }
5049 else
5050 new_argv[i] = (char *) string;
5051 }
5052 new_argv[argc] = NULL;
5053
5054 return new_argv;
5055 }
5056 EOF
5057 ;;
5058 esac
5059
5060 cat <<"EOF"
5061 void lt_dump_script (FILE* f)
5062 {
5063 EOF
5064 func_emit_wrapper yes |
5065 $SED -n -e '
5066 s/^\(.\{79\}\)\(..*\)/\1\
5067 \2/
5068 h
5069 s/\([\\"]\)/\\\1/g
5070 s/$/\\n/
5071 s/\([^\n]*\).*/ fputs ("\1", f);/p
5072 g
5073 D'
5074 cat <<"EOF"
5075 }
5076 EOF
40275077 }
40285078 # end: func_emit_cwrapperexe_src
5079
5080 # func_win32_import_lib_p ARG
5081 # True if ARG is an import lib, as indicated by $file_magic_cmd
5082 func_win32_import_lib_p ()
5083 {
5084 $opt_debug
5085 case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
5086 *import*) : ;;
5087 *) false ;;
5088 esac
5089 }
40295090
40305091 # func_mode_link arg...
40315092 func_mode_link ()
40715132 new_inherited_linker_flags=
40725133
40735134 avoid_version=no
5135 bindir=
40745136 dlfiles=
40755137 dlprefiles=
40765138 dlself=no
41635225 esac
41645226
41655227 case $prev in
5228 bindir)
5229 bindir="$arg"
5230 prev=
5231 continue
5232 ;;
41665233 dlfiles|dlprefiles)
41675234 if test "$preload" = no; then
41685235 # Add the symbol object into the linking commands.
41945261 ;;
41955262 *)
41965263 if test "$prev" = dlfiles; then
4197 dlfiles="$dlfiles $arg"
5264 func_append dlfiles " $arg"
41985265 else
4199 dlprefiles="$dlprefiles $arg"
5266 func_append dlprefiles " $arg"
42005267 fi
42015268 prev=
42025269 continue
42205287 *-*-darwin*)
42215288 case "$deplibs " in
42225289 *" $qarg.ltframework "*) ;;
4223 *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
5290 *) func_append deplibs " $qarg.ltframework" # this is fixed later
42245291 ;;
42255292 esac
42265293 ;;
42395306 moreargs=
42405307 for fil in `cat "$save_arg"`
42415308 do
4242 # moreargs="$moreargs $fil"
5309 # func_append moreargs " $fil"
42435310 arg=$fil
42445311 # A libtool-controlled object.
42455312
42685335
42695336 if test "$prev" = dlfiles; then
42705337 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
4271 dlfiles="$dlfiles $pic_object"
5338 func_append dlfiles " $pic_object"
42725339 prev=
42735340 continue
42745341 else
42805347 # CHECK ME: I think I busted this. -Ossama
42815348 if test "$prev" = dlprefiles; then
42825349 # Preload the old-style object.
4283 dlprefiles="$dlprefiles $pic_object"
5350 func_append dlprefiles " $pic_object"
42845351 prev=
42855352 fi
42865353
43505417 if test "$prev" = rpath; then
43515418 case "$rpath " in
43525419 *" $arg "*) ;;
4353 *) rpath="$rpath $arg" ;;
5420 *) func_append rpath " $arg" ;;
43545421 esac
43555422 else
43565423 case "$xrpath " in
43575424 *" $arg "*) ;;
4358 *) xrpath="$xrpath $arg" ;;
5425 *) func_append xrpath " $arg" ;;
43595426 esac
43605427 fi
43615428 prev=
43675434 continue
43685435 ;;
43695436 weak)
4370 weak_libs="$weak_libs $arg"
5437 func_append weak_libs " $arg"
43715438 prev=
43725439 continue
43735440 ;;
43745441 xcclinker)
4375 linker_flags="$linker_flags $qarg"
4376 compiler_flags="$compiler_flags $qarg"
5442 func_append linker_flags " $qarg"
5443 func_append compiler_flags " $qarg"
43775444 prev=
43785445 func_append compile_command " $qarg"
43795446 func_append finalize_command " $qarg"
43805447 continue
43815448 ;;
43825449 xcompiler)
4383 compiler_flags="$compiler_flags $qarg"
5450 func_append compiler_flags " $qarg"
43845451 prev=
43855452 func_append compile_command " $qarg"
43865453 func_append finalize_command " $qarg"
43875454 continue
43885455 ;;
43895456 xlinker)
4390 linker_flags="$linker_flags $qarg"
4391 compiler_flags="$compiler_flags $wl$qarg"
5457 func_append linker_flags " $qarg"
5458 func_append compiler_flags " $wl$qarg"
43925459 prev=
43935460 func_append compile_command " $wl$qarg"
43945461 func_append finalize_command " $wl$qarg"
44245491 continue
44255492 ;;
44265493
5494 -bindir)
5495 prev=bindir
5496 continue
5497 ;;
5498
44275499 -dlopen)
44285500 prev=dlfiles
44295501 continue
44745546 ;;
44755547
44765548 -L*)
4477 func_stripname '-L' '' "$arg"
4478 dir=$func_stripname_result
4479 if test -z "$dir"; then
5549 func_stripname "-L" '' "$arg"
5550 if test -z "$func_stripname_result"; then
44805551 if test "$#" -gt 0; then
44815552 func_fatal_error "require no space between \`-L' and \`$1'"
44825553 else
44835554 func_fatal_error "need path for \`-L' option"
44845555 fi
44855556 fi
5557 func_resolve_sysroot "$func_stripname_result"
5558 dir=$func_resolve_sysroot_result
44865559 # We need an absolute path.
44875560 case $dir in
44885561 [\\/]* | [A-Za-z]:[\\/]*) ;;
44945567 ;;
44955568 esac
44965569 case "$deplibs " in
4497 *" -L$dir "*) ;;
5570 *" -L$dir "* | *" $arg "*)
5571 # Will only happen for absolute or sysroot arguments
5572 ;;
44985573 *)
4499 deplibs="$deplibs -L$dir"
4500 lib_search_path="$lib_search_path $dir"
5574 # Preserve sysroot, but never include relative directories
5575 case $dir in
5576 [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
5577 *) func_append deplibs " -L$dir" ;;
5578 esac
5579 func_append lib_search_path " $dir"
45015580 ;;
45025581 esac
45035582 case $host in
45045583 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
4505 testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
5584 testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
45065585 case :$dllsearchpath: in
45075586 *":$dir:"*) ;;
45085587 ::) dllsearchpath=$dir;;
4509 *) dllsearchpath="$dllsearchpath:$dir";;
5588 *) func_append dllsearchpath ":$dir";;
45105589 esac
45115590 case :$dllsearchpath: in
45125591 *":$testbindir:"*) ;;
45135592 ::) dllsearchpath=$testbindir;;
4514 *) dllsearchpath="$dllsearchpath:$testbindir";;
5593 *) func_append dllsearchpath ":$testbindir";;
45155594 esac
45165595 ;;
45175596 esac
45215600 -l*)
45225601 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
45235602 case $host in
4524 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
5603 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
45255604 # These systems don't actually have a C or math library (as such)
45265605 continue
45275606 ;;
45355614 ;;
45365615 *-*-rhapsody* | *-*-darwin1.[012])
45375616 # Rhapsody C and math libraries are in the System framework
4538 deplibs="$deplibs System.ltframework"
5617 func_append deplibs " System.ltframework"
45395618 continue
45405619 ;;
45415620 *-*-sco3.2v5* | *-*-sco5v6*)
45555634 ;;
45565635 esac
45575636 fi
4558 deplibs="$deplibs $arg"
5637 func_append deplibs " $arg"
45595638 continue
45605639 ;;
45615640
45675646 # Tru64 UNIX uses -model [arg] to determine the layout of C++
45685647 # classes, name mangling, and exception handling.
45695648 # Darwin uses the -arch flag to determine output architecture.
4570 -model|-arch|-isysroot)
4571 compiler_flags="$compiler_flags $arg"
5649 -model|-arch|-isysroot|--sysroot)
5650 func_append compiler_flags " $arg"
45725651 func_append compile_command " $arg"
45735652 func_append finalize_command " $arg"
45745653 prev=xcompiler
45755654 continue
45765655 ;;
45775656
4578 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
4579 compiler_flags="$compiler_flags $arg"
5657 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
5658 |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
5659 func_append compiler_flags " $arg"
45805660 func_append compile_command " $arg"
45815661 func_append finalize_command " $arg"
45825662 case "$new_inherited_linker_flags " in
45835663 *" $arg "*) ;;
4584 * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
5664 * ) func_append new_inherited_linker_flags " $arg" ;;
45855665 esac
45865666 continue
45875667 ;;
46485728 # We need an absolute path.
46495729 case $dir in
46505730 [\\/]* | [A-Za-z]:[\\/]*) ;;
5731 =*)
5732 func_stripname '=' '' "$dir"
5733 dir=$lt_sysroot$func_stripname_result
5734 ;;
46515735 *)
46525736 func_fatal_error "only absolute run-paths are allowed"
46535737 ;;
46545738 esac
46555739 case "$xrpath " in
46565740 *" $dir "*) ;;
4657 *) xrpath="$xrpath $dir" ;;
5741 *) func_append xrpath " $dir" ;;
46585742 esac
46595743 continue
46605744 ;;
47075791 for flag in $args; do
47085792 IFS="$save_ifs"
47095793 func_quote_for_eval "$flag"
4710 arg="$arg $wl$func_quote_for_eval_result"
4711 compiler_flags="$compiler_flags $func_quote_for_eval_result"
5794 func_append arg " $func_quote_for_eval_result"
5795 func_append compiler_flags " $func_quote_for_eval_result"
47125796 done
47135797 IFS="$save_ifs"
47145798 func_stripname ' ' '' "$arg"
47235807 for flag in $args; do
47245808 IFS="$save_ifs"
47255809 func_quote_for_eval "$flag"
4726 arg="$arg $wl$func_quote_for_eval_result"
4727 compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
4728 linker_flags="$linker_flags $func_quote_for_eval_result"
5810 func_append arg " $wl$func_quote_for_eval_result"
5811 func_append compiler_flags " $wl$func_quote_for_eval_result"
5812 func_append linker_flags " $func_quote_for_eval_result"
47295813 done
47305814 IFS="$save_ifs"
47315815 func_stripname ' ' '' "$arg"
47535837 arg="$func_quote_for_eval_result"
47545838 ;;
47555839
4756 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
4757 # -r[0-9][0-9]* specifies the processor on the SGI compiler
4758 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
4759 # +DA*, +DD* enable 64-bit mode on the HP compiler
4760 # -q* pass through compiler args for the IBM compiler
4761 # -m*, -t[45]*, -txscale* pass through architecture-specific
4762 # compiler args for GCC
4763 # -F/path gives path to uninstalled frameworks, gcc on darwin
4764 # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
4765 # @file GCC response files
5840 # Flags to be passed through unchanged, with rationale:
5841 # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
5842 # -r[0-9][0-9]* specify processor for the SGI compiler
5843 # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
5844 # +DA*, +DD* enable 64-bit mode for the HP compiler
5845 # -q* compiler args for the IBM compiler
5846 # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
5847 # -F/path path to uninstalled frameworks, gcc on darwin
5848 # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
5849 # @file GCC response files
5850 # -tp=* Portland pgcc target processor selection
5851 # --sysroot=* for sysroot support
5852 # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
47665853 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
4767 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
5854 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
5855 -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
47685856 func_quote_for_eval "$arg"
47695857 arg="$func_quote_for_eval_result"
47705858 func_append compile_command " $arg"
47715859 func_append finalize_command " $arg"
4772 compiler_flags="$compiler_flags $arg"
5860 func_append compiler_flags " $arg"
47735861 continue
47745862 ;;
47755863
47815869
47825870 *.$objext)
47835871 # A standard object.
4784 objs="$objs $arg"
5872 func_append objs " $arg"
47855873 ;;
47865874
47875875 *.lo)
48125900
48135901 if test "$prev" = dlfiles; then
48145902 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
4815 dlfiles="$dlfiles $pic_object"
5903 func_append dlfiles " $pic_object"
48165904 prev=
48175905 continue
48185906 else
48245912 # CHECK ME: I think I busted this. -Ossama
48255913 if test "$prev" = dlprefiles; then
48265914 # Preload the old-style object.
4827 dlprefiles="$dlprefiles $pic_object"
5915 func_append dlprefiles " $pic_object"
48285916 prev=
48295917 fi
48305918
48695957
48705958 *.$libext)
48715959 # An archive.
4872 deplibs="$deplibs $arg"
4873 old_deplibs="$old_deplibs $arg"
5960 func_append deplibs " $arg"
5961 func_append old_deplibs " $arg"
48745962 continue
48755963 ;;
48765964
48775965 *.la)
48785966 # A libtool-controlled library.
48795967
5968 func_resolve_sysroot "$arg"
48805969 if test "$prev" = dlfiles; then
48815970 # This library was specified with -dlopen.
4882 dlfiles="$dlfiles $arg"
5971 func_append dlfiles " $func_resolve_sysroot_result"
48835972 prev=
48845973 elif test "$prev" = dlprefiles; then
48855974 # The library was specified with -dlpreopen.
4886 dlprefiles="$dlprefiles $arg"
5975 func_append dlprefiles " $func_resolve_sysroot_result"
48875976 prev=
48885977 else
4889 deplibs="$deplibs $arg"
5978 func_append deplibs " $func_resolve_sysroot_result"
48905979 fi
48915980 continue
48925981 ;;
49246013
49256014 if test -n "$shlibpath_var"; then
49266015 # get the directories listed in $shlibpath_var
4927 eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
6016 eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
49286017 else
49296018 shlib_search_path=
49306019 fi
49336022
49346023 func_dirname "$output" "/" ""
49356024 output_objdir="$func_dirname_result$objdir"
6025 func_to_tool_file "$output_objdir/"
6026 tool_output_objdir=$func_to_tool_file_result
49366027 # Create the object directory.
49376028 func_mkdir_p "$output_objdir"
49386029
49536044 # Find all interdependent deplibs by searching for libraries
49546045 # that are linked more than once (e.g. -la -lb -la)
49556046 for deplib in $deplibs; do
4956 if $opt_duplicate_deps ; then
6047 if $opt_preserve_dup_deps ; then
49576048 case "$libs " in
4958 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
6049 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
49596050 esac
49606051 fi
4961 libs="$libs $deplib"
6052 func_append libs " $deplib"
49626053 done
49636054
49646055 if test "$linkmode" = lib; then
49716062 if $opt_duplicate_compiler_generated_deps; then
49726063 for pre_post_dep in $predeps $postdeps; do
49736064 case "$pre_post_deps " in
4974 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
6065 *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
49756066 esac
4976 pre_post_deps="$pre_post_deps $pre_post_dep"
6067 func_append pre_post_deps " $pre_post_dep"
49776068 done
49786069 fi
49796070 pre_post_deps=
50436134 for lib in $dlprefiles; do
50446135 # Ignore non-libtool-libs
50456136 dependency_libs=
6137 func_resolve_sysroot "$lib"
50466138 case $lib in
5047 *.la) func_source "$lib" ;;
6139 *.la) func_source "$func_resolve_sysroot_result" ;;
50486140 esac
50496141
50506142 # Collect preopened libtool deplibs, except any this library
50516143 # has declared as weak libs
50526144 for deplib in $dependency_libs; do
5053 deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
6145 func_basename "$deplib"
6146 deplib_base=$func_basename_result
50546147 case " $weak_libs " in
50556148 *" $deplib_base "*) ;;
5056 *) deplibs="$deplibs $deplib" ;;
6149 *) func_append deplibs " $deplib" ;;
50576150 esac
50586151 done
50596152 done
50696162 lib=
50706163 found=no
50716164 case $deplib in
5072 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
6165 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
6166 |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
50736167 if test "$linkmode,$pass" = "prog,link"; then
50746168 compile_deplibs="$deplib $compile_deplibs"
50756169 finalize_deplibs="$deplib $finalize_deplibs"
50766170 else
5077 compiler_flags="$compiler_flags $deplib"
6171 func_append compiler_flags " $deplib"
50786172 if test "$linkmode" = lib ; then
50796173 case "$new_inherited_linker_flags " in
50806174 *" $deplib "*) ;;
5081 * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
6175 * ) func_append new_inherited_linker_flags " $deplib" ;;
50826176 esac
50836177 fi
50846178 fi
51636257 if test "$linkmode" = lib ; then
51646258 case "$new_inherited_linker_flags " in
51656259 *" $deplib "*) ;;
5166 * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
6260 * ) func_append new_inherited_linker_flags " $deplib" ;;
51676261 esac
51686262 fi
51696263 fi
51766270 test "$pass" = conv && continue
51776271 newdependency_libs="$deplib $newdependency_libs"
51786272 func_stripname '-L' '' "$deplib"
5179 newlib_search_path="$newlib_search_path $func_stripname_result"
6273 func_resolve_sysroot "$func_stripname_result"
6274 func_append newlib_search_path " $func_resolve_sysroot_result"
51806275 ;;
51816276 prog)
51826277 if test "$pass" = conv; then
51906285 finalize_deplibs="$deplib $finalize_deplibs"
51916286 fi
51926287 func_stripname '-L' '' "$deplib"
5193 newlib_search_path="$newlib_search_path $func_stripname_result"
6288 func_resolve_sysroot "$func_stripname_result"
6289 func_append newlib_search_path " $func_resolve_sysroot_result"
51946290 ;;
51956291 *)
51966292 func_warning "\`-L' is ignored for archives/objects"
52016297 -R*)
52026298 if test "$pass" = link; then
52036299 func_stripname '-R' '' "$deplib"
5204 dir=$func_stripname_result
6300 func_resolve_sysroot "$func_stripname_result"
6301 dir=$func_resolve_sysroot_result
52056302 # Make sure the xrpath contains only unique directories.
52066303 case "$xrpath " in
52076304 *" $dir "*) ;;
5208 *) xrpath="$xrpath $dir" ;;
6305 *) func_append xrpath " $dir" ;;
52096306 esac
52106307 fi
52116308 deplibs="$deplib $deplibs"
52126309 continue
52136310 ;;
5214 *.la) lib="$deplib" ;;
6311 *.la)
6312 func_resolve_sysroot "$deplib"
6313 lib=$func_resolve_sysroot_result
6314 ;;
52156315 *.$libext)
52166316 if test "$pass" = conv; then
52176317 deplibs="$deplib $deplibs"
52296329 match_pattern*)
52306330 set dummy $deplibs_check_method; shift
52316331 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
5232 if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
6332 if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
52336333 | $EGREP "$match_pattern_regex" > /dev/null; then
52346334 valid_a_lib=yes
52356335 fi
52396339 ;;
52406340 esac
52416341 if test "$valid_a_lib" != yes; then
5242 $ECHO
6342 echo
52436343 $ECHO "*** Warning: Trying to link with static lib archive $deplib."
5244 $ECHO "*** I have the capability to make that library automatically link in when"
5245 $ECHO "*** you link to this library. But I can only do this if you have a"
5246 $ECHO "*** shared version of the library, which you do not appear to have"
5247 $ECHO "*** because the file extensions .$libext of this argument makes me believe"
5248 $ECHO "*** that it is just a static archive that I should not use here."
6344 echo "*** I have the capability to make that library automatically link in when"
6345 echo "*** you link to this library. But I can only do this if you have a"
6346 echo "*** shared version of the library, which you do not appear to have"
6347 echo "*** because the file extensions .$libext of this argument makes me believe"
6348 echo "*** that it is just a static archive that I should not use here."
52496349 else
5250 $ECHO
6350 echo
52516351 $ECHO "*** Warning: Linking the shared library $output against the"
52526352 $ECHO "*** static library $deplib is not portable!"
52536353 deplibs="$deplib $deplibs"
52746374 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
52756375 # If there is no dlopen support or we're linking statically,
52766376 # we need to preload.
5277 newdlprefiles="$newdlprefiles $deplib"
6377 func_append newdlprefiles " $deplib"
52786378 compile_deplibs="$deplib $compile_deplibs"
52796379 finalize_deplibs="$deplib $finalize_deplibs"
52806380 else
5281 newdlfiles="$newdlfiles $deplib"
6381 func_append newdlfiles " $deplib"
52826382 fi
52836383 fi
52846384 continue
53206420
53216421 # Convert "-framework foo" to "foo.ltframework"
53226422 if test -n "$inherited_linker_flags"; then
5323 tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
6423 tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
53246424 for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
53256425 case " $new_inherited_linker_flags " in
53266426 *" $tmp_inherited_linker_flag "*) ;;
5327 *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
6427 *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
53286428 esac
53296429 done
53306430 fi
5331 dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6431 dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
53326432 if test "$linkmode,$pass" = "lib,link" ||
53336433 test "$linkmode,$pass" = "prog,scan" ||
53346434 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
5335 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
5336 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
6435 test -n "$dlopen" && func_append dlfiles " $dlopen"
6436 test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
53376437 fi
53386438
53396439 if test "$pass" = conv; then
53446444 func_fatal_error "cannot find name of link library for \`$lib'"
53456445 fi
53466446 # It is a libtool convenience library, so add in its objects.
5347 convenience="$convenience $ladir/$objdir/$old_library"
5348 old_convenience="$old_convenience $ladir/$objdir/$old_library"
6447 func_append convenience " $ladir/$objdir/$old_library"
6448 func_append old_convenience " $ladir/$objdir/$old_library"
53496449 tmp_libs=
53506450 for deplib in $dependency_libs; do
53516451 deplibs="$deplib $deplibs"
5352 if $opt_duplicate_deps ; then
6452 if $opt_preserve_dup_deps ; then
53536453 case "$tmp_libs " in
5354 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
6454 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
53556455 esac
53566456 fi
5357 tmp_libs="$tmp_libs $deplib"
6457 func_append tmp_libs " $deplib"
53586458 done
53596459 elif test "$linkmode" != prog && test "$linkmode" != lib; then
53606460 func_fatal_error "\`$lib' is not a convenience library"
53656465
53666466 # Get the name of the library we link against.
53676467 linklib=
5368 for l in $old_library $library_names; do
5369 linklib="$l"
5370 done
6468 if test -n "$old_library" &&
6469 { test "$prefer_static_libs" = yes ||
6470 test "$prefer_static_libs,$installed" = "built,no"; }; then
6471 linklib=$old_library
6472 else
6473 for l in $old_library $library_names; do
6474 linklib="$l"
6475 done
6476 fi
53716477 if test -z "$linklib"; then
53726478 func_fatal_error "cannot find name of link library for \`$lib'"
53736479 fi
53846490 # statically, we need to preload. We also need to preload any
53856491 # dependent libraries so libltdl's deplib preloader doesn't
53866492 # bomb out in the load deplibs phase.
5387 dlprefiles="$dlprefiles $lib $dependency_libs"
6493 func_append dlprefiles " $lib $dependency_libs"
53886494 else
5389 newdlfiles="$newdlfiles $lib"
6495 func_append newdlfiles " $lib"
53906496 fi
53916497 continue
53926498 fi # $pass = dlopen
54086514
54096515 # Find the relevant object directory and library name.
54106516 if test "X$installed" = Xyes; then
5411 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
6517 if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
54126518 func_warning "library \`$lib' was moved."
54136519 dir="$ladir"
54146520 absdir="$abs_ladir"
54156521 libdir="$abs_ladir"
54166522 else
5417 dir="$libdir"
5418 absdir="$libdir"
6523 dir="$lt_sysroot$libdir"
6524 absdir="$lt_sysroot$libdir"
54196525 fi
54206526 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
54216527 else
54236529 dir="$ladir"
54246530 absdir="$abs_ladir"
54256531 # Remove this search path later
5426 notinst_path="$notinst_path $abs_ladir"
6532 func_append notinst_path " $abs_ladir"
54276533 else
54286534 dir="$ladir/$objdir"
54296535 absdir="$abs_ladir/$objdir"
54306536 # Remove this search path later
5431 notinst_path="$notinst_path $abs_ladir"
6537 func_append notinst_path " $abs_ladir"
54326538 fi
54336539 fi # $installed = yes
54346540 func_stripname 'lib' '.la' "$laname"
54396545 if test -z "$libdir" && test "$linkmode" = prog; then
54406546 func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
54416547 fi
5442 # Prefer using a static library (so that no silly _DYNAMIC symbols
5443 # are required to link).
5444 if test -n "$old_library"; then
5445 newdlprefiles="$newdlprefiles $dir/$old_library"
5446 # Keep a list of preopened convenience libraries to check
5447 # that they are being used correctly in the link pass.
5448 test -z "$libdir" && \
5449 dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
5450 # Otherwise, use the dlname, so that lt_dlopen finds it.
5451 elif test -n "$dlname"; then
5452 newdlprefiles="$newdlprefiles $dir/$dlname"
5453 else
5454 newdlprefiles="$newdlprefiles $dir/$linklib"
5455 fi
6548 case "$host" in
6549 # special handling for platforms with PE-DLLs.
6550 *cygwin* | *mingw* | *cegcc* )
6551 # Linker will automatically link against shared library if both
6552 # static and shared are present. Therefore, ensure we extract
6553 # symbols from the import library if a shared library is present
6554 # (otherwise, the dlopen module name will be incorrect). We do
6555 # this by putting the import library name into $newdlprefiles.
6556 # We recover the dlopen module name by 'saving' the la file
6557 # name in a special purpose variable, and (later) extracting the
6558 # dlname from the la file.
6559 if test -n "$dlname"; then
6560 func_tr_sh "$dir/$linklib"
6561 eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
6562 func_append newdlprefiles " $dir/$linklib"
6563 else
6564 func_append newdlprefiles " $dir/$old_library"
6565 # Keep a list of preopened convenience libraries to check
6566 # that they are being used correctly in the link pass.
6567 test -z "$libdir" && \
6568 func_append dlpreconveniencelibs " $dir/$old_library"
6569 fi
6570 ;;
6571 * )
6572 # Prefer using a static library (so that no silly _DYNAMIC symbols
6573 # are required to link).
6574 if test -n "$old_library"; then
6575 func_append newdlprefiles " $dir/$old_library"
6576 # Keep a list of preopened convenience libraries to check
6577 # that they are being used correctly in the link pass.
6578 test -z "$libdir" && \
6579 func_append dlpreconveniencelibs " $dir/$old_library"
6580 # Otherwise, use the dlname, so that lt_dlopen finds it.
6581 elif test -n "$dlname"; then
6582 func_append newdlprefiles " $dir/$dlname"
6583 else
6584 func_append newdlprefiles " $dir/$linklib"
6585 fi
6586 ;;
6587 esac
54566588 fi # $pass = dlpreopen
54576589
54586590 if test -z "$libdir"; then
54706602
54716603
54726604 if test "$linkmode" = prog && test "$pass" != link; then
5473 newlib_search_path="$newlib_search_path $ladir"
6605 func_append newlib_search_path " $ladir"
54746606 deplibs="$lib $deplibs"
54756607
54766608 linkalldeplibs=no
54836615 for deplib in $dependency_libs; do
54846616 case $deplib in
54856617 -L*) func_stripname '-L' '' "$deplib"
5486 newlib_search_path="$newlib_search_path $func_stripname_result"
6618 func_resolve_sysroot "$func_stripname_result"
6619 func_append newlib_search_path " $func_resolve_sysroot_result"
54876620 ;;
54886621 esac
54896622 # Need to link against all dependency_libs?
54946627 # or/and link against static libraries
54956628 newdependency_libs="$deplib $newdependency_libs"
54966629 fi
5497 if $opt_duplicate_deps ; then
6630 if $opt_preserve_dup_deps ; then
54986631 case "$tmp_libs " in
5499 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
6632 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
55006633 esac
55016634 fi
5502 tmp_libs="$tmp_libs $deplib"
6635 func_append tmp_libs " $deplib"
55036636 done # for deplib
55046637 continue
55056638 fi # $linkmode = prog...
55146647 # Make sure the rpath contains only unique directories.
55156648 case "$temp_rpath:" in
55166649 *"$absdir:"*) ;;
5517 *) temp_rpath="$temp_rpath$absdir:" ;;
6650 *) func_append temp_rpath "$absdir:" ;;
55186651 esac
55196652 fi
55206653
55266659 *)
55276660 case "$compile_rpath " in
55286661 *" $absdir "*) ;;
5529 *) compile_rpath="$compile_rpath $absdir"
6662 *) func_append compile_rpath " $absdir" ;;
55306663 esac
55316664 ;;
55326665 esac
55356668 *)
55366669 case "$finalize_rpath " in
55376670 *" $libdir "*) ;;
5538 *) finalize_rpath="$finalize_rpath $libdir"
6671 *) func_append finalize_rpath " $libdir" ;;
55396672 esac
55406673 ;;
55416674 esac
55606693 case $host in
55616694 *cygwin* | *mingw* | *cegcc*)
55626695 # No point in relinking DLLs because paths are not encoded
5563 notinst_deplibs="$notinst_deplibs $lib"
6696 func_append notinst_deplibs " $lib"
55646697 need_relink=no
55656698 ;;
55666699 *)
55676700 if test "$installed" = no; then
5568 notinst_deplibs="$notinst_deplibs $lib"
6701 func_append notinst_deplibs " $lib"
55696702 need_relink=yes
55706703 fi
55716704 ;;
55826715 fi
55836716 done
55846717 if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
5585 $ECHO
6718 echo
55866719 if test "$linkmode" = prog; then
55876720 $ECHO "*** Warning: Linking the executable $output against the loadable module"
55886721 else
56006733 *)
56016734 case "$compile_rpath " in
56026735 *" $absdir "*) ;;
5603 *) compile_rpath="$compile_rpath $absdir"
6736 *) func_append compile_rpath " $absdir" ;;
56046737 esac
56056738 ;;
56066739 esac
56096742 *)
56106743 case "$finalize_rpath " in
56116744 *" $libdir "*) ;;
5612 *) finalize_rpath="$finalize_rpath $libdir"
6745 *) func_append finalize_rpath " $libdir" ;;
56136746 esac
56146747 ;;
56156748 esac
56636796 linklib=$newlib
56646797 fi # test -n "$old_archive_from_expsyms_cmds"
56656798
5666 if test "$linkmode" = prog || test "$mode" != relink; then
6799 if test "$linkmode" = prog || test "$opt_mode" != relink; then
56676800 add_shlibpath=
56686801 add_dir=
56696802 add=
56856818 if test "X$dlopenmodule" != "X$lib"; then
56866819 $ECHO "*** Warning: lib $linklib is a module, not a shared library"
56876820 if test -z "$old_library" ; then
5688 $ECHO
5689 $ECHO "*** And there doesn't seem to be a static archive available"
5690 $ECHO "*** The link will probably fail, sorry"
6821 echo
6822 echo "*** And there doesn't seem to be a static archive available"
6823 echo "*** The link will probably fail, sorry"
56916824 else
56926825 add="$dir/$old_library"
56936826 fi
57146847 test "$hardcode_direct_absolute" = no; then
57156848 add="$dir/$linklib"
57166849 elif test "$hardcode_minus_L" = yes; then
5717 add_dir="-L$dir"
6850 add_dir="-L$absdir"
57186851 # Try looking first in the location we're being installed to.
57196852 if test -n "$inst_prefix_dir"; then
57206853 case $libdir in
57216854 [\\/]*)
5722 add_dir="$add_dir -L$inst_prefix_dir$libdir"
6855 func_append add_dir " -L$inst_prefix_dir$libdir"
57236856 ;;
57246857 esac
57256858 fi
57416874 if test -n "$add_shlibpath"; then
57426875 case :$compile_shlibpath: in
57436876 *":$add_shlibpath:"*) ;;
5744 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
6877 *) func_append compile_shlibpath "$add_shlibpath:" ;;
57456878 esac
57466879 fi
57476880 if test "$linkmode" = prog; then
57556888 test "$hardcode_shlibpath_var" = yes; then
57566889 case :$finalize_shlibpath: in
57576890 *":$libdir:"*) ;;
5758 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
6891 *) func_append finalize_shlibpath "$libdir:" ;;
57596892 esac
57606893 fi
57616894 fi
57626895 fi
57636896
5764 if test "$linkmode" = prog || test "$mode" = relink; then
6897 if test "$linkmode" = prog || test "$opt_mode" = relink; then
57656898 add_shlibpath=
57666899 add_dir=
57676900 add=
57756908 elif test "$hardcode_shlibpath_var" = yes; then
57766909 case :$finalize_shlibpath: in
57776910 *":$libdir:"*) ;;
5778 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
6911 *) func_append finalize_shlibpath "$libdir:" ;;
57796912 esac
57806913 add="-l$name"
57816914 elif test "$hardcode_automatic" = yes; then
57926925 if test -n "$inst_prefix_dir"; then
57936926 case $libdir in
57946927 [\\/]*)
5795 add_dir="$add_dir -L$inst_prefix_dir$libdir"
6928 func_append add_dir " -L$inst_prefix_dir$libdir"
57966929 ;;
57976930 esac
57986931 fi
58276960
58286961 # Just print a warning and add the library to dependency_libs so
58296962 # that the program can be linked against the static library.
5830 $ECHO
6963 echo
58316964 $ECHO "*** Warning: This system can not link to static lib archive $lib."
5832 $ECHO "*** I have the capability to make that library automatically link in when"
5833 $ECHO "*** you link to this library. But I can only do this if you have a"
5834 $ECHO "*** shared version of the library, which you do not appear to have."
6965 echo "*** I have the capability to make that library automatically link in when"
6966 echo "*** you link to this library. But I can only do this if you have a"
6967 echo "*** shared version of the library, which you do not appear to have."
58356968 if test "$module" = yes; then
5836 $ECHO "*** But as you try to build a module library, libtool will still create "
5837 $ECHO "*** a static module, that should work as long as the dlopening application"
5838 $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
6969 echo "*** But as you try to build a module library, libtool will still create "
6970 echo "*** a static module, that should work as long as the dlopening application"
6971 echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
58396972 if test -z "$global_symbol_pipe"; then
5840 $ECHO
5841 $ECHO "*** However, this would only work if libtool was able to extract symbol"
5842 $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
5843 $ECHO "*** not find such a program. So, this module is probably useless."
5844 $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
6973 echo
6974 echo "*** However, this would only work if libtool was able to extract symbol"
6975 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
6976 echo "*** not find such a program. So, this module is probably useless."
6977 echo "*** \`nm' from GNU binutils and a full rebuild may help."
58456978 fi
58466979 if test "$build_old_libs" = no; then
58476980 build_libtool_libs=module
58697002 temp_xrpath=$func_stripname_result
58707003 case " $xrpath " in
58717004 *" $temp_xrpath "*) ;;
5872 *) xrpath="$xrpath $temp_xrpath";;
7005 *) func_append xrpath " $temp_xrpath";;
58737006 esac;;
5874 *) temp_deplibs="$temp_deplibs $libdir";;
7007 *) func_append temp_deplibs " $libdir";;
58757008 esac
58767009 done
58777010 dependency_libs="$temp_deplibs"
58787011 fi
58797012
5880 newlib_search_path="$newlib_search_path $absdir"
7013 func_append newlib_search_path " $absdir"
58817014 # Link against this library
58827015 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
58837016 # ... and its dependency_libs
58847017 tmp_libs=
58857018 for deplib in $dependency_libs; do
58867019 newdependency_libs="$deplib $newdependency_libs"
5887 if $opt_duplicate_deps ; then
7020 case $deplib in
7021 -L*) func_stripname '-L' '' "$deplib"
7022 func_resolve_sysroot "$func_stripname_result";;
7023 *) func_resolve_sysroot "$deplib" ;;
7024 esac
7025 if $opt_preserve_dup_deps ; then
58887026 case "$tmp_libs " in
5889 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
7027 *" $func_resolve_sysroot_result "*)
7028 func_append specialdeplibs " $func_resolve_sysroot_result" ;;
58907029 esac
58917030 fi
5892 tmp_libs="$tmp_libs $deplib"
7031 func_append tmp_libs " $func_resolve_sysroot_result"
58937032 done
58947033
58957034 if test "$link_all_deplibs" != no; then
58997038 case $deplib in
59007039 -L*) path="$deplib" ;;
59017040 *.la)
7041 func_resolve_sysroot "$deplib"
7042 deplib=$func_resolve_sysroot_result
59027043 func_dirname "$deplib" "" "."
5903 dir="$func_dirname_result"
7044 dir=$func_dirname_result
59047045 # We need an absolute path.
59057046 case $dir in
59067047 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
59277068 if test -z "$darwin_install_name"; then
59287069 darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
59297070 fi
5930 compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
5931 linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
7071 func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
7072 func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
59327073 path=
59337074 fi
59347075 fi
59617102 compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
59627103 finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
59637104 else
5964 compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
7105 compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
59657106 fi
59667107 fi
59677108 dependency_libs="$newdependency_libs"
59787119 for dir in $newlib_search_path; do
59797120 case "$lib_search_path " in
59807121 *" $dir "*) ;;
5981 *) lib_search_path="$lib_search_path $dir" ;;
7122 *) func_append lib_search_path " $dir" ;;
59827123 esac
59837124 done
59847125 newlib_search_path=
60367177 -L*)
60377178 case " $tmp_libs " in
60387179 *" $deplib "*) ;;
6039 *) tmp_libs="$tmp_libs $deplib" ;;
7180 *) func_append tmp_libs " $deplib" ;;
60407181 esac
60417182 ;;
6042 *) tmp_libs="$tmp_libs $deplib" ;;
7183 *) func_append tmp_libs " $deplib" ;;
60437184 esac
60447185 done
60457186 eval $var=\"$tmp_libs\"
60557196 ;;
60567197 esac
60577198 if test -n "$i" ; then
6058 tmp_libs="$tmp_libs $i"
7199 func_append tmp_libs " $i"
60597200 fi
60607201 done
60617202 dependency_libs=$tmp_libs
60967237 # Now set the variables for building old libraries.
60977238 build_libtool_libs=no
60987239 oldlibs="$output"
6099 objs="$objs$old_deplibs"
7240 func_append objs "$old_deplibs"
61007241 ;;
61017242
61027243 lib)
61297270 if test "$deplibs_check_method" != pass_all; then
61307271 func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
61317272 else
6132 $ECHO
7273 echo
61337274 $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
61347275 $ECHO "*** objects $objs is not portable!"
6135 libobjs="$libobjs $objs"
7276 func_append libobjs " $objs"
61367277 fi
61377278 fi
61387279
61917332 # which has an extra 1 added just for fun
61927333 #
61937334 case $version_type in
7335 # correct linux to gnu/linux during the next big refactor
61947336 darwin|linux|osf|windows|none)
61957337 func_arith $number_major + $number_minor
61967338 current=$func_arith_result
61977339 age="$number_minor"
61987340 revision="$number_revision"
61997341 ;;
6200 freebsd-aout|freebsd-elf|sunos)
7342 freebsd-aout|freebsd-elf|qnx|sunos)
62017343 current="$number_major"
62027344 revision="$number_minor"
62037345 age="0"
63107452 versuffix="$major.$revision"
63117453 ;;
63127454
6313 linux)
7455 linux) # correct to gnu/linux during the next big refactor
63147456 func_arith $current - $age
63157457 major=.$func_arith_result
63167458 versuffix="$major.$age.$revision"
63337475 done
63347476
63357477 # Make executables depend on our current version.
6336 verstring="$verstring:${current}.0"
7478 func_append verstring ":${current}.0"
63377479 ;;
63387480
63397481 qnx)
64017543 fi
64027544
64037545 func_generate_dlsyms "$libname" "$libname" "yes"
6404 libobjs="$libobjs $symfileobj"
7546 func_append libobjs " $symfileobj"
64057547 test "X$libobjs" = "X " && libobjs=
64067548
6407 if test "$mode" != relink; then
7549 if test "$opt_mode" != relink; then
64087550 # Remove our outputs, but don't remove object files since they
64097551 # may have been created when compiling PIC objects.
64107552 removelist=
64207562 continue
64217563 fi
64227564 fi
6423 removelist="$removelist $p"
7565 func_append removelist " $p"
64247566 ;;
64257567 *) ;;
64267568 esac
64317573
64327574 # Now set the variables for building old libraries.
64337575 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
6434 oldlibs="$oldlibs $output_objdir/$libname.$libext"
7576 func_append oldlibs " $output_objdir/$libname.$libext"
64357577
64367578 # Transform .lo files to .o files.
6437 oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
7579 oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
64387580 fi
64397581
64407582 # Eliminate all temporary directories.
64417583 #for path in $notinst_path; do
6442 # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
6443 # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
6444 # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
7584 # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
7585 # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
7586 # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
64457587 #done
64467588
64477589 if test -n "$xrpath"; then
64487590 # If the user specified any rpath flags, then add them.
64497591 temp_xrpath=
64507592 for libdir in $xrpath; do
6451 temp_xrpath="$temp_xrpath -R$libdir"
7593 func_replace_sysroot "$libdir"
7594 func_append temp_xrpath " -R$func_replace_sysroot_result"
64527595 case "$finalize_rpath " in
64537596 *" $libdir "*) ;;
6454 *) finalize_rpath="$finalize_rpath $libdir" ;;
7597 *) func_append finalize_rpath " $libdir" ;;
64557598 esac
64567599 done
64577600 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
64657608 for lib in $old_dlfiles; do
64667609 case " $dlprefiles $dlfiles " in
64677610 *" $lib "*) ;;
6468 *) dlfiles="$dlfiles $lib" ;;
7611 *) func_append dlfiles " $lib" ;;
64697612 esac
64707613 done
64717614
64757618 for lib in $old_dlprefiles; do
64767619 case "$dlprefiles " in
64777620 *" $lib "*) ;;
6478 *) dlprefiles="$dlprefiles $lib" ;;
7621 *) func_append dlprefiles " $lib" ;;
64797622 esac
64807623 done
64817624
64827625 if test "$build_libtool_libs" = yes; then
64837626 if test -n "$rpath"; then
64847627 case $host in
6485 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
7628 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
64867629 # these systems don't actually have a c library (as such)!
64877630 ;;
64887631 *-*-rhapsody* | *-*-darwin1.[012])
64897632 # Rhapsody C library is in the System framework
6490 deplibs="$deplibs System.ltframework"
7633 func_append deplibs " System.ltframework"
64917634 ;;
64927635 *-*-netbsd*)
64937636 # Don't link with libc until the a.out ld.so is fixed.
65047647 *)
65057648 # Add libc to deplibs on all other systems if necessary.
65067649 if test "$build_libtool_need_lc" = "yes"; then
6507 deplibs="$deplibs -lc"
7650 func_append deplibs " -lc"
65087651 fi
65097652 ;;
65107653 esac
65537696 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
65547697 case " $predeps $postdeps " in
65557698 *" $i "*)
6556 newdeplibs="$newdeplibs $i"
7699 func_append newdeplibs " $i"
65577700 i=""
65587701 ;;
65597702 esac
65647707 set dummy $deplib_matches; shift
65657708 deplib_match=$1
65667709 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
6567 newdeplibs="$newdeplibs $i"
7710 func_append newdeplibs " $i"
65687711 else
65697712 droppeddeps=yes
6570 $ECHO
7713 echo
65717714 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
6572 $ECHO "*** I have the capability to make that library automatically link in when"
6573 $ECHO "*** you link to this library. But I can only do this if you have a"
6574 $ECHO "*** shared version of the library, which I believe you do not have"
6575 $ECHO "*** because a test_compile did reveal that the linker did not use it for"
6576 $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
7715 echo "*** I have the capability to make that library automatically link in when"
7716 echo "*** you link to this library. But I can only do this if you have a"
7717 echo "*** shared version of the library, which I believe you do not have"
7718 echo "*** because a test_compile did reveal that the linker did not use it for"
7719 echo "*** its dynamic dependency list that programs get resolved with at runtime."
65777720 fi
65787721 fi
65797722 ;;
65807723 *)
6581 newdeplibs="$newdeplibs $i"
7724 func_append newdeplibs " $i"
65827725 ;;
65837726 esac
65847727 done
65967739 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
65977740 case " $predeps $postdeps " in
65987741 *" $i "*)
6599 newdeplibs="$newdeplibs $i"
7742 func_append newdeplibs " $i"
66007743 i=""
66017744 ;;
66027745 esac
66077750 set dummy $deplib_matches; shift
66087751 deplib_match=$1
66097752 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
6610 newdeplibs="$newdeplibs $i"
7753 func_append newdeplibs " $i"
66117754 else
66127755 droppeddeps=yes
6613 $ECHO
7756 echo
66147757 $ECHO "*** Warning: dynamic linker does not accept needed library $i."
6615 $ECHO "*** I have the capability to make that library automatically link in when"
6616 $ECHO "*** you link to this library. But I can only do this if you have a"
6617 $ECHO "*** shared version of the library, which you do not appear to have"
6618 $ECHO "*** because a test_compile did reveal that the linker did not use this one"
6619 $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
7758 echo "*** I have the capability to make that library automatically link in when"
7759 echo "*** you link to this library. But I can only do this if you have a"
7760 echo "*** shared version of the library, which you do not appear to have"
7761 echo "*** because a test_compile did reveal that the linker did not use this one"
7762 echo "*** as a dynamic dependency that programs can get resolved with at runtime."
66207763 fi
66217764 fi
66227765 else
66237766 droppeddeps=yes
6624 $ECHO
7767 echo
66257768 $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
6626 $ECHO "*** make it link in! You will probably need to install it or some"
6627 $ECHO "*** library that it depends on before this library will be fully"
6628 $ECHO "*** functional. Installing it before continuing would be even better."
7769 echo "*** make it link in! You will probably need to install it or some"
7770 echo "*** library that it depends on before this library will be fully"
7771 echo "*** functional. Installing it before continuing would be even better."
66297772 fi
66307773 ;;
66317774 *)
6632 newdeplibs="$newdeplibs $i"
7775 func_append newdeplibs " $i"
66337776 ;;
66347777 esac
66357778 done
66467789 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
66477790 case " $predeps $postdeps " in
66487791 *" $a_deplib "*)
6649 newdeplibs="$newdeplibs $a_deplib"
7792 func_append newdeplibs " $a_deplib"
66507793 a_deplib=""
66517794 ;;
66527795 esac
66537796 fi
66547797 if test -n "$a_deplib" ; then
66557798 libname=`eval "\\$ECHO \"$libname_spec\""`
7799 if test -n "$file_magic_glob"; then
7800 libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
7801 else
7802 libnameglob=$libname
7803 fi
7804 test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
66567805 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
6657 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
7806 if test "$want_nocaseglob" = yes; then
7807 shopt -s nocaseglob
7808 potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
7809 $nocaseglob
7810 else
7811 potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
7812 fi
66587813 for potent_lib in $potential_libs; do
66597814 # Follow soft links.
66607815 if ls -lLd "$potent_lib" 2>/dev/null |
66717826 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
66727827 case $potliblink in
66737828 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
6674 *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
7829 *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
66757830 esac
66767831 done
66777832 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
66787833 $SED -e 10q |
66797834 $EGREP "$file_magic_regex" > /dev/null; then
6680 newdeplibs="$newdeplibs $a_deplib"
7835 func_append newdeplibs " $a_deplib"
66817836 a_deplib=""
66827837 break 2
66837838 fi
66867841 fi
66877842 if test -n "$a_deplib" ; then
66887843 droppeddeps=yes
6689 $ECHO
7844 echo
66907845 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
6691 $ECHO "*** I have the capability to make that library automatically link in when"
6692 $ECHO "*** you link to this library. But I can only do this if you have a"
6693 $ECHO "*** shared version of the library, which you do not appear to have"
6694 $ECHO "*** because I did check the linker path looking for a file starting"
7846 echo "*** I have the capability to make that library automatically link in when"
7847 echo "*** you link to this library. But I can only do this if you have a"
7848 echo "*** shared version of the library, which you do not appear to have"
7849 echo "*** because I did check the linker path looking for a file starting"
66957850 if test -z "$potlib" ; then
66967851 $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
66977852 else
67027857 ;;
67037858 *)
67047859 # Add a -L argument.
6705 newdeplibs="$newdeplibs $a_deplib"
7860 func_append newdeplibs " $a_deplib"
67067861 ;;
67077862 esac
67087863 done # Gone through all deplibs.
67187873 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
67197874 case " $predeps $postdeps " in
67207875 *" $a_deplib "*)
6721 newdeplibs="$newdeplibs $a_deplib"
7876 func_append newdeplibs " $a_deplib"
67227877 a_deplib=""
67237878 ;;
67247879 esac
67297884 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
67307885 for potent_lib in $potential_libs; do
67317886 potlib="$potent_lib" # see symlink-check above in file_magic test
6732 if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
7887 if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
67337888 $EGREP "$match_pattern_regex" > /dev/null; then
6734 newdeplibs="$newdeplibs $a_deplib"
7889 func_append newdeplibs " $a_deplib"
67357890 a_deplib=""
67367891 break 2
67377892 fi
67407895 fi
67417896 if test -n "$a_deplib" ; then
67427897 droppeddeps=yes
6743 $ECHO
7898 echo
67447899 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
6745 $ECHO "*** I have the capability to make that library automatically link in when"
6746 $ECHO "*** you link to this library. But I can only do this if you have a"
6747 $ECHO "*** shared version of the library, which you do not appear to have"
6748 $ECHO "*** because I did check the linker path looking for a file starting"
7900 echo "*** I have the capability to make that library automatically link in when"
7901 echo "*** you link to this library. But I can only do this if you have a"
7902 echo "*** shared version of the library, which you do not appear to have"
7903 echo "*** because I did check the linker path looking for a file starting"
67497904 if test -z "$potlib" ; then
67507905 $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
67517906 else
67567911 ;;
67577912 *)
67587913 # Add a -L argument.
6759 newdeplibs="$newdeplibs $a_deplib"
7914 func_append newdeplibs " $a_deplib"
67607915 ;;
67617916 esac
67627917 done # Gone through all deplibs.
67637918 ;;
67647919 none | unknown | *)
67657920 newdeplibs=""
6766 tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
6767 -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
7921 tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
67687922 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
67697923 for i in $predeps $postdeps ; do
67707924 # can't use Xsed below, because $i might contain '/'
6771 tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
7925 tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
67727926 done
67737927 fi
6774 if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' |
6775 $GREP . >/dev/null; then
6776 $ECHO
7928 case $tmp_deplibs in
7929 *[!\ \ ]*)
7930 echo
67777931 if test "X$deplibs_check_method" = "Xnone"; then
6778 $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
7932 echo "*** Warning: inter-library dependencies are not supported in this platform."
67797933 else
6780 $ECHO "*** Warning: inter-library dependencies are not known to be supported."
7934 echo "*** Warning: inter-library dependencies are not known to be supported."
67817935 fi
6782 $ECHO "*** All declared inter-library dependencies are being dropped."
7936 echo "*** All declared inter-library dependencies are being dropped."
67837937 droppeddeps=yes
6784 fi
7938 ;;
7939 esac
67857940 ;;
67867941 esac
67877942 versuffix=$versuffix_save
67937948 case $host in
67947949 *-*-rhapsody* | *-*-darwin1.[012])
67957950 # On Rhapsody replace the C library with the System framework
6796 newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
7951 newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
67977952 ;;
67987953 esac
67997954
68007955 if test "$droppeddeps" = yes; then
68017956 if test "$module" = yes; then
6802 $ECHO
6803 $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
7957 echo
7958 echo "*** Warning: libtool could not satisfy all declared inter-library"
68047959 $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
6805 $ECHO "*** a static module, that should work as long as the dlopening"
6806 $ECHO "*** application is linked with the -dlopen flag."
7960 echo "*** a static module, that should work as long as the dlopening"
7961 echo "*** application is linked with the -dlopen flag."
68077962 if test -z "$global_symbol_pipe"; then
6808 $ECHO
6809 $ECHO "*** However, this would only work if libtool was able to extract symbol"
6810 $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
6811 $ECHO "*** not find such a program. So, this module is probably useless."
6812 $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
7963 echo
7964 echo "*** However, this would only work if libtool was able to extract symbol"
7965 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
7966 echo "*** not find such a program. So, this module is probably useless."
7967 echo "*** \`nm' from GNU binutils and a full rebuild may help."
68137968 fi
68147969 if test "$build_old_libs" = no; then
68157970 oldlibs="$output_objdir/$libname.$libext"
68197974 build_libtool_libs=no
68207975 fi
68217976 else
6822 $ECHO "*** The inter-library dependencies that have been dropped here will be"
6823 $ECHO "*** automatically added whenever a program is linked with this library"
6824 $ECHO "*** or is declared to -dlopen it."
7977 echo "*** The inter-library dependencies that have been dropped here will be"
7978 echo "*** automatically added whenever a program is linked with this library"
7979 echo "*** or is declared to -dlopen it."
68257980
68267981 if test "$allow_undefined" = no; then
6827 $ECHO
6828 $ECHO "*** Since this library must not contain undefined symbols,"
6829 $ECHO "*** because either the platform does not support them or"
6830 $ECHO "*** it was explicitly requested with -no-undefined,"
6831 $ECHO "*** libtool will only create a static version of it."
7982 echo
7983 echo "*** Since this library must not contain undefined symbols,"
7984 echo "*** because either the platform does not support them or"
7985 echo "*** it was explicitly requested with -no-undefined,"
7986 echo "*** libtool will only create a static version of it."
68327987 if test "$build_old_libs" = no; then
68337988 oldlibs="$output_objdir/$libname.$libext"
68347989 build_libtool_libs=module
68458000 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
68468001 case $host in
68478002 *-*-darwin*)
6848 newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6849 new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
6850 deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
8003 newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8004 new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8005 deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
68518006 ;;
68528007 esac
68538008
68608015 *)
68618016 case " $deplibs " in
68628017 *" -L$path/$objdir "*)
6863 new_libs="$new_libs -L$path/$objdir" ;;
8018 func_append new_libs " -L$path/$objdir" ;;
68648019 esac
68658020 ;;
68668021 esac
68708025 -L*)
68718026 case " $new_libs " in
68728027 *" $deplib "*) ;;
6873 *) new_libs="$new_libs $deplib" ;;
8028 *) func_append new_libs " $deplib" ;;
68748029 esac
68758030 ;;
6876 *) new_libs="$new_libs $deplib" ;;
8031 *) func_append new_libs " $deplib" ;;
68778032 esac
68788033 done
68798034 deplibs="$new_libs"
68858040
68868041 # Test again, we may have decided not to build it any more
68878042 if test "$build_libtool_libs" = yes; then
8043 # Remove ${wl} instances when linking with ld.
8044 # FIXME: should test the right _cmds variable.
8045 case $archive_cmds in
8046 *\$LD\ *) wl= ;;
8047 esac
68888048 if test "$hardcode_into_libs" = yes; then
68898049 # Hardcode the library paths
68908050 hardcode_libdirs=
68918051 dep_rpath=
68928052 rpath="$finalize_rpath"
6893 test "$mode" != relink && rpath="$compile_rpath$rpath"
8053 test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
68948054 for libdir in $rpath; do
68958055 if test -n "$hardcode_libdir_flag_spec"; then
68968056 if test -n "$hardcode_libdir_separator"; then
8057 func_replace_sysroot "$libdir"
8058 libdir=$func_replace_sysroot_result
68978059 if test -z "$hardcode_libdirs"; then
68988060 hardcode_libdirs="$libdir"
68998061 else
69028064 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
69038065 ;;
69048066 *)
6905 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
8067 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
69068068 ;;
69078069 esac
69088070 fi
69098071 else
69108072 eval flag=\"$hardcode_libdir_flag_spec\"
6911 dep_rpath="$dep_rpath $flag"
8073 func_append dep_rpath " $flag"
69128074 fi
69138075 elif test -n "$runpath_var"; then
69148076 case "$perm_rpath " in
69158077 *" $libdir "*) ;;
6916 *) perm_rpath="$perm_rpath $libdir" ;;
8078 *) func_append perm_rpath " $libdir" ;;
69178079 esac
69188080 fi
69198081 done
69218083 if test -n "$hardcode_libdir_separator" &&
69228084 test -n "$hardcode_libdirs"; then
69238085 libdir="$hardcode_libdirs"
6924 if test -n "$hardcode_libdir_flag_spec_ld"; then
6925 eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
6926 else
6927 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
6928 fi
8086 eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
69298087 fi
69308088 if test -n "$runpath_var" && test -n "$perm_rpath"; then
69318089 # We should set the runpath_var.
69328090 rpath=
69338091 for dir in $perm_rpath; do
6934 rpath="$rpath$dir:"
8092 func_append rpath "$dir:"
69358093 done
69368094 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
69378095 fi
69398097 fi
69408098
69418099 shlibpath="$finalize_shlibpath"
6942 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
8100 test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
69438101 if test -n "$shlibpath"; then
69448102 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
69458103 fi
69658123 linknames=
69668124 for link
69678125 do
6968 linknames="$linknames $link"
8126 func_append linknames " $link"
69698127 done
69708128
69718129 # Use standard objects if they are pic
6972 test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
8130 test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
69738131 test "X$libobjs" = "X " && libobjs=
69748132
69758133 delfiles=
69768134 if test -n "$export_symbols" && test -n "$include_expsyms"; then
69778135 $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
69788136 export_symbols="$output_objdir/$libname.uexp"
6979 delfiles="$delfiles $export_symbols"
8137 func_append delfiles " $export_symbols"
69808138 fi
69818139
69828140 orig_export_symbols=
70078165 $opt_dry_run || $RM $export_symbols
70088166 cmds=$export_symbols_cmds
70098167 save_ifs="$IFS"; IFS='~'
7010 for cmd in $cmds; do
8168 for cmd1 in $cmds; do
70118169 IFS="$save_ifs"
7012 eval cmd=\"$cmd\"
7013 func_len " $cmd"
7014 len=$func_len_result
7015 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
8170 # Take the normal branch if the nm_file_list_spec branch
8171 # doesn't work or if tool conversion is not needed.
8172 case $nm_file_list_spec~$to_tool_file_cmd in
8173 *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
8174 try_normal_branch=yes
8175 eval cmd=\"$cmd1\"
8176 func_len " $cmd"
8177 len=$func_len_result
8178 ;;
8179 *)
8180 try_normal_branch=no
8181 ;;
8182 esac
8183 if test "$try_normal_branch" = yes \
8184 && { test "$len" -lt "$max_cmd_len" \
8185 || test "$max_cmd_len" -le -1; }
8186 then
70168187 func_show_eval "$cmd" 'exit $?'
8188 skipped_export=false
8189 elif test -n "$nm_file_list_spec"; then
8190 func_basename "$output"
8191 output_la=$func_basename_result
8192 save_libobjs=$libobjs
8193 save_output=$output
8194 output=${output_objdir}/${output_la}.nm
8195 func_to_tool_file "$output"
8196 libobjs=$nm_file_list_spec$func_to_tool_file_result
8197 func_append delfiles " $output"
8198 func_verbose "creating $NM input file list: $output"
8199 for obj in $save_libobjs; do
8200 func_to_tool_file "$obj"
8201 $ECHO "$func_to_tool_file_result"
8202 done > "$output"
8203 eval cmd=\"$cmd1\"
8204 func_show_eval "$cmd" 'exit $?'
8205 output=$save_output
8206 libobjs=$save_libobjs
70178207 skipped_export=false
70188208 else
70198209 # The command line is too long to execute in one step.
70358225 if test -n "$export_symbols" && test -n "$include_expsyms"; then
70368226 tmp_export_symbols="$export_symbols"
70378227 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
7038 $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
8228 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
70398229 fi
70408230
70418231 if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
70478237 # global variables. join(1) would be nice here, but unfortunately
70488238 # isn't a blessed tool.
70498239 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
7050 delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
8240 func_append delfiles " $export_symbols $output_objdir/$libname.filter"
70518241 export_symbols=$output_objdir/$libname.def
70528242 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
70538243 fi
70578247 case " $convenience " in
70588248 *" $test_deplib "*) ;;
70598249 *)
7060 tmp_deplibs="$tmp_deplibs $test_deplib"
8250 func_append tmp_deplibs " $test_deplib"
70618251 ;;
70628252 esac
70638253 done
70778267 test "X$libobjs" = "X " && libobjs=
70788268 else
70798269 gentop="$output_objdir/${outputname}x"
7080 generated="$generated $gentop"
8270 func_append generated " $gentop"
70818271
70828272 func_extract_archives $gentop $convenience
7083 libobjs="$libobjs $func_extract_archives_result"
8273 func_append libobjs " $func_extract_archives_result"
70848274 test "X$libobjs" = "X " && libobjs=
70858275 fi
70868276 fi
70878277
70888278 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
70898279 eval flag=\"$thread_safe_flag_spec\"
7090 linker_flags="$linker_flags $flag"
8280 func_append linker_flags " $flag"
70918281 fi
70928282
70938283 # Make a backup of the uninstalled library when relinking
7094 if test "$mode" = relink; then
8284 if test "$opt_mode" = relink; then
70958285 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
70968286 fi
70978287
71368326 save_libobjs=$libobjs
71378327 fi
71388328 save_output=$output
7139 output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
8329 func_basename "$output"
8330 output_la=$func_basename_result
71408331
71418332 # Clear the reloadable object creation command queue and
71428333 # initialize k to one.
71498340 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
71508341 output=${output_objdir}/${output_la}.lnkscript
71518342 func_verbose "creating GNU ld script: $output"
7152 $ECHO 'INPUT (' > $output
8343 echo 'INPUT (' > $output
71538344 for obj in $save_libobjs
71548345 do
7155 $ECHO "$obj" >> $output
8346 func_to_tool_file "$obj"
8347 $ECHO "$func_to_tool_file_result" >> $output
71568348 done
7157 $ECHO ')' >> $output
7158 delfiles="$delfiles $output"
8349 echo ')' >> $output
8350 func_append delfiles " $output"
8351 func_to_tool_file "$output"
8352 output=$func_to_tool_file_result
71598353 elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
71608354 output=${output_objdir}/${output_la}.lnk
71618355 func_verbose "creating linker input file list: $output"
71698363 fi
71708364 for obj
71718365 do
7172 $ECHO "$obj" >> $output
8366 func_to_tool_file "$obj"
8367 $ECHO "$func_to_tool_file_result" >> $output
71738368 done
7174 delfiles="$delfiles $output"
7175 output=$firstobj\"$file_list_spec$output\"
8369 func_append delfiles " $output"
8370 func_to_tool_file "$output"
8371 output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
71768372 else
71778373 if test -n "$save_libobjs"; then
71788374 func_verbose "creating reloadable object files..."
71968392 # command to the queue.
71978393 if test "$k" -eq 1 ; then
71988394 # The first file doesn't have a previous command to add.
7199 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
8395 reload_objs=$objlist
8396 eval concat_cmds=\"$reload_cmds\"
72008397 else
72018398 # All subsequent reloadable object files will link in
72028399 # the last one created.
7203 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
8400 reload_objs="$objlist $last_robj"
8401 eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
72048402 fi
72058403 last_robj=$output_objdir/$output_la-${k}.$objext
72068404 func_arith $k + 1
72078405 k=$func_arith_result
72088406 output=$output_objdir/$output_la-${k}.$objext
7209 objlist=$obj
8407 objlist=" $obj"
72108408 func_len " $last_robj"
72118409 func_arith $len0 + $func_len_result
72128410 len=$func_arith_result
72168414 # reloadable object file. All subsequent reloadable object
72178415 # files will link in the last one created.
72188416 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
7219 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
8417 reload_objs="$objlist $last_robj"
8418 eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
72208419 if test -n "$last_robj"; then
72218420 eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
72228421 fi
7223 delfiles="$delfiles $output"
8422 func_append delfiles " $output"
72248423
72258424 else
72268425 output=
72548453 lt_exit=$?
72558454
72568455 # Restore the uninstalled library and exit
7257 if test "$mode" = relink; then
8456 if test "$opt_mode" = relink; then
72588457 ( cd "$output_objdir" && \
72598458 $RM "${realname}T" && \
72608459 $MV "${realname}U" "$realname" )
72758474 if test -n "$export_symbols" && test -n "$include_expsyms"; then
72768475 tmp_export_symbols="$export_symbols"
72778476 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
7278 $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
8477 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
72798478 fi
72808479
72818480 if test -n "$orig_export_symbols"; then
72878486 # global variables. join(1) would be nice here, but unfortunately
72888487 # isn't a blessed tool.
72898488 $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
7290 delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
8489 func_append delfiles " $export_symbols $output_objdir/$libname.filter"
72918490 export_symbols=$output_objdir/$libname.def
72928491 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
72938492 fi
73288527 # Add any objects from preloaded convenience libraries
73298528 if test -n "$dlprefiles"; then
73308529 gentop="$output_objdir/${outputname}x"
7331 generated="$generated $gentop"
8530 func_append generated " $gentop"
73328531
73338532 func_extract_archives $gentop $dlprefiles
7334 libobjs="$libobjs $func_extract_archives_result"
8533 func_append libobjs " $func_extract_archives_result"
73358534 test "X$libobjs" = "X " && libobjs=
73368535 fi
73378536
73478546 lt_exit=$?
73488547
73498548 # Restore the uninstalled library and exit
7350 if test "$mode" = relink; then
8549 if test "$opt_mode" = relink; then
73518550 ( cd "$output_objdir" && \
73528551 $RM "${realname}T" && \
73538552 $MV "${realname}U" "$realname" )
73598558 IFS="$save_ifs"
73608559
73618560 # Restore the uninstalled library and exit
7362 if test "$mode" = relink; then
8561 if test "$opt_mode" = relink; then
73638562 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
73648563
73658564 if test -n "$convenience"; then
74408639 if test -n "$convenience"; then
74418640 if test -n "$whole_archive_flag_spec"; then
74428641 eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
7443 reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
8642 reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
74448643 else
74458644 gentop="$output_objdir/${obj}x"
7446 generated="$generated $gentop"
8645 func_append generated " $gentop"
74478646
74488647 func_extract_archives $gentop $convenience
74498648 reload_conv_objs="$reload_objs $func_extract_archives_result"
74508649 fi
74518650 fi
74528651
8652 # If we're not building shared, we need to use non_pic_objs
8653 test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
8654
74538655 # Create the old-style object.
7454 reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
8656 reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
74558657
74568658 output="$obj"
74578659 func_execute_cmds "$reload_cmds" 'exit $?'
75118713 case $host in
75128714 *-*-rhapsody* | *-*-darwin1.[012])
75138715 # On Rhapsody replace the C library is the System framework
7514 compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
7515 finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
8716 compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
8717 finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
75168718 ;;
75178719 esac
75188720
75238725 if test "$tagname" = CXX ; then
75248726 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
75258727 10.[0123])
7526 compile_command="$compile_command ${wl}-bind_at_load"
7527 finalize_command="$finalize_command ${wl}-bind_at_load"
8728 func_append compile_command " ${wl}-bind_at_load"
8729 func_append finalize_command " ${wl}-bind_at_load"
75288730 ;;
75298731 esac
75308732 fi
75318733 # Time to change all our "foo.ltframework" stuff back to "-framework foo"
7532 compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
7533 finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
8734 compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
8735 finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
75348736 ;;
75358737 esac
75368738
75448746 *)
75458747 case " $compile_deplibs " in
75468748 *" -L$path/$objdir "*)
7547 new_libs="$new_libs -L$path/$objdir" ;;
8749 func_append new_libs " -L$path/$objdir" ;;
75488750 esac
75498751 ;;
75508752 esac
75548756 -L*)
75558757 case " $new_libs " in
75568758 *" $deplib "*) ;;
7557 *) new_libs="$new_libs $deplib" ;;
8759 *) func_append new_libs " $deplib" ;;
75588760 esac
75598761 ;;
7560 *) new_libs="$new_libs $deplib" ;;
8762 *) func_append new_libs " $deplib" ;;
75618763 esac
75628764 done
75638765 compile_deplibs="$new_libs"
75648766
75658767
7566 compile_command="$compile_command $compile_deplibs"
7567 finalize_command="$finalize_command $finalize_deplibs"
8768 func_append compile_command " $compile_deplibs"
8769 func_append finalize_command " $finalize_deplibs"
75688770
75698771 if test -n "$rpath$xrpath"; then
75708772 # If the user specified any rpath flags, then add them.
75728774 # This is the magic to use -rpath.
75738775 case "$finalize_rpath " in
75748776 *" $libdir "*) ;;
7575 *) finalize_rpath="$finalize_rpath $libdir" ;;
8777 *) func_append finalize_rpath " $libdir" ;;
75768778 esac
75778779 done
75788780 fi
75918793 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
75928794 ;;
75938795 *)
7594 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
8796 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
75958797 ;;
75968798 esac
75978799 fi
75988800 else
75998801 eval flag=\"$hardcode_libdir_flag_spec\"
7600 rpath="$rpath $flag"
8802 func_append rpath " $flag"
76018803 fi
76028804 elif test -n "$runpath_var"; then
76038805 case "$perm_rpath " in
76048806 *" $libdir "*) ;;
7605 *) perm_rpath="$perm_rpath $libdir" ;;
8807 *) func_append perm_rpath " $libdir" ;;
76068808 esac
76078809 fi
76088810 case $host in
76118813 case :$dllsearchpath: in
76128814 *":$libdir:"*) ;;
76138815 ::) dllsearchpath=$libdir;;
7614 *) dllsearchpath="$dllsearchpath:$libdir";;
8816 *) func_append dllsearchpath ":$libdir";;
76158817 esac
76168818 case :$dllsearchpath: in
76178819 *":$testbindir:"*) ;;
76188820 ::) dllsearchpath=$testbindir;;
7619 *) dllsearchpath="$dllsearchpath:$testbindir";;
8821 *) func_append dllsearchpath ":$testbindir";;
76208822 esac
76218823 ;;
76228824 esac
76428844 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
76438845 ;;
76448846 *)
7645 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
8847 func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
76468848 ;;
76478849 esac
76488850 fi
76498851 else
76508852 eval flag=\"$hardcode_libdir_flag_spec\"
7651 rpath="$rpath $flag"
8853 func_append rpath " $flag"
76528854 fi
76538855 elif test -n "$runpath_var"; then
76548856 case "$finalize_perm_rpath " in
76558857 *" $libdir "*) ;;
7656 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
8858 *) func_append finalize_perm_rpath " $libdir" ;;
76578859 esac
76588860 fi
76598861 done
76678869
76688870 if test -n "$libobjs" && test "$build_old_libs" = yes; then
76698871 # Transform all the library objects into standard objects.
7670 compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
7671 finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
8872 compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
8873 finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
76728874 fi
76738875
76748876 func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
76808882
76818883 wrappers_required=yes
76828884 case $host in
8885 *cegcc* | *mingw32ce*)
8886 # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
8887 wrappers_required=no
8888 ;;
76838889 *cygwin* | *mingw* )
76848890 if test "$build_libtool_libs" != yes; then
76858891 wrappers_required=no
76868892 fi
7687 ;;
7688 *cegcc)
7689 # Disable wrappers for cegcc, we are cross compiling anyway.
7690 wrappers_required=no
76918893 ;;
76928894 *)
76938895 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
76978899 esac
76988900 if test "$wrappers_required" = no; then
76998901 # Replace the output file specification.
7700 compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
8902 compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
77018903 link_command="$compile_command$compile_rpath"
77028904
77038905 # We have no uninstalled library dependencies, so finalize right now.
77048906 exit_status=0
77058907 func_show_eval "$link_command" 'exit_status=$?'
8908
8909 if test -n "$postlink_cmds"; then
8910 func_to_tool_file "$output"
8911 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
8912 func_execute_cmds "$postlink_cmds" 'exit $?'
8913 fi
77068914
77078915 # Delete the generated files.
77088916 if test -f "$output_objdir/${outputname}S.${objext}"; then
77268934 # We should set the runpath_var.
77278935 rpath=
77288936 for dir in $perm_rpath; do
7729 rpath="$rpath$dir:"
8937 func_append rpath "$dir:"
77308938 done
77318939 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
77328940 fi
77348942 # We should set the runpath_var.
77358943 rpath=
77368944 for dir in $finalize_perm_rpath; do
7737 rpath="$rpath$dir:"
8945 func_append rpath "$dir:"
77388946 done
77398947 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
77408948 fi
77448952 # We don't need to create a wrapper script.
77458953 link_command="$compile_var$compile_command$compile_rpath"
77468954 # Replace the output file specification.
7747 link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
8955 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
77488956 # Delete the old output file.
77498957 $opt_dry_run || $RM $output
77508958 # Link the executable and exit
77518959 func_show_eval "$link_command" 'exit $?'
8960
8961 if test -n "$postlink_cmds"; then
8962 func_to_tool_file "$output"
8963 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
8964 func_execute_cmds "$postlink_cmds" 'exit $?'
8965 fi
8966
77528967 exit $EXIT_SUCCESS
77538968 fi
77548969
77638978 if test "$fast_install" != no; then
77648979 link_command="$finalize_var$compile_command$finalize_rpath"
77658980 if test "$fast_install" = yes; then
7766 relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
8981 relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
77678982 else
77688983 # fast_install is set to needless
77698984 relink_command=
77758990 fi
77768991
77778992 # Replace the output file specification.
7778 link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
8993 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
77798994
77808995 # Delete the old output files.
77818996 $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
77828997
77838998 func_show_eval "$link_command" 'exit $?'
8999
9000 if test -n "$postlink_cmds"; then
9001 func_to_tool_file "$output_objdir/$outputname"
9002 postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
9003 func_execute_cmds "$postlink_cmds" 'exit $?'
9004 fi
77849005
77859006 # Now create the wrapper script.
77869007 func_verbose "creating $output"
77999020 fi
78009021 done
78019022 relink_command="(cd `pwd`; $relink_command)"
7802 relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
7803 fi
7804
7805 # Quote $ECHO for shipping.
7806 if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
7807 case $progpath in
7808 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
7809 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
7810 esac
7811 qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
7812 else
7813 qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
9023 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
78149024 fi
78159025
78169026 # Only actually do things if not in dry run mode.
78909100 else
78919101 oldobjs="$old_deplibs $non_pic_objects"
78929102 if test "$preload" = yes && test -f "$symfileobj"; then
7893 oldobjs="$oldobjs $symfileobj"
9103 func_append oldobjs " $symfileobj"
78949104 fi
78959105 fi
78969106 addlibs="$old_convenience"
78989108
78999109 if test -n "$addlibs"; then
79009110 gentop="$output_objdir/${outputname}x"
7901 generated="$generated $gentop"
9111 func_append generated " $gentop"
79029112
79039113 func_extract_archives $gentop $addlibs
7904 oldobjs="$oldobjs $func_extract_archives_result"
9114 func_append oldobjs " $func_extract_archives_result"
79059115 fi
79069116
79079117 # Do each command in the archive commands.
79129122 # Add any objects from preloaded convenience libraries
79139123 if test -n "$dlprefiles"; then
79149124 gentop="$output_objdir/${outputname}x"
7915 generated="$generated $gentop"
9125 func_append generated " $gentop"
79169126
79179127 func_extract_archives $gentop $dlprefiles
7918 oldobjs="$oldobjs $func_extract_archives_result"
9128 func_append oldobjs " $func_extract_archives_result"
79199129 fi
79209130
79219131 # POSIX demands no paths to be encoded in archives. We have
79319141 done | sort | sort -uc >/dev/null 2>&1); then
79329142 :
79339143 else
7934 $ECHO "copying selected object files to avoid basename conflicts..."
9144 echo "copying selected object files to avoid basename conflicts..."
79359145 gentop="$output_objdir/${outputname}x"
7936 generated="$generated $gentop"
9146 func_append generated " $gentop"
79379147 func_mkdir_p "$gentop"
79389148 save_oldobjs=$oldobjs
79399149 oldobjs=
79579167 esac
79589168 done
79599169 func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
7960 oldobjs="$oldobjs $gentop/$newobj"
9170 func_append oldobjs " $gentop/$newobj"
79619171 ;;
7962 *) oldobjs="$oldobjs $obj" ;;
9172 *) func_append oldobjs " $obj" ;;
79639173 esac
79649174 done
79659175 fi
9176 func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
9177 tool_oldlib=$func_to_tool_file_result
79669178 eval cmds=\"$old_archive_cmds\"
79679179
79689180 func_len " $cmds"
79699181 len=$func_len_result
79709182 if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
9183 cmds=$old_archive_cmds
9184 elif test -n "$archiver_list_spec"; then
9185 func_verbose "using command file archive linking..."
9186 for obj in $oldobjs
9187 do
9188 func_to_tool_file "$obj"
9189 $ECHO "$func_to_tool_file_result"
9190 done > $output_objdir/$libname.libcmd
9191 func_to_tool_file "$output_objdir/$libname.libcmd"
9192 oldobjs=" $archiver_list_spec$func_to_tool_file_result"
79719193 cmds=$old_archive_cmds
79729194 else
79739195 # the command line is too long to link in one step, link in parts
80429264 done
80439265 # Quote the link command for shipping.
80449266 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
8045 relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
9267 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
80469268 if test "$hardcode_automatic" = yes ; then
80479269 relink_command=
80489270 fi
80629284 *.la)
80639285 func_basename "$deplib"
80649286 name="$func_basename_result"
8065 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
9287 func_resolve_sysroot "$deplib"
9288 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
80669289 test -z "$libdir" && \
80679290 func_fatal_error "\`$deplib' is not a valid libtool archive"
8068 newdependency_libs="$newdependency_libs $libdir/$name"
9291 func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
80699292 ;;
8070 *) newdependency_libs="$newdependency_libs $deplib" ;;
9293 -L*)
9294 func_stripname -L '' "$deplib"
9295 func_replace_sysroot "$func_stripname_result"
9296 func_append newdependency_libs " -L$func_replace_sysroot_result"
9297 ;;
9298 -R*)
9299 func_stripname -R '' "$deplib"
9300 func_replace_sysroot "$func_stripname_result"
9301 func_append newdependency_libs " -R$func_replace_sysroot_result"
9302 ;;
9303 *) func_append newdependency_libs " $deplib" ;;
80719304 esac
80729305 done
80739306 dependency_libs="$newdependency_libs"
80819314 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
80829315 test -z "$libdir" && \
80839316 func_fatal_error "\`$lib' is not a valid libtool archive"
8084 newdlfiles="$newdlfiles $libdir/$name"
9317 func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
80859318 ;;
8086 *) newdlfiles="$newdlfiles $lib" ;;
9319 *) func_append newdlfiles " $lib" ;;
80879320 esac
80889321 done
80899322 dlfiles="$newdlfiles"
81009333 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
81019334 test -z "$libdir" && \
81029335 func_fatal_error "\`$lib' is not a valid libtool archive"
8103 newdlprefiles="$newdlprefiles $libdir/$name"
9336 func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
81049337 ;;
81059338 esac
81069339 done
81129345 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
81139346 *) abs=`pwd`"/$lib" ;;
81149347 esac
8115 newdlfiles="$newdlfiles $abs"
9348 func_append newdlfiles " $abs"
81169349 done
81179350 dlfiles="$newdlfiles"
81189351 newdlprefiles=
81219354 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
81229355 *) abs=`pwd`"/$lib" ;;
81239356 esac
8124 newdlprefiles="$newdlprefiles $abs"
9357 func_append newdlprefiles " $abs"
81259358 done
81269359 dlprefiles="$newdlprefiles"
81279360 fi
81289361 $RM $output
81299362 # place dlname in correct position for cygwin
9363 # In fact, it would be nice if we could use this code for all target
9364 # systems that can't hard-code library paths into their executables
9365 # and that have no shared library path variable independent of PATH,
9366 # but it turns out we can't easily determine that from inspecting
9367 # libtool variables, so we have to hard-code the OSs to which it
9368 # applies here; at the moment, that means platforms that use the PE
9369 # object format with DLL files. See the long comment at the top of
9370 # tests/bindir.at for full details.
81309371 tdlname=$dlname
81319372 case $host,$output,$installed,$module,$dlname in
8132 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
9373 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
9374 # If a -bindir argument was supplied, place the dll there.
9375 if test "x$bindir" != x ;
9376 then
9377 func_relative_path "$install_libdir" "$bindir"
9378 tdlname=$func_relative_path_result$dlname
9379 else
9380 # Otherwise fall back on heuristic.
9381 tdlname=../bin/$dlname
9382 fi
9383 ;;
81339384 esac
81349385 $ECHO > $output "\
81359386 # $outputname - a libtool library file
81889439 exit $EXIT_SUCCESS
81899440 }
81909441
8191 { test "$mode" = link || test "$mode" = relink; } &&
9442 { test "$opt_mode" = link || test "$opt_mode" = relink; } &&
81929443 func_mode_link ${1+"$@"}
81939444
81949445
82089459 for arg
82099460 do
82109461 case $arg in
8211 -f) RM="$RM $arg"; rmforce=yes ;;
8212 -*) RM="$RM $arg" ;;
8213 *) files="$files $arg" ;;
9462 -f) func_append RM " $arg"; rmforce=yes ;;
9463 -*) func_append RM " $arg" ;;
9464 *) func_append files " $arg" ;;
82149465 esac
82159466 done
82169467
82199470
82209471 rmdirs=
82219472
8222 origobjdir="$objdir"
82239473 for file in $files; do
82249474 func_dirname "$file" "" "."
82259475 dir="$func_dirname_result"
82269476 if test "X$dir" = X.; then
8227 objdir="$origobjdir"
9477 odir="$objdir"
82289478 else
8229 objdir="$dir/$origobjdir"
9479 odir="$dir/$objdir"
82309480 fi
82319481 func_basename "$file"
82329482 name="$func_basename_result"
8233 test "$mode" = uninstall && objdir="$dir"
8234
8235 # Remember objdir for removal later, being careful to avoid duplicates
8236 if test "$mode" = clean; then
9483 test "$opt_mode" = uninstall && odir="$dir"
9484
9485 # Remember odir for removal later, being careful to avoid duplicates
9486 if test "$opt_mode" = clean; then
82379487 case " $rmdirs " in
8238 *" $objdir "*) ;;
8239 *) rmdirs="$rmdirs $objdir" ;;
9488 *" $odir "*) ;;
9489 *) func_append rmdirs " $odir" ;;
82409490 esac
82419491 fi
82429492
82629512
82639513 # Delete the libtool libraries and symlinks.
82649514 for n in $library_names; do
8265 rmfiles="$rmfiles $objdir/$n"
9515 func_append rmfiles " $odir/$n"
82669516 done
8267 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
8268
8269 case "$mode" in
9517 test -n "$old_library" && func_append rmfiles " $odir/$old_library"
9518
9519 case "$opt_mode" in
82709520 clean)
8271 case " $library_names " in
8272 # " " in the beginning catches empty $dlname
9521 case " $library_names " in
82739522 *" $dlname "*) ;;
8274 *) rmfiles="$rmfiles $objdir/$dlname" ;;
9523 *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
82759524 esac
8276 test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
9525 test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
82779526 ;;
82789527 uninstall)
82799528 if test -n "$library_names"; then
83019550 # Add PIC object to the list of files to remove.
83029551 if test -n "$pic_object" &&
83039552 test "$pic_object" != none; then
8304 rmfiles="$rmfiles $dir/$pic_object"
9553 func_append rmfiles " $dir/$pic_object"
83059554 fi
83069555
83079556 # Add non-PIC object to the list of files to remove.
83089557 if test -n "$non_pic_object" &&
83099558 test "$non_pic_object" != none; then
8310 rmfiles="$rmfiles $dir/$non_pic_object"
9559 func_append rmfiles " $dir/$non_pic_object"
83119560 fi
83129561 fi
83139562 ;;
83149563
83159564 *)
8316 if test "$mode" = clean ; then
9565 if test "$opt_mode" = clean ; then
83179566 noexename=$name
83189567 case $file in
83199568 *.exe)
83239572 noexename=$func_stripname_result
83249573 # $file with .exe has already been added to rmfiles,
83259574 # add $file without .exe
8326 rmfiles="$rmfiles $file"
9575 func_append rmfiles " $file"
83279576 ;;
83289577 esac
83299578 # Do a test to see if this is a libtool program.
83329581 func_ltwrapper_scriptname "$file"
83339582 relink_command=
83349583 func_source $func_ltwrapper_scriptname_result
8335 rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
9584 func_append rmfiles " $func_ltwrapper_scriptname_result"
83369585 else
83379586 relink_command=
83389587 func_source $dir/$noexename
83409589
83419590 # note $name still contains .exe if it was in $file originally
83429591 # as does the version of $file that was added into $rmfiles
8343 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
9592 func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
83449593 if test "$fast_install" = yes && test -n "$relink_command"; then
8345 rmfiles="$rmfiles $objdir/lt-$name"
9594 func_append rmfiles " $odir/lt-$name"
83469595 fi
83479596 if test "X$noexename" != "X$name" ; then
8348 rmfiles="$rmfiles $objdir/lt-${noexename}.c"
9597 func_append rmfiles " $odir/lt-${noexename}.c"
83499598 fi
83509599 fi
83519600 fi
83539602 esac
83549603 func_show_eval "$RM $rmfiles" 'exit_status=1'
83559604 done
8356 objdir="$origobjdir"
83579605
83589606 # Try to remove the ${objdir}s in the directories where we deleted files
83599607 for dir in $rmdirs; do
83659613 exit $exit_status
83669614 }
83679615
8368 { test "$mode" = uninstall || test "$mode" = clean; } &&
9616 { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
83699617 func_mode_uninstall ${1+"$@"}
83709618
8371 test -z "$mode" && {
9619 test -z "$opt_mode" && {
83729620 help="$generic_help"
83739621 func_fatal_help "you must specify a MODE"
83749622 }
83759623
83769624 test -z "$exec_cmd" && \
8377 func_fatal_help "invalid operation mode \`$mode'"
9625 func_fatal_help "invalid operation mode \`$opt_mode'"
83789626
83799627 if test -n "$exec_cmd"; then
83809628 eval exec "$exec_cmd"