Codebase list ffmpeg2theora / 1d765a9
Merge commit 'upstream/0.24' RISKO Gergely 15 years ago
46 changed file(s) with 4627 addition(s) and 45894 deletion(s). Raw diff Collapse all Expand all
0 0.24 2009-03-12
1 - fix to make --max_size --no_upscaling work
2 - pad image with black instead of green
3 - long option for -p is --preset now
4 - update to ffmpeg 0.5
5
6 0.23 2008-11-30
7 - output frontend status to file, for frontends that can not read stdout
8 - --no-upscaling new option to only use widht/height, fps, samplerate
9 if input is bigger
10 - new option: --max_size resize image,
11 setting the larger value of width or height to given size
12 - fix bugs in crop and deinterlace
13 - link os x binary to mmx version of libtheora again
14
15 0.22 2008-10-10
16 - enable v4l input again (-f video4linux or -f video4linux2)
17 - ability to set framerate for image sequences (--inputfps)
18 - fix several memory leaks
19 - if only width or height are given, the other is set to preserve aspect ratio
20 - -start / -end options now work with audio only input
21 - new option --novideo to disable input video
22 - remove autotools build system, only scons build is supported now.
23
024 0.21 2008-05-19
125 - switch default extension to .ogv
226 - enable Ogg Skeleton by default
0 Compiling from SVN
1 ------------------
2 If you donwloaded ffmpeg2theora from svn you have
3 need automake 1.6 or later to build the configure script.
4 To do this run ./autogen.sh
5 Then build as you would from a tarball.
6
7 Compiling from tarball:
0 Compiling from tarball or subversion:
81 -----------------------
92 you need
3 - scons (http://www.scons.org/)
104 - the latest version of libtheora <http://downloads.xiph.org/releases/theora/>
11 - ffmpeg-trunk <http://ffmpeg.sf.net> by running ./get_ffmpeg_svn.sh
5 - ffmpeg svn rev 15004 <http://ffmpeg.sf.net> by running ./get_ffmpeg_svn.sh
126 (this script downloads current ffmpeg trunk, runs an appropriate
13 configure and builds ffmpeg)
7 configure and builds ffmpeg, newer versions might work)
148 - for subtitles support, libkate <http://code.google.com/p/libkate/>,
159 or by running ./get_libkate.sh (this script downloads libkate, and
1610 builds libkate)
2216 export PKG_CONFIG_PATH=/path/to/ffmpeg_src:$PKG_CONFIG_PATH
2317
2418 now you can build ffmpeg2theora:
25 ./configure
26 make
19 scons
20
21 to make a static binary
22 scons static=1
23
2724
2825 Installation
2926 ------------
27 install ffmpeg2theora in /usr/local/bin:
3028
31 make install
29 scons install
3230
33 Unless you specify a different --prefix option to ./configure, you will
34 need root privileges for this, ie.:
31 Unless you specify a different prefix,
32 you will need root privileges for this, ie.:
3533
36 sudo make install
34 sudo scons install
3735
38 Compiling on windows using mingw32:
39 ---------------------------------
40 you have to compile libvorbis, libogg, libtheora
41 configure ffmpeg like this:
42 ./configure --disable-encoder --enable-libogg --enable-vorbis --enable-theora \
43 --enable-pp --enable-a52 --enable-gpl
36 to install to another prefix:
4437
38 scons install prefix=/usr
4539
4640 vhook suppport
4741 --------------
5044 the installed shared libs. otherwise one gets errors like this:
5145 undefined symbol: av_read_frame
5246 this is a known limitation of vhooks in ffmpeg.
53
5447
5548 subtitles suppport
5649 ------------------
6255 For example, to encode a video with both German and Italian subtitles:
6356
6457 ./ffmpeg2theora -o ouput.ogv --subtitles german.srt --subtitles-language de_DE \
65 --subtitles italian.srt --subtitles-language it \
58 --subtitles italian.srt --subtitles-language it \
6659 input.avi
6760
68 See subtitles.txt for more information on how to add subtitles to your
69 videos.
61 See subtitles.txt for more information on how to add subtitles to your videos.
62
0 all:
1 scons
2
3 clean:
4 scons -c
5
6 install:
7 scons install $(PREFIX)
8
9 dist:
10 svn export . ffmpeg2theora-`grep pkg_version= SConstruct | cut -d\" -f2`
11 tar cjf ffmpeg2theora-`grep pkg_version= SConstruct | cut -d\" -f2`.tar.bz2 ffmpeg2theora-`grep pkg_version= SConstruct | cut -d\" -f2`
12 rm -r ffmpeg2theora-`grep pkg_version= SConstruct | cut -d\" -f2`
+0
-14
Makefile.am less more
0 AUTOMAKE_OPTIONS = 1.8 dist-bzip2 no-dist-gzip
1
2 SUBDIRS = kino_export
3
4 EXTRA_DIST = Makefile.mingw32 theorautils.h get_ffmpeg_svn.sh ffmpeg2theora.1 \
5 get_libkate.sh subtitles.txt
6
7 bin_PROGRAMS = ffmpeg2theora
8
9 ffmpeg2theora_SOURCES = ffmpeg2theora.c theorautils.c
10 ffmpeg2theora_LDFLAGS = -L$(prefix)/lib @XIPH_LIBS@ @KATE_LIBS@ @FFMPEG_LIBS@
11 ffmpeg2theora_CFLAGS = @XIPH_CFLAGS@ @KATE_CFLAGS@ @FFMPEG_CFLAGS@
12
13 man_MANS = ffmpeg2theora.1
+0
-800
Makefile.in less more
0 # Makefile.in generated by automake 1.10.1 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 VPATH = @srcdir@
17 pkgdatadir = $(datadir)/@PACKAGE@
18 pkglibdir = $(libdir)/@PACKAGE@
19 pkgincludedir = $(includedir)/@PACKAGE@
20 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
21 install_sh_DATA = $(install_sh) -c -m 644
22 install_sh_PROGRAM = $(install_sh) -c
23 install_sh_SCRIPT = $(install_sh) -c
24 INSTALL_HEADER = $(INSTALL_DATA)
25 transform = $(program_transform_name)
26 NORMAL_INSTALL = :
27 PRE_INSTALL = :
28 POST_INSTALL = :
29 NORMAL_UNINSTALL = :
30 PRE_UNINSTALL = :
31 POST_UNINSTALL = :
32 build_triplet = @build@
33 host_triplet = @host@
34 bin_PROGRAMS = ffmpeg2theora$(EXEEXT)
35 subdir = .
36 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
37 $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
38 ChangeLog INSTALL NEWS TODO compile config.guess config.sub \
39 depcomp install-sh ltmain.sh missing
40 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
41 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
42 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
43 $(ACLOCAL_M4)
44 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
45 configure.lineno config.status.lineno
46 mkinstalldirs = $(install_sh) -d
47 CONFIG_CLEAN_FILES =
48 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
49 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
50 PROGRAMS = $(bin_PROGRAMS)
51 am_ffmpeg2theora_OBJECTS = ffmpeg2theora-ffmpeg2theora.$(OBJEXT) \
52 ffmpeg2theora-theorautils.$(OBJEXT)
53 ffmpeg2theora_OBJECTS = $(am_ffmpeg2theora_OBJECTS)
54 ffmpeg2theora_LDADD = $(LDADD)
55 ffmpeg2theora_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
56 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(ffmpeg2theora_CFLAGS) \
57 $(CFLAGS) $(ffmpeg2theora_LDFLAGS) $(LDFLAGS) -o $@
58 DEFAULT_INCLUDES = -I.@am__isrc@
59 depcomp = $(SHELL) $(top_srcdir)/depcomp
60 am__depfiles_maybe = depfiles
61 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
62 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
63 LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
64 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
65 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
66 CCLD = $(CC)
67 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
68 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
69 $(LDFLAGS) -o $@
70 SOURCES = $(ffmpeg2theora_SOURCES)
71 DIST_SOURCES = $(ffmpeg2theora_SOURCES)
72 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
73 html-recursive info-recursive install-data-recursive \
74 install-dvi-recursive install-exec-recursive \
75 install-html-recursive install-info-recursive \
76 install-pdf-recursive install-ps-recursive install-recursive \
77 installcheck-recursive installdirs-recursive pdf-recursive \
78 ps-recursive uninstall-recursive
79 man1dir = $(mandir)/man1
80 NROFF = nroff
81 MANS = $(man_MANS)
82 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
83 distclean-recursive maintainer-clean-recursive
84 ETAGS = etags
85 CTAGS = ctags
86 DIST_SUBDIRS = $(SUBDIRS)
87 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
88 distdir = $(PACKAGE)-$(VERSION)
89 top_distdir = $(distdir)
90 am__remove_distdir = \
91 { test ! -d $(distdir) \
92 || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
93 && rm -fr $(distdir); }; }
94 GZIP_ENV = --best
95 DIST_ARCHIVES = $(distdir).tar.bz2
96 distuninstallcheck_listfiles = find . -type f -print
97 distcleancheck_listfiles = find . -type f -print
98 ACLOCAL = @ACLOCAL@
99 AMTAR = @AMTAR@
100 AR = @AR@
101 AUTOCONF = @AUTOCONF@
102 AUTOHEADER = @AUTOHEADER@
103 AUTOMAKE = @AUTOMAKE@
104 AWK = @AWK@
105 CC = @CC@
106 CCDEPMODE = @CCDEPMODE@
107 CFLAGS = @CFLAGS@
108 CPP = @CPP@
109 CPPFLAGS = @CPPFLAGS@
110 CXX = @CXX@
111 CXXCPP = @CXXCPP@
112 CXXDEPMODE = @CXXDEPMODE@
113 CXXFLAGS = @CXXFLAGS@
114 CYGPATH_W = @CYGPATH_W@
115 DEFS = @DEFS@
116 DEPDIR = @DEPDIR@
117 DSYMUTIL = @DSYMUTIL@
118 ECHO = @ECHO@
119 ECHO_C = @ECHO_C@
120 ECHO_N = @ECHO_N@
121 ECHO_T = @ECHO_T@
122 EGREP = @EGREP@
123 EXEEXT = @EXEEXT@
124 F77 = @F77@
125 FFLAGS = @FFLAGS@
126 FFMPEG_CFLAGS = @FFMPEG_CFLAGS@
127 FFMPEG_LIBS = @FFMPEG_LIBS@
128 GREP = @GREP@
129 INSTALL = @INSTALL@
130 INSTALL_DATA = @INSTALL_DATA@
131 INSTALL_PROGRAM = @INSTALL_PROGRAM@
132 INSTALL_SCRIPT = @INSTALL_SCRIPT@
133 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
134 KATE_CFLAGS = @KATE_CFLAGS@
135 KATE_LIBS = @KATE_LIBS@
136 LDFLAGS = @LDFLAGS@
137 LIBOBJS = @LIBOBJS@
138 LIBS = @LIBS@
139 LIBTOOL = @LIBTOOL@
140 LN_S = @LN_S@
141 LTLIBOBJS = @LTLIBOBJS@
142 MAKEINFO = @MAKEINFO@
143 MKDIR_P = @MKDIR_P@
144 NMEDIT = @NMEDIT@
145 OBJEXT = @OBJEXT@
146 PACKAGE = @PACKAGE@
147 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
148 PACKAGE_NAME = @PACKAGE_NAME@
149 PACKAGE_STRING = @PACKAGE_STRING@
150 PACKAGE_TARNAME = @PACKAGE_TARNAME@
151 PACKAGE_VERSION = @PACKAGE_VERSION@
152 PATH_SEPARATOR = @PATH_SEPARATOR@
153 PKG_CONFIG = @PKG_CONFIG@
154 RANLIB = @RANLIB@
155 SED = @SED@
156 SET_MAKE = @SET_MAKE@
157 SHELL = @SHELL@
158 STRIP = @STRIP@
159 VERSION = @VERSION@
160 XIPH_CFLAGS = @XIPH_CFLAGS@
161 XIPH_LIBS = @XIPH_LIBS@
162 abs_builddir = @abs_builddir@
163 abs_srcdir = @abs_srcdir@
164 abs_top_builddir = @abs_top_builddir@
165 abs_top_srcdir = @abs_top_srcdir@
166 ac_ct_CC = @ac_ct_CC@
167 ac_ct_CXX = @ac_ct_CXX@
168 ac_ct_F77 = @ac_ct_F77@
169 am__include = @am__include@
170 am__leading_dot = @am__leading_dot@
171 am__quote = @am__quote@
172 am__tar = @am__tar@
173 am__untar = @am__untar@
174 bindir = @bindir@
175 build = @build@
176 build_alias = @build_alias@
177 build_cpu = @build_cpu@
178 build_os = @build_os@
179 build_vendor = @build_vendor@
180 builddir = @builddir@
181 datadir = @datadir@
182 datarootdir = @datarootdir@
183 docdir = @docdir@
184 dvidir = @dvidir@
185 exec_prefix = @exec_prefix@
186 host = @host@
187 host_alias = @host_alias@
188 host_cpu = @host_cpu@
189 host_os = @host_os@
190 host_vendor = @host_vendor@
191 htmldir = @htmldir@
192 includedir = @includedir@
193 infodir = @infodir@
194 install_sh = @install_sh@
195 libdir = @libdir@
196 libexecdir = @libexecdir@
197 localedir = @localedir@
198 localstatedir = @localstatedir@
199 mandir = @mandir@
200 mkdir_p = @mkdir_p@
201 oldincludedir = @oldincludedir@
202 pdfdir = @pdfdir@
203 prefix = @prefix@
204 program_transform_name = @program_transform_name@
205 psdir = @psdir@
206 sbindir = @sbindir@
207 sharedstatedir = @sharedstatedir@
208 srcdir = @srcdir@
209 sysconfdir = @sysconfdir@
210 target_alias = @target_alias@
211 top_builddir = @top_builddir@
212 top_srcdir = @top_srcdir@
213 AUTOMAKE_OPTIONS = 1.8 dist-bzip2 no-dist-gzip
214 SUBDIRS = kino_export
215 EXTRA_DIST = Makefile.mingw32 theorautils.h get_ffmpeg_svn.sh ffmpeg2theora.1 \
216 get_libkate.sh subtitles.txt
217
218 ffmpeg2theora_SOURCES = ffmpeg2theora.c theorautils.c
219 ffmpeg2theora_LDFLAGS = -L$(prefix)/lib @XIPH_LIBS@ @KATE_LIBS@ @FFMPEG_LIBS@
220 ffmpeg2theora_CFLAGS = @XIPH_CFLAGS@ @KATE_CFLAGS@ @FFMPEG_CFLAGS@
221 man_MANS = ffmpeg2theora.1
222 all: all-recursive
223
224 .SUFFIXES:
225 .SUFFIXES: .c .lo .o .obj
226 am--refresh:
227 @:
228 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
229 @for dep in $?; do \
230 case '$(am__configure_deps)' in \
231 *$$dep*) \
232 echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
233 cd $(srcdir) && $(AUTOMAKE) --gnu \
234 && exit 0; \
235 exit 1;; \
236 esac; \
237 done; \
238 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
239 cd $(top_srcdir) && \
240 $(AUTOMAKE) --gnu Makefile
241 .PRECIOUS: Makefile
242 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
243 @case '$?' in \
244 *config.status*) \
245 echo ' $(SHELL) ./config.status'; \
246 $(SHELL) ./config.status;; \
247 *) \
248 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
249 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
250 esac;
251
252 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
253 $(SHELL) ./config.status --recheck
254
255 $(top_srcdir)/configure: $(am__configure_deps)
256 cd $(srcdir) && $(AUTOCONF)
257 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
258 cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
259 install-binPROGRAMS: $(bin_PROGRAMS)
260 @$(NORMAL_INSTALL)
261 test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
262 @list='$(bin_PROGRAMS)'; for p in $$list; do \
263 p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
264 if test -f $$p \
265 || test -f $$p1 \
266 ; then \
267 f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
268 echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
269 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
270 else :; fi; \
271 done
272
273 uninstall-binPROGRAMS:
274 @$(NORMAL_UNINSTALL)
275 @list='$(bin_PROGRAMS)'; for p in $$list; do \
276 f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
277 echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
278 rm -f "$(DESTDIR)$(bindir)/$$f"; \
279 done
280
281 clean-binPROGRAMS:
282 @list='$(bin_PROGRAMS)'; for p in $$list; do \
283 f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
284 echo " rm -f $$p $$f"; \
285 rm -f $$p $$f ; \
286 done
287 ffmpeg2theora$(EXEEXT): $(ffmpeg2theora_OBJECTS) $(ffmpeg2theora_DEPENDENCIES)
288 @rm -f ffmpeg2theora$(EXEEXT)
289 $(ffmpeg2theora_LINK) $(ffmpeg2theora_OBJECTS) $(ffmpeg2theora_LDADD) $(LIBS)
290
291 mostlyclean-compile:
292 -rm -f *.$(OBJEXT)
293
294 distclean-compile:
295 -rm -f *.tab.c
296
297 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ffmpeg2theora-ffmpeg2theora.Po@am__quote@
298 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ffmpeg2theora-theorautils.Po@am__quote@
299
300 .c.o:
301 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
302 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
303 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
304 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
305 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
306
307 .c.obj:
308 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
309 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
310 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
311 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
312 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
313
314 .c.lo:
315 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
316 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
317 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
318 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
319 @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
320
321 ffmpeg2theora-ffmpeg2theora.o: ffmpeg2theora.c
322 @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ffmpeg2theora_CFLAGS) $(CFLAGS) -MT ffmpeg2theora-ffmpeg2theora.o -MD -MP -MF $(DEPDIR)/ffmpeg2theora-ffmpeg2theora.Tpo -c -o ffmpeg2theora-ffmpeg2theora.o `test -f 'ffmpeg2theora.c' || echo '$(srcdir)/'`ffmpeg2theora.c
323 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ffmpeg2theora-ffmpeg2theora.Tpo $(DEPDIR)/ffmpeg2theora-ffmpeg2theora.Po
324 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ffmpeg2theora.c' object='ffmpeg2theora-ffmpeg2theora.o' libtool=no @AMDEPBACKSLASH@
325 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
326 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ffmpeg2theora_CFLAGS) $(CFLAGS) -c -o ffmpeg2theora-ffmpeg2theora.o `test -f 'ffmpeg2theora.c' || echo '$(srcdir)/'`ffmpeg2theora.c
327
328 ffmpeg2theora-ffmpeg2theora.obj: ffmpeg2theora.c
329 @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ffmpeg2theora_CFLAGS) $(CFLAGS) -MT ffmpeg2theora-ffmpeg2theora.obj -MD -MP -MF $(DEPDIR)/ffmpeg2theora-ffmpeg2theora.Tpo -c -o ffmpeg2theora-ffmpeg2theora.obj `if test -f 'ffmpeg2theora.c'; then $(CYGPATH_W) 'ffmpeg2theora.c'; else $(CYGPATH_W) '$(srcdir)/ffmpeg2theora.c'; fi`
330 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ffmpeg2theora-ffmpeg2theora.Tpo $(DEPDIR)/ffmpeg2theora-ffmpeg2theora.Po
331 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ffmpeg2theora.c' object='ffmpeg2theora-ffmpeg2theora.obj' libtool=no @AMDEPBACKSLASH@
332 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
333 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ffmpeg2theora_CFLAGS) $(CFLAGS) -c -o ffmpeg2theora-ffmpeg2theora.obj `if test -f 'ffmpeg2theora.c'; then $(CYGPATH_W) 'ffmpeg2theora.c'; else $(CYGPATH_W) '$(srcdir)/ffmpeg2theora.c'; fi`
334
335 ffmpeg2theora-theorautils.o: theorautils.c
336 @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ffmpeg2theora_CFLAGS) $(CFLAGS) -MT ffmpeg2theora-theorautils.o -MD -MP -MF $(DEPDIR)/ffmpeg2theora-theorautils.Tpo -c -o ffmpeg2theora-theorautils.o `test -f 'theorautils.c' || echo '$(srcdir)/'`theorautils.c
337 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ffmpeg2theora-theorautils.Tpo $(DEPDIR)/ffmpeg2theora-theorautils.Po
338 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='theorautils.c' object='ffmpeg2theora-theorautils.o' libtool=no @AMDEPBACKSLASH@
339 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
340 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ffmpeg2theora_CFLAGS) $(CFLAGS) -c -o ffmpeg2theora-theorautils.o `test -f 'theorautils.c' || echo '$(srcdir)/'`theorautils.c
341
342 ffmpeg2theora-theorautils.obj: theorautils.c
343 @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ffmpeg2theora_CFLAGS) $(CFLAGS) -MT ffmpeg2theora-theorautils.obj -MD -MP -MF $(DEPDIR)/ffmpeg2theora-theorautils.Tpo -c -o ffmpeg2theora-theorautils.obj `if test -f 'theorautils.c'; then $(CYGPATH_W) 'theorautils.c'; else $(CYGPATH_W) '$(srcdir)/theorautils.c'; fi`
344 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/ffmpeg2theora-theorautils.Tpo $(DEPDIR)/ffmpeg2theora-theorautils.Po
345 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='theorautils.c' object='ffmpeg2theora-theorautils.obj' libtool=no @AMDEPBACKSLASH@
346 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
347 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ffmpeg2theora_CFLAGS) $(CFLAGS) -c -o ffmpeg2theora-theorautils.obj `if test -f 'theorautils.c'; then $(CYGPATH_W) 'theorautils.c'; else $(CYGPATH_W) '$(srcdir)/theorautils.c'; fi`
348
349 mostlyclean-libtool:
350 -rm -f *.lo
351
352 clean-libtool:
353 -rm -rf .libs _libs
354
355 distclean-libtool:
356 -rm -f libtool
357 install-man1: $(man1_MANS) $(man_MANS)
358 @$(NORMAL_INSTALL)
359 test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
360 @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
361 l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
362 for i in $$l2; do \
363 case "$$i" in \
364 *.1*) list="$$list $$i" ;; \
365 esac; \
366 done; \
367 for i in $$list; do \
368 if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
369 else file=$$i; fi; \
370 ext=`echo $$i | sed -e 's/^.*\\.//'`; \
371 case "$$ext" in \
372 1*) ;; \
373 *) ext='1' ;; \
374 esac; \
375 inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
376 inst=`echo $$inst | sed -e 's/^.*\///'`; \
377 inst=`echo $$inst | sed '$(transform)'`.$$ext; \
378 echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
379 $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
380 done
381 uninstall-man1:
382 @$(NORMAL_UNINSTALL)
383 @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
384 l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
385 for i in $$l2; do \
386 case "$$i" in \
387 *.1*) list="$$list $$i" ;; \
388 esac; \
389 done; \
390 for i in $$list; do \
391 ext=`echo $$i | sed -e 's/^.*\\.//'`; \
392 case "$$ext" in \
393 1*) ;; \
394 *) ext='1' ;; \
395 esac; \
396 inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
397 inst=`echo $$inst | sed -e 's/^.*\///'`; \
398 inst=`echo $$inst | sed '$(transform)'`.$$ext; \
399 echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
400 rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
401 done
402
403 # This directory's subdirectories are mostly independent; you can cd
404 # into them and run `make' without going through this Makefile.
405 # To change the values of `make' variables: instead of editing Makefiles,
406 # (1) if the variable is set in `config.status', edit `config.status'
407 # (which will cause the Makefiles to be regenerated when you run `make');
408 # (2) otherwise, pass the desired values on the `make' command line.
409 $(RECURSIVE_TARGETS):
410 @failcom='exit 1'; \
411 for f in x $$MAKEFLAGS; do \
412 case $$f in \
413 *=* | --[!k]*);; \
414 *k*) failcom='fail=yes';; \
415 esac; \
416 done; \
417 dot_seen=no; \
418 target=`echo $@ | sed s/-recursive//`; \
419 list='$(SUBDIRS)'; for subdir in $$list; do \
420 echo "Making $$target in $$subdir"; \
421 if test "$$subdir" = "."; then \
422 dot_seen=yes; \
423 local_target="$$target-am"; \
424 else \
425 local_target="$$target"; \
426 fi; \
427 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
428 || eval $$failcom; \
429 done; \
430 if test "$$dot_seen" = "no"; then \
431 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
432 fi; test -z "$$fail"
433
434 $(RECURSIVE_CLEAN_TARGETS):
435 @failcom='exit 1'; \
436 for f in x $$MAKEFLAGS; do \
437 case $$f in \
438 *=* | --[!k]*);; \
439 *k*) failcom='fail=yes';; \
440 esac; \
441 done; \
442 dot_seen=no; \
443 case "$@" in \
444 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
445 *) list='$(SUBDIRS)' ;; \
446 esac; \
447 rev=''; for subdir in $$list; do \
448 if test "$$subdir" = "."; then :; else \
449 rev="$$subdir $$rev"; \
450 fi; \
451 done; \
452 rev="$$rev ."; \
453 target=`echo $@ | sed s/-recursive//`; \
454 for subdir in $$rev; do \
455 echo "Making $$target in $$subdir"; \
456 if test "$$subdir" = "."; then \
457 local_target="$$target-am"; \
458 else \
459 local_target="$$target"; \
460 fi; \
461 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
462 || eval $$failcom; \
463 done && test -z "$$fail"
464 tags-recursive:
465 list='$(SUBDIRS)'; for subdir in $$list; do \
466 test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
467 done
468 ctags-recursive:
469 list='$(SUBDIRS)'; for subdir in $$list; do \
470 test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
471 done
472
473 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
474 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
475 unique=`for i in $$list; do \
476 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
477 done | \
478 $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
479 END { if (nonempty) { for (i in files) print i; }; }'`; \
480 mkid -fID $$unique
481 tags: TAGS
482
483 TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
484 $(TAGS_FILES) $(LISP)
485 tags=; \
486 here=`pwd`; \
487 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
488 include_option=--etags-include; \
489 empty_fix=.; \
490 else \
491 include_option=--include; \
492 empty_fix=; \
493 fi; \
494 list='$(SUBDIRS)'; for subdir in $$list; do \
495 if test "$$subdir" = .; then :; else \
496 test ! -f $$subdir/TAGS || \
497 tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
498 fi; \
499 done; \
500 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
501 unique=`for i in $$list; do \
502 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
503 done | \
504 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
505 END { if (nonempty) { for (i in files) print i; }; }'`; \
506 if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
507 test -n "$$unique" || unique=$$empty_fix; \
508 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
509 $$tags $$unique; \
510 fi
511 ctags: CTAGS
512 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
513 $(TAGS_FILES) $(LISP)
514 tags=; \
515 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
516 unique=`for i in $$list; do \
517 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
518 done | \
519 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
520 END { if (nonempty) { for (i in files) print i; }; }'`; \
521 test -z "$(CTAGS_ARGS)$$tags$$unique" \
522 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
523 $$tags $$unique
524
525 GTAGS:
526 here=`$(am__cd) $(top_builddir) && pwd` \
527 && cd $(top_srcdir) \
528 && gtags -i $(GTAGS_ARGS) $$here
529
530 distclean-tags:
531 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
532
533 distdir: $(DISTFILES)
534 $(am__remove_distdir)
535 test -d $(distdir) || mkdir $(distdir)
536 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
537 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
538 list='$(DISTFILES)'; \
539 dist_files=`for file in $$list; do echo $$file; done | \
540 sed -e "s|^$$srcdirstrip/||;t" \
541 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
542 case $$dist_files in \
543 */*) $(MKDIR_P) `echo "$$dist_files" | \
544 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
545 sort -u` ;; \
546 esac; \
547 for file in $$dist_files; do \
548 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
549 if test -d $$d/$$file; then \
550 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
551 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
552 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
553 fi; \
554 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
555 else \
556 test -f $(distdir)/$$file \
557 || cp -p $$d/$$file $(distdir)/$$file \
558 || exit 1; \
559 fi; \
560 done
561 list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
562 if test "$$subdir" = .; then :; else \
563 test -d "$(distdir)/$$subdir" \
564 || $(MKDIR_P) "$(distdir)/$$subdir" \
565 || exit 1; \
566 distdir=`$(am__cd) $(distdir) && pwd`; \
567 top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
568 (cd $$subdir && \
569 $(MAKE) $(AM_MAKEFLAGS) \
570 top_distdir="$$top_distdir" \
571 distdir="$$distdir/$$subdir" \
572 am__remove_distdir=: \
573 am__skip_length_check=: \
574 distdir) \
575 || exit 1; \
576 fi; \
577 done
578 -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
579 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
580 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
581 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
582 || chmod -R a+r $(distdir)
583 dist-gzip: distdir
584 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
585 $(am__remove_distdir)
586 dist-bzip2: distdir
587 tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
588 $(am__remove_distdir)
589
590 dist-lzma: distdir
591 tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
592 $(am__remove_distdir)
593
594 dist-tarZ: distdir
595 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
596 $(am__remove_distdir)
597
598 dist-shar: distdir
599 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
600 $(am__remove_distdir)
601
602 dist-zip: distdir
603 -rm -f $(distdir).zip
604 zip -rq $(distdir).zip $(distdir)
605 $(am__remove_distdir)
606
607 dist dist-all: distdir
608 tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
609 $(am__remove_distdir)
610
611 # This target untars the dist file and tries a VPATH configuration. Then
612 # it guarantees that the distribution is self-contained by making another
613 # tarfile.
614 distcheck: dist
615 case '$(DIST_ARCHIVES)' in \
616 *.tar.gz*) \
617 GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
618 *.tar.bz2*) \
619 bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
620 *.tar.lzma*) \
621 unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
622 *.tar.Z*) \
623 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
624 *.shar.gz*) \
625 GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
626 *.zip*) \
627 unzip $(distdir).zip ;;\
628 esac
629 chmod -R a-w $(distdir); chmod a+w $(distdir)
630 mkdir $(distdir)/_build
631 mkdir $(distdir)/_inst
632 chmod a-w $(distdir)
633 dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
634 && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
635 && cd $(distdir)/_build \
636 && ../configure --srcdir=.. --prefix="$$dc_install_base" \
637 $(DISTCHECK_CONFIGURE_FLAGS) \
638 && $(MAKE) $(AM_MAKEFLAGS) \
639 && $(MAKE) $(AM_MAKEFLAGS) dvi \
640 && $(MAKE) $(AM_MAKEFLAGS) check \
641 && $(MAKE) $(AM_MAKEFLAGS) install \
642 && $(MAKE) $(AM_MAKEFLAGS) installcheck \
643 && $(MAKE) $(AM_MAKEFLAGS) uninstall \
644 && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
645 distuninstallcheck \
646 && chmod -R a-w "$$dc_install_base" \
647 && ({ \
648 (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
649 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
650 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
651 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
652 distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
653 } || { rm -rf "$$dc_destdir"; exit 1; }) \
654 && rm -rf "$$dc_destdir" \
655 && $(MAKE) $(AM_MAKEFLAGS) dist \
656 && rm -rf $(DIST_ARCHIVES) \
657 && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
658 $(am__remove_distdir)
659 @(echo "$(distdir) archives ready for distribution: "; \
660 list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
661 sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
662 distuninstallcheck:
663 @cd $(distuninstallcheck_dir) \
664 && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
665 || { echo "ERROR: files left after uninstall:" ; \
666 if test -n "$(DESTDIR)"; then \
667 echo " (check DESTDIR support)"; \
668 fi ; \
669 $(distuninstallcheck_listfiles) ; \
670 exit 1; } >&2
671 distcleancheck: distclean
672 @if test '$(srcdir)' = . ; then \
673 echo "ERROR: distcleancheck can only run from a VPATH build" ; \
674 exit 1 ; \
675 fi
676 @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
677 || { echo "ERROR: files left in build directory after distclean:" ; \
678 $(distcleancheck_listfiles) ; \
679 exit 1; } >&2
680 check-am: all-am
681 check: check-recursive
682 all-am: Makefile $(PROGRAMS) $(MANS)
683 installdirs: installdirs-recursive
684 installdirs-am:
685 for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
686 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
687 done
688 install: install-recursive
689 install-exec: install-exec-recursive
690 install-data: install-data-recursive
691 uninstall: uninstall-recursive
692
693 install-am: all-am
694 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
695
696 installcheck: installcheck-recursive
697 install-strip:
698 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
699 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
700 `test -z '$(STRIP)' || \
701 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
702 mostlyclean-generic:
703
704 clean-generic:
705
706 distclean-generic:
707 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
708
709 maintainer-clean-generic:
710 @echo "This command is intended for maintainers to use"
711 @echo "it deletes files that may require special tools to rebuild."
712 clean: clean-recursive
713
714 clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
715
716 distclean: distclean-recursive
717 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
718 -rm -rf ./$(DEPDIR)
719 -rm -f Makefile
720 distclean-am: clean-am distclean-compile distclean-generic \
721 distclean-libtool distclean-tags
722
723 dvi: dvi-recursive
724
725 dvi-am:
726
727 html: html-recursive
728
729 info: info-recursive
730
731 info-am:
732
733 install-data-am: install-man
734
735 install-dvi: install-dvi-recursive
736
737 install-exec-am: install-binPROGRAMS
738
739 install-html: install-html-recursive
740
741 install-info: install-info-recursive
742
743 install-man: install-man1
744
745 install-pdf: install-pdf-recursive
746
747 install-ps: install-ps-recursive
748
749 installcheck-am:
750
751 maintainer-clean: maintainer-clean-recursive
752 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
753 -rm -rf $(top_srcdir)/autom4te.cache
754 -rm -rf ./$(DEPDIR)
755 -rm -f Makefile
756 maintainer-clean-am: distclean-am maintainer-clean-generic
757
758 mostlyclean: mostlyclean-recursive
759
760 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
761 mostlyclean-libtool
762
763 pdf: pdf-recursive
764
765 pdf-am:
766
767 ps: ps-recursive
768
769 ps-am:
770
771 uninstall-am: uninstall-binPROGRAMS uninstall-man
772
773 uninstall-man: uninstall-man1
774
775 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
776 install-strip
777
778 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
779 all all-am am--refresh check check-am clean clean-binPROGRAMS \
780 clean-generic clean-libtool ctags ctags-recursive dist \
781 dist-all dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ \
782 dist-zip distcheck distclean distclean-compile \
783 distclean-generic distclean-libtool distclean-tags \
784 distcleancheck distdir distuninstallcheck dvi dvi-am html \
785 html-am info info-am install install-am install-binPROGRAMS \
786 install-data install-data-am install-dvi install-dvi-am \
787 install-exec install-exec-am install-html install-html-am \
788 install-info install-info-am install-man install-man1 \
789 install-pdf install-pdf-am install-ps install-ps-am \
790 install-strip installcheck installcheck-am installdirs \
791 installdirs-am maintainer-clean maintainer-clean-generic \
792 mostlyclean mostlyclean-compile mostlyclean-generic \
793 mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
794 uninstall uninstall-am uninstall-binPROGRAMS uninstall-man \
795 uninstall-man1
796
797 # Tell versions [3.59,3.63) of GNU make to not export all variables.
798 # Otherwise a system limit (for SysV at least) may be exceeded.
799 .NOEXPORT:
+0
-34
Makefile.mingw32 less more
0 #Makefile for ffmpeg2theora/mingw32
1 #
2 #
3
4 CC=i586-mingw32msvc-gcc
5 CFLAGS=-O3 -s -D_FILE_OFFSET_BITS=64
6
7 MINGW32LIBS=/usr/local/win32/build/lib
8 FFMPEG=/usr/local/win32/src/ffmpeg
9 MINGW32INCLUDE=-I/usr/local/win32/build/include
10 #LINKFLAGS= -static -ltheora -lvorbis -lvorbisenc -lz -lm $(MINGW32LIBS)/avformat.dll $(MINGW32LIBS)/avcodec.dll -static
11 LINKFLAGS= -static $(MINGW32LIBS)/libtheora.a $(FFMPEG)/libavformat/avformat.dll $(FFMPEG)/libavcodec/libavcodec.a $(MINGW32LIBS)/libvorbis.a $(MINGW32LIBS)/libvorbisenc.a $(MINGW32LIBS)/libogg.a -lz -lm
12
13 BIN=ffmpeg2theora.exe
14
15
16 all: $(BIN)
17
18 theorautils.o:
19 $(CC) $(CFLAGS) $(INCLUDE) $(MINGW32INCLUDE) $(MINGW32INCLUDE)/ffmpeg \
20 -c -o theorautils.o theorautils.c
21
22 ffmpeg2theora.o:
23 $(CC) $(CFLAGS) $(INCLUDE) $(MINGW32INCLUDE) $(MINGW32INCLUDE)/ffmpeg \
24 -c -o ffmpeg2theora.o ffmpeg2theora.c
25
26 $(BIN): ffmpeg2theora.o theorautils.o
27 $(CC) $(CFLAGS) -o $(BIN) ffmpeg2theora.o theorautils.o \
28 $(LINKFLAGS) -L$(MINGW32LIBS)
29 upx $(BIN)
30
31 clean:
32 rm -f $(BIN)
33 rm -f *.o core *.core
+0
-0
NEWS less more
(Empty file)
44 the binary. the idea is to provide ffmpeg2theora as a binary
55 along sites like v2v.cc to enable as many people as possible
66 to encode video clips with the same settings.
7
87
98 usage right now:
109 ./ffmpeg2theora clip.avi
0 # SCons build specification
1 from glob import glob
2 import os
3
4 import SCons
5
6
7 pkg_version="0.24"
8 pkg_name="ffmpeg2theora"
9
10 scons_version=(0,97,0)
11 #this is needed to make scons -h work, so not checking for it right now
12 #(i.e. ubuntu hardy only ships with 0.97..)
13 #scons_version=(0,98,0)
14
15 try:
16 EnsureSConsVersion(*scons_version)
17 except TypeError:
18 print 'SCons %d.%d.%d or greater is required, but you have an older version' % scons_version
19 Exit(2)
20
21 opts = Options()
22 opts.AddOptions(
23 BoolOption('static', 'Set to 1 for static linking', 0),
24 BoolOption('debug', 'Set to 1 to enable debugging', 0),
25 ('prefix', 'install architecture-independent files in', '/usr/local'),
26 ('bindir', 'user executables', 'PREFIX/bin'),
27 ('mandir', 'man documentation', 'PREFIX/man'),
28 ('destdir', 'extra install time prefix', ''),
29 ('APPEND_CCFLAGS', 'Additional C/C++ compiler flags'),
30 ('APPEND_LINKFLAGS', 'Additional linker flags'),
31 BoolOption('crossmingw', 'Set to 1 for crosscompile with mingw', 0)
32 )
33 env = Environment(options = opts)
34 Help(opts.GenerateHelpText(env))
35
36 pkg_flags="--cflags --libs"
37 if env['static']:
38 pkg_flags+=" --static"
39 env.Append(LINKFLAGS=["-static"])
40
41 if env['crossmingw']:
42 env.Tool('crossmingw', toolpath = ['scons-tools'])
43
44 prefix = env['prefix']
45 if env['destdir']:
46 if prefix.startswith('/'): prefix = prefix[1:]
47 prefix = os.path.join(env['destdir'], prefix)
48 man_dir = env['mandir'].replace('PREFIX', prefix)
49 bin_dir = env['bindir'].replace('PREFIX', prefix)
50
51 env.Append(CPPPATH=['.'])
52 env.Append(CCFLAGS=[
53 '-DPACKAGE_VERSION=\\"%s\\"' % pkg_version,
54 '-DPACKAGE_STRING=\\"%s-%s\\"' % (pkg_name, pkg_version),
55 '-DPACKAGE=\\"%s\\"' % pkg_name,
56 '-D_FILE_OFFSET_BITS=64'
57 ])
58
59 env.Append(CCFLAGS = Split('$APPEND_CCFLAGS'))
60 env.Append(LINKFLAGS = Split('$APPEND_LINKFLAGS'))
61
62 if env['debug'] and env['CC'] == 'gcc':
63 env.Append(CCFLAGS=["-g", "-O2", "-Wall"])
64
65 if GetOption("help"):
66 Return()
67
68 def ParsePKGConfig(env, name):
69 if os.environ.get('PKG_CONFIG_PATH', ''):
70 action = 'PKG_CONFIG_PATH=%s pkg-config %s "%s"' % (os.environ['PKG_CONFIG_PATH'], pkg_flags, name)
71 else:
72 action = 'pkg-config %s "%s"' % (pkg_flags, name)
73 return env.ParseConfig(action)
74
75 def TryAction(action):
76 import os
77 ret = os.system(action)
78 if ret == 0:
79 return (1, '')
80 return (0, '')
81
82 def CheckPKGConfig(context, version):
83 context.Message( 'Checking for pkg-config... ' )
84 ret = TryAction('pkg-config --atleast-pkgconfig-version=%s' % version)[0]
85 context.Result( ret )
86 return ret
87
88 def CheckPKG(context, name):
89 context.Message( 'Checking for %s... ' % name )
90 if os.environ.get('PKG_CONFIG_PATH', ''):
91 action = 'PKG_CONFIG_PATH=%s pkg-config --exists "%s"' % (os.environ['PKG_CONFIG_PATH'], name)
92 else:
93 action = 'pkg-config --exists "%s"' % name
94 ret = TryAction(action)[0]
95 context.Result( ret )
96 return ret
97
98 conf = Configure(env, custom_tests = {
99 'CheckPKGConfig' : CheckPKGConfig,
100 'CheckPKG' : CheckPKG,
101 })
102
103 pkgconfig_version='0.15.0'
104 if not conf.CheckPKGConfig(pkgconfig_version):
105 print 'pkg-config >= %s not found.' % pkgconfig_version
106 Exit(1)
107
108 XIPH_LIBS="ogg >= 1.1 vorbis vorbisenc theora >= 1.0beta1"
109
110 if not conf.CheckPKG(XIPH_LIBS):
111 print 'some xiph libs are missing, ffmpeg2theora depends on %s' % XIPH_LIBS
112 Exit(1)
113 ParsePKGConfig(env, XIPH_LIBS)
114
115 FFMPEG_LIBS="libavcodec libavformat libavdevice libpostproc libswscale"
116 if os.path.exists("./ffmpeg"):
117 os.environ['PKG_CONFIG_PATH'] = "./ffmpeg/libavutil:./ffmpeg/libavformat:./ffmpeg/libavcodec:./ffmpeg/libavdevice:./ffmpeg/libswscale:./ffmpeg/libpostproc:" + os.environ.get('PKG_CONFIG_PATH', '')
118 if not conf.CheckPKG(FFMPEG_LIBS):
119 print """
120 Could not find %s.
121 You can install it via
122 sudo apt-get install %s
123 or update PKG_CONFIG_PATH to point to ffmpeg's source folder
124 or run ./get_ffmpeg_svn.sh (for more information see INSTALL)
125 """ %(FFMPEG_LIBS, " ".join(["%s-dev"%l for l in FFMPEG_LIBS.split()]))
126 Exit(1)
127 for lib in FFMPEG_LIBS.split():
128 ParsePKGConfig(env, lib)
129
130 if conf.CheckCHeader('libavformat/framehook.h'):
131 env.Append(CCFLAGS=[
132 '-DHAVE_FRAMEHOOK'
133 ])
134
135 KATE_LIBS="oggkate"
136 if os.path.exists("./libkate/misc/pkgconfig"):
137 os.environ['PKG_CONFIG_PATH'] = "./libkate/misc/pkgconfig:" + os.environ.get('PKG_CONFIG_PATH', '')
138 if os.path.exists("./libkate/pkg/pkgconfig"):
139 os.environ['PKG_CONFIG_PATH'] = "./libkate/pkg/pkgconfig:" + os.environ.get('PKG_CONFIG_PATH', '')
140 if conf.CheckPKG(KATE_LIBS):
141 ParsePKGConfig(env, KATE_LIBS)
142 env.Append(CCFLAGS=['-DHAVE_KATE', '-DHAVE_OGGKATE'])
143 else:
144 print """
145 Could not find libkate. Subtitles support will be disabled.
146 You can also run ./get_libkate.sh (for more information see INSTALL)
147 or update PKG_CONFIG_PATH to point to libkate's source folder
148 """
149 env = conf.Finish()
150
151 # ffmpeg2theora
152 ffmpeg2theora = env.Clone()
153 ffmpeg2theora_sources = glob('src/*.c')
154 ffmpeg2theora.Program('ffmpeg2theora', ffmpeg2theora_sources)
155
156 ffmpeg2theora.Install(bin_dir, 'ffmpeg2theora')
157 ffmpeg2theora.Install(man_dir + "/man1", 'ffmpeg2theora.1')
158 ffmpeg2theora.Alias('install', prefix)
159
00 - remove global variable info
11 - more commandline options
2 - think of adding noise reduction(best would be integration of denoise3d)
3 - allow frame size not multiple of 16.
42 - add option for pixel aspect ratio
+0
-7712
aclocal.m4 less more
0 # generated automatically by aclocal 1.10.1 -*- Autoconf -*-
1
2 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3 # 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
4 # This file is free software; the Free Software Foundation
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
7
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 # PARTICULAR PURPOSE.
12
13 m4_ifndef([AC_AUTOCONF_VERSION],
14 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
15 m4_if(AC_AUTOCONF_VERSION, [2.61],,
16 [m4_warning([this file was generated for autoconf 2.61.
17 You have another version of autoconf. It may work, but is not guaranteed to.
18 If you have problems, you may need to regenerate the build system entirely.
19 To do so, use the procedure documented by the package, typically `autoreconf'.])])
20
21 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
22
23 # serial 52 Debian 1.5.26-1ubuntu1 AC_PROG_LIBTOOL
24
25
26 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
27 # -----------------------------------------------------------
28 # If this macro is not defined by Autoconf, define it here.
29 m4_ifdef([AC_PROVIDE_IFELSE],
30 [],
31 [m4_define([AC_PROVIDE_IFELSE],
32 [m4_ifdef([AC_PROVIDE_$1],
33 [$2], [$3])])])
34
35
36 # AC_PROG_LIBTOOL
37 # ---------------
38 AC_DEFUN([AC_PROG_LIBTOOL],
39 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
40 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
41 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
42 AC_PROVIDE_IFELSE([AC_PROG_CXX],
43 [AC_LIBTOOL_CXX],
44 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
45 ])])
46 dnl And a similar setup for Fortran 77 support
47 AC_PROVIDE_IFELSE([AC_PROG_F77],
48 [AC_LIBTOOL_F77],
49 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
50 ])])
51
52 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
53 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
54 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
55 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
56 [AC_LIBTOOL_GCJ],
57 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
58 [AC_LIBTOOL_GCJ],
59 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
60 [AC_LIBTOOL_GCJ],
61 [ifdef([AC_PROG_GCJ],
62 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
63 ifdef([A][M_PROG_GCJ],
64 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
65 ifdef([LT_AC_PROG_GCJ],
66 [define([LT_AC_PROG_GCJ],
67 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
68 ])])# AC_PROG_LIBTOOL
69
70
71 # _AC_PROG_LIBTOOL
72 # ----------------
73 AC_DEFUN([_AC_PROG_LIBTOOL],
74 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
75 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
76 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
77 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
78
79 # This can be used to rebuild libtool when needed
80 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
81
82 # Always use our own libtool.
83 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
84 AC_SUBST(LIBTOOL)dnl
85
86 # Prevent multiple expansion
87 define([AC_PROG_LIBTOOL], [])
88 ])# _AC_PROG_LIBTOOL
89
90
91 # AC_LIBTOOL_SETUP
92 # ----------------
93 AC_DEFUN([AC_LIBTOOL_SETUP],
94 [AC_PREREQ(2.50)dnl
95 AC_REQUIRE([AC_ENABLE_SHARED])dnl
96 AC_REQUIRE([AC_ENABLE_STATIC])dnl
97 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
98 AC_REQUIRE([AC_CANONICAL_HOST])dnl
99 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
100 AC_REQUIRE([AC_PROG_CC])dnl
101 AC_REQUIRE([AC_PROG_LD])dnl
102 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
103 AC_REQUIRE([AC_PROG_NM])dnl
104
105 AC_REQUIRE([AC_PROG_LN_S])dnl
106 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
107 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
108 AC_REQUIRE([AC_OBJEXT])dnl
109 AC_REQUIRE([AC_EXEEXT])dnl
110 dnl
111 AC_LIBTOOL_SYS_MAX_CMD_LEN
112 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
113 AC_LIBTOOL_OBJDIR
114
115 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
116 _LT_AC_PROG_ECHO_BACKSLASH
117
118 case $host_os in
119 aix3*)
120 # AIX sometimes has problems with the GCC collect2 program. For some
121 # reason, if we set the COLLECT_NAMES environment variable, the problems
122 # vanish in a puff of smoke.
123 if test "X${COLLECT_NAMES+set}" != Xset; then
124 COLLECT_NAMES=
125 export COLLECT_NAMES
126 fi
127 ;;
128 esac
129
130 # Sed substitution that helps us do robust quoting. It backslashifies
131 # metacharacters that are still active within double-quoted strings.
132 Xsed='sed -e 1s/^X//'
133 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
134
135 # Same as above, but do not quote variable references.
136 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
137
138 # Sed substitution to delay expansion of an escaped shell variable in a
139 # double_quote_subst'ed string.
140 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
141
142 # Sed substitution to avoid accidental globbing in evaled expressions
143 no_glob_subst='s/\*/\\\*/g'
144
145 # Constants:
146 rm="rm -f"
147
148 # Global variables:
149 default_ofile=libtool
150 can_build_shared=yes
151
152 # All known linkers require a `.a' archive for static linking (except MSVC,
153 # which needs '.lib').
154 libext=a
155 ltmain="$ac_aux_dir/ltmain.sh"
156 ofile="$default_ofile"
157 with_gnu_ld="$lt_cv_prog_gnu_ld"
158
159 AC_CHECK_TOOL(AR, ar, false)
160 AC_CHECK_TOOL(RANLIB, ranlib, :)
161 AC_CHECK_TOOL(STRIP, strip, :)
162
163 old_CC="$CC"
164 old_CFLAGS="$CFLAGS"
165
166 # Set sane defaults for various variables
167 test -z "$AR" && AR=ar
168 test -z "$AR_FLAGS" && AR_FLAGS=cru
169 test -z "$AS" && AS=as
170 test -z "$CC" && CC=cc
171 test -z "$LTCC" && LTCC=$CC
172 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
173 test -z "$DLLTOOL" && DLLTOOL=dlltool
174 test -z "$LD" && LD=ld
175 test -z "$LN_S" && LN_S="ln -s"
176 test -z "$MAGIC_CMD" && MAGIC_CMD=file
177 test -z "$NM" && NM=nm
178 test -z "$SED" && SED=sed
179 test -z "$OBJDUMP" && OBJDUMP=objdump
180 test -z "$RANLIB" && RANLIB=:
181 test -z "$STRIP" && STRIP=:
182 test -z "$ac_objext" && ac_objext=o
183
184 # Determine commands to create old-style static archives.
185 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
186 old_postinstall_cmds='chmod 644 $oldlib'
187 old_postuninstall_cmds=
188
189 if test -n "$RANLIB"; then
190 case $host_os in
191 openbsd*)
192 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
193 ;;
194 *)
195 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
196 ;;
197 esac
198 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
199 fi
200
201 _LT_CC_BASENAME([$compiler])
202
203 # Only perform the check for file, if the check method requires it
204 case $deplibs_check_method in
205 file_magic*)
206 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
207 AC_PATH_MAGIC
208 fi
209 ;;
210 esac
211
212 _LT_REQUIRED_DARWIN_CHECKS
213
214 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
215 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
216 enable_win32_dll=yes, enable_win32_dll=no)
217
218 AC_ARG_ENABLE([libtool-lock],
219 [AC_HELP_STRING([--disable-libtool-lock],
220 [avoid locking (might break parallel builds)])])
221 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
222
223 AC_ARG_WITH([pic],
224 [AC_HELP_STRING([--with-pic],
225 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
226 [pic_mode="$withval"],
227 [pic_mode=default])
228 test -z "$pic_mode" && pic_mode=default
229
230 # Use C for the default configuration in the libtool script
231 tagname=
232 AC_LIBTOOL_LANG_C_CONFIG
233 _LT_AC_TAGCONFIG
234 ])# AC_LIBTOOL_SETUP
235
236
237 # _LT_AC_SYS_COMPILER
238 # -------------------
239 AC_DEFUN([_LT_AC_SYS_COMPILER],
240 [AC_REQUIRE([AC_PROG_CC])dnl
241
242 # If no C compiler was specified, use CC.
243 LTCC=${LTCC-"$CC"}
244
245 # If no C compiler flags were specified, use CFLAGS.
246 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
247
248 # Allow CC to be a program name with arguments.
249 compiler=$CC
250 ])# _LT_AC_SYS_COMPILER
251
252
253 # _LT_CC_BASENAME(CC)
254 # -------------------
255 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
256 AC_DEFUN([_LT_CC_BASENAME],
257 [for cc_temp in $1""; do
258 case $cc_temp in
259 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
260 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
261 \-*) ;;
262 *) break;;
263 esac
264 done
265 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
266 ])
267
268
269 # _LT_COMPILER_BOILERPLATE
270 # ------------------------
271 # Check for compiler boilerplate output or warnings with
272 # the simple compiler test code.
273 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
274 [AC_REQUIRE([LT_AC_PROG_SED])dnl
275 ac_outfile=conftest.$ac_objext
276 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
277 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
278 _lt_compiler_boilerplate=`cat conftest.err`
279 $rm conftest*
280 ])# _LT_COMPILER_BOILERPLATE
281
282
283 # _LT_LINKER_BOILERPLATE
284 # ----------------------
285 # Check for linker boilerplate output or warnings with
286 # the simple link test code.
287 AC_DEFUN([_LT_LINKER_BOILERPLATE],
288 [AC_REQUIRE([LT_AC_PROG_SED])dnl
289 ac_outfile=conftest.$ac_objext
290 echo "$lt_simple_link_test_code" >conftest.$ac_ext
291 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
292 _lt_linker_boilerplate=`cat conftest.err`
293 $rm -r conftest*
294 ])# _LT_LINKER_BOILERPLATE
295
296 # _LT_REQUIRED_DARWIN_CHECKS
297 # --------------------------
298 # Check for some things on darwin
299 AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
300 case $host_os in
301 rhapsody* | darwin*)
302 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
303 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
304
305 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
306 [lt_cv_apple_cc_single_mod=no
307 if test -z "${LT_MULTI_MODULE}"; then
308 # By default we will add the -single_module flag. You can override
309 # by either setting the environment variable LT_MULTI_MODULE
310 # non-empty at configure time, or by adding -multi_module to the
311 # link flags.
312 echo "int foo(void){return 1;}" > conftest.c
313 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
314 -dynamiclib ${wl}-single_module conftest.c
315 if test -f libconftest.dylib; then
316 lt_cv_apple_cc_single_mod=yes
317 rm -rf libconftest.dylib*
318 fi
319 rm conftest.c
320 fi])
321 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
322 [lt_cv_ld_exported_symbols_list],
323 [lt_cv_ld_exported_symbols_list=no
324 save_LDFLAGS=$LDFLAGS
325 echo "_main" > conftest.sym
326 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
327 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
328 [lt_cv_ld_exported_symbols_list=yes],
329 [lt_cv_ld_exported_symbols_list=no])
330 LDFLAGS="$save_LDFLAGS"
331 ])
332 case $host_os in
333 rhapsody* | darwin1.[[0123]])
334 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
335 darwin1.*)
336 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
337 darwin*)
338 # if running on 10.5 or later, the deployment target defaults
339 # to the OS version, if on x86, and 10.4, the deployment
340 # target defaults to 10.4. Don't you love it?
341 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
342 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
343 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
344 10.[[012]]*)
345 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
346 10.*)
347 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
348 esac
349 ;;
350 esac
351 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
352 _lt_dar_single_mod='$single_module'
353 fi
354 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
355 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
356 else
357 _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
358 fi
359 if test "$DSYMUTIL" != ":"; then
360 _lt_dsymutil="~$DSYMUTIL \$lib || :"
361 else
362 _lt_dsymutil=
363 fi
364 ;;
365 esac
366 ])
367
368 # _LT_AC_SYS_LIBPATH_AIX
369 # ----------------------
370 # Links a minimal program and checks the executable
371 # for the system default hardcoded library path. In most cases,
372 # this is /usr/lib:/lib, but when the MPI compilers are used
373 # the location of the communication and MPI libs are included too.
374 # If we don't find anything, use the default library path according
375 # to the aix ld manual.
376 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
377 [AC_REQUIRE([LT_AC_PROG_SED])dnl
378 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
379 lt_aix_libpath_sed='
380 /Import File Strings/,/^$/ {
381 /^0/ {
382 s/^0 *\(.*\)$/\1/
383 p
384 }
385 }'
386 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
387 # Check for a 64-bit object if we didn't find anything.
388 if test -z "$aix_libpath"; then
389 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
390 fi],[])
391 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
392 ])# _LT_AC_SYS_LIBPATH_AIX
393
394
395 # _LT_AC_SHELL_INIT(ARG)
396 # ----------------------
397 AC_DEFUN([_LT_AC_SHELL_INIT],
398 [ifdef([AC_DIVERSION_NOTICE],
399 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
400 [AC_DIVERT_PUSH(NOTICE)])
401 $1
402 AC_DIVERT_POP
403 ])# _LT_AC_SHELL_INIT
404
405
406 # _LT_AC_PROG_ECHO_BACKSLASH
407 # --------------------------
408 # Add some code to the start of the generated configure script which
409 # will find an echo command which doesn't interpret backslashes.
410 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
411 [_LT_AC_SHELL_INIT([
412 # Check that we are running under the correct shell.
413 SHELL=${CONFIG_SHELL-/bin/sh}
414
415 case X$ECHO in
416 X*--fallback-echo)
417 # Remove one level of quotation (which was required for Make).
418 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
419 ;;
420 esac
421
422 echo=${ECHO-echo}
423 if test "X[$]1" = X--no-reexec; then
424 # Discard the --no-reexec flag, and continue.
425 shift
426 elif test "X[$]1" = X--fallback-echo; then
427 # Avoid inline document here, it may be left over
428 :
429 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
430 # Yippee, $echo works!
431 :
432 else
433 # Restart under the correct shell.
434 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
435 fi
436
437 if test "X[$]1" = X--fallback-echo; then
438 # used as fallback echo
439 shift
440 cat <<EOF
441 [$]*
442 EOF
443 exit 0
444 fi
445
446 # The HP-UX ksh and POSIX shell print the target directory to stdout
447 # if CDPATH is set.
448 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
449
450 if test -z "$ECHO"; then
451 if test "X${echo_test_string+set}" != Xset; then
452 # find a string as large as possible, as long as the shell can cope with it
453 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
454 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
455 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
456 echo_test_string=`eval $cmd` &&
457 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
458 then
459 break
460 fi
461 done
462 fi
463
464 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
465 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
466 test "X$echo_testing_string" = "X$echo_test_string"; then
467 :
468 else
469 # The Solaris, AIX, and Digital Unix default echo programs unquote
470 # backslashes. This makes it impossible to quote backslashes using
471 # echo "$something" | sed 's/\\/\\\\/g'
472 #
473 # So, first we look for a working echo in the user's PATH.
474
475 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
476 for dir in $PATH /usr/ucb; do
477 IFS="$lt_save_ifs"
478 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
479 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
480 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
481 test "X$echo_testing_string" = "X$echo_test_string"; then
482 echo="$dir/echo"
483 break
484 fi
485 done
486 IFS="$lt_save_ifs"
487
488 if test "X$echo" = Xecho; then
489 # We didn't find a better echo, so look for alternatives.
490 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
491 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
492 test "X$echo_testing_string" = "X$echo_test_string"; then
493 # This shell has a builtin print -r that does the trick.
494 echo='print -r'
495 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
496 test "X$CONFIG_SHELL" != X/bin/ksh; then
497 # If we have ksh, try running configure again with it.
498 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
499 export ORIGINAL_CONFIG_SHELL
500 CONFIG_SHELL=/bin/ksh
501 export CONFIG_SHELL
502 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
503 else
504 # Try using printf.
505 echo='printf %s\n'
506 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
507 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
508 test "X$echo_testing_string" = "X$echo_test_string"; then
509 # Cool, printf works
510 :
511 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
512 test "X$echo_testing_string" = 'X\t' &&
513 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
514 test "X$echo_testing_string" = "X$echo_test_string"; then
515 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
516 export CONFIG_SHELL
517 SHELL="$CONFIG_SHELL"
518 export SHELL
519 echo="$CONFIG_SHELL [$]0 --fallback-echo"
520 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
521 test "X$echo_testing_string" = 'X\t' &&
522 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
523 test "X$echo_testing_string" = "X$echo_test_string"; then
524 echo="$CONFIG_SHELL [$]0 --fallback-echo"
525 else
526 # maybe with a smaller string...
527 prev=:
528
529 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
530 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
531 then
532 break
533 fi
534 prev="$cmd"
535 done
536
537 if test "$prev" != 'sed 50q "[$]0"'; then
538 echo_test_string=`eval $prev`
539 export echo_test_string
540 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
541 else
542 # Oops. We lost completely, so just stick with echo.
543 echo=echo
544 fi
545 fi
546 fi
547 fi
548 fi
549 fi
550
551 # Copy echo and quote the copy suitably for passing to libtool from
552 # the Makefile, instead of quoting the original, which is used later.
553 ECHO=$echo
554 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
555 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
556 fi
557
558 AC_SUBST(ECHO)
559 ])])# _LT_AC_PROG_ECHO_BACKSLASH
560
561
562 # _LT_AC_LOCK
563 # -----------
564 AC_DEFUN([_LT_AC_LOCK],
565 [AC_ARG_ENABLE([libtool-lock],
566 [AC_HELP_STRING([--disable-libtool-lock],
567 [avoid locking (might break parallel builds)])])
568 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
569
570 # Some flags need to be propagated to the compiler or linker for good
571 # libtool support.
572 case $host in
573 ia64-*-hpux*)
574 # Find out which ABI we are using.
575 echo 'int i;' > conftest.$ac_ext
576 if AC_TRY_EVAL(ac_compile); then
577 case `/usr/bin/file conftest.$ac_objext` in
578 *ELF-32*)
579 HPUX_IA64_MODE="32"
580 ;;
581 *ELF-64*)
582 HPUX_IA64_MODE="64"
583 ;;
584 esac
585 fi
586 rm -rf conftest*
587 ;;
588 *-*-irix6*)
589 # Find out which ABI we are using.
590 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
591 if AC_TRY_EVAL(ac_compile); then
592 if test "$lt_cv_prog_gnu_ld" = yes; then
593 case `/usr/bin/file conftest.$ac_objext` in
594 *32-bit*)
595 LD="${LD-ld} -melf32bsmip"
596 ;;
597 *N32*)
598 LD="${LD-ld} -melf32bmipn32"
599 ;;
600 *64-bit*)
601 LD="${LD-ld} -melf64bmip"
602 ;;
603 esac
604 else
605 case `/usr/bin/file conftest.$ac_objext` in
606 *32-bit*)
607 LD="${LD-ld} -32"
608 ;;
609 *N32*)
610 LD="${LD-ld} -n32"
611 ;;
612 *64-bit*)
613 LD="${LD-ld} -64"
614 ;;
615 esac
616 fi
617 fi
618 rm -rf conftest*
619 ;;
620
621 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
622 s390*-*linux*|sparc*-*linux*)
623 # Find out which ABI we are using.
624 echo 'int i;' > conftest.$ac_ext
625 if AC_TRY_EVAL(ac_compile); then
626 case `/usr/bin/file conftest.o` in
627 *32-bit*)
628 case $host in
629 x86_64-*kfreebsd*-gnu)
630 LD="${LD-ld} -m elf_i386_fbsd"
631 ;;
632 x86_64-*linux*)
633 LD="${LD-ld} -m elf_i386"
634 ;;
635 ppc64-*linux*|powerpc64-*linux*)
636 LD="${LD-ld} -m elf32ppclinux"
637 ;;
638 s390x-*linux*)
639 LD="${LD-ld} -m elf_s390"
640 ;;
641 sparc64-*linux*)
642 LD="${LD-ld} -m elf32_sparc"
643 ;;
644 esac
645 ;;
646 *64-bit*)
647 case $host in
648 x86_64-*kfreebsd*-gnu)
649 LD="${LD-ld} -m elf_x86_64_fbsd"
650 ;;
651 x86_64-*linux*)
652 LD="${LD-ld} -m elf_x86_64"
653 ;;
654 ppc*-*linux*|powerpc*-*linux*)
655 LD="${LD-ld} -m elf64ppc"
656 ;;
657 s390*-*linux*)
658 LD="${LD-ld} -m elf64_s390"
659 ;;
660 sparc*-*linux*)
661 LD="${LD-ld} -m elf64_sparc"
662 ;;
663 esac
664 ;;
665 esac
666 fi
667 rm -rf conftest*
668 ;;
669
670 *-*-sco3.2v5*)
671 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
672 SAVE_CFLAGS="$CFLAGS"
673 CFLAGS="$CFLAGS -belf"
674 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
675 [AC_LANG_PUSH(C)
676 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
677 AC_LANG_POP])
678 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
679 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
680 CFLAGS="$SAVE_CFLAGS"
681 fi
682 ;;
683 sparc*-*solaris*)
684 # Find out which ABI we are using.
685 echo 'int i;' > conftest.$ac_ext
686 if AC_TRY_EVAL(ac_compile); then
687 case `/usr/bin/file conftest.o` in
688 *64-bit*)
689 case $lt_cv_prog_gnu_ld in
690 yes*) LD="${LD-ld} -m elf64_sparc" ;;
691 *)
692 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
693 LD="${LD-ld} -64"
694 fi
695 ;;
696 esac
697 ;;
698 esac
699 fi
700 rm -rf conftest*
701 ;;
702
703 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
704 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
705 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
706 AC_CHECK_TOOL(AS, as, false)
707 AC_CHECK_TOOL(OBJDUMP, objdump, false)
708 ;;
709 ])
710 esac
711
712 need_locks="$enable_libtool_lock"
713
714 ])# _LT_AC_LOCK
715
716
717 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
718 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
719 # ----------------------------------------------------------------
720 # Check whether the given compiler option works
721 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
722 [AC_REQUIRE([LT_AC_PROG_SED])
723 AC_CACHE_CHECK([$1], [$2],
724 [$2=no
725 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
726 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
727 lt_compiler_flag="$3"
728 # Insert the option either (1) after the last *FLAGS variable, or
729 # (2) before a word containing "conftest.", or (3) at the end.
730 # Note that $ac_compile itself does not contain backslashes and begins
731 # with a dollar sign (not a hyphen), so the echo should work correctly.
732 # The option is referenced via a variable to avoid confusing sed.
733 lt_compile=`echo "$ac_compile" | $SED \
734 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
735 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
736 -e 's:$: $lt_compiler_flag:'`
737 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
738 (eval "$lt_compile" 2>conftest.err)
739 ac_status=$?
740 cat conftest.err >&AS_MESSAGE_LOG_FD
741 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
742 if (exit $ac_status) && test -s "$ac_outfile"; then
743 # The compiler can only warn and ignore the option if not recognized
744 # So say no if there are warnings other than the usual output.
745 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
746 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
747 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
748 $2=yes
749 fi
750 fi
751 $rm conftest*
752 ])
753
754 if test x"[$]$2" = xyes; then
755 ifelse([$5], , :, [$5])
756 else
757 ifelse([$6], , :, [$6])
758 fi
759 ])# AC_LIBTOOL_COMPILER_OPTION
760
761
762 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
763 # [ACTION-SUCCESS], [ACTION-FAILURE])
764 # ------------------------------------------------------------
765 # Check whether the given compiler option works
766 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
767 [AC_REQUIRE([LT_AC_PROG_SED])dnl
768 AC_CACHE_CHECK([$1], [$2],
769 [$2=no
770 save_LDFLAGS="$LDFLAGS"
771 LDFLAGS="$LDFLAGS $3"
772 echo "$lt_simple_link_test_code" > conftest.$ac_ext
773 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
774 # The linker can only warn and ignore the option if not recognized
775 # So say no if there are warnings
776 if test -s conftest.err; then
777 # Append any errors to the config.log.
778 cat conftest.err 1>&AS_MESSAGE_LOG_FD
779 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
780 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
781 if diff conftest.exp conftest.er2 >/dev/null; then
782 $2=yes
783 fi
784 else
785 $2=yes
786 fi
787 fi
788 $rm -r conftest*
789 LDFLAGS="$save_LDFLAGS"
790 ])
791
792 if test x"[$]$2" = xyes; then
793 ifelse([$4], , :, [$4])
794 else
795 ifelse([$5], , :, [$5])
796 fi
797 ])# AC_LIBTOOL_LINKER_OPTION
798
799
800 # AC_LIBTOOL_SYS_MAX_CMD_LEN
801 # --------------------------
802 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
803 [# find the maximum length of command line arguments
804 AC_MSG_CHECKING([the maximum length of command line arguments])
805 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
806 i=0
807 teststring="ABCD"
808
809 case $build_os in
810 msdosdjgpp*)
811 # On DJGPP, this test can blow up pretty badly due to problems in libc
812 # (any single argument exceeding 2000 bytes causes a buffer overrun
813 # during glob expansion). Even if it were fixed, the result of this
814 # check would be larger than it should be.
815 lt_cv_sys_max_cmd_len=12288; # 12K is about right
816 ;;
817
818 gnu*)
819 # Under GNU Hurd, this test is not required because there is
820 # no limit to the length of command line arguments.
821 # Libtool will interpret -1 as no limit whatsoever
822 lt_cv_sys_max_cmd_len=-1;
823 ;;
824
825 cygwin* | mingw*)
826 # On Win9x/ME, this test blows up -- it succeeds, but takes
827 # about 5 minutes as the teststring grows exponentially.
828 # Worse, since 9x/ME are not pre-emptively multitasking,
829 # you end up with a "frozen" computer, even though with patience
830 # the test eventually succeeds (with a max line length of 256k).
831 # Instead, let's just punt: use the minimum linelength reported by
832 # all of the supported platforms: 8192 (on NT/2K/XP).
833 lt_cv_sys_max_cmd_len=8192;
834 ;;
835
836 amigaos*)
837 # On AmigaOS with pdksh, this test takes hours, literally.
838 # So we just punt and use a minimum line length of 8192.
839 lt_cv_sys_max_cmd_len=8192;
840 ;;
841
842 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
843 # This has been around since 386BSD, at least. Likely further.
844 if test -x /sbin/sysctl; then
845 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
846 elif test -x /usr/sbin/sysctl; then
847 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
848 else
849 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
850 fi
851 # And add a safety zone
852 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
853 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
854 ;;
855
856 interix*)
857 # We know the value 262144 and hardcode it with a safety zone (like BSD)
858 lt_cv_sys_max_cmd_len=196608
859 ;;
860
861 osf*)
862 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
863 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
864 # nice to cause kernel panics so lets avoid the loop below.
865 # First set a reasonable default.
866 lt_cv_sys_max_cmd_len=16384
867 #
868 if test -x /sbin/sysconfig; then
869 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
870 *1*) lt_cv_sys_max_cmd_len=-1 ;;
871 esac
872 fi
873 ;;
874 sco3.2v5*)
875 lt_cv_sys_max_cmd_len=102400
876 ;;
877 sysv5* | sco5v6* | sysv4.2uw2*)
878 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
879 if test -n "$kargmax"; then
880 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
881 else
882 lt_cv_sys_max_cmd_len=32768
883 fi
884 ;;
885 *)
886 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
887 if test -n "$lt_cv_sys_max_cmd_len"; then
888 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
889 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
890 else
891 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
892 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
893 = "XX$teststring") >/dev/null 2>&1 &&
894 new_result=`expr "X$teststring" : ".*" 2>&1` &&
895 lt_cv_sys_max_cmd_len=$new_result &&
896 test $i != 17 # 1/2 MB should be enough
897 do
898 i=`expr $i + 1`
899 teststring=$teststring$teststring
900 done
901 teststring=
902 # Add a significant safety factor because C++ compilers can tack on massive
903 # amounts of additional arguments before passing them to the linker.
904 # It appears as though 1/2 is a usable value.
905 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
906 fi
907 ;;
908 esac
909 ])
910 if test -n $lt_cv_sys_max_cmd_len ; then
911 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
912 else
913 AC_MSG_RESULT(none)
914 fi
915 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
916
917
918 # _LT_AC_CHECK_DLFCN
919 # ------------------
920 AC_DEFUN([_LT_AC_CHECK_DLFCN],
921 [AC_CHECK_HEADERS(dlfcn.h)dnl
922 ])# _LT_AC_CHECK_DLFCN
923
924
925 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
926 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
927 # ---------------------------------------------------------------------
928 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
929 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
930 if test "$cross_compiling" = yes; then :
931 [$4]
932 else
933 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
934 lt_status=$lt_dlunknown
935 cat > conftest.$ac_ext <<EOF
936 [#line __oline__ "configure"
937 #include "confdefs.h"
938
939 #if HAVE_DLFCN_H
940 #include <dlfcn.h>
941 #endif
942
943 #include <stdio.h>
944
945 #ifdef RTLD_GLOBAL
946 # define LT_DLGLOBAL RTLD_GLOBAL
947 #else
948 # ifdef DL_GLOBAL
949 # define LT_DLGLOBAL DL_GLOBAL
950 # else
951 # define LT_DLGLOBAL 0
952 # endif
953 #endif
954
955 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
956 find out it does not work in some platform. */
957 #ifndef LT_DLLAZY_OR_NOW
958 # ifdef RTLD_LAZY
959 # define LT_DLLAZY_OR_NOW RTLD_LAZY
960 # else
961 # ifdef DL_LAZY
962 # define LT_DLLAZY_OR_NOW DL_LAZY
963 # else
964 # ifdef RTLD_NOW
965 # define LT_DLLAZY_OR_NOW RTLD_NOW
966 # else
967 # ifdef DL_NOW
968 # define LT_DLLAZY_OR_NOW DL_NOW
969 # else
970 # define LT_DLLAZY_OR_NOW 0
971 # endif
972 # endif
973 # endif
974 # endif
975 #endif
976
977 #ifdef __cplusplus
978 extern "C" void exit (int);
979 #endif
980
981 void fnord() { int i=42;}
982 int main ()
983 {
984 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
985 int status = $lt_dlunknown;
986
987 if (self)
988 {
989 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
990 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
991 /* dlclose (self); */
992 }
993 else
994 puts (dlerror ());
995
996 exit (status);
997 }]
998 EOF
999 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1000 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1001 lt_status=$?
1002 case x$lt_status in
1003 x$lt_dlno_uscore) $1 ;;
1004 x$lt_dlneed_uscore) $2 ;;
1005 x$lt_dlunknown|x*) $3 ;;
1006 esac
1007 else :
1008 # compilation failed
1009 $3
1010 fi
1011 fi
1012 rm -fr conftest*
1013 ])# _LT_AC_TRY_DLOPEN_SELF
1014
1015
1016 # AC_LIBTOOL_DLOPEN_SELF
1017 # ----------------------
1018 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1019 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1020 if test "x$enable_dlopen" != xyes; then
1021 enable_dlopen=unknown
1022 enable_dlopen_self=unknown
1023 enable_dlopen_self_static=unknown
1024 else
1025 lt_cv_dlopen=no
1026 lt_cv_dlopen_libs=
1027
1028 case $host_os in
1029 beos*)
1030 lt_cv_dlopen="load_add_on"
1031 lt_cv_dlopen_libs=
1032 lt_cv_dlopen_self=yes
1033 ;;
1034
1035 mingw* | pw32*)
1036 lt_cv_dlopen="LoadLibrary"
1037 lt_cv_dlopen_libs=
1038 ;;
1039
1040 cygwin*)
1041 lt_cv_dlopen="dlopen"
1042 lt_cv_dlopen_libs=
1043 ;;
1044
1045 darwin*)
1046 # if libdl is installed we need to link against it
1047 AC_CHECK_LIB([dl], [dlopen],
1048 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1049 lt_cv_dlopen="dyld"
1050 lt_cv_dlopen_libs=
1051 lt_cv_dlopen_self=yes
1052 ])
1053 ;;
1054
1055 *)
1056 AC_CHECK_FUNC([shl_load],
1057 [lt_cv_dlopen="shl_load"],
1058 [AC_CHECK_LIB([dld], [shl_load],
1059 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1060 [AC_CHECK_FUNC([dlopen],
1061 [lt_cv_dlopen="dlopen"],
1062 [AC_CHECK_LIB([dl], [dlopen],
1063 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1064 [AC_CHECK_LIB([svld], [dlopen],
1065 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1066 [AC_CHECK_LIB([dld], [dld_link],
1067 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1068 ])
1069 ])
1070 ])
1071 ])
1072 ])
1073 ;;
1074 esac
1075
1076 if test "x$lt_cv_dlopen" != xno; then
1077 enable_dlopen=yes
1078 else
1079 enable_dlopen=no
1080 fi
1081
1082 case $lt_cv_dlopen in
1083 dlopen)
1084 save_CPPFLAGS="$CPPFLAGS"
1085 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1086
1087 save_LDFLAGS="$LDFLAGS"
1088 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1089
1090 save_LIBS="$LIBS"
1091 LIBS="$lt_cv_dlopen_libs $LIBS"
1092
1093 AC_CACHE_CHECK([whether a program can dlopen itself],
1094 lt_cv_dlopen_self, [dnl
1095 _LT_AC_TRY_DLOPEN_SELF(
1096 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1097 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1098 ])
1099
1100 if test "x$lt_cv_dlopen_self" = xyes; then
1101 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1102 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1103 lt_cv_dlopen_self_static, [dnl
1104 _LT_AC_TRY_DLOPEN_SELF(
1105 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1106 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1107 ])
1108 fi
1109
1110 CPPFLAGS="$save_CPPFLAGS"
1111 LDFLAGS="$save_LDFLAGS"
1112 LIBS="$save_LIBS"
1113 ;;
1114 esac
1115
1116 case $lt_cv_dlopen_self in
1117 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1118 *) enable_dlopen_self=unknown ;;
1119 esac
1120
1121 case $lt_cv_dlopen_self_static in
1122 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1123 *) enable_dlopen_self_static=unknown ;;
1124 esac
1125 fi
1126 ])# AC_LIBTOOL_DLOPEN_SELF
1127
1128
1129 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1130 # ---------------------------------
1131 # Check to see if options -c and -o are simultaneously supported by compiler
1132 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1133 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1134 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1135 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1136 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1137 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1138 $rm -r conftest 2>/dev/null
1139 mkdir conftest
1140 cd conftest
1141 mkdir out
1142 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1143
1144 lt_compiler_flag="-o out/conftest2.$ac_objext"
1145 # Insert the option either (1) after the last *FLAGS variable, or
1146 # (2) before a word containing "conftest.", or (3) at the end.
1147 # Note that $ac_compile itself does not contain backslashes and begins
1148 # with a dollar sign (not a hyphen), so the echo should work correctly.
1149 lt_compile=`echo "$ac_compile" | $SED \
1150 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1151 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1152 -e 's:$: $lt_compiler_flag:'`
1153 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1154 (eval "$lt_compile" 2>out/conftest.err)
1155 ac_status=$?
1156 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1157 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1158 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1159 then
1160 # The compiler can only warn and ignore the option if not recognized
1161 # So say no if there are warnings
1162 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1163 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1164 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1165 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1166 fi
1167 fi
1168 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1169 $rm conftest*
1170 # SGI C++ compiler will create directory out/ii_files/ for
1171 # template instantiation
1172 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1173 $rm out/* && rmdir out
1174 cd ..
1175 rmdir conftest
1176 $rm conftest*
1177 ])
1178 ])# AC_LIBTOOL_PROG_CC_C_O
1179
1180
1181 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1182 # -----------------------------------------
1183 # Check to see if we can do hard links to lock some files if needed
1184 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1185 [AC_REQUIRE([_LT_AC_LOCK])dnl
1186
1187 hard_links="nottested"
1188 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1189 # do not overwrite the value of need_locks provided by the user
1190 AC_MSG_CHECKING([if we can lock with hard links])
1191 hard_links=yes
1192 $rm conftest*
1193 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1194 touch conftest.a
1195 ln conftest.a conftest.b 2>&5 || hard_links=no
1196 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1197 AC_MSG_RESULT([$hard_links])
1198 if test "$hard_links" = no; then
1199 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1200 need_locks=warn
1201 fi
1202 else
1203 need_locks=no
1204 fi
1205 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1206
1207
1208 # AC_LIBTOOL_OBJDIR
1209 # -----------------
1210 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1211 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1212 [rm -f .libs 2>/dev/null
1213 mkdir .libs 2>/dev/null
1214 if test -d .libs; then
1215 lt_cv_objdir=.libs
1216 else
1217 # MS-DOS does not allow filenames that begin with a dot.
1218 lt_cv_objdir=_libs
1219 fi
1220 rmdir .libs 2>/dev/null])
1221 objdir=$lt_cv_objdir
1222 ])# AC_LIBTOOL_OBJDIR
1223
1224
1225 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1226 # ----------------------------------------------
1227 # Check hardcoding attributes.
1228 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1229 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1230 _LT_AC_TAGVAR(hardcode_action, $1)=
1231 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1232 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1233 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1234
1235 # We can hardcode non-existant directories.
1236 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1237 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1238 # have to relink, otherwise we might link with an installed library
1239 # when we should be linking with a yet-to-be-installed one
1240 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1241 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1242 # Linking always hardcodes the temporary library directory.
1243 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1244 else
1245 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1246 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1247 fi
1248 else
1249 # We cannot hardcode anything, or else we can only hardcode existing
1250 # directories.
1251 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1252 fi
1253 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1254
1255 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1256 # Fast installation is not supported
1257 enable_fast_install=no
1258 elif test "$shlibpath_overrides_runpath" = yes ||
1259 test "$enable_shared" = no; then
1260 # Fast installation is not necessary
1261 enable_fast_install=needless
1262 fi
1263 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1264
1265
1266 # AC_LIBTOOL_SYS_LIB_STRIP
1267 # ------------------------
1268 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1269 [striplib=
1270 old_striplib=
1271 AC_MSG_CHECKING([whether stripping libraries is possible])
1272 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1273 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1274 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1275 AC_MSG_RESULT([yes])
1276 else
1277 # FIXME - insert some real tests, host_os isn't really good enough
1278 case $host_os in
1279 darwin*)
1280 if test -n "$STRIP" ; then
1281 striplib="$STRIP -x"
1282 old_striplib="$STRIP -S"
1283 AC_MSG_RESULT([yes])
1284 else
1285 AC_MSG_RESULT([no])
1286 fi
1287 ;;
1288 *)
1289 AC_MSG_RESULT([no])
1290 ;;
1291 esac
1292 fi
1293 ])# AC_LIBTOOL_SYS_LIB_STRIP
1294
1295
1296 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1297 # -----------------------------
1298 # PORTME Fill in your ld.so characteristics
1299 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1300 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1301 AC_MSG_CHECKING([dynamic linker characteristics])
1302 library_names_spec=
1303 libname_spec='lib$name'
1304 soname_spec=
1305 shrext_cmds=".so"
1306 postinstall_cmds=
1307 postuninstall_cmds=
1308 finish_cmds=
1309 finish_eval=
1310 shlibpath_var=
1311 shlibpath_overrides_runpath=unknown
1312 version_type=none
1313 dynamic_linker="$host_os ld.so"
1314 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1315 m4_if($1,[],[
1316 if test "$GCC" = yes; then
1317 case $host_os in
1318 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
1319 *) lt_awk_arg="/^libraries:/" ;;
1320 esac
1321 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1322 if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
1323 # if the path contains ";" then we assume it to be the separator
1324 # otherwise default to the standard path separator (i.e. ":") - it is
1325 # assumed that no part of a normal pathname contains ";" but that should
1326 # okay in the real world where ";" in dirpaths is itself problematic.
1327 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
1328 else
1329 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1330 fi
1331 # Ok, now we have the path, separated by spaces, we can step through it
1332 # and add multilib dir if necessary.
1333 lt_tmp_lt_search_path_spec=
1334 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
1335 for lt_sys_path in $lt_search_path_spec; do
1336 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
1337 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
1338 else
1339 test -d "$lt_sys_path" && \
1340 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
1341 fi
1342 done
1343 lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
1344 BEGIN {RS=" "; FS="/|\n";} {
1345 lt_foo="";
1346 lt_count=0;
1347 for (lt_i = NF; lt_i > 0; lt_i--) {
1348 if ($lt_i != "" && $lt_i != ".") {
1349 if ($lt_i == "..") {
1350 lt_count++;
1351 } else {
1352 if (lt_count == 0) {
1353 lt_foo="/" $lt_i lt_foo;
1354 } else {
1355 lt_count--;
1356 }
1357 }
1358 }
1359 }
1360 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
1361 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
1362 }'`
1363 sys_lib_search_path_spec=`echo $lt_search_path_spec`
1364 else
1365 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1366 fi])
1367 need_lib_prefix=unknown
1368 hardcode_into_libs=no
1369
1370 # when you set need_version to no, make sure it does not cause -set_version
1371 # flags to be left without arguments
1372 need_version=unknown
1373
1374 case $host_os in
1375 aix3*)
1376 version_type=linux
1377 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1378 shlibpath_var=LIBPATH
1379
1380 # AIX 3 has no versioning support, so we append a major version to the name.
1381 soname_spec='${libname}${release}${shared_ext}$major'
1382 ;;
1383
1384 aix[[4-9]]*)
1385 version_type=linux
1386 need_lib_prefix=no
1387 need_version=no
1388 hardcode_into_libs=yes
1389 if test "$host_cpu" = ia64; then
1390 # AIX 5 supports IA64
1391 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1392 shlibpath_var=LD_LIBRARY_PATH
1393 else
1394 # With GCC up to 2.95.x, collect2 would create an import file
1395 # for dependence libraries. The import file would start with
1396 # the line `#! .'. This would cause the generated library to
1397 # depend on `.', always an invalid library. This was fixed in
1398 # development snapshots of GCC prior to 3.0.
1399 case $host_os in
1400 aix4 | aix4.[[01]] | aix4.[[01]].*)
1401 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1402 echo ' yes '
1403 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1404 :
1405 else
1406 can_build_shared=no
1407 fi
1408 ;;
1409 esac
1410 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1411 # soname into executable. Probably we can add versioning support to
1412 # collect2, so additional links can be useful in future.
1413 if test "$aix_use_runtimelinking" = yes; then
1414 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1415 # instead of lib<name>.a to let people know that these are not
1416 # typical AIX shared libraries.
1417 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1418 else
1419 # We preserve .a as extension for shared libraries through AIX4.2
1420 # and later when we are not doing run time linking.
1421 library_names_spec='${libname}${release}.a $libname.a'
1422 soname_spec='${libname}${release}${shared_ext}$major'
1423 fi
1424 shlibpath_var=LIBPATH
1425 fi
1426 ;;
1427
1428 amigaos*)
1429 library_names_spec='$libname.ixlibrary $libname.a'
1430 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1431 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'
1432 ;;
1433
1434 beos*)
1435 library_names_spec='${libname}${shared_ext}'
1436 dynamic_linker="$host_os ld.so"
1437 shlibpath_var=LIBRARY_PATH
1438 ;;
1439
1440 bsdi[[45]]*)
1441 version_type=linux
1442 need_version=no
1443 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1444 soname_spec='${libname}${release}${shared_ext}$major'
1445 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1446 shlibpath_var=LD_LIBRARY_PATH
1447 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1448 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1449 # the default ld.so.conf also contains /usr/contrib/lib and
1450 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1451 # libtool to hard-code these into programs
1452 ;;
1453
1454 cygwin* | mingw* | pw32*)
1455 version_type=windows
1456 shrext_cmds=".dll"
1457 need_version=no
1458 need_lib_prefix=no
1459
1460 case $GCC,$host_os in
1461 yes,cygwin* | yes,mingw* | yes,pw32*)
1462 library_names_spec='$libname.dll.a'
1463 # DLL is installed to $(libdir)/../bin by postinstall_cmds
1464 postinstall_cmds='base_file=`basename \${file}`~
1465 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1466 dldir=$destdir/`dirname \$dlpath`~
1467 test -d \$dldir || mkdir -p \$dldir~
1468 $install_prog $dir/$dlname \$dldir/$dlname~
1469 chmod a+x \$dldir/$dlname'
1470 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1471 dlpath=$dir/\$dldll~
1472 $rm \$dlpath'
1473 shlibpath_overrides_runpath=yes
1474
1475 case $host_os in
1476 cygwin*)
1477 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1478 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1479 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1480 ;;
1481 mingw*)
1482 # MinGW DLLs use traditional 'lib' prefix
1483 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1484 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1485 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1486 # It is most probably a Windows format PATH printed by
1487 # mingw gcc, but we are running on Cygwin. Gcc prints its search
1488 # path with ; separators, and with drive letters. We can handle the
1489 # drive letters (cygwin fileutils understands them), so leave them,
1490 # especially as we might pass files found there to a mingw objdump,
1491 # which wouldn't understand a cygwinified path. Ahh.
1492 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1493 else
1494 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1495 fi
1496 ;;
1497 pw32*)
1498 # pw32 DLLs use 'pw' prefix rather than 'lib'
1499 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1500 ;;
1501 esac
1502 ;;
1503
1504 *)
1505 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1506 ;;
1507 esac
1508 dynamic_linker='Win32 ld.exe'
1509 # FIXME: first we should search . and the directory the executable is in
1510 shlibpath_var=PATH
1511 ;;
1512
1513 darwin* | rhapsody*)
1514 dynamic_linker="$host_os dyld"
1515 version_type=darwin
1516 need_lib_prefix=no
1517 need_version=no
1518 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1519 soname_spec='${libname}${release}${major}$shared_ext'
1520 shlibpath_overrides_runpath=yes
1521 shlibpath_var=DYLD_LIBRARY_PATH
1522 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1523 m4_if([$1], [],[
1524 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
1525 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1526 ;;
1527
1528 dgux*)
1529 version_type=linux
1530 need_lib_prefix=no
1531 need_version=no
1532 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1533 soname_spec='${libname}${release}${shared_ext}$major'
1534 shlibpath_var=LD_LIBRARY_PATH
1535 ;;
1536
1537 freebsd1*)
1538 dynamic_linker=no
1539 ;;
1540
1541 freebsd* | dragonfly*)
1542 # DragonFly does not have aout. When/if they implement a new
1543 # versioning mechanism, adjust this.
1544 if test -x /usr/bin/objformat; then
1545 objformat=`/usr/bin/objformat`
1546 else
1547 case $host_os in
1548 freebsd[[123]]*) objformat=aout ;;
1549 *) objformat=elf ;;
1550 esac
1551 fi
1552 version_type=freebsd-$objformat
1553 case $version_type in
1554 freebsd-elf*)
1555 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1556 need_version=no
1557 need_lib_prefix=no
1558 ;;
1559 freebsd-*)
1560 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1561 need_version=yes
1562 ;;
1563 esac
1564 shlibpath_var=LD_LIBRARY_PATH
1565 case $host_os in
1566 freebsd2*)
1567 shlibpath_overrides_runpath=yes
1568 ;;
1569 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1570 shlibpath_overrides_runpath=yes
1571 hardcode_into_libs=yes
1572 ;;
1573 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
1574 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1575 shlibpath_overrides_runpath=no
1576 hardcode_into_libs=yes
1577 ;;
1578 *) # from 4.6 on, and DragonFly
1579 shlibpath_overrides_runpath=yes
1580 hardcode_into_libs=yes
1581 ;;
1582 esac
1583 ;;
1584
1585 gnu*)
1586 version_type=linux
1587 need_lib_prefix=no
1588 need_version=no
1589 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1590 soname_spec='${libname}${release}${shared_ext}$major'
1591 shlibpath_var=LD_LIBRARY_PATH
1592 hardcode_into_libs=yes
1593 ;;
1594
1595 hpux9* | hpux10* | hpux11*)
1596 # Give a soname corresponding to the major version so that dld.sl refuses to
1597 # link against other versions.
1598 version_type=sunos
1599 need_lib_prefix=no
1600 need_version=no
1601 case $host_cpu in
1602 ia64*)
1603 shrext_cmds='.so'
1604 hardcode_into_libs=yes
1605 dynamic_linker="$host_os dld.so"
1606 shlibpath_var=LD_LIBRARY_PATH
1607 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1608 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1609 soname_spec='${libname}${release}${shared_ext}$major'
1610 if test "X$HPUX_IA64_MODE" = X32; then
1611 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1612 else
1613 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1614 fi
1615 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1616 ;;
1617 hppa*64*)
1618 shrext_cmds='.sl'
1619 hardcode_into_libs=yes
1620 dynamic_linker="$host_os dld.sl"
1621 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1622 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1623 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1624 soname_spec='${libname}${release}${shared_ext}$major'
1625 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1626 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1627 ;;
1628 *)
1629 shrext_cmds='.sl'
1630 dynamic_linker="$host_os dld.sl"
1631 shlibpath_var=SHLIB_PATH
1632 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1633 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1634 soname_spec='${libname}${release}${shared_ext}$major'
1635 ;;
1636 esac
1637 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1638 postinstall_cmds='chmod 555 $lib'
1639 ;;
1640
1641 interix[[3-9]]*)
1642 version_type=linux
1643 need_lib_prefix=no
1644 need_version=no
1645 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1646 soname_spec='${libname}${release}${shared_ext}$major'
1647 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1648 shlibpath_var=LD_LIBRARY_PATH
1649 shlibpath_overrides_runpath=no
1650 hardcode_into_libs=yes
1651 ;;
1652
1653 irix5* | irix6* | nonstopux*)
1654 case $host_os in
1655 nonstopux*) version_type=nonstopux ;;
1656 *)
1657 if test "$lt_cv_prog_gnu_ld" = yes; then
1658 version_type=linux
1659 else
1660 version_type=irix
1661 fi ;;
1662 esac
1663 need_lib_prefix=no
1664 need_version=no
1665 soname_spec='${libname}${release}${shared_ext}$major'
1666 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1667 case $host_os in
1668 irix5* | nonstopux*)
1669 libsuff= shlibsuff=
1670 ;;
1671 *)
1672 case $LD in # libtool.m4 will add one of these switches to LD
1673 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1674 libsuff= shlibsuff= libmagic=32-bit;;
1675 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1676 libsuff=32 shlibsuff=N32 libmagic=N32;;
1677 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1678 libsuff=64 shlibsuff=64 libmagic=64-bit;;
1679 *) libsuff= shlibsuff= libmagic=never-match;;
1680 esac
1681 ;;
1682 esac
1683 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1684 shlibpath_overrides_runpath=no
1685 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1686 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1687 hardcode_into_libs=yes
1688 ;;
1689
1690 # No shared lib support for Linux oldld, aout, or coff.
1691 linux*oldld* | linux*aout* | linux*coff*)
1692 dynamic_linker=no
1693 ;;
1694
1695 # This must be Linux ELF.
1696 linux* | k*bsd*-gnu)
1697 version_type=linux
1698 need_lib_prefix=no
1699 need_version=no
1700 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1701 soname_spec='${libname}${release}${shared_ext}$major'
1702 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1703 shlibpath_var=LD_LIBRARY_PATH
1704 shlibpath_overrides_runpath=no
1705 # This implies no fast_install, which is unacceptable.
1706 # Some rework will be needed to allow for fast_install
1707 # before this can be enabled.
1708 hardcode_into_libs=yes
1709
1710 # Append ld.so.conf contents to the search path
1711 if test -f /etc/ld.so.conf; then
1712 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' ' '`
1713 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1714 fi
1715
1716 # We used to test for /lib/ld.so.1 and disable shared libraries on
1717 # powerpc, because MkLinux only supported shared libraries with the
1718 # GNU dynamic linker. Since this was broken with cross compilers,
1719 # most powerpc-linux boxes support dynamic linking these days and
1720 # people can always --disable-shared, the test was removed, and we
1721 # assume the GNU/Linux dynamic linker is in use.
1722 dynamic_linker='GNU/Linux ld.so'
1723 ;;
1724
1725 netbsdelf*-gnu)
1726 version_type=linux
1727 need_lib_prefix=no
1728 need_version=no
1729 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1730 soname_spec='${libname}${release}${shared_ext}$major'
1731 shlibpath_var=LD_LIBRARY_PATH
1732 shlibpath_overrides_runpath=no
1733 hardcode_into_libs=yes
1734 dynamic_linker='NetBSD ld.elf_so'
1735 ;;
1736
1737 netbsd*)
1738 version_type=sunos
1739 need_lib_prefix=no
1740 need_version=no
1741 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1742 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1743 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1744 dynamic_linker='NetBSD (a.out) ld.so'
1745 else
1746 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1747 soname_spec='${libname}${release}${shared_ext}$major'
1748 dynamic_linker='NetBSD ld.elf_so'
1749 fi
1750 shlibpath_var=LD_LIBRARY_PATH
1751 shlibpath_overrides_runpath=yes
1752 hardcode_into_libs=yes
1753 ;;
1754
1755 newsos6)
1756 version_type=linux
1757 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1758 shlibpath_var=LD_LIBRARY_PATH
1759 shlibpath_overrides_runpath=yes
1760 ;;
1761
1762 nto-qnx*)
1763 version_type=linux
1764 need_lib_prefix=no
1765 need_version=no
1766 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1767 soname_spec='${libname}${release}${shared_ext}$major'
1768 shlibpath_var=LD_LIBRARY_PATH
1769 shlibpath_overrides_runpath=yes
1770 ;;
1771
1772 openbsd*)
1773 version_type=sunos
1774 sys_lib_dlsearch_path_spec="/usr/lib"
1775 need_lib_prefix=no
1776 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1777 case $host_os in
1778 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1779 *) need_version=no ;;
1780 esac
1781 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1782 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1783 shlibpath_var=LD_LIBRARY_PATH
1784 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1785 case $host_os in
1786 openbsd2.[[89]] | openbsd2.[[89]].*)
1787 shlibpath_overrides_runpath=no
1788 ;;
1789 *)
1790 shlibpath_overrides_runpath=yes
1791 ;;
1792 esac
1793 else
1794 shlibpath_overrides_runpath=yes
1795 fi
1796 ;;
1797
1798 os2*)
1799 libname_spec='$name'
1800 shrext_cmds=".dll"
1801 need_lib_prefix=no
1802 library_names_spec='$libname${shared_ext} $libname.a'
1803 dynamic_linker='OS/2 ld.exe'
1804 shlibpath_var=LIBPATH
1805 ;;
1806
1807 osf3* | osf4* | osf5*)
1808 version_type=osf
1809 need_lib_prefix=no
1810 need_version=no
1811 soname_spec='${libname}${release}${shared_ext}$major'
1812 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1813 shlibpath_var=LD_LIBRARY_PATH
1814 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1815 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1816 ;;
1817
1818 rdos*)
1819 dynamic_linker=no
1820 ;;
1821
1822 solaris*)
1823 version_type=linux
1824 need_lib_prefix=no
1825 need_version=no
1826 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1827 soname_spec='${libname}${release}${shared_ext}$major'
1828 shlibpath_var=LD_LIBRARY_PATH
1829 shlibpath_overrides_runpath=yes
1830 hardcode_into_libs=yes
1831 # ldd complains unless libraries are executable
1832 postinstall_cmds='chmod +x $lib'
1833 ;;
1834
1835 sunos4*)
1836 version_type=sunos
1837 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1838 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1839 shlibpath_var=LD_LIBRARY_PATH
1840 shlibpath_overrides_runpath=yes
1841 if test "$with_gnu_ld" = yes; then
1842 need_lib_prefix=no
1843 fi
1844 need_version=yes
1845 ;;
1846
1847 sysv4 | sysv4.3*)
1848 version_type=linux
1849 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1850 soname_spec='${libname}${release}${shared_ext}$major'
1851 shlibpath_var=LD_LIBRARY_PATH
1852 case $host_vendor in
1853 sni)
1854 shlibpath_overrides_runpath=no
1855 need_lib_prefix=no
1856 export_dynamic_flag_spec='${wl}-Blargedynsym'
1857 runpath_var=LD_RUN_PATH
1858 ;;
1859 siemens)
1860 need_lib_prefix=no
1861 ;;
1862 motorola)
1863 need_lib_prefix=no
1864 need_version=no
1865 shlibpath_overrides_runpath=no
1866 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1867 ;;
1868 esac
1869 ;;
1870
1871 sysv4*MP*)
1872 if test -d /usr/nec ;then
1873 version_type=linux
1874 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1875 soname_spec='$libname${shared_ext}.$major'
1876 shlibpath_var=LD_LIBRARY_PATH
1877 fi
1878 ;;
1879
1880 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1881 version_type=freebsd-elf
1882 need_lib_prefix=no
1883 need_version=no
1884 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1885 soname_spec='${libname}${release}${shared_ext}$major'
1886 shlibpath_var=LD_LIBRARY_PATH
1887 hardcode_into_libs=yes
1888 if test "$with_gnu_ld" = yes; then
1889 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1890 shlibpath_overrides_runpath=no
1891 else
1892 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1893 shlibpath_overrides_runpath=yes
1894 case $host_os in
1895 sco3.2v5*)
1896 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
1897 ;;
1898 esac
1899 fi
1900 sys_lib_dlsearch_path_spec='/usr/lib'
1901 ;;
1902
1903 uts4*)
1904 version_type=linux
1905 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1906 soname_spec='${libname}${release}${shared_ext}$major'
1907 shlibpath_var=LD_LIBRARY_PATH
1908 ;;
1909
1910 *)
1911 dynamic_linker=no
1912 ;;
1913 esac
1914 AC_MSG_RESULT([$dynamic_linker])
1915 test "$dynamic_linker" = no && can_build_shared=no
1916
1917 AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
1918 [lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
1919 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
1920 AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
1921 [lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
1922 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
1923
1924 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
1925 if test "$GCC" = yes; then
1926 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1927 fi
1928 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1929
1930
1931 # _LT_AC_TAGCONFIG
1932 # ----------------
1933 AC_DEFUN([_LT_AC_TAGCONFIG],
1934 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1935 AC_ARG_WITH([tags],
1936 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1937 [include additional configurations @<:@automatic@:>@])],
1938 [tagnames="$withval"])
1939
1940 if test -f "$ltmain" && test -n "$tagnames"; then
1941 if test ! -f "${ofile}"; then
1942 AC_MSG_WARN([output file `$ofile' does not exist])
1943 fi
1944
1945 if test -z "$LTCC"; then
1946 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1947 if test -z "$LTCC"; then
1948 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1949 else
1950 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1951 fi
1952 fi
1953 if test -z "$LTCFLAGS"; then
1954 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1955 fi
1956
1957 # Extract list of available tagged configurations in $ofile.
1958 # Note that this assumes the entire list is on one line.
1959 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1960
1961 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1962 for tagname in $tagnames; do
1963 IFS="$lt_save_ifs"
1964 # Check whether tagname contains only valid characters
1965 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1966 "") ;;
1967 *) AC_MSG_ERROR([invalid tag name: $tagname])
1968 ;;
1969 esac
1970
1971 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1972 then
1973 AC_MSG_ERROR([tag name \"$tagname\" already exists])
1974 fi
1975
1976 # Update the list of available tags.
1977 if test -n "$tagname"; then
1978 echo appending configuration tag \"$tagname\" to $ofile
1979
1980 case $tagname in
1981 CXX)
1982 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1983 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1984 (test "X$CXX" != "Xg++"))) ; then
1985 AC_LIBTOOL_LANG_CXX_CONFIG
1986 else
1987 tagname=""
1988 fi
1989 ;;
1990
1991 F77)
1992 if test -n "$F77" && test "X$F77" != "Xno"; then
1993 AC_LIBTOOL_LANG_F77_CONFIG
1994 else
1995 tagname=""
1996 fi
1997 ;;
1998
1999 GCJ)
2000 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2001 AC_LIBTOOL_LANG_GCJ_CONFIG
2002 else
2003 tagname=""
2004 fi
2005 ;;
2006
2007 RC)
2008 AC_LIBTOOL_LANG_RC_CONFIG
2009 ;;
2010
2011 *)
2012 AC_MSG_ERROR([Unsupported tag name: $tagname])
2013 ;;
2014 esac
2015
2016 # Append the new tag name to the list of available tags.
2017 if test -n "$tagname" ; then
2018 available_tags="$available_tags $tagname"
2019 fi
2020 fi
2021 done
2022 IFS="$lt_save_ifs"
2023
2024 # Now substitute the updated list of available tags.
2025 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2026 mv "${ofile}T" "$ofile"
2027 chmod +x "$ofile"
2028 else
2029 rm -f "${ofile}T"
2030 AC_MSG_ERROR([unable to update list of available tagged configurations.])
2031 fi
2032 fi
2033 ])# _LT_AC_TAGCONFIG
2034
2035
2036 # AC_LIBTOOL_DLOPEN
2037 # -----------------
2038 # enable checks for dlopen support
2039 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2040 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2041 ])# AC_LIBTOOL_DLOPEN
2042
2043
2044 # AC_LIBTOOL_WIN32_DLL
2045 # --------------------
2046 # declare package support for building win32 DLLs
2047 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2048 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2049 ])# AC_LIBTOOL_WIN32_DLL
2050
2051
2052 # AC_ENABLE_SHARED([DEFAULT])
2053 # ---------------------------
2054 # implement the --enable-shared flag
2055 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2056 AC_DEFUN([AC_ENABLE_SHARED],
2057 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2058 AC_ARG_ENABLE([shared],
2059 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2060 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2061 [p=${PACKAGE-default}
2062 case $enableval in
2063 yes) enable_shared=yes ;;
2064 no) enable_shared=no ;;
2065 *)
2066 enable_shared=no
2067 # Look at the argument we got. We use all the common list separators.
2068 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2069 for pkg in $enableval; do
2070 IFS="$lt_save_ifs"
2071 if test "X$pkg" = "X$p"; then
2072 enable_shared=yes
2073 fi
2074 done
2075 IFS="$lt_save_ifs"
2076 ;;
2077 esac],
2078 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2079 ])# AC_ENABLE_SHARED
2080
2081
2082 # AC_DISABLE_SHARED
2083 # -----------------
2084 # set the default shared flag to --disable-shared
2085 AC_DEFUN([AC_DISABLE_SHARED],
2086 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2087 AC_ENABLE_SHARED(no)
2088 ])# AC_DISABLE_SHARED
2089
2090
2091 # AC_ENABLE_STATIC([DEFAULT])
2092 # ---------------------------
2093 # implement the --enable-static flag
2094 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2095 AC_DEFUN([AC_ENABLE_STATIC],
2096 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2097 AC_ARG_ENABLE([static],
2098 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2099 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2100 [p=${PACKAGE-default}
2101 case $enableval in
2102 yes) enable_static=yes ;;
2103 no) enable_static=no ;;
2104 *)
2105 enable_static=no
2106 # Look at the argument we got. We use all the common list separators.
2107 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2108 for pkg in $enableval; do
2109 IFS="$lt_save_ifs"
2110 if test "X$pkg" = "X$p"; then
2111 enable_static=yes
2112 fi
2113 done
2114 IFS="$lt_save_ifs"
2115 ;;
2116 esac],
2117 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2118 ])# AC_ENABLE_STATIC
2119
2120
2121 # AC_DISABLE_STATIC
2122 # -----------------
2123 # set the default static flag to --disable-static
2124 AC_DEFUN([AC_DISABLE_STATIC],
2125 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2126 AC_ENABLE_STATIC(no)
2127 ])# AC_DISABLE_STATIC
2128
2129
2130 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2131 # ---------------------------------
2132 # implement the --enable-fast-install flag
2133 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2134 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2135 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2136 AC_ARG_ENABLE([fast-install],
2137 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2138 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2139 [p=${PACKAGE-default}
2140 case $enableval in
2141 yes) enable_fast_install=yes ;;
2142 no) enable_fast_install=no ;;
2143 *)
2144 enable_fast_install=no
2145 # Look at the argument we got. We use all the common list separators.
2146 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2147 for pkg in $enableval; do
2148 IFS="$lt_save_ifs"
2149 if test "X$pkg" = "X$p"; then
2150 enable_fast_install=yes
2151 fi
2152 done
2153 IFS="$lt_save_ifs"
2154 ;;
2155 esac],
2156 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2157 ])# AC_ENABLE_FAST_INSTALL
2158
2159
2160 # AC_DISABLE_FAST_INSTALL
2161 # -----------------------
2162 # set the default to --disable-fast-install
2163 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2164 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2165 AC_ENABLE_FAST_INSTALL(no)
2166 ])# AC_DISABLE_FAST_INSTALL
2167
2168
2169 # AC_LIBTOOL_PICMODE([MODE])
2170 # --------------------------
2171 # implement the --with-pic flag
2172 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2173 AC_DEFUN([AC_LIBTOOL_PICMODE],
2174 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2175 pic_mode=ifelse($#,1,$1,default)
2176 ])# AC_LIBTOOL_PICMODE
2177
2178
2179 # AC_PROG_EGREP
2180 # -------------
2181 # This is predefined starting with Autoconf 2.54, so this conditional
2182 # definition can be removed once we require Autoconf 2.54 or later.
2183 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2184 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2185 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2186 then ac_cv_prog_egrep='grep -E'
2187 else ac_cv_prog_egrep='egrep'
2188 fi])
2189 EGREP=$ac_cv_prog_egrep
2190 AC_SUBST([EGREP])
2191 ])])
2192
2193
2194 # AC_PATH_TOOL_PREFIX
2195 # -------------------
2196 # find a file program which can recognize shared library
2197 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2198 [AC_REQUIRE([AC_PROG_EGREP])dnl
2199 AC_MSG_CHECKING([for $1])
2200 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2201 [case $MAGIC_CMD in
2202 [[\\/*] | ?:[\\/]*])
2203 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2204 ;;
2205 *)
2206 lt_save_MAGIC_CMD="$MAGIC_CMD"
2207 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2208 dnl $ac_dummy forces splitting on constant user-supplied paths.
2209 dnl POSIX.2 word splitting is done only on the output of word expansions,
2210 dnl not every word. This closes a longstanding sh security hole.
2211 ac_dummy="ifelse([$2], , $PATH, [$2])"
2212 for ac_dir in $ac_dummy; do
2213 IFS="$lt_save_ifs"
2214 test -z "$ac_dir" && ac_dir=.
2215 if test -f $ac_dir/$1; then
2216 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2217 if test -n "$file_magic_test_file"; then
2218 case $deplibs_check_method in
2219 "file_magic "*)
2220 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2221 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2222 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2223 $EGREP "$file_magic_regex" > /dev/null; then
2224 :
2225 else
2226 cat <<EOF 1>&2
2227
2228 *** Warning: the command libtool uses to detect shared libraries,
2229 *** $file_magic_cmd, produces output that libtool cannot recognize.
2230 *** The result is that libtool may fail to recognize shared libraries
2231 *** as such. This will affect the creation of libtool libraries that
2232 *** depend on shared libraries, but programs linked with such libtool
2233 *** libraries will work regardless of this problem. Nevertheless, you
2234 *** may want to report the problem to your system manager and/or to
2235 *** bug-libtool@gnu.org
2236
2237 EOF
2238 fi ;;
2239 esac
2240 fi
2241 break
2242 fi
2243 done
2244 IFS="$lt_save_ifs"
2245 MAGIC_CMD="$lt_save_MAGIC_CMD"
2246 ;;
2247 esac])
2248 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2249 if test -n "$MAGIC_CMD"; then
2250 AC_MSG_RESULT($MAGIC_CMD)
2251 else
2252 AC_MSG_RESULT(no)
2253 fi
2254 ])# AC_PATH_TOOL_PREFIX
2255
2256
2257 # AC_PATH_MAGIC
2258 # -------------
2259 # find a file program which can recognize a shared library
2260 AC_DEFUN([AC_PATH_MAGIC],
2261 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2262 if test -z "$lt_cv_path_MAGIC_CMD"; then
2263 if test -n "$ac_tool_prefix"; then
2264 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2265 else
2266 MAGIC_CMD=:
2267 fi
2268 fi
2269 ])# AC_PATH_MAGIC
2270
2271
2272 # AC_PROG_LD
2273 # ----------
2274 # find the pathname to the GNU or non-GNU linker
2275 AC_DEFUN([AC_PROG_LD],
2276 [AC_ARG_WITH([gnu-ld],
2277 [AC_HELP_STRING([--with-gnu-ld],
2278 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2279 [test "$withval" = no || with_gnu_ld=yes],
2280 [with_gnu_ld=no])
2281 AC_REQUIRE([LT_AC_PROG_SED])dnl
2282 AC_REQUIRE([AC_PROG_CC])dnl
2283 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2284 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2285 ac_prog=ld
2286 if test "$GCC" = yes; then
2287 # Check if gcc -print-prog-name=ld gives a path.
2288 AC_MSG_CHECKING([for ld used by $CC])
2289 case $host in
2290 *-*-mingw*)
2291 # gcc leaves a trailing carriage return which upsets mingw
2292 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2293 *)
2294 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2295 esac
2296 case $ac_prog in
2297 # Accept absolute paths.
2298 [[\\/]]* | ?:[[\\/]]*)
2299 re_direlt='/[[^/]][[^/]]*/\.\./'
2300 # Canonicalize the pathname of ld
2301 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2302 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2303 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2304 done
2305 test -z "$LD" && LD="$ac_prog"
2306 ;;
2307 "")
2308 # If it fails, then pretend we aren't using GCC.
2309 ac_prog=ld
2310 ;;
2311 *)
2312 # If it is relative, then search for the first ld in PATH.
2313 with_gnu_ld=unknown
2314 ;;
2315 esac
2316 elif test "$with_gnu_ld" = yes; then
2317 AC_MSG_CHECKING([for GNU ld])
2318 else
2319 AC_MSG_CHECKING([for non-GNU ld])
2320 fi
2321 AC_CACHE_VAL(lt_cv_path_LD,
2322 [if test -z "$LD"; then
2323 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2324 for ac_dir in $PATH; do
2325 IFS="$lt_save_ifs"
2326 test -z "$ac_dir" && ac_dir=.
2327 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2328 lt_cv_path_LD="$ac_dir/$ac_prog"
2329 # Check to see if the program is GNU ld. I'd rather use --version,
2330 # but apparently some variants of GNU ld only accept -v.
2331 # Break only if it was the GNU/non-GNU ld that we prefer.
2332 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2333 *GNU* | *'with BFD'*)
2334 test "$with_gnu_ld" != no && break
2335 ;;
2336 *)
2337 test "$with_gnu_ld" != yes && break
2338 ;;
2339 esac
2340 fi
2341 done
2342 IFS="$lt_save_ifs"
2343 else
2344 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2345 fi])
2346 LD="$lt_cv_path_LD"
2347 if test -n "$LD"; then
2348 AC_MSG_RESULT($LD)
2349 else
2350 AC_MSG_RESULT(no)
2351 fi
2352 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2353 AC_PROG_LD_GNU
2354 ])# AC_PROG_LD
2355
2356
2357 # AC_PROG_LD_GNU
2358 # --------------
2359 AC_DEFUN([AC_PROG_LD_GNU],
2360 [AC_REQUIRE([AC_PROG_EGREP])dnl
2361 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2362 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
2363 case `$LD -v 2>&1 </dev/null` in
2364 *GNU* | *'with BFD'*)
2365 lt_cv_prog_gnu_ld=yes
2366 ;;
2367 *)
2368 lt_cv_prog_gnu_ld=no
2369 ;;
2370 esac])
2371 with_gnu_ld=$lt_cv_prog_gnu_ld
2372 ])# AC_PROG_LD_GNU
2373
2374
2375 # AC_PROG_LD_RELOAD_FLAG
2376 # ----------------------
2377 # find reload flag for linker
2378 # -- PORTME Some linkers may need a different reload flag.
2379 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2380 [AC_CACHE_CHECK([for $LD option to reload object files],
2381 lt_cv_ld_reload_flag,
2382 [lt_cv_ld_reload_flag='-r'])
2383 reload_flag=$lt_cv_ld_reload_flag
2384 case $reload_flag in
2385 "" | " "*) ;;
2386 *) reload_flag=" $reload_flag" ;;
2387 esac
2388 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2389 case $host_os in
2390 darwin*)
2391 if test "$GCC" = yes; then
2392 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2393 else
2394 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2395 fi
2396 ;;
2397 esac
2398 ])# AC_PROG_LD_RELOAD_FLAG
2399
2400
2401 # AC_DEPLIBS_CHECK_METHOD
2402 # -----------------------
2403 # how to check for library dependencies
2404 # -- PORTME fill in with the dynamic library characteristics
2405 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2406 [AC_CACHE_CHECK([how to recognize dependent libraries],
2407 lt_cv_deplibs_check_method,
2408 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2409 lt_cv_file_magic_test_file=
2410 lt_cv_deplibs_check_method='unknown'
2411 # Need to set the preceding variable on all platforms that support
2412 # interlibrary dependencies.
2413 # 'none' -- dependencies not supported.
2414 # `unknown' -- same as none, but documents that we really don't know.
2415 # 'pass_all' -- all dependencies passed with no checks.
2416 # 'test_compile' -- check by making test program.
2417 # 'file_magic [[regex]]' -- check by looking for files in library path
2418 # which responds to the $file_magic_cmd with a given extended regex.
2419 # If you have `file' or equivalent on your system and you're not sure
2420 # whether `pass_all' will *always* work, you probably want this one.
2421
2422 case $host_os in
2423 aix[[4-9]]*)
2424 lt_cv_deplibs_check_method=pass_all
2425 ;;
2426
2427 beos*)
2428 lt_cv_deplibs_check_method=pass_all
2429 ;;
2430
2431 bsdi[[45]]*)
2432 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2433 lt_cv_file_magic_cmd='/usr/bin/file -L'
2434 lt_cv_file_magic_test_file=/shlib/libc.so
2435 ;;
2436
2437 cygwin*)
2438 # func_win32_libid is a shell function defined in ltmain.sh
2439 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2440 lt_cv_file_magic_cmd='func_win32_libid'
2441 ;;
2442
2443 mingw* | pw32*)
2444 # Base MSYS/MinGW do not provide the 'file' command needed by
2445 # func_win32_libid shell function, so use a weaker test based on 'objdump',
2446 # unless we find 'file', for example because we are cross-compiling.
2447 if ( file / ) >/dev/null 2>&1; then
2448 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2449 lt_cv_file_magic_cmd='func_win32_libid'
2450 else
2451 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2452 lt_cv_file_magic_cmd='$OBJDUMP -f'
2453 fi
2454 ;;
2455
2456 darwin* | rhapsody*)
2457 lt_cv_deplibs_check_method=pass_all
2458 ;;
2459
2460 freebsd* | dragonfly*)
2461 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2462 case $host_cpu in
2463 i*86 )
2464 # Not sure whether the presence of OpenBSD here was a mistake.
2465 # Let's accept both of them until this is cleared up.
2466 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2467 lt_cv_file_magic_cmd=/usr/bin/file
2468 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2469 ;;
2470 esac
2471 else
2472 lt_cv_deplibs_check_method=pass_all
2473 fi
2474 ;;
2475
2476 gnu*)
2477 lt_cv_deplibs_check_method=pass_all
2478 ;;
2479
2480 hpux10.20* | hpux11*)
2481 lt_cv_file_magic_cmd=/usr/bin/file
2482 case $host_cpu in
2483 ia64*)
2484 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2485 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2486 ;;
2487 hppa*64*)
2488 [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]']
2489 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2490 ;;
2491 *)
2492 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2493 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2494 ;;
2495 esac
2496 ;;
2497
2498 interix[[3-9]]*)
2499 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2500 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2501 ;;
2502
2503 irix5* | irix6* | nonstopux*)
2504 case $LD in
2505 *-32|*"-32 ") libmagic=32-bit;;
2506 *-n32|*"-n32 ") libmagic=N32;;
2507 *-64|*"-64 ") libmagic=64-bit;;
2508 *) libmagic=never-match;;
2509 esac
2510 lt_cv_deplibs_check_method=pass_all
2511 ;;
2512
2513 # This must be Linux ELF.
2514 linux* | k*bsd*-gnu)
2515 lt_cv_deplibs_check_method=pass_all
2516 ;;
2517
2518 netbsd* | netbsdelf*-gnu)
2519 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2520 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2521 else
2522 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2523 fi
2524 ;;
2525
2526 newos6*)
2527 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2528 lt_cv_file_magic_cmd=/usr/bin/file
2529 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2530 ;;
2531
2532 nto-qnx*)
2533 lt_cv_deplibs_check_method=unknown
2534 ;;
2535
2536 openbsd*)
2537 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2538 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2539 else
2540 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2541 fi
2542 ;;
2543
2544 osf3* | osf4* | osf5*)
2545 lt_cv_deplibs_check_method=pass_all
2546 ;;
2547
2548 rdos*)
2549 lt_cv_deplibs_check_method=pass_all
2550 ;;
2551
2552 solaris*)
2553 lt_cv_deplibs_check_method=pass_all
2554 ;;
2555
2556 sysv4 | sysv4.3*)
2557 case $host_vendor in
2558 motorola)
2559 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
2560 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2561 ;;
2562 ncr)
2563 lt_cv_deplibs_check_method=pass_all
2564 ;;
2565 sequent)
2566 lt_cv_file_magic_cmd='/bin/file'
2567 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2568 ;;
2569 sni)
2570 lt_cv_file_magic_cmd='/bin/file'
2571 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2572 lt_cv_file_magic_test_file=/lib/libc.so
2573 ;;
2574 siemens)
2575 lt_cv_deplibs_check_method=pass_all
2576 ;;
2577 pc)
2578 lt_cv_deplibs_check_method=pass_all
2579 ;;
2580 esac
2581 ;;
2582
2583 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2584 lt_cv_deplibs_check_method=pass_all
2585 ;;
2586 esac
2587 ])
2588 file_magic_cmd=$lt_cv_file_magic_cmd
2589 deplibs_check_method=$lt_cv_deplibs_check_method
2590 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2591 ])# AC_DEPLIBS_CHECK_METHOD
2592
2593
2594 # AC_PROG_NM
2595 # ----------
2596 # find the pathname to a BSD-compatible name lister
2597 AC_DEFUN([AC_PROG_NM],
2598 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2599 [if test -n "$NM"; then
2600 # Let the user override the test.
2601 lt_cv_path_NM="$NM"
2602 else
2603 lt_nm_to_check="${ac_tool_prefix}nm"
2604 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
2605 lt_nm_to_check="$lt_nm_to_check nm"
2606 fi
2607 for lt_tmp_nm in $lt_nm_to_check; do
2608 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2609 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2610 IFS="$lt_save_ifs"
2611 test -z "$ac_dir" && ac_dir=.
2612 tmp_nm="$ac_dir/$lt_tmp_nm"
2613 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2614 # Check to see if the nm accepts a BSD-compat flag.
2615 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2616 # nm: unknown option "B" ignored
2617 # Tru64's nm complains that /dev/null is an invalid object file
2618 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2619 */dev/null* | *'Invalid file or object type'*)
2620 lt_cv_path_NM="$tmp_nm -B"
2621 break
2622 ;;
2623 *)
2624 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2625 */dev/null*)
2626 lt_cv_path_NM="$tmp_nm -p"
2627 break
2628 ;;
2629 *)
2630 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2631 continue # so that we can try to find one that supports BSD flags
2632 ;;
2633 esac
2634 ;;
2635 esac
2636 fi
2637 done
2638 IFS="$lt_save_ifs"
2639 done
2640 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2641 fi])
2642 NM="$lt_cv_path_NM"
2643 ])# AC_PROG_NM
2644
2645
2646 # AC_CHECK_LIBM
2647 # -------------
2648 # check for math library
2649 AC_DEFUN([AC_CHECK_LIBM],
2650 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2651 LIBM=
2652 case $host in
2653 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2654 # These system don't have libm, or don't need it
2655 ;;
2656 *-ncr-sysv4.3*)
2657 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2658 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2659 ;;
2660 *)
2661 AC_CHECK_LIB(m, cos, LIBM="-lm")
2662 ;;
2663 esac
2664 ])# AC_CHECK_LIBM
2665
2666
2667 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2668 # -----------------------------------
2669 # sets LIBLTDL to the link flags for the libltdl convenience library and
2670 # LTDLINCL to the include flags for the libltdl header and adds
2671 # --enable-ltdl-convenience to the configure arguments. Note that
2672 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2673 # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
2674 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2675 # (note the single quotes!). If your package is not flat and you're not
2676 # using automake, define top_builddir and top_srcdir appropriately in
2677 # the Makefiles.
2678 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2679 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2680 case $enable_ltdl_convenience in
2681 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2682 "") enable_ltdl_convenience=yes
2683 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2684 esac
2685 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2686 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2687 # For backwards non-gettext consistent compatibility...
2688 INCLTDL="$LTDLINCL"
2689 ])# AC_LIBLTDL_CONVENIENCE
2690
2691
2692 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2693 # -----------------------------------
2694 # sets LIBLTDL to the link flags for the libltdl installable library and
2695 # LTDLINCL to the include flags for the libltdl header and adds
2696 # --enable-ltdl-install to the configure arguments. Note that
2697 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2698 # and an installed libltdl is not found, it is assumed to be `libltdl'.
2699 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2700 # '${top_srcdir}/' (note the single quotes!). If your package is not
2701 # flat and you're not using automake, define top_builddir and top_srcdir
2702 # appropriately in the Makefiles.
2703 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2704 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2705 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2706 AC_CHECK_LIB(ltdl, lt_dlinit,
2707 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2708 [if test x"$enable_ltdl_install" = xno; then
2709 AC_MSG_WARN([libltdl not installed, but installation disabled])
2710 else
2711 enable_ltdl_install=yes
2712 fi
2713 ])
2714 if test x"$enable_ltdl_install" = x"yes"; then
2715 ac_configure_args="$ac_configure_args --enable-ltdl-install"
2716 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2717 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2718 else
2719 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2720 LIBLTDL="-lltdl"
2721 LTDLINCL=
2722 fi
2723 # For backwards non-gettext consistent compatibility...
2724 INCLTDL="$LTDLINCL"
2725 ])# AC_LIBLTDL_INSTALLABLE
2726
2727
2728 # AC_LIBTOOL_CXX
2729 # --------------
2730 # enable support for C++ libraries
2731 AC_DEFUN([AC_LIBTOOL_CXX],
2732 [AC_REQUIRE([_LT_AC_LANG_CXX])
2733 ])# AC_LIBTOOL_CXX
2734
2735
2736 # _LT_AC_LANG_CXX
2737 # ---------------
2738 AC_DEFUN([_LT_AC_LANG_CXX],
2739 [AC_REQUIRE([AC_PROG_CXX])
2740 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2741 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2742 ])# _LT_AC_LANG_CXX
2743
2744 # _LT_AC_PROG_CXXCPP
2745 # ------------------
2746 AC_DEFUN([_LT_AC_PROG_CXXCPP],
2747 [
2748 AC_REQUIRE([AC_PROG_CXX])
2749 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2750 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2751 (test "X$CXX" != "Xg++"))) ; then
2752 AC_PROG_CXXCPP
2753 fi
2754 ])# _LT_AC_PROG_CXXCPP
2755
2756 # AC_LIBTOOL_F77
2757 # --------------
2758 # enable support for Fortran 77 libraries
2759 AC_DEFUN([AC_LIBTOOL_F77],
2760 [AC_REQUIRE([_LT_AC_LANG_F77])
2761 ])# AC_LIBTOOL_F77
2762
2763
2764 # _LT_AC_LANG_F77
2765 # ---------------
2766 AC_DEFUN([_LT_AC_LANG_F77],
2767 [AC_REQUIRE([AC_PROG_F77])
2768 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2769 ])# _LT_AC_LANG_F77
2770
2771
2772 # AC_LIBTOOL_GCJ
2773 # --------------
2774 # enable support for GCJ libraries
2775 AC_DEFUN([AC_LIBTOOL_GCJ],
2776 [AC_REQUIRE([_LT_AC_LANG_GCJ])
2777 ])# AC_LIBTOOL_GCJ
2778
2779
2780 # _LT_AC_LANG_GCJ
2781 # ---------------
2782 AC_DEFUN([_LT_AC_LANG_GCJ],
2783 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2784 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2785 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2786 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2787 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2788 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2789 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2790 ])# _LT_AC_LANG_GCJ
2791
2792
2793 # AC_LIBTOOL_RC
2794 # -------------
2795 # enable support for Windows resource files
2796 AC_DEFUN([AC_LIBTOOL_RC],
2797 [AC_REQUIRE([LT_AC_PROG_RC])
2798 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2799 ])# AC_LIBTOOL_RC
2800
2801
2802 # AC_LIBTOOL_LANG_C_CONFIG
2803 # ------------------------
2804 # Ensure that the configuration vars for the C compiler are
2805 # suitably defined. Those variables are subsequently used by
2806 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2807 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2808 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2809 [lt_save_CC="$CC"
2810 AC_LANG_PUSH(C)
2811
2812 # Source file extension for C test sources.
2813 ac_ext=c
2814
2815 # Object file extension for compiled C test sources.
2816 objext=o
2817 _LT_AC_TAGVAR(objext, $1)=$objext
2818
2819 # Code to be used in simple compile tests
2820 lt_simple_compile_test_code="int some_variable = 0;"
2821
2822 # Code to be used in simple link tests
2823 lt_simple_link_test_code='int main(){return(0);}'
2824
2825 _LT_AC_SYS_COMPILER
2826
2827 # save warnings/boilerplate of simple test code
2828 _LT_COMPILER_BOILERPLATE
2829 _LT_LINKER_BOILERPLATE
2830
2831 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2832 AC_LIBTOOL_PROG_COMPILER_PIC($1)
2833 AC_LIBTOOL_PROG_CC_C_O($1)
2834 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2835 AC_LIBTOOL_PROG_LD_SHLIBS($1)
2836 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2837 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2838 AC_LIBTOOL_SYS_LIB_STRIP
2839 AC_LIBTOOL_DLOPEN_SELF
2840
2841 # Report which library types will actually be built
2842 AC_MSG_CHECKING([if libtool supports shared libraries])
2843 AC_MSG_RESULT([$can_build_shared])
2844
2845 AC_MSG_CHECKING([whether to build shared libraries])
2846 test "$can_build_shared" = "no" && enable_shared=no
2847
2848 # On AIX, shared libraries and static libraries use the same namespace, and
2849 # are all built from PIC.
2850 case $host_os in
2851 aix3*)
2852 test "$enable_shared" = yes && enable_static=no
2853 if test -n "$RANLIB"; then
2854 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2855 postinstall_cmds='$RANLIB $lib'
2856 fi
2857 ;;
2858
2859 aix[[4-9]]*)
2860 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2861 test "$enable_shared" = yes && enable_static=no
2862 fi
2863 ;;
2864 esac
2865 AC_MSG_RESULT([$enable_shared])
2866
2867 AC_MSG_CHECKING([whether to build static libraries])
2868 # Make sure either enable_shared or enable_static is yes.
2869 test "$enable_shared" = yes || enable_static=yes
2870 AC_MSG_RESULT([$enable_static])
2871
2872 AC_LIBTOOL_CONFIG($1)
2873
2874 AC_LANG_POP
2875 CC="$lt_save_CC"
2876 ])# AC_LIBTOOL_LANG_C_CONFIG
2877
2878
2879 # AC_LIBTOOL_LANG_CXX_CONFIG
2880 # --------------------------
2881 # Ensure that the configuration vars for the C compiler are
2882 # suitably defined. Those variables are subsequently used by
2883 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2884 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2885 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2886 [AC_LANG_PUSH(C++)
2887 AC_REQUIRE([AC_PROG_CXX])
2888 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2889
2890 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2891 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
2892 _LT_AC_TAGVAR(always_export_symbols, $1)=no
2893 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2894 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2895 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2896 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2897 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2898 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2899 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2900 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2901 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
2902 _LT_AC_TAGVAR(module_cmds, $1)=
2903 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
2904 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2905 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2906 _LT_AC_TAGVAR(no_undefined_flag, $1)=
2907 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2908 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2909
2910 # Dependencies to place before and after the object being linked:
2911 _LT_AC_TAGVAR(predep_objects, $1)=
2912 _LT_AC_TAGVAR(postdep_objects, $1)=
2913 _LT_AC_TAGVAR(predeps, $1)=
2914 _LT_AC_TAGVAR(postdeps, $1)=
2915 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2916 _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
2917
2918 # Source file extension for C++ test sources.
2919 ac_ext=cpp
2920
2921 # Object file extension for compiled C++ test sources.
2922 objext=o
2923 _LT_AC_TAGVAR(objext, $1)=$objext
2924
2925 # Code to be used in simple compile tests
2926 lt_simple_compile_test_code="int some_variable = 0;"
2927
2928 # Code to be used in simple link tests
2929 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
2930
2931 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
2932 _LT_AC_SYS_COMPILER
2933
2934 # save warnings/boilerplate of simple test code
2935 _LT_COMPILER_BOILERPLATE
2936 _LT_LINKER_BOILERPLATE
2937
2938 # Allow CC to be a program name with arguments.
2939 lt_save_CC=$CC
2940 lt_save_LD=$LD
2941 lt_save_GCC=$GCC
2942 GCC=$GXX
2943 lt_save_with_gnu_ld=$with_gnu_ld
2944 lt_save_path_LD=$lt_cv_path_LD
2945 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2946 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2947 else
2948 $as_unset lt_cv_prog_gnu_ld
2949 fi
2950 if test -n "${lt_cv_path_LDCXX+set}"; then
2951 lt_cv_path_LD=$lt_cv_path_LDCXX
2952 else
2953 $as_unset lt_cv_path_LD
2954 fi
2955 test -z "${LDCXX+set}" || LD=$LDCXX
2956 CC=${CXX-"c++"}
2957 compiler=$CC
2958 _LT_AC_TAGVAR(compiler, $1)=$CC
2959 _LT_CC_BASENAME([$compiler])
2960
2961 # We don't want -fno-exception wen compiling C++ code, so set the
2962 # no_builtin_flag separately
2963 if test "$GXX" = yes; then
2964 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2965 else
2966 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2967 fi
2968
2969 if test "$GXX" = yes; then
2970 # Set up default GNU C++ configuration
2971
2972 AC_PROG_LD
2973
2974 # Check if GNU C++ uses GNU ld as the underlying linker, since the
2975 # archiving commands below assume that GNU ld is being used.
2976 if test "$with_gnu_ld" = yes; then
2977 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2978 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2979
2980 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2981 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2982
2983 # If archive_cmds runs LD, not CC, wlarc should be empty
2984 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2985 # investigate it a little bit more. (MM)
2986 wlarc='${wl}'
2987
2988 # ancient GNU ld didn't support --whole-archive et. al.
2989 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2990 grep 'no-whole-archive' > /dev/null; then
2991 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2992 else
2993 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2994 fi
2995 else
2996 with_gnu_ld=no
2997 wlarc=
2998
2999 # A generic and very simple default shared library creation
3000 # command for GNU C++ for the case where it uses the native
3001 # linker, instead of GNU ld. If possible, this setting should
3002 # overridden to take advantage of the native linker features on
3003 # the platform it is being used on.
3004 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3005 fi
3006
3007 # Commands to make compiler produce verbose output that lists
3008 # what "hidden" libraries, object files and flags are used when
3009 # linking a shared library.
3010 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3011
3012 else
3013 GXX=no
3014 with_gnu_ld=no
3015 wlarc=
3016 fi
3017
3018 # PORTME: fill in a description of your system's C++ link characteristics
3019 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3020 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3021 case $host_os in
3022 aix3*)
3023 # FIXME: insert proper C++ library support
3024 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3025 ;;
3026 aix[[4-9]]*)
3027 if test "$host_cpu" = ia64; then
3028 # On IA64, the linker does run time linking by default, so we don't
3029 # have to do anything special.
3030 aix_use_runtimelinking=no
3031 exp_sym_flag='-Bexport'
3032 no_entry_flag=""
3033 else
3034 aix_use_runtimelinking=no
3035
3036 # Test if we are trying to use run time linking or normal
3037 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3038 # need to do runtime linking.
3039 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
3040 for ld_flag in $LDFLAGS; do
3041 case $ld_flag in
3042 *-brtl*)
3043 aix_use_runtimelinking=yes
3044 break
3045 ;;
3046 esac
3047 done
3048 ;;
3049 esac
3050
3051 exp_sym_flag='-bexport'
3052 no_entry_flag='-bnoentry'
3053 fi
3054
3055 # When large executables or shared objects are built, AIX ld can
3056 # have problems creating the table of contents. If linking a library
3057 # or program results in "error TOC overflow" add -mminimal-toc to
3058 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3059 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3060
3061 _LT_AC_TAGVAR(archive_cmds, $1)=''
3062 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3063 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3064 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3065
3066 if test "$GXX" = yes; then
3067 case $host_os in aix4.[[012]]|aix4.[[012]].*)
3068 # We only want to do this on AIX 4.2 and lower, the check
3069 # below for broken collect2 doesn't work under 4.3+
3070 collect2name=`${CC} -print-prog-name=collect2`
3071 if test -f "$collect2name" && \
3072 strings "$collect2name" | grep resolve_lib_name >/dev/null
3073 then
3074 # We have reworked collect2
3075 :
3076 else
3077 # We have old collect2
3078 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3079 # It fails to find uninstalled libraries when the uninstalled
3080 # path is not listed in the libpath. Setting hardcode_minus_L
3081 # to unsupported forces relinking
3082 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3083 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3084 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3085 fi
3086 ;;
3087 esac
3088 shared_flag='-shared'
3089 if test "$aix_use_runtimelinking" = yes; then
3090 shared_flag="$shared_flag "'${wl}-G'
3091 fi
3092 else
3093 # not using gcc
3094 if test "$host_cpu" = ia64; then
3095 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3096 # chokes on -Wl,-G. The following line is correct:
3097 shared_flag='-G'
3098 else
3099 if test "$aix_use_runtimelinking" = yes; then
3100 shared_flag='${wl}-G'
3101 else
3102 shared_flag='${wl}-bM:SRE'
3103 fi
3104 fi
3105 fi
3106
3107 # It seems that -bexpall does not export symbols beginning with
3108 # underscore (_), so it is better to generate a list of symbols to export.
3109 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3110 if test "$aix_use_runtimelinking" = yes; then
3111 # Warning - without using the other runtime loading flags (-brtl),
3112 # -berok will link without error, but may produce a broken library.
3113 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3114 # Determine the default libpath from the value encoded in an empty executable.
3115 _LT_AC_SYS_LIBPATH_AIX
3116 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3117
3118 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3119 else
3120 if test "$host_cpu" = ia64; then
3121 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3122 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3123 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
3124 else
3125 # Determine the default libpath from the value encoded in an empty executable.
3126 _LT_AC_SYS_LIBPATH_AIX
3127 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3128 # Warning - without using the other run time loading flags,
3129 # -berok will link without error, but may produce a broken library.
3130 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3131 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3132 # Exported symbols can be pulled into shared objects from archives
3133 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
3134 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3135 # This is similar to how AIX traditionally builds its shared libraries.
3136 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3137 fi
3138 fi
3139 ;;
3140
3141 beos*)
3142 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3143 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3144 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3145 # support --undefined. This deserves some investigation. FIXME
3146 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3147 else
3148 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3149 fi
3150 ;;
3151
3152 chorus*)
3153 case $cc_basename in
3154 *)
3155 # FIXME: insert proper C++ library support
3156 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3157 ;;
3158 esac
3159 ;;
3160
3161 cygwin* | mingw* | pw32*)
3162 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3163 # as there is no search path for DLLs.
3164 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3165 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3166 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3167 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3168
3169 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3170 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3171 # If the export-symbols file already is a .def file (1st line
3172 # is EXPORTS), use it as is; otherwise, prepend...
3173 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3174 cp $export_symbols $output_objdir/$soname.def;
3175 else
3176 echo EXPORTS > $output_objdir/$soname.def;
3177 cat $export_symbols >> $output_objdir/$soname.def;
3178 fi~
3179 $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'
3180 else
3181 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3182 fi
3183 ;;
3184 darwin* | rhapsody*)
3185 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3186 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3187 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3188 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3189 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3190 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3191 _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
3192 if test "$GXX" = yes ; then
3193 output_verbose_link_cmd='echo'
3194 _LT_AC_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}"
3195 _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
3196 _LT_AC_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}"
3197 _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
3198 if test "$lt_cv_apple_cc_single_mod" != "yes"; then
3199 _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
3200 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
3201 fi
3202 else
3203 case $cc_basename in
3204 xlc*)
3205 output_verbose_link_cmd='echo'
3206 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
3207 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3208 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3209 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3210 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3211 ;;
3212 *)
3213 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3214 ;;
3215 esac
3216 fi
3217 ;;
3218
3219 dgux*)
3220 case $cc_basename in
3221 ec++*)
3222 # FIXME: insert proper C++ library support
3223 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3224 ;;
3225 ghcx*)
3226 # Green Hills C++ Compiler
3227 # FIXME: insert proper C++ library support
3228 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3229 ;;
3230 *)
3231 # FIXME: insert proper C++ library support
3232 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3233 ;;
3234 esac
3235 ;;
3236 freebsd[[12]]*)
3237 # C++ shared libraries reported to be fairly broken before switch to ELF
3238 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3239 ;;
3240 freebsd-elf*)
3241 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3242 ;;
3243 freebsd* | dragonfly*)
3244 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3245 # conventions
3246 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3247 ;;
3248 gnu*)
3249 ;;
3250 hpux9*)
3251 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3252 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3253 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3254 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3255 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3256 # but as the default
3257 # location of the library.
3258
3259 case $cc_basename in
3260 CC*)
3261 # FIXME: insert proper C++ library support
3262 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3263 ;;
3264 aCC*)
3265 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3266 # Commands to make compiler produce verbose output that lists
3267 # what "hidden" libraries, object files and flags are used when
3268 # linking a shared library.
3269 #
3270 # There doesn't appear to be a way to prevent this compiler from
3271 # explicitly linking system object files so we need to strip them
3272 # from the output so that they don't get included in the library
3273 # dependencies.
3274 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3275 ;;
3276 *)
3277 if test "$GXX" = yes; then
3278 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3279 else
3280 # FIXME: insert proper C++ library support
3281 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3282 fi
3283 ;;
3284 esac
3285 ;;
3286 hpux10*|hpux11*)
3287 if test $with_gnu_ld = no; then
3288 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3289 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3290
3291 case $host_cpu in
3292 hppa*64*|ia64*) ;;
3293 *)
3294 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3295 ;;
3296 esac
3297 fi
3298 case $host_cpu in
3299 hppa*64*|ia64*)
3300 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3301 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3302 ;;
3303 *)
3304 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3305 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3306 # but as the default
3307 # location of the library.
3308 ;;
3309 esac
3310
3311 case $cc_basename in
3312 CC*)
3313 # FIXME: insert proper C++ library support
3314 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3315 ;;
3316 aCC*)
3317 case $host_cpu in
3318 hppa*64*)
3319 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3320 ;;
3321 ia64*)
3322 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3323 ;;
3324 *)
3325 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3326 ;;
3327 esac
3328 # Commands to make compiler produce verbose output that lists
3329 # what "hidden" libraries, object files and flags are used when
3330 # linking a shared library.
3331 #
3332 # There doesn't appear to be a way to prevent this compiler from
3333 # explicitly linking system object files so we need to strip them
3334 # from the output so that they don't get included in the library
3335 # dependencies.
3336 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3337 ;;
3338 *)
3339 if test "$GXX" = yes; then
3340 if test $with_gnu_ld = no; then
3341 case $host_cpu in
3342 hppa*64*)
3343 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3344 ;;
3345 ia64*)
3346 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3347 ;;
3348 *)
3349 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3350 ;;
3351 esac
3352 fi
3353 else
3354 # FIXME: insert proper C++ library support
3355 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3356 fi
3357 ;;
3358 esac
3359 ;;
3360 interix[[3-9]]*)
3361 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3362 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3363 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3364 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3365 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3366 # Instead, shared libraries are loaded at an image base (0x10000000 by
3367 # default) and relocated if they conflict, which is a slow very memory
3368 # consuming and fragmenting process. To avoid this, we pick a random,
3369 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3370 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
3371 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3372 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3373 ;;
3374 irix5* | irix6*)
3375 case $cc_basename in
3376 CC*)
3377 # SGI C++
3378 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3379
3380 # Archives containing C++ object files must be created using
3381 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
3382 # necessary to make sure instantiated templates are included
3383 # in the archive.
3384 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3385 ;;
3386 *)
3387 if test "$GXX" = yes; then
3388 if test "$with_gnu_ld" = no; then
3389 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3390 else
3391 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
3392 fi
3393 fi
3394 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3395 ;;
3396 esac
3397 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3398 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3399 ;;
3400 linux* | k*bsd*-gnu)
3401 case $cc_basename in
3402 KCC*)
3403 # Kuck and Associates, Inc. (KAI) C++ Compiler
3404
3405 # KCC will only create a shared library if the output file
3406 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3407 # to its proper name (with version) after linking.
3408 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3409 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
3410 # Commands to make compiler produce verbose output that lists
3411 # what "hidden" libraries, object files and flags are used when
3412 # linking a shared library.
3413 #
3414 # There doesn't appear to be a way to prevent this compiler from
3415 # explicitly linking system object files so we need to strip them
3416 # from the output so that they don't get included in the library
3417 # dependencies.
3418 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3419
3420 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3421 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3422
3423 # Archives containing C++ object files must be created using
3424 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3425 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3426 ;;
3427 icpc*)
3428 # Intel C++
3429 with_gnu_ld=yes
3430 # version 8.0 and above of icpc choke on multiply defined symbols
3431 # if we add $predep_objects and $postdep_objects, however 7.1 and
3432 # earlier do not add the objects themselves.
3433 case `$CC -V 2>&1` in
3434 *"Version 7."*)
3435 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3436 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3437 ;;
3438 *) # Version 8.0 or newer
3439 tmp_idyn=
3440 case $host_cpu in
3441 ia64*) tmp_idyn=' -i_dynamic';;
3442 esac
3443 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3444 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3445 ;;
3446 esac
3447 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3448 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3449 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3450 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3451 ;;
3452 pgCC* | pgcpp*)
3453 # Portland Group C++ compiler
3454 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3455 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
3456
3457 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3458 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3459 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3460 ;;
3461 cxx*)
3462 # Compaq C++
3463 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3464 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
3465
3466 runpath_var=LD_RUN_PATH
3467 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3468 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3469
3470 # Commands to make compiler produce verbose output that lists
3471 # what "hidden" libraries, object files and flags are used when
3472 # linking a shared library.
3473 #
3474 # There doesn't appear to be a way to prevent this compiler from
3475 # explicitly linking system object files so we need to strip them
3476 # from the output so that they don't get included in the library
3477 # dependencies.
3478 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3479 ;;
3480 *)
3481 case `$CC -V 2>&1 | sed 5q` in
3482 *Sun\ C*)
3483 # Sun C++ 5.9
3484 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3485 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3486 _LT_AC_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'
3487 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3488 _LT_AC_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'
3489
3490 # Not sure whether something based on
3491 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
3492 # would be better.
3493 output_verbose_link_cmd='echo'
3494
3495 # Archives containing C++ object files must be created using
3496 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3497 # necessary to make sure instantiated templates are included
3498 # in the archive.
3499 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3500 ;;
3501 esac
3502 ;;
3503 esac
3504 ;;
3505 lynxos*)
3506 # FIXME: insert proper C++ library support
3507 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3508 ;;
3509 m88k*)
3510 # FIXME: insert proper C++ library support
3511 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3512 ;;
3513 mvs*)
3514 case $cc_basename in
3515 cxx*)
3516 # FIXME: insert proper C++ library support
3517 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3518 ;;
3519 *)
3520 # FIXME: insert proper C++ library support
3521 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3522 ;;
3523 esac
3524 ;;
3525 netbsd* | netbsdelf*-gnu)
3526 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3527 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3528 wlarc=
3529 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3530 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3531 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3532 fi
3533 # Workaround some broken pre-1.5 toolchains
3534 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3535 ;;
3536 openbsd2*)
3537 # C++ shared libraries are fairly broken
3538 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3539 ;;
3540 openbsd*)
3541 if test -f /usr/libexec/ld.so; then
3542 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3543 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3544 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3545 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3546 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3547 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
3548 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3549 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3550 fi
3551 output_verbose_link_cmd='echo'
3552 else
3553 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3554 fi
3555 ;;
3556 osf3*)
3557 case $cc_basename in
3558 KCC*)
3559 # Kuck and Associates, Inc. (KAI) C++ Compiler
3560
3561 # KCC will only create a shared library if the output file
3562 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3563 # to its proper name (with version) after linking.
3564 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3565
3566 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3567 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3568
3569 # Archives containing C++ object files must be created using
3570 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3571 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3572
3573 ;;
3574 RCC*)
3575 # Rational C++ 2.4.1
3576 # FIXME: insert proper C++ library support
3577 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3578 ;;
3579 cxx*)
3580 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3581 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3582
3583 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3584 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3585
3586 # Commands to make compiler produce verbose output that lists
3587 # what "hidden" libraries, object files and flags are used when
3588 # linking a shared library.
3589 #
3590 # There doesn't appear to be a way to prevent this compiler from
3591 # explicitly linking system object files so we need to strip them
3592 # from the output so that they don't get included in the library
3593 # dependencies.
3594 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3595 ;;
3596 *)
3597 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3598 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3599 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3600
3601 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3602 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3603
3604 # Commands to make compiler produce verbose output that lists
3605 # what "hidden" libraries, object files and flags are used when
3606 # linking a shared library.
3607 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3608
3609 else
3610 # FIXME: insert proper C++ library support
3611 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3612 fi
3613 ;;
3614 esac
3615 ;;
3616 osf4* | osf5*)
3617 case $cc_basename in
3618 KCC*)
3619 # Kuck and Associates, Inc. (KAI) C++ Compiler
3620
3621 # KCC will only create a shared library if the output file
3622 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3623 # to its proper name (with version) after linking.
3624 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3625
3626 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3627 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3628
3629 # Archives containing C++ object files must be created using
3630 # the KAI C++ compiler.
3631 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3632 ;;
3633 RCC*)
3634 # Rational C++ 2.4.1
3635 # FIXME: insert proper C++ library support
3636 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3637 ;;
3638 cxx*)
3639 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3640 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3641 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3642 echo "-hidden">> $lib.exp~
3643 $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~
3644 $rm $lib.exp'
3645
3646 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3647 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3648
3649 # Commands to make compiler produce verbose output that lists
3650 # what "hidden" libraries, object files and flags are used when
3651 # linking a shared library.
3652 #
3653 # There doesn't appear to be a way to prevent this compiler from
3654 # explicitly linking system object files so we need to strip them
3655 # from the output so that they don't get included in the library
3656 # dependencies.
3657 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3658 ;;
3659 *)
3660 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3661 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3662 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3663
3664 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3665 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3666
3667 # Commands to make compiler produce verbose output that lists
3668 # what "hidden" libraries, object files and flags are used when
3669 # linking a shared library.
3670 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3671
3672 else
3673 # FIXME: insert proper C++ library support
3674 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3675 fi
3676 ;;
3677 esac
3678 ;;
3679 psos*)
3680 # FIXME: insert proper C++ library support
3681 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3682 ;;
3683 sunos4*)
3684 case $cc_basename in
3685 CC*)
3686 # Sun C++ 4.x
3687 # FIXME: insert proper C++ library support
3688 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3689 ;;
3690 lcc*)
3691 # Lucid
3692 # FIXME: insert proper C++ library support
3693 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3694 ;;
3695 *)
3696 # FIXME: insert proper C++ library support
3697 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3698 ;;
3699 esac
3700 ;;
3701 solaris*)
3702 case $cc_basename in
3703 CC*)
3704 # Sun C++ 4.2, 5.x and Centerline C++
3705 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3706 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3707 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3708 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3709 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3710
3711 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3712 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3713 case $host_os in
3714 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3715 *)
3716 # The compiler driver will combine and reorder linker options,
3717 # but understands `-z linker_flag'.
3718 # Supported since Solaris 2.6 (maybe 2.5.1?)
3719 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
3720 ;;
3721 esac
3722 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3723
3724 output_verbose_link_cmd='echo'
3725
3726 # Archives containing C++ object files must be created using
3727 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3728 # necessary to make sure instantiated templates are included
3729 # in the archive.
3730 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3731 ;;
3732 gcx*)
3733 # Green Hills C++ Compiler
3734 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3735
3736 # The C++ compiler must be used to create the archive.
3737 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3738 ;;
3739 *)
3740 # GNU C++ compiler with Solaris linker
3741 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3742 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3743 if $CC --version | grep -v '^2\.7' > /dev/null; then
3744 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3745 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3746 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3747
3748 # Commands to make compiler produce verbose output that lists
3749 # what "hidden" libraries, object files and flags are used when
3750 # linking a shared library.
3751 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3752 else
3753 # g++ 2.7 appears to require `-G' NOT `-shared' on this
3754 # platform.
3755 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3756 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3757 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3758
3759 # Commands to make compiler produce verbose output that lists
3760 # what "hidden" libraries, object files and flags are used when
3761 # linking a shared library.
3762 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3763 fi
3764
3765 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3766 case $host_os in
3767 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3768 *)
3769 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3770 ;;
3771 esac
3772 fi
3773 ;;
3774 esac
3775 ;;
3776 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
3777 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3778 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3779 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3780 runpath_var='LD_RUN_PATH'
3781
3782 case $cc_basename in
3783 CC*)
3784 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3785 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3786 ;;
3787 *)
3788 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3789 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3790 ;;
3791 esac
3792 ;;
3793 sysv5* | sco3.2v5* | sco5v6*)
3794 # Note: We can NOT use -z defs as we might desire, because we do not
3795 # link with -lc, and that would cause any symbols used from libc to
3796 # always be unresolved, which means just about no library would
3797 # ever link correctly. If we're not using GNU ld we use -z text
3798 # though, which does catch some bad symbols but isn't as heavy-handed
3799 # as -z defs.
3800 # For security reasons, it is highly recommended that you always
3801 # use absolute paths for naming shared libraries, and exclude the
3802 # DT_RUNPATH tag from executables and libraries. But doing so
3803 # requires that you compile everything twice, which is a pain.
3804 # So that behaviour is only enabled if SCOABSPATH is set to a
3805 # non-empty value in the environment. Most likely only useful for
3806 # creating official distributions of packages.
3807 # This is a hack until libtool officially supports absolute path
3808 # names for shared libraries.
3809 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3810 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
3811 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3812 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3813 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
3814 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3815 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3816 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
3817 runpath_var='LD_RUN_PATH'
3818
3819 case $cc_basename in
3820 CC*)
3821 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3822 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3823 ;;
3824 *)
3825 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3826 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3827 ;;
3828 esac
3829 ;;
3830 tandem*)
3831 case $cc_basename in
3832 NCC*)
3833 # NonStop-UX NCC 3.20
3834 # FIXME: insert proper C++ library support
3835 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3836 ;;
3837 *)
3838 # FIXME: insert proper C++ library support
3839 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3840 ;;
3841 esac
3842 ;;
3843 vxworks*)
3844 # FIXME: insert proper C++ library support
3845 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3846 ;;
3847 *)
3848 # FIXME: insert proper C++ library support
3849 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3850 ;;
3851 esac
3852 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3853 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3854
3855 _LT_AC_TAGVAR(GCC, $1)="$GXX"
3856 _LT_AC_TAGVAR(LD, $1)="$LD"
3857
3858 AC_LIBTOOL_POSTDEP_PREDEP($1)
3859 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3860 AC_LIBTOOL_PROG_CC_C_O($1)
3861 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3862 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3863 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3864 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3865
3866 AC_LIBTOOL_CONFIG($1)
3867
3868 AC_LANG_POP
3869 CC=$lt_save_CC
3870 LDCXX=$LD
3871 LD=$lt_save_LD
3872 GCC=$lt_save_GCC
3873 with_gnu_ldcxx=$with_gnu_ld
3874 with_gnu_ld=$lt_save_with_gnu_ld
3875 lt_cv_path_LDCXX=$lt_cv_path_LD
3876 lt_cv_path_LD=$lt_save_path_LD
3877 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3878 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3879 ])# AC_LIBTOOL_LANG_CXX_CONFIG
3880
3881 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3882 # ------------------------------------
3883 # Figure out "hidden" library dependencies from verbose
3884 # compiler output when linking a shared library.
3885 # Parse the compiler output and extract the necessary
3886 # objects, libraries and library flags.
3887 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
3888 [AC_REQUIRE([LT_AC_PROG_SED])dnl
3889 dnl we can't use the lt_simple_compile_test_code here,
3890 dnl because it contains code intended for an executable,
3891 dnl not a library. It's possible we should let each
3892 dnl tag define a new lt_????_link_test_code variable,
3893 dnl but it's only used here...
3894 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3895 int a;
3896 void foo (void) { a = 0; }
3897 EOF
3898 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3899 class Foo
3900 {
3901 public:
3902 Foo (void) { a = 0; }
3903 private:
3904 int a;
3905 };
3906 EOF
3907 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3908 subroutine foo
3909 implicit none
3910 integer*4 a
3911 a=0
3912 return
3913 end
3914 EOF
3915 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3916 public class foo {
3917 private int a;
3918 public void bar (void) {
3919 a = 0;
3920 }
3921 };
3922 EOF
3923 ])
3924 dnl Parse the compiler output and extract the necessary
3925 dnl objects, libraries and library flags.
3926 if AC_TRY_EVAL(ac_compile); then
3927 # Parse the compiler output and extract the necessary
3928 # objects, libraries and library flags.
3929
3930 # Sentinel used to keep track of whether or not we are before
3931 # the conftest object file.
3932 pre_test_object_deps_done=no
3933
3934 # The `*' in the case matches for architectures that use `case' in
3935 # $output_verbose_cmd can trigger glob expansion during the loop
3936 # eval without this substitution.
3937 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3938
3939 for p in `eval $output_verbose_link_cmd`; do
3940 case $p in
3941
3942 -L* | -R* | -l*)
3943 # Some compilers place space between "-{L,R}" and the path.
3944 # Remove the space.
3945 if test $p = "-L" \
3946 || test $p = "-R"; then
3947 prev=$p
3948 continue
3949 else
3950 prev=
3951 fi
3952
3953 if test "$pre_test_object_deps_done" = no; then
3954 case $p in
3955 -L* | -R*)
3956 # Internal compiler library paths should come after those
3957 # provided the user. The postdeps already come after the
3958 # user supplied libs so there is no need to process them.
3959 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3960 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3961 else
3962 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3963 fi
3964 ;;
3965 # The "-l" case would never come before the object being
3966 # linked, so don't bother handling this case.
3967 esac
3968 else
3969 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3970 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3971 else
3972 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3973 fi
3974 fi
3975 ;;
3976
3977 *.$objext)
3978 # This assumes that the test object file only shows up
3979 # once in the compiler output.
3980 if test "$p" = "conftest.$objext"; then
3981 pre_test_object_deps_done=yes
3982 continue
3983 fi
3984
3985 if test "$pre_test_object_deps_done" = no; then
3986 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3987 _LT_AC_TAGVAR(predep_objects, $1)="$p"
3988 else
3989 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3990 fi
3991 else
3992 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3993 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3994 else
3995 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3996 fi
3997 fi
3998 ;;
3999
4000 *) ;; # Ignore the rest.
4001
4002 esac
4003 done
4004
4005 # Clean up.
4006 rm -f a.out a.exe
4007 else
4008 echo "libtool.m4: error: problem compiling $1 test program"
4009 fi
4010
4011 $rm -f confest.$objext
4012
4013 _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
4014 if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4015 _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
4016 fi
4017
4018 # PORTME: override above test on systems where it is broken
4019 ifelse([$1],[CXX],
4020 [case $host_os in
4021 interix[[3-9]]*)
4022 # Interix 3.5 installs completely hosed .la files for C++, so rather than
4023 # hack all around it, let's just trust "g++" to DTRT.
4024 _LT_AC_TAGVAR(predep_objects,$1)=
4025 _LT_AC_TAGVAR(postdep_objects,$1)=
4026 _LT_AC_TAGVAR(postdeps,$1)=
4027 ;;
4028
4029 linux*)
4030 case `$CC -V 2>&1 | sed 5q` in
4031 *Sun\ C*)
4032 # Sun C++ 5.9
4033 #
4034 # The more standards-conforming stlport4 library is
4035 # incompatible with the Cstd library. Avoid specifying
4036 # it if it's in CXXFLAGS. Ignore libCrun as
4037 # -library=stlport4 depends on it.
4038 case " $CXX $CXXFLAGS " in
4039 *" -library=stlport4 "*)
4040 solaris_use_stlport4=yes
4041 ;;
4042 esac
4043 if test "$solaris_use_stlport4" != yes; then
4044 _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
4045 fi
4046 ;;
4047 esac
4048 ;;
4049
4050 solaris*)
4051 case $cc_basename in
4052 CC*)
4053 # The more standards-conforming stlport4 library is
4054 # incompatible with the Cstd library. Avoid specifying
4055 # it if it's in CXXFLAGS. Ignore libCrun as
4056 # -library=stlport4 depends on it.
4057 case " $CXX $CXXFLAGS " in
4058 *" -library=stlport4 "*)
4059 solaris_use_stlport4=yes
4060 ;;
4061 esac
4062
4063 # Adding this requires a known-good setup of shared libraries for
4064 # Sun compiler versions before 5.6, else PIC objects from an old
4065 # archive will be linked into the output, leading to subtle bugs.
4066 if test "$solaris_use_stlport4" != yes; then
4067 _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
4068 fi
4069 ;;
4070 esac
4071 ;;
4072 esac
4073 ])
4074 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4075 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4076 esac
4077 ])# AC_LIBTOOL_POSTDEP_PREDEP
4078
4079 # AC_LIBTOOL_LANG_F77_CONFIG
4080 # --------------------------
4081 # Ensure that the configuration vars for the C compiler are
4082 # suitably defined. Those variables are subsequently used by
4083 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4084 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4085 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4086 [AC_REQUIRE([AC_PROG_F77])
4087 AC_LANG_PUSH(Fortran 77)
4088
4089 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4090 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4091 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4092 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4093 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4094 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4095 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4096 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4097 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4098 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4099 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4100 _LT_AC_TAGVAR(module_cmds, $1)=
4101 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4102 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4103 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4104 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4105 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4106 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4107
4108 # Source file extension for f77 test sources.
4109 ac_ext=f
4110
4111 # Object file extension for compiled f77 test sources.
4112 objext=o
4113 _LT_AC_TAGVAR(objext, $1)=$objext
4114
4115 # Code to be used in simple compile tests
4116 lt_simple_compile_test_code="\
4117 subroutine t
4118 return
4119 end
4120 "
4121
4122 # Code to be used in simple link tests
4123 lt_simple_link_test_code="\
4124 program t
4125 end
4126 "
4127
4128 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4129 _LT_AC_SYS_COMPILER
4130
4131 # save warnings/boilerplate of simple test code
4132 _LT_COMPILER_BOILERPLATE
4133 _LT_LINKER_BOILERPLATE
4134
4135 # Allow CC to be a program name with arguments.
4136 lt_save_CC="$CC"
4137 CC=${F77-"f77"}
4138 compiler=$CC
4139 _LT_AC_TAGVAR(compiler, $1)=$CC
4140 _LT_CC_BASENAME([$compiler])
4141
4142 AC_MSG_CHECKING([if libtool supports shared libraries])
4143 AC_MSG_RESULT([$can_build_shared])
4144
4145 AC_MSG_CHECKING([whether to build shared libraries])
4146 test "$can_build_shared" = "no" && enable_shared=no
4147
4148 # On AIX, shared libraries and static libraries use the same namespace, and
4149 # are all built from PIC.
4150 case $host_os in
4151 aix3*)
4152 test "$enable_shared" = yes && enable_static=no
4153 if test -n "$RANLIB"; then
4154 archive_cmds="$archive_cmds~\$RANLIB \$lib"
4155 postinstall_cmds='$RANLIB $lib'
4156 fi
4157 ;;
4158 aix[[4-9]]*)
4159 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4160 test "$enable_shared" = yes && enable_static=no
4161 fi
4162 ;;
4163 esac
4164 AC_MSG_RESULT([$enable_shared])
4165
4166 AC_MSG_CHECKING([whether to build static libraries])
4167 # Make sure either enable_shared or enable_static is yes.
4168 test "$enable_shared" = yes || enable_static=yes
4169 AC_MSG_RESULT([$enable_static])
4170
4171 _LT_AC_TAGVAR(GCC, $1)="$G77"
4172 _LT_AC_TAGVAR(LD, $1)="$LD"
4173
4174 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4175 AC_LIBTOOL_PROG_CC_C_O($1)
4176 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4177 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4178 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4179 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4180
4181 AC_LIBTOOL_CONFIG($1)
4182
4183 AC_LANG_POP
4184 CC="$lt_save_CC"
4185 ])# AC_LIBTOOL_LANG_F77_CONFIG
4186
4187
4188 # AC_LIBTOOL_LANG_GCJ_CONFIG
4189 # --------------------------
4190 # Ensure that the configuration vars for the C compiler are
4191 # suitably defined. Those variables are subsequently used by
4192 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4193 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4194 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4195 [AC_LANG_SAVE
4196
4197 # Source file extension for Java test sources.
4198 ac_ext=java
4199
4200 # Object file extension for compiled Java test sources.
4201 objext=o
4202 _LT_AC_TAGVAR(objext, $1)=$objext
4203
4204 # Code to be used in simple compile tests
4205 lt_simple_compile_test_code="class foo {}"
4206
4207 # Code to be used in simple link tests
4208 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
4209
4210 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4211 _LT_AC_SYS_COMPILER
4212
4213 # save warnings/boilerplate of simple test code
4214 _LT_COMPILER_BOILERPLATE
4215 _LT_LINKER_BOILERPLATE
4216
4217 # Allow CC to be a program name with arguments.
4218 lt_save_CC="$CC"
4219 CC=${GCJ-"gcj"}
4220 compiler=$CC
4221 _LT_AC_TAGVAR(compiler, $1)=$CC
4222 _LT_CC_BASENAME([$compiler])
4223
4224 # GCJ did not exist at the time GCC didn't implicitly link libc in.
4225 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4226
4227 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4228
4229 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4230 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4231 AC_LIBTOOL_PROG_CC_C_O($1)
4232 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4233 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4234 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4235 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4236
4237 AC_LIBTOOL_CONFIG($1)
4238
4239 AC_LANG_RESTORE
4240 CC="$lt_save_CC"
4241 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
4242
4243
4244 # AC_LIBTOOL_LANG_RC_CONFIG
4245 # -------------------------
4246 # Ensure that the configuration vars for the Windows resource compiler are
4247 # suitably defined. Those variables are subsequently used by
4248 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4249 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4250 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4251 [AC_LANG_SAVE
4252
4253 # Source file extension for RC test sources.
4254 ac_ext=rc
4255
4256 # Object file extension for compiled RC test sources.
4257 objext=o
4258 _LT_AC_TAGVAR(objext, $1)=$objext
4259
4260 # Code to be used in simple compile tests
4261 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
4262
4263 # Code to be used in simple link tests
4264 lt_simple_link_test_code="$lt_simple_compile_test_code"
4265
4266 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4267 _LT_AC_SYS_COMPILER
4268
4269 # save warnings/boilerplate of simple test code
4270 _LT_COMPILER_BOILERPLATE
4271 _LT_LINKER_BOILERPLATE
4272
4273 # Allow CC to be a program name with arguments.
4274 lt_save_CC="$CC"
4275 CC=${RC-"windres"}
4276 compiler=$CC
4277 _LT_AC_TAGVAR(compiler, $1)=$CC
4278 _LT_CC_BASENAME([$compiler])
4279 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4280
4281 AC_LIBTOOL_CONFIG($1)
4282
4283 AC_LANG_RESTORE
4284 CC="$lt_save_CC"
4285 ])# AC_LIBTOOL_LANG_RC_CONFIG
4286
4287
4288 # AC_LIBTOOL_CONFIG([TAGNAME])
4289 # ----------------------------
4290 # If TAGNAME is not passed, then create an initial libtool script
4291 # with a default configuration from the untagged config vars. Otherwise
4292 # add code to config.status for appending the configuration named by
4293 # TAGNAME from the matching tagged config vars.
4294 AC_DEFUN([AC_LIBTOOL_CONFIG],
4295 [# The else clause should only fire when bootstrapping the
4296 # libtool distribution, otherwise you forgot to ship ltmain.sh
4297 # with your package, and you will get complaints that there are
4298 # no rules to generate ltmain.sh.
4299 if test -f "$ltmain"; then
4300 # See if we are running on zsh, and set the options which allow our commands through
4301 # without removal of \ escapes.
4302 if test -n "${ZSH_VERSION+set}" ; then
4303 setopt NO_GLOB_SUBST
4304 fi
4305 # Now quote all the things that may contain metacharacters while being
4306 # careful not to overquote the AC_SUBSTed values. We take copies of the
4307 # variables and quote the copies for generation of the libtool script.
4308 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4309 SED SHELL STRIP \
4310 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4311 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4312 deplibs_check_method reload_flag reload_cmds need_locks \
4313 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4314 lt_cv_sys_global_symbol_to_c_name_address \
4315 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4316 old_postinstall_cmds old_postuninstall_cmds \
4317 _LT_AC_TAGVAR(compiler, $1) \
4318 _LT_AC_TAGVAR(CC, $1) \
4319 _LT_AC_TAGVAR(LD, $1) \
4320 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4321 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4322 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4323 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4324 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4325 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4326 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4327 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4328 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4329 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4330 _LT_AC_TAGVAR(predep_objects, $1) \
4331 _LT_AC_TAGVAR(postdep_objects, $1) \
4332 _LT_AC_TAGVAR(predeps, $1) \
4333 _LT_AC_TAGVAR(postdeps, $1) \
4334 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4335 _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
4336 _LT_AC_TAGVAR(archive_cmds, $1) \
4337 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4338 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4339 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4340 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4341 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4342 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4343 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4344 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4345 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4346 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4347 _LT_AC_TAGVAR(hardcode_automatic, $1) \
4348 _LT_AC_TAGVAR(module_cmds, $1) \
4349 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4350 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4351 _LT_AC_TAGVAR(fix_srcfile_path, $1) \
4352 _LT_AC_TAGVAR(exclude_expsyms, $1) \
4353 _LT_AC_TAGVAR(include_expsyms, $1); do
4354
4355 case $var in
4356 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4357 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4358 _LT_AC_TAGVAR(archive_cmds, $1) | \
4359 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4360 _LT_AC_TAGVAR(module_cmds, $1) | \
4361 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4362 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4363 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4364 extract_expsyms_cmds | reload_cmds | finish_cmds | \
4365 postinstall_cmds | postuninstall_cmds | \
4366 old_postinstall_cmds | old_postuninstall_cmds | \
4367 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4368 # Double-quote double-evaled strings.
4369 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4370 ;;
4371 *)
4372 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4373 ;;
4374 esac
4375 done
4376
4377 case $lt_echo in
4378 *'\[$]0 --fallback-echo"')
4379 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4380 ;;
4381 esac
4382
4383 ifelse([$1], [],
4384 [cfgfile="${ofile}T"
4385 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4386 $rm -f "$cfgfile"
4387 AC_MSG_NOTICE([creating $ofile])],
4388 [cfgfile="$ofile"])
4389
4390 cat <<__EOF__ >> "$cfgfile"
4391 ifelse([$1], [],
4392 [#! $SHELL
4393
4394 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4395 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4396 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4397 #
4398 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
4399 # Free Software Foundation, Inc.
4400 #
4401 # This file is part of GNU Libtool:
4402 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4403 #
4404 # This program is free software; you can redistribute it and/or modify
4405 # it under the terms of the GNU General Public License as published by
4406 # the Free Software Foundation; either version 2 of the License, or
4407 # (at your option) any later version.
4408 #
4409 # This program is distributed in the hope that it will be useful, but
4410 # WITHOUT ANY WARRANTY; without even the implied warranty of
4411 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4412 # General Public License for more details.
4413 #
4414 # You should have received a copy of the GNU General Public License
4415 # along with this program; if not, write to the Free Software
4416 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4417 #
4418 # As a special exception to the GNU General Public License, if you
4419 # distribute this file as part of a program that contains a
4420 # configuration script generated by Autoconf, you may include it under
4421 # the same distribution terms that you use for the rest of that program.
4422
4423 # A sed program that does not truncate output.
4424 SED=$lt_SED
4425
4426 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4427 Xsed="$SED -e 1s/^X//"
4428
4429 # The HP-UX ksh and POSIX shell print the target directory to stdout
4430 # if CDPATH is set.
4431 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4432
4433 # The names of the tagged configurations supported by this script.
4434 available_tags=
4435
4436 # ### BEGIN LIBTOOL CONFIG],
4437 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4438
4439 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4440
4441 # Shell to use when invoking shell scripts.
4442 SHELL=$lt_SHELL
4443
4444 # Whether or not to build shared libraries.
4445 build_libtool_libs=$enable_shared
4446
4447 # Whether or not to build static libraries.
4448 build_old_libs=$enable_static
4449
4450 # Whether or not to add -lc for building shared libraries.
4451 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4452
4453 # Whether or not to disallow shared libs when runtime libs are static
4454 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4455
4456 # Whether or not to optimize for fast installation.
4457 fast_install=$enable_fast_install
4458
4459 # The host system.
4460 host_alias=$host_alias
4461 host=$host
4462 host_os=$host_os
4463
4464 # The build system.
4465 build_alias=$build_alias
4466 build=$build
4467 build_os=$build_os
4468
4469 # An echo program that does not interpret backslashes.
4470 echo=$lt_echo
4471
4472 # The archiver.
4473 AR=$lt_AR
4474 AR_FLAGS=$lt_AR_FLAGS
4475
4476 # A C compiler.
4477 LTCC=$lt_LTCC
4478
4479 # LTCC compiler flags.
4480 LTCFLAGS=$lt_LTCFLAGS
4481
4482 # A language-specific compiler.
4483 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4484
4485 # Is the compiler the GNU C compiler?
4486 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4487
4488 # An ERE matcher.
4489 EGREP=$lt_EGREP
4490
4491 # The linker used to build libraries.
4492 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4493
4494 # Whether we need hard or soft links.
4495 LN_S=$lt_LN_S
4496
4497 # A BSD-compatible nm program.
4498 NM=$lt_NM
4499
4500 # A symbol stripping program
4501 STRIP=$lt_STRIP
4502
4503 # Used to examine libraries when file_magic_cmd begins "file"
4504 MAGIC_CMD=$MAGIC_CMD
4505
4506 # Used on cygwin: DLL creation program.
4507 DLLTOOL="$DLLTOOL"
4508
4509 # Used on cygwin: object dumper.
4510 OBJDUMP="$OBJDUMP"
4511
4512 # Used on cygwin: assembler.
4513 AS="$AS"
4514
4515 # The name of the directory that contains temporary libtool files.
4516 objdir=$objdir
4517
4518 # How to create reloadable object files.
4519 reload_flag=$lt_reload_flag
4520 reload_cmds=$lt_reload_cmds
4521
4522 # How to pass a linker flag through the compiler.
4523 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4524
4525 # Object file suffix (normally "o").
4526 objext="$ac_objext"
4527
4528 # Old archive suffix (normally "a").
4529 libext="$libext"
4530
4531 # Shared library suffix (normally ".so").
4532 shrext_cmds='$shrext_cmds'
4533
4534 # Executable file suffix (normally "").
4535 exeext="$exeext"
4536
4537 # Additional compiler flags for building library objects.
4538 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4539 pic_mode=$pic_mode
4540
4541 # What is the maximum length of a command?
4542 max_cmd_len=$lt_cv_sys_max_cmd_len
4543
4544 # Does compiler simultaneously support -c and -o options?
4545 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4546
4547 # Must we lock files when doing compilation?
4548 need_locks=$lt_need_locks
4549
4550 # Do we need the lib prefix for modules?
4551 need_lib_prefix=$need_lib_prefix
4552
4553 # Do we need a version for libraries?
4554 need_version=$need_version
4555
4556 # Whether dlopen is supported.
4557 dlopen_support=$enable_dlopen
4558
4559 # Whether dlopen of programs is supported.
4560 dlopen_self=$enable_dlopen_self
4561
4562 # Whether dlopen of statically linked programs is supported.
4563 dlopen_self_static=$enable_dlopen_self_static
4564
4565 # Compiler flag to prevent dynamic linking.
4566 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4567
4568 # Compiler flag to turn off builtin functions.
4569 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4570
4571 # Compiler flag to allow reflexive dlopens.
4572 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4573
4574 # Compiler flag to generate shared objects directly from archives.
4575 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4576
4577 # Compiler flag to generate thread-safe objects.
4578 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4579
4580 # Library versioning type.
4581 version_type=$version_type
4582
4583 # Format of library name prefix.
4584 libname_spec=$lt_libname_spec
4585
4586 # List of archive names. First name is the real one, the rest are links.
4587 # The last name is the one that the linker finds with -lNAME.
4588 library_names_spec=$lt_library_names_spec
4589
4590 # The coded name of the library, if different from the real name.
4591 soname_spec=$lt_soname_spec
4592
4593 # Commands used to build and install an old-style archive.
4594 RANLIB=$lt_RANLIB
4595 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4596 old_postinstall_cmds=$lt_old_postinstall_cmds
4597 old_postuninstall_cmds=$lt_old_postuninstall_cmds
4598
4599 # Create an old-style archive from a shared archive.
4600 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4601
4602 # Create a temporary old-style archive to link instead of a shared archive.
4603 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4604
4605 # Commands used to build and install a shared archive.
4606 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4607 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4608 postinstall_cmds=$lt_postinstall_cmds
4609 postuninstall_cmds=$lt_postuninstall_cmds
4610
4611 # Commands used to build a loadable module (assumed same as above if empty)
4612 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4613 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4614
4615 # Commands to strip libraries.
4616 old_striplib=$lt_old_striplib
4617 striplib=$lt_striplib
4618
4619 # Dependencies to place before the objects being linked to create a
4620 # shared library.
4621 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4622
4623 # Dependencies to place after the objects being linked to create a
4624 # shared library.
4625 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4626
4627 # Dependencies to place before the objects being linked to create a
4628 # shared library.
4629 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4630
4631 # Dependencies to place after the objects being linked to create a
4632 # shared library.
4633 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4634
4635 # The directories searched by this compiler when creating a shared
4636 # library
4637 compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
4638
4639 # The library search path used internally by the compiler when linking
4640 # a shared library.
4641 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4642
4643 # Method to check whether dependent libraries are shared objects.
4644 deplibs_check_method=$lt_deplibs_check_method
4645
4646 # Command to use when deplibs_check_method == file_magic.
4647 file_magic_cmd=$lt_file_magic_cmd
4648
4649 # Flag that allows shared libraries with undefined symbols to be built.
4650 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4651
4652 # Flag that forces no undefined symbols.
4653 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4654
4655 # Commands used to finish a libtool library installation in a directory.
4656 finish_cmds=$lt_finish_cmds
4657
4658 # Same as above, but a single script fragment to be evaled but not shown.
4659 finish_eval=$lt_finish_eval
4660
4661 # Take the output of nm and produce a listing of raw symbols and C names.
4662 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4663
4664 # Transform the output of nm in a proper C declaration
4665 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4666
4667 # Transform the output of nm in a C name address pair
4668 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4669
4670 # This is the shared library runtime path variable.
4671 runpath_var=$runpath_var
4672
4673 # This is the shared library path variable.
4674 shlibpath_var=$shlibpath_var
4675
4676 # Is shlibpath searched before the hard-coded library search path?
4677 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4678
4679 # How to hardcode a shared library path into an executable.
4680 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4681
4682 # Whether we should hardcode library paths into libraries.
4683 hardcode_into_libs=$hardcode_into_libs
4684
4685 # Flag to hardcode \$libdir into a binary during linking.
4686 # This must work even if \$libdir does not exist.
4687 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4688
4689 # If ld is used when linking, flag to hardcode \$libdir into
4690 # a binary during linking. This must work even if \$libdir does
4691 # not exist.
4692 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4693
4694 # Whether we need a single -rpath flag with a separated argument.
4695 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4696
4697 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4698 # resulting binary.
4699 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4700
4701 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4702 # resulting binary.
4703 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4704
4705 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4706 # the resulting binary.
4707 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4708
4709 # Set to yes if building a shared library automatically hardcodes DIR into the library
4710 # and all subsequent libraries and executables linked against it.
4711 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4712
4713 # Variables whose values should be saved in libtool wrapper scripts and
4714 # restored at relink time.
4715 variables_saved_for_relink="$variables_saved_for_relink"
4716
4717 # Whether libtool must link a program against all its dependency libraries.
4718 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4719
4720 # Compile-time system search path for libraries
4721 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4722
4723 # Run-time system search path for libraries
4724 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4725
4726 # Fix the shell variable \$srcfile for the compiler.
4727 fix_srcfile_path=$lt_fix_srcfile_path
4728
4729 # Set to yes if exported symbols are required.
4730 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4731
4732 # The commands to list exported symbols.
4733 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4734
4735 # The commands to extract the exported symbol list from a shared archive.
4736 extract_expsyms_cmds=$lt_extract_expsyms_cmds
4737
4738 # Symbols that should not be listed in the preloaded symbols.
4739 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4740
4741 # Symbols that must always be exported.
4742 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4743
4744 ifelse([$1],[],
4745 [# ### END LIBTOOL CONFIG],
4746 [# ### END LIBTOOL TAG CONFIG: $tagname])
4747
4748 __EOF__
4749
4750 ifelse([$1],[], [
4751 case $host_os in
4752 aix3*)
4753 cat <<\EOF >> "$cfgfile"
4754
4755 # AIX sometimes has problems with the GCC collect2 program. For some
4756 # reason, if we set the COLLECT_NAMES environment variable, the problems
4757 # vanish in a puff of smoke.
4758 if test "X${COLLECT_NAMES+set}" != Xset; then
4759 COLLECT_NAMES=
4760 export COLLECT_NAMES
4761 fi
4762 EOF
4763 ;;
4764 esac
4765
4766 # We use sed instead of cat because bash on DJGPP gets confused if
4767 # if finds mixed CR/LF and LF-only lines. Since sed operates in
4768 # text mode, it properly converts lines to CR/LF. This bash problem
4769 # is reportedly fixed, but why not run on old versions too?
4770 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4771
4772 mv -f "$cfgfile" "$ofile" || \
4773 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4774 chmod +x "$ofile"
4775 ])
4776 else
4777 # If there is no Makefile yet, we rely on a make rule to execute
4778 # `config.status --recheck' to rerun these tests and create the
4779 # libtool script then.
4780 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4781 if test -f "$ltmain_in"; then
4782 test -f Makefile && make "$ltmain"
4783 fi
4784 fi
4785 ])# AC_LIBTOOL_CONFIG
4786
4787
4788 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4789 # -------------------------------------------
4790 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4791 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4792
4793 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4794
4795 if test "$GCC" = yes; then
4796 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4797
4798 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4799 lt_cv_prog_compiler_rtti_exceptions,
4800 [-fno-rtti -fno-exceptions], [],
4801 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4802 fi
4803 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4804
4805
4806 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4807 # ---------------------------------
4808 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4809 [AC_REQUIRE([AC_CANONICAL_HOST])
4810 AC_REQUIRE([LT_AC_PROG_SED])
4811 AC_REQUIRE([AC_PROG_NM])
4812 AC_REQUIRE([AC_OBJEXT])
4813 # Check for command to grab the raw symbol name followed by C symbol from nm.
4814 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4815 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4816 [
4817 # These are sane defaults that work on at least a few old systems.
4818 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4819
4820 # Character class describing NM global symbol codes.
4821 symcode='[[BCDEGRST]]'
4822
4823 # Regexp to match symbols that can be accessed directly from C.
4824 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4825
4826 # Transform an extracted symbol line into a proper C declaration
4827 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4828
4829 # Transform an extracted symbol line into symbol name and symbol address
4830 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4831
4832 # Define system-specific variables.
4833 case $host_os in
4834 aix*)
4835 symcode='[[BCDT]]'
4836 ;;
4837 cygwin* | mingw* | pw32*)
4838 symcode='[[ABCDGISTW]]'
4839 ;;
4840 hpux*) # Its linker distinguishes data from code symbols
4841 if test "$host_cpu" = ia64; then
4842 symcode='[[ABCDEGRST]]'
4843 fi
4844 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4845 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4846 ;;
4847 linux* | k*bsd*-gnu)
4848 if test "$host_cpu" = ia64; then
4849 symcode='[[ABCDGIRSTW]]'
4850 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4851 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4852 fi
4853 ;;
4854 irix* | nonstopux*)
4855 symcode='[[BCDEGRST]]'
4856 ;;
4857 osf*)
4858 symcode='[[BCDEGQRST]]'
4859 ;;
4860 solaris*)
4861 symcode='[[BDRT]]'
4862 ;;
4863 sco3.2v5*)
4864 symcode='[[DT]]'
4865 ;;
4866 sysv4.2uw2*)
4867 symcode='[[DT]]'
4868 ;;
4869 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4870 symcode='[[ABDT]]'
4871 ;;
4872 sysv4)
4873 symcode='[[DFNSTU]]'
4874 ;;
4875 esac
4876
4877 # Handle CRLF in mingw tool chain
4878 opt_cr=
4879 case $build_os in
4880 mingw*)
4881 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4882 ;;
4883 esac
4884
4885 # If we're using GNU nm, then use its standard symbol codes.
4886 case `$NM -V 2>&1` in
4887 *GNU* | *'with BFD'*)
4888 symcode='[[ABCDGIRSTW]]' ;;
4889 esac
4890
4891 # Try without a prefix undercore, then with it.
4892 for ac_symprfx in "" "_"; do
4893
4894 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4895 symxfrm="\\1 $ac_symprfx\\2 \\2"
4896
4897 # Write the raw and C identifiers.
4898 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4899
4900 # Check to see that the pipe works correctly.
4901 pipe_works=no
4902
4903 rm -f conftest*
4904 cat > conftest.$ac_ext <<EOF
4905 #ifdef __cplusplus
4906 extern "C" {
4907 #endif
4908 char nm_test_var;
4909 void nm_test_func(){}
4910 #ifdef __cplusplus
4911 }
4912 #endif
4913 int main(){nm_test_var='a';nm_test_func();return(0);}
4914 EOF
4915
4916 if AC_TRY_EVAL(ac_compile); then
4917 # Now try to grab the symbols.
4918 nlist=conftest.nm
4919 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4920 # Try sorting and uniquifying the output.
4921 if sort "$nlist" | uniq > "$nlist"T; then
4922 mv -f "$nlist"T "$nlist"
4923 else
4924 rm -f "$nlist"T
4925 fi
4926
4927 # Make sure that we snagged all the symbols we need.
4928 if grep ' nm_test_var$' "$nlist" >/dev/null; then
4929 if grep ' nm_test_func$' "$nlist" >/dev/null; then
4930 cat <<EOF > conftest.$ac_ext
4931 #ifdef __cplusplus
4932 extern "C" {
4933 #endif
4934
4935 EOF
4936 # Now generate the symbol file.
4937 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4938
4939 cat <<EOF >> conftest.$ac_ext
4940 #if defined (__STDC__) && __STDC__
4941 # define lt_ptr_t void *
4942 #else
4943 # define lt_ptr_t char *
4944 # define const
4945 #endif
4946
4947 /* The mapping between symbol names and symbols. */
4948 const struct {
4949 const char *name;
4950 lt_ptr_t address;
4951 }
4952 lt_preloaded_symbols[[]] =
4953 {
4954 EOF
4955 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4956 cat <<\EOF >> conftest.$ac_ext
4957 {0, (lt_ptr_t) 0}
4958 };
4959
4960 #ifdef __cplusplus
4961 }
4962 #endif
4963 EOF
4964 # Now try linking the two files.
4965 mv conftest.$ac_objext conftstm.$ac_objext
4966 lt_save_LIBS="$LIBS"
4967 lt_save_CFLAGS="$CFLAGS"
4968 LIBS="conftstm.$ac_objext"
4969 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4970 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4971 pipe_works=yes
4972 fi
4973 LIBS="$lt_save_LIBS"
4974 CFLAGS="$lt_save_CFLAGS"
4975 else
4976 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4977 fi
4978 else
4979 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4980 fi
4981 else
4982 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4983 fi
4984 else
4985 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4986 cat conftest.$ac_ext >&5
4987 fi
4988 rm -rf conftest* conftst*
4989
4990 # Do not use the global_symbol_pipe unless it works.
4991 if test "$pipe_works" = yes; then
4992 break
4993 else
4994 lt_cv_sys_global_symbol_pipe=
4995 fi
4996 done
4997 ])
4998 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4999 lt_cv_sys_global_symbol_to_cdecl=
5000 fi
5001 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5002 AC_MSG_RESULT(failed)
5003 else
5004 AC_MSG_RESULT(ok)
5005 fi
5006 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5007
5008
5009 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5010 # ---------------------------------------
5011 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5012 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5013 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5014 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5015
5016 AC_MSG_CHECKING([for $compiler option to produce PIC])
5017 ifelse([$1],[CXX],[
5018 # C++ specific cases for pic, static, wl, etc.
5019 if test "$GXX" = yes; then
5020 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5021 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5022
5023 case $host_os in
5024 aix*)
5025 # All AIX code is PIC.
5026 if test "$host_cpu" = ia64; then
5027 # AIX 5 now supports IA64 processor
5028 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5029 fi
5030 ;;
5031 amigaos*)
5032 # FIXME: we need at least 68020 code to build shared libraries, but
5033 # adding the `-m68020' flag to GCC prevents building anything better,
5034 # like `-m68040'.
5035 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5036 ;;
5037 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5038 # PIC is the default for these OSes.
5039 ;;
5040 mingw* | cygwin* | os2* | pw32*)
5041 # This hack is so that the source file can tell whether it is being
5042 # built for inclusion in a dll (and should export symbols for example).
5043 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5044 # (--disable-auto-import) libraries
5045 m4_if([$1], [GCJ], [],
5046 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5047 ;;
5048 darwin* | rhapsody*)
5049 # PIC is the default on this platform
5050 # Common symbols not allowed in MH_DYLIB files
5051 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5052 ;;
5053 *djgpp*)
5054 # DJGPP does not support shared libraries at all
5055 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5056 ;;
5057 interix[[3-9]]*)
5058 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5059 # Instead, we relocate shared libraries at runtime.
5060 ;;
5061 sysv4*MP*)
5062 if test -d /usr/nec; then
5063 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5064 fi
5065 ;;
5066 hpux*)
5067 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5068 # not for PA HP-UX.
5069 case $host_cpu in
5070 hppa*64*|ia64*)
5071 ;;
5072 *)
5073 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5074 ;;
5075 esac
5076 ;;
5077 *)
5078 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5079 ;;
5080 esac
5081 else
5082 case $host_os in
5083 aix[[4-9]]*)
5084 # All AIX code is PIC.
5085 if test "$host_cpu" = ia64; then
5086 # AIX 5 now supports IA64 processor
5087 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5088 else
5089 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5090 fi
5091 ;;
5092 chorus*)
5093 case $cc_basename in
5094 cxch68*)
5095 # Green Hills C++ Compiler
5096 # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
5097 ;;
5098 esac
5099 ;;
5100 darwin*)
5101 # PIC is the default on this platform
5102 # Common symbols not allowed in MH_DYLIB files
5103 case $cc_basename in
5104 xlc*)
5105 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5106 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5107 ;;
5108 esac
5109 ;;
5110 dgux*)
5111 case $cc_basename in
5112 ec++*)
5113 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5114 ;;
5115 ghcx*)
5116 # Green Hills C++ Compiler
5117 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5118 ;;
5119 *)
5120 ;;
5121 esac
5122 ;;
5123 freebsd* | dragonfly*)
5124 # FreeBSD uses GNU C++
5125 ;;
5126 hpux9* | hpux10* | hpux11*)
5127 case $cc_basename in
5128 CC*)
5129 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5130 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5131 if test "$host_cpu" != ia64; then
5132 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5133 fi
5134 ;;
5135 aCC*)
5136 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5137 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5138 case $host_cpu in
5139 hppa*64*|ia64*)
5140 # +Z the default
5141 ;;
5142 *)
5143 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5144 ;;
5145 esac
5146 ;;
5147 *)
5148 ;;
5149 esac
5150 ;;
5151 interix*)
5152 # This is c89, which is MS Visual C++ (no shared libs)
5153 # Anyone wants to do a port?
5154 ;;
5155 irix5* | irix6* | nonstopux*)
5156 case $cc_basename in
5157 CC*)
5158 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5159 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5160 # CC pic flag -KPIC is the default.
5161 ;;
5162 *)
5163 ;;
5164 esac
5165 ;;
5166 linux* | k*bsd*-gnu)
5167 case $cc_basename in
5168 KCC*)
5169 # KAI C++ Compiler
5170 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5171 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5172 ;;
5173 icpc* | ecpc*)
5174 # Intel C++
5175 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5176 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5177 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5178 ;;
5179 pgCC* | pgcpp*)
5180 # Portland Group C++ compiler.
5181 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5182 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5183 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5184 ;;
5185 cxx*)
5186 # Compaq C++
5187 # Make sure the PIC flag is empty. It appears that all Alpha
5188 # Linux and Compaq Tru64 Unix objects are PIC.
5189 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5190 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5191 ;;
5192 *)
5193 case `$CC -V 2>&1 | sed 5q` in
5194 *Sun\ C*)
5195 # Sun C++ 5.9
5196 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5197 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5198 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5199 ;;
5200 esac
5201 ;;
5202 esac
5203 ;;
5204 lynxos*)
5205 ;;
5206 m88k*)
5207 ;;
5208 mvs*)
5209 case $cc_basename in
5210 cxx*)
5211 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5212 ;;
5213 *)
5214 ;;
5215 esac
5216 ;;
5217 netbsd* | netbsdelf*-gnu)
5218 ;;
5219 osf3* | osf4* | osf5*)
5220 case $cc_basename in
5221 KCC*)
5222 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5223 ;;
5224 RCC*)
5225 # Rational C++ 2.4.1
5226 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5227 ;;
5228 cxx*)
5229 # Digital/Compaq C++
5230 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5231 # Make sure the PIC flag is empty. It appears that all Alpha
5232 # Linux and Compaq Tru64 Unix objects are PIC.
5233 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5234 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5235 ;;
5236 *)
5237 ;;
5238 esac
5239 ;;
5240 psos*)
5241 ;;
5242 solaris*)
5243 case $cc_basename in
5244 CC*)
5245 # Sun C++ 4.2, 5.x and Centerline C++
5246 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5247 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5248 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5249 ;;
5250 gcx*)
5251 # Green Hills C++ Compiler
5252 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5253 ;;
5254 *)
5255 ;;
5256 esac
5257 ;;
5258 sunos4*)
5259 case $cc_basename in
5260 CC*)
5261 # Sun C++ 4.x
5262 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5263 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5264 ;;
5265 lcc*)
5266 # Lucid
5267 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5268 ;;
5269 *)
5270 ;;
5271 esac
5272 ;;
5273 tandem*)
5274 case $cc_basename in
5275 NCC*)
5276 # NonStop-UX NCC 3.20
5277 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5278 ;;
5279 *)
5280 ;;
5281 esac
5282 ;;
5283 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5284 case $cc_basename in
5285 CC*)
5286 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5287 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5288 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5289 ;;
5290 esac
5291 ;;
5292 vxworks*)
5293 ;;
5294 *)
5295 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5296 ;;
5297 esac
5298 fi
5299 ],
5300 [
5301 if test "$GCC" = yes; then
5302 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5303 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5304
5305 case $host_os in
5306 aix*)
5307 # All AIX code is PIC.
5308 if test "$host_cpu" = ia64; then
5309 # AIX 5 now supports IA64 processor
5310 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5311 fi
5312 ;;
5313
5314 amigaos*)
5315 # FIXME: we need at least 68020 code to build shared libraries, but
5316 # adding the `-m68020' flag to GCC prevents building anything better,
5317 # like `-m68040'.
5318 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5319 ;;
5320
5321 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5322 # PIC is the default for these OSes.
5323 ;;
5324
5325 mingw* | cygwin* | pw32* | os2*)
5326 # This hack is so that the source file can tell whether it is being
5327 # built for inclusion in a dll (and should export symbols for example).
5328 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5329 # (--disable-auto-import) libraries
5330 m4_if([$1], [GCJ], [],
5331 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5332 ;;
5333
5334 darwin* | rhapsody*)
5335 # PIC is the default on this platform
5336 # Common symbols not allowed in MH_DYLIB files
5337 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5338 ;;
5339
5340 interix[[3-9]]*)
5341 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5342 # Instead, we relocate shared libraries at runtime.
5343 ;;
5344
5345 msdosdjgpp*)
5346 # Just because we use GCC doesn't mean we suddenly get shared libraries
5347 # on systems that don't support them.
5348 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5349 enable_shared=no
5350 ;;
5351
5352 sysv4*MP*)
5353 if test -d /usr/nec; then
5354 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5355 fi
5356 ;;
5357
5358 hpux*)
5359 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5360 # not for PA HP-UX.
5361 case $host_cpu in
5362 hppa*64*|ia64*)
5363 # +Z the default
5364 ;;
5365 *)
5366 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5367 ;;
5368 esac
5369 ;;
5370
5371 *)
5372 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5373 ;;
5374 esac
5375 else
5376 # PORTME Check for flag to pass linker flags through the system compiler.
5377 case $host_os in
5378 aix*)
5379 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5380 if test "$host_cpu" = ia64; then
5381 # AIX 5 now supports IA64 processor
5382 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5383 else
5384 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5385 fi
5386 ;;
5387 darwin*)
5388 # PIC is the default on this platform
5389 # Common symbols not allowed in MH_DYLIB files
5390 case $cc_basename in
5391 xlc*)
5392 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5393 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5394 ;;
5395 esac
5396 ;;
5397
5398 mingw* | cygwin* | pw32* | os2*)
5399 # This hack is so that the source file can tell whether it is being
5400 # built for inclusion in a dll (and should export symbols for example).
5401 m4_if([$1], [GCJ], [],
5402 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5403 ;;
5404
5405 hpux9* | hpux10* | hpux11*)
5406 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5407 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5408 # not for PA HP-UX.
5409 case $host_cpu in
5410 hppa*64*|ia64*)
5411 # +Z the default
5412 ;;
5413 *)
5414 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5415 ;;
5416 esac
5417 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5418 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5419 ;;
5420
5421 irix5* | irix6* | nonstopux*)
5422 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5423 # PIC (with -KPIC) is the default.
5424 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5425 ;;
5426
5427 newsos6)
5428 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5429 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5430 ;;
5431
5432 linux* | k*bsd*-gnu)
5433 case $cc_basename in
5434 icc* | ecc*)
5435 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5436 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5437 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5438 ;;
5439 pgcc* | pgf77* | pgf90* | pgf95*)
5440 # Portland Group compilers (*not* the Pentium gcc compiler,
5441 # which looks to be a dead project)
5442 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5443 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5444 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5445 ;;
5446 ccc*)
5447 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5448 # All Alpha code is PIC.
5449 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5450 ;;
5451 *)
5452 case `$CC -V 2>&1 | sed 5q` in
5453 *Sun\ C*)
5454 # Sun C 5.9
5455 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5456 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5457 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5458 ;;
5459 *Sun\ F*)
5460 # Sun Fortran 8.3 passes all unrecognized flags to the linker
5461 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5462 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5463 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
5464 ;;
5465 esac
5466 ;;
5467 esac
5468 ;;
5469
5470 osf3* | osf4* | osf5*)
5471 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5472 # All OSF/1 code is PIC.
5473 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5474 ;;
5475
5476 rdos*)
5477 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5478 ;;
5479
5480 solaris*)
5481 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5482 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5483 case $cc_basename in
5484 f77* | f90* | f95*)
5485 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5486 *)
5487 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5488 esac
5489 ;;
5490
5491 sunos4*)
5492 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5493 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5494 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5495 ;;
5496
5497 sysv4 | sysv4.2uw2* | sysv4.3*)
5498 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5499 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5500 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5501 ;;
5502
5503 sysv4*MP*)
5504 if test -d /usr/nec ;then
5505 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5506 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5507 fi
5508 ;;
5509
5510 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5511 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5512 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5513 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5514 ;;
5515
5516 unicos*)
5517 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5518 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5519 ;;
5520
5521 uts4*)
5522 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5523 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5524 ;;
5525
5526 *)
5527 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5528 ;;
5529 esac
5530 fi
5531 ])
5532 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5533
5534 #
5535 # Check to make sure the PIC flag actually works.
5536 #
5537 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5538 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5539 _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
5540 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5541 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5542 "" | " "*) ;;
5543 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5544 esac],
5545 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5546 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5547 fi
5548 case $host_os in
5549 # For platforms which do not support PIC, -DPIC is meaningless:
5550 *djgpp*)
5551 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5552 ;;
5553 *)
5554 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5555 ;;
5556 esac
5557
5558 #
5559 # Check to make sure the static flag actually works.
5560 #
5561 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
5562 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5563 _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5564 $lt_tmp_static_flag,
5565 [],
5566 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
5567 ])
5568
5569
5570 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5571 # ------------------------------------
5572 # See if the linker supports building shared libraries.
5573 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5574 [AC_REQUIRE([LT_AC_PROG_SED])dnl
5575 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5576 ifelse([$1],[CXX],[
5577 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5578 case $host_os in
5579 aix[[4-9]]*)
5580 # If we're using GNU nm, then we don't want the "-C" option.
5581 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5582 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5583 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5584 else
5585 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5586 fi
5587 ;;
5588 pw32*)
5589 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5590 ;;
5591 cygwin* | mingw*)
5592 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5593 ;;
5594 linux* | k*bsd*-gnu)
5595 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
5596 ;;
5597 *)
5598 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5599 ;;
5600 esac
5601 _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5602 ],[
5603 runpath_var=
5604 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5605 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5606 _LT_AC_TAGVAR(archive_cmds, $1)=
5607 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5608 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5609 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5610 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5611 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5612 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5613 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5614 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5615 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5616 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5617 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5618 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5619 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5620 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5621 _LT_AC_TAGVAR(module_cmds, $1)=
5622 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5623 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5624 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5625 # include_expsyms should be a list of space-separated symbols to be *always*
5626 # included in the symbol list
5627 _LT_AC_TAGVAR(include_expsyms, $1)=
5628 # exclude_expsyms can be an extended regexp of symbols to exclude
5629 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5630 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5631 # as well as any symbol that contains `d'.
5632 _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5633 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5634 # platforms (ab)use it in PIC code, but their linkers get confused if
5635 # the symbol is explicitly referenced. Since portable code cannot
5636 # rely on this symbol name, it's probably fine to never include it in
5637 # preloaded symbol tables.
5638 # Exclude shared library initialization/finalization symbols.
5639 dnl Note also adjust exclude_expsyms for C++ above.
5640 extract_expsyms_cmds=
5641 # Just being paranoid about ensuring that cc_basename is set.
5642 _LT_CC_BASENAME([$compiler])
5643 case $host_os in
5644 cygwin* | mingw* | pw32*)
5645 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5646 # When not using gcc, we currently assume that we are using
5647 # Microsoft Visual C++.
5648 if test "$GCC" != yes; then
5649 with_gnu_ld=no
5650 fi
5651 ;;
5652 interix*)
5653 # we just hope/assume this is gcc and not c89 (= MSVC++)
5654 with_gnu_ld=yes
5655 ;;
5656 openbsd*)
5657 with_gnu_ld=no
5658 ;;
5659 esac
5660
5661 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5662 if test "$with_gnu_ld" = yes; then
5663 # If archive_cmds runs LD, not CC, wlarc should be empty
5664 wlarc='${wl}'
5665
5666 # Set some defaults for GNU ld with shared library support. These
5667 # are reset later if shared libraries are not supported. Putting them
5668 # here allows them to be overridden if necessary.
5669 runpath_var=LD_RUN_PATH
5670 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5671 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5672 # ancient GNU ld didn't support --whole-archive et. al.
5673 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5674 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5675 else
5676 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5677 fi
5678 supports_anon_versioning=no
5679 case `$LD -v 2>/dev/null` in
5680 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5681 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5682 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5683 *\ 2.11.*) ;; # other 2.11 versions
5684 *) supports_anon_versioning=yes ;;
5685 esac
5686
5687 # See if GNU ld supports shared libraries.
5688 case $host_os in
5689 aix[[3-9]]*)
5690 # On AIX/PPC, the GNU linker is very broken
5691 if test "$host_cpu" != ia64; then
5692 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5693 cat <<EOF 1>&2
5694
5695 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5696 *** to be unable to reliably create shared libraries on AIX.
5697 *** Therefore, libtool is disabling shared libraries support. If you
5698 *** really care for shared libraries, you may want to modify your PATH
5699 *** so that a non-GNU linker is found, and then restart.
5700
5701 EOF
5702 fi
5703 ;;
5704
5705 amigaos*)
5706 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5707 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5708 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5709
5710 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5711 # that the semantics of dynamic libraries on AmigaOS, at least up
5712 # to version 4, is to share data among multiple programs linked
5713 # with the same dynamic library. Since this doesn't match the
5714 # behavior of shared libraries on other platforms, we can't use
5715 # them.
5716 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5717 ;;
5718
5719 beos*)
5720 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5721 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5722 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5723 # support --undefined. This deserves some investigation. FIXME
5724 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5725 else
5726 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5727 fi
5728 ;;
5729
5730 cygwin* | mingw* | pw32*)
5731 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5732 # as there is no search path for DLLs.
5733 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5734 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5735 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5736 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5737 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5738
5739 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5740 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5741 # If the export-symbols file already is a .def file (1st line
5742 # is EXPORTS), use it as is; otherwise, prepend...
5743 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5744 cp $export_symbols $output_objdir/$soname.def;
5745 else
5746 echo EXPORTS > $output_objdir/$soname.def;
5747 cat $export_symbols >> $output_objdir/$soname.def;
5748 fi~
5749 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5750 else
5751 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5752 fi
5753 ;;
5754
5755 interix[[3-9]]*)
5756 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5757 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5758 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5759 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5760 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5761 # Instead, shared libraries are loaded at an image base (0x10000000 by
5762 # default) and relocated if they conflict, which is a slow very memory
5763 # consuming and fragmenting process. To avoid this, we pick a random,
5764 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5765 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5766 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5767 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5768 ;;
5769
5770 gnu* | linux* | k*bsd*-gnu)
5771 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5772 tmp_addflag=
5773 case $cc_basename,$host_cpu in
5774 pgcc*) # Portland Group C compiler
5775 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5776 tmp_addflag=' $pic_flag'
5777 ;;
5778 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
5779 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5780 tmp_addflag=' $pic_flag -Mnomain' ;;
5781 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5782 tmp_addflag=' -i_dynamic' ;;
5783 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5784 tmp_addflag=' -i_dynamic -nofor_main' ;;
5785 ifc* | ifort*) # Intel Fortran compiler
5786 tmp_addflag=' -nofor_main' ;;
5787 esac
5788 case `$CC -V 2>&1 | sed 5q` in
5789 *Sun\ C*) # Sun C 5.9
5790 _LT_AC_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'
5791 tmp_sharedflag='-G' ;;
5792 *Sun\ F*) # Sun Fortran 8.3
5793 tmp_sharedflag='-G' ;;
5794 *)
5795 tmp_sharedflag='-shared' ;;
5796 esac
5797 _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5798
5799 if test $supports_anon_versioning = yes; then
5800 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5801 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5802 $echo "local: *; };" >> $output_objdir/$libname.ver~
5803 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5804 fi
5805 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
5806 else
5807 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5808 fi
5809 ;;
5810
5811 netbsd* | netbsdelf*-gnu)
5812 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5813 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5814 wlarc=
5815 else
5816 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5817 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5818 fi
5819 ;;
5820
5821 solaris*)
5822 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5823 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5824 cat <<EOF 1>&2
5825
5826 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5827 *** create shared libraries on Solaris systems. Therefore, libtool
5828 *** is disabling shared libraries support. We urge you to upgrade GNU
5829 *** binutils to release 2.9.1 or newer. Another option is to modify
5830 *** your PATH or compiler configuration so that the native linker is
5831 *** used, and then restart.
5832
5833 EOF
5834 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5835 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5836 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5837 else
5838 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5839 fi
5840 ;;
5841
5842 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5843 case `$LD -v 2>&1` in
5844 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5845 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5846 cat <<_LT_EOF 1>&2
5847
5848 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5849 *** reliably create shared libraries on SCO systems. Therefore, libtool
5850 *** is disabling shared libraries support. We urge you to upgrade GNU
5851 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5852 *** your PATH or compiler configuration so that the native linker is
5853 *** used, and then restart.
5854
5855 _LT_EOF
5856 ;;
5857 *)
5858 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5859 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
5860 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
5861 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
5862 else
5863 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5864 fi
5865 ;;
5866 esac
5867 ;;
5868
5869 sunos4*)
5870 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5871 wlarc=
5872 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5873 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5874 ;;
5875
5876 *)
5877 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5878 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5879 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5880 else
5881 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5882 fi
5883 ;;
5884 esac
5885
5886 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5887 runpath_var=
5888 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5889 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5890 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5891 fi
5892 else
5893 # PORTME fill in a description of your system's linker (not GNU ld)
5894 case $host_os in
5895 aix3*)
5896 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5897 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5898 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5899 # Note: this linker hardcodes the directories in LIBPATH if there
5900 # are no directories specified by -L.
5901 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5902 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5903 # Neither direct hardcoding nor static linking is supported with a
5904 # broken collect2.
5905 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5906 fi
5907 ;;
5908
5909 aix[[4-9]]*)
5910 if test "$host_cpu" = ia64; then
5911 # On IA64, the linker does run time linking by default, so we don't
5912 # have to do anything special.
5913 aix_use_runtimelinking=no
5914 exp_sym_flag='-Bexport'
5915 no_entry_flag=""
5916 else
5917 # If we're using GNU nm, then we don't want the "-C" option.
5918 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5919 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5920 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5921 else
5922 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5923 fi
5924 aix_use_runtimelinking=no
5925
5926 # Test if we are trying to use run time linking or normal
5927 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5928 # need to do runtime linking.
5929 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5930 for ld_flag in $LDFLAGS; do
5931 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5932 aix_use_runtimelinking=yes
5933 break
5934 fi
5935 done
5936 ;;
5937 esac
5938
5939 exp_sym_flag='-bexport'
5940 no_entry_flag='-bnoentry'
5941 fi
5942
5943 # When large executables or shared objects are built, AIX ld can
5944 # have problems creating the table of contents. If linking a library
5945 # or program results in "error TOC overflow" add -mminimal-toc to
5946 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5947 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5948
5949 _LT_AC_TAGVAR(archive_cmds, $1)=''
5950 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5951 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5952 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5953
5954 if test "$GCC" = yes; then
5955 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5956 # We only want to do this on AIX 4.2 and lower, the check
5957 # below for broken collect2 doesn't work under 4.3+
5958 collect2name=`${CC} -print-prog-name=collect2`
5959 if test -f "$collect2name" && \
5960 strings "$collect2name" | grep resolve_lib_name >/dev/null
5961 then
5962 # We have reworked collect2
5963 :
5964 else
5965 # We have old collect2
5966 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5967 # It fails to find uninstalled libraries when the uninstalled
5968 # path is not listed in the libpath. Setting hardcode_minus_L
5969 # to unsupported forces relinking
5970 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5971 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5972 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5973 fi
5974 ;;
5975 esac
5976 shared_flag='-shared'
5977 if test "$aix_use_runtimelinking" = yes; then
5978 shared_flag="$shared_flag "'${wl}-G'
5979 fi
5980 else
5981 # not using gcc
5982 if test "$host_cpu" = ia64; then
5983 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5984 # chokes on -Wl,-G. The following line is correct:
5985 shared_flag='-G'
5986 else
5987 if test "$aix_use_runtimelinking" = yes; then
5988 shared_flag='${wl}-G'
5989 else
5990 shared_flag='${wl}-bM:SRE'
5991 fi
5992 fi
5993 fi
5994
5995 # It seems that -bexpall does not export symbols beginning with
5996 # underscore (_), so it is better to generate a list of symbols to export.
5997 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5998 if test "$aix_use_runtimelinking" = yes; then
5999 # Warning - without using the other runtime loading flags (-brtl),
6000 # -berok will link without error, but may produce a broken library.
6001 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6002 # Determine the default libpath from the value encoded in an empty executable.
6003 _LT_AC_SYS_LIBPATH_AIX
6004 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6005 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6006 else
6007 if test "$host_cpu" = ia64; then
6008 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6009 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6010 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6011 else
6012 # Determine the default libpath from the value encoded in an empty executable.
6013 _LT_AC_SYS_LIBPATH_AIX
6014 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6015 # Warning - without using the other run time loading flags,
6016 # -berok will link without error, but may produce a broken library.
6017 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6018 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6019 # Exported symbols can be pulled into shared objects from archives
6020 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6021 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6022 # This is similar to how AIX traditionally builds its shared libraries.
6023 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6024 fi
6025 fi
6026 ;;
6027
6028 amigaos*)
6029 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6030 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6031 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6032 # see comment about different semantics on the GNU ld section
6033 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6034 ;;
6035
6036 bsdi[[45]]*)
6037 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6038 ;;
6039
6040 cygwin* | mingw* | pw32*)
6041 # When not using gcc, we currently assume that we are using
6042 # Microsoft Visual C++.
6043 # hardcode_libdir_flag_spec is actually meaningless, as there is
6044 # no search path for DLLs.
6045 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6046 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6047 # Tell ltmain to make .lib files, not .a files.
6048 libext=lib
6049 # Tell ltmain to make .dll files, not .so files.
6050 shrext_cmds=".dll"
6051 # FIXME: Setting linknames here is a bad hack.
6052 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6053 # The linker will automatically build a .lib file if we build a DLL.
6054 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6055 # FIXME: Should let the user specify the lib program.
6056 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6057 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6058 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6059 ;;
6060
6061 darwin* | rhapsody*)
6062 case $host_os in
6063 rhapsody* | darwin1.[[012]])
6064 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
6065 ;;
6066 *) # Darwin 1.3 on
6067 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6068 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6069 else
6070 case ${MACOSX_DEPLOYMENT_TARGET} in
6071 10.[[012]])
6072 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6073 ;;
6074 10.*)
6075 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
6076 ;;
6077 esac
6078 fi
6079 ;;
6080 esac
6081 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6082 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6083 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6084 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6085 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6086 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6087 if test "$GCC" = yes ; then
6088 output_verbose_link_cmd='echo'
6089 _LT_AC_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}"
6090 _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
6091 _LT_AC_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}"
6092 _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
6093 else
6094 case $cc_basename in
6095 xlc*)
6096 output_verbose_link_cmd='echo'
6097 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
6098 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6099 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6100 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6101 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6102 ;;
6103 *)
6104 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6105 ;;
6106 esac
6107 fi
6108 ;;
6109
6110 dgux*)
6111 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6112 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6113 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6114 ;;
6115
6116 freebsd1*)
6117 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6118 ;;
6119
6120 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6121 # support. Future versions do this automatically, but an explicit c++rt0.o
6122 # does not break anything, and helps significantly (at the cost of a little
6123 # extra space).
6124 freebsd2.2*)
6125 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6126 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6127 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6128 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6129 ;;
6130
6131 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6132 freebsd2*)
6133 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6134 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6135 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6136 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6137 ;;
6138
6139 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6140 freebsd* | dragonfly*)
6141 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6142 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6143 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6144 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6145 ;;
6146
6147 hpux9*)
6148 if test "$GCC" = yes; then
6149 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6150 else
6151 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6152 fi
6153 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6154 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6155 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6156
6157 # hardcode_minus_L: Not really in the search PATH,
6158 # but as the default location of the library.
6159 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6160 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6161 ;;
6162
6163 hpux10*)
6164 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6165 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6166 else
6167 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6168 fi
6169 if test "$with_gnu_ld" = no; then
6170 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6171 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6172
6173 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6174 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6175
6176 # hardcode_minus_L: Not really in the search PATH,
6177 # but as the default location of the library.
6178 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6179 fi
6180 ;;
6181
6182 hpux11*)
6183 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6184 case $host_cpu in
6185 hppa*64*)
6186 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6187 ;;
6188 ia64*)
6189 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6190 ;;
6191 *)
6192 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6193 ;;
6194 esac
6195 else
6196 case $host_cpu in
6197 hppa*64*)
6198 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6199 ;;
6200 ia64*)
6201 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6202 ;;
6203 *)
6204 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6205 ;;
6206 esac
6207 fi
6208 if test "$with_gnu_ld" = no; then
6209 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6210 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6211
6212 case $host_cpu in
6213 hppa*64*|ia64*)
6214 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6215 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6216 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6217 ;;
6218 *)
6219 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6220 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6221
6222 # hardcode_minus_L: Not really in the search PATH,
6223 # but as the default location of the library.
6224 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6225 ;;
6226 esac
6227 fi
6228 ;;
6229
6230 irix5* | irix6* | nonstopux*)
6231 if test "$GCC" = yes; then
6232 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6233 else
6234 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6235 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6236 fi
6237 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6238 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6239 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6240 ;;
6241
6242 netbsd* | netbsdelf*-gnu)
6243 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6244 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6245 else
6246 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6247 fi
6248 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6249 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6250 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6251 ;;
6252
6253 newsos6)
6254 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6255 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6256 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6257 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6258 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6259 ;;
6260
6261 openbsd*)
6262 if test -f /usr/libexec/ld.so; then
6263 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6264 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6265 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6266 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6267 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6268 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6269 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6270 else
6271 case $host_os in
6272 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6273 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6274 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6275 ;;
6276 *)
6277 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6278 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6279 ;;
6280 esac
6281 fi
6282 else
6283 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6284 fi
6285 ;;
6286
6287 os2*)
6288 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6289 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6290 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6291 _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6292 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6293 ;;
6294
6295 osf3*)
6296 if test "$GCC" = yes; then
6297 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6298 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6299 else
6300 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6301 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6302 fi
6303 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6304 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6305 ;;
6306
6307 osf4* | osf5*) # as osf3* with the addition of -msym flag
6308 if test "$GCC" = yes; then
6309 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6310 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6311 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6312 else
6313 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6314 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6315 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6316 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
6317
6318 # Both c and cxx compiler support -rpath directly
6319 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6320 fi
6321 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6322 ;;
6323
6324 solaris*)
6325 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6326 if test "$GCC" = yes; then
6327 wlarc='${wl}'
6328 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6329 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6330 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6331 else
6332 wlarc=''
6333 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6334 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6335 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6336 fi
6337 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6338 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6339 case $host_os in
6340 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6341 *)
6342 # The compiler driver will combine and reorder linker options,
6343 # but understands `-z linker_flag'. GCC discards it without `$wl',
6344 # but is careful enough not to reorder.
6345 # Supported since Solaris 2.6 (maybe 2.5.1?)
6346 if test "$GCC" = yes; then
6347 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6348 else
6349 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6350 fi
6351 ;;
6352 esac
6353 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6354 ;;
6355
6356 sunos4*)
6357 if test "x$host_vendor" = xsequent; then
6358 # Use $CC to link under sequent, because it throws in some extra .o
6359 # files that make .init and .fini sections work.
6360 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6361 else
6362 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6363 fi
6364 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6365 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6366 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6367 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6368 ;;
6369
6370 sysv4)
6371 case $host_vendor in
6372 sni)
6373 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6374 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6375 ;;
6376 siemens)
6377 ## LD is ld it makes a PLAMLIB
6378 ## CC just makes a GrossModule.
6379 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6380 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6381 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6382 ;;
6383 motorola)
6384 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6385 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6386 ;;
6387 esac
6388 runpath_var='LD_RUN_PATH'
6389 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6390 ;;
6391
6392 sysv4.3*)
6393 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6394 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6395 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6396 ;;
6397
6398 sysv4*MP*)
6399 if test -d /usr/nec; then
6400 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6401 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6402 runpath_var=LD_RUN_PATH
6403 hardcode_runpath_var=yes
6404 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6405 fi
6406 ;;
6407
6408 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6409 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6410 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6411 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6412 runpath_var='LD_RUN_PATH'
6413
6414 if test "$GCC" = yes; then
6415 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6416 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6417 else
6418 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6419 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6420 fi
6421 ;;
6422
6423 sysv5* | sco3.2v5* | sco5v6*)
6424 # Note: We can NOT use -z defs as we might desire, because we do not
6425 # link with -lc, and that would cause any symbols used from libc to
6426 # always be unresolved, which means just about no library would
6427 # ever link correctly. If we're not using GNU ld we use -z text
6428 # though, which does catch some bad symbols but isn't as heavy-handed
6429 # as -z defs.
6430 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6431 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6432 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6433 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6434 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6435 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6436 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6437 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6438 runpath_var='LD_RUN_PATH'
6439
6440 if test "$GCC" = yes; then
6441 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6442 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6443 else
6444 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6445 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6446 fi
6447 ;;
6448
6449 uts4*)
6450 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6451 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6452 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6453 ;;
6454
6455 *)
6456 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6457 ;;
6458 esac
6459 fi
6460 ])
6461 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6462 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6463
6464 #
6465 # Do we need to explicitly link libc?
6466 #
6467 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6468 x|xyes)
6469 # Assume -lc should be added
6470 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6471
6472 if test "$enable_shared" = yes && test "$GCC" = yes; then
6473 case $_LT_AC_TAGVAR(archive_cmds, $1) in
6474 *'~'*)
6475 # FIXME: we may have to deal with multi-command sequences.
6476 ;;
6477 '$CC '*)
6478 # Test whether the compiler implicitly links with -lc since on some
6479 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6480 # to ld, don't add -lc before -lgcc.
6481 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6482 $rm conftest*
6483 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6484
6485 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6486 soname=conftest
6487 lib=conftest
6488 libobjs=conftest.$ac_objext
6489 deplibs=
6490 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6491 pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6492 compiler_flags=-v
6493 linker_flags=-v
6494 verstring=
6495 output_objdir=.
6496 libname=conftest
6497 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6498 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6499 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6500 then
6501 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6502 else
6503 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6504 fi
6505 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6506 else
6507 cat conftest.err 1>&5
6508 fi
6509 $rm conftest*
6510 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6511 ;;
6512 esac
6513 fi
6514 ;;
6515 esac
6516 ])# AC_LIBTOOL_PROG_LD_SHLIBS
6517
6518
6519 # _LT_AC_FILE_LTDLL_C
6520 # -------------------
6521 # Be careful that the start marker always follows a newline.
6522 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6523 # /* ltdll.c starts here */
6524 # #define WIN32_LEAN_AND_MEAN
6525 # #include <windows.h>
6526 # #undef WIN32_LEAN_AND_MEAN
6527 # #include <stdio.h>
6528 #
6529 # #ifndef __CYGWIN__
6530 # # ifdef __CYGWIN32__
6531 # # define __CYGWIN__ __CYGWIN32__
6532 # # endif
6533 # #endif
6534 #
6535 # #ifdef __cplusplus
6536 # extern "C" {
6537 # #endif
6538 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6539 # #ifdef __cplusplus
6540 # }
6541 # #endif
6542 #
6543 # #ifdef __CYGWIN__
6544 # #include <cygwin/cygwin_dll.h>
6545 # DECLARE_CYGWIN_DLL( DllMain );
6546 # #endif
6547 # HINSTANCE __hDllInstance_base;
6548 #
6549 # BOOL APIENTRY
6550 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6551 # {
6552 # __hDllInstance_base = hInst;
6553 # return TRUE;
6554 # }
6555 # /* ltdll.c ends here */
6556 ])# _LT_AC_FILE_LTDLL_C
6557
6558
6559 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6560 # ---------------------------------
6561 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6562
6563
6564 # old names
6565 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
6566 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
6567 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
6568 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6569 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6570 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
6571 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
6572
6573 # This is just to silence aclocal about the macro not being used
6574 ifelse([AC_DISABLE_FAST_INSTALL])
6575
6576 AC_DEFUN([LT_AC_PROG_GCJ],
6577 [AC_CHECK_TOOL(GCJ, gcj, no)
6578 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6579 AC_SUBST(GCJFLAGS)
6580 ])
6581
6582 AC_DEFUN([LT_AC_PROG_RC],
6583 [AC_CHECK_TOOL(RC, windres, no)
6584 ])
6585
6586
6587 # Cheap backport of AS_EXECUTABLE_P and required macros
6588 # from Autoconf 2.59; we should not use $as_executable_p directly.
6589
6590 # _AS_TEST_PREPARE
6591 # ----------------
6592 m4_ifndef([_AS_TEST_PREPARE],
6593 [m4_defun([_AS_TEST_PREPARE],
6594 [if test -x / >/dev/null 2>&1; then
6595 as_executable_p='test -x'
6596 else
6597 as_executable_p='test -f'
6598 fi
6599 ])])# _AS_TEST_PREPARE
6600
6601 # AS_EXECUTABLE_P
6602 # ---------------
6603 # Check whether a file is executable.
6604 m4_ifndef([AS_EXECUTABLE_P],
6605 [m4_defun([AS_EXECUTABLE_P],
6606 [AS_REQUIRE([_AS_TEST_PREPARE])dnl
6607 $as_executable_p $1[]dnl
6608 ])])# AS_EXECUTABLE_P
6609
6610 # NOTE: This macro has been submitted for inclusion into #
6611 # GNU Autoconf as AC_PROG_SED. When it is available in #
6612 # a released version of Autoconf we should remove this #
6613 # macro and use it instead. #
6614 # LT_AC_PROG_SED
6615 # --------------
6616 # Check for a fully-functional sed program, that truncates
6617 # as few characters as possible. Prefer GNU sed if found.
6618 AC_DEFUN([LT_AC_PROG_SED],
6619 [AC_MSG_CHECKING([for a sed that does not truncate output])
6620 AC_CACHE_VAL(lt_cv_path_SED,
6621 [# Loop through the user's path and test for sed and gsed.
6622 # Then use that list of sed's as ones to test for truncation.
6623 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6624 for as_dir in $PATH
6625 do
6626 IFS=$as_save_IFS
6627 test -z "$as_dir" && as_dir=.
6628 for lt_ac_prog in sed gsed; do
6629 for ac_exec_ext in '' $ac_executable_extensions; do
6630 if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
6631 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6632 fi
6633 done
6634 done
6635 done
6636 IFS=$as_save_IFS
6637 lt_ac_max=0
6638 lt_ac_count=0
6639 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6640 # along with /bin/sed that truncates output.
6641 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6642 test ! -f $lt_ac_sed && continue
6643 cat /dev/null > conftest.in
6644 lt_ac_count=0
6645 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6646 # Check for GNU sed and select it if it is found.
6647 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6648 lt_cv_path_SED=$lt_ac_sed
6649 break
6650 fi
6651 while true; do
6652 cat conftest.in conftest.in >conftest.tmp
6653 mv conftest.tmp conftest.in
6654 cp conftest.in conftest.nl
6655 echo >>conftest.nl
6656 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6657 cmp -s conftest.out conftest.nl || break
6658 # 10000 chars as input seems more than enough
6659 test $lt_ac_count -gt 10 && break
6660 lt_ac_count=`expr $lt_ac_count + 1`
6661 if test $lt_ac_count -gt $lt_ac_max; then
6662 lt_ac_max=$lt_ac_count
6663 lt_cv_path_SED=$lt_ac_sed
6664 fi
6665 done
6666 done
6667 ])
6668 SED=$lt_cv_path_SED
6669 AC_SUBST([SED])
6670 AC_MSG_RESULT([$SED])
6671 ])
6672
6673 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
6674 #
6675 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
6676 #
6677 # This program is free software; you can redistribute it and/or modify
6678 # it under the terms of the GNU General Public License as published by
6679 # the Free Software Foundation; either version 2 of the License, or
6680 # (at your option) any later version.
6681 #
6682 # This program is distributed in the hope that it will be useful, but
6683 # WITHOUT ANY WARRANTY; without even the implied warranty of
6684 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6685 # General Public License for more details.
6686 #
6687 # You should have received a copy of the GNU General Public License
6688 # along with this program; if not, write to the Free Software
6689 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6690 #
6691 # As a special exception to the GNU General Public License, if you
6692 # distribute this file as part of a program that contains a
6693 # configuration script generated by Autoconf, you may include it under
6694 # the same distribution terms that you use for the rest of that program.
6695
6696 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
6697 # ----------------------------------
6698 AC_DEFUN([PKG_PROG_PKG_CONFIG],
6699 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
6700 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
6701 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
6702 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6703 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
6704 fi
6705 if test -n "$PKG_CONFIG"; then
6706 _pkg_min_version=m4_default([$1], [0.9.0])
6707 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
6708 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6709 AC_MSG_RESULT([yes])
6710 else
6711 AC_MSG_RESULT([no])
6712 PKG_CONFIG=""
6713 fi
6714
6715 fi[]dnl
6716 ])# PKG_PROG_PKG_CONFIG
6717
6718 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
6719 #
6720 # Check to see whether a particular set of modules exists. Similar
6721 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
6722 #
6723 #
6724 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
6725 # this or PKG_CHECK_MODULES is called, or make sure to call
6726 # PKG_CHECK_EXISTS manually
6727 # --------------------------------------------------------------
6728 AC_DEFUN([PKG_CHECK_EXISTS],
6729 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6730 if test -n "$PKG_CONFIG" && \
6731 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
6732 m4_ifval([$2], [$2], [:])
6733 m4_ifvaln([$3], [else
6734 $3])dnl
6735 fi])
6736
6737
6738 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
6739 # ---------------------------------------------
6740 m4_define([_PKG_CONFIG],
6741 [if test -n "$PKG_CONFIG"; then
6742 if test -n "$$1"; then
6743 pkg_cv_[]$1="$$1"
6744 else
6745 PKG_CHECK_EXISTS([$3],
6746 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
6747 [pkg_failed=yes])
6748 fi
6749 else
6750 pkg_failed=untried
6751 fi[]dnl
6752 ])# _PKG_CONFIG
6753
6754 # _PKG_SHORT_ERRORS_SUPPORTED
6755 # -----------------------------
6756 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
6757 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
6758 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
6759 _pkg_short_errors_supported=yes
6760 else
6761 _pkg_short_errors_supported=no
6762 fi[]dnl
6763 ])# _PKG_SHORT_ERRORS_SUPPORTED
6764
6765
6766 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
6767 # [ACTION-IF-NOT-FOUND])
6768 #
6769 #
6770 # Note that if there is a possibility the first call to
6771 # PKG_CHECK_MODULES might not happen, you should be sure to include an
6772 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
6773 #
6774 #
6775 # --------------------------------------------------------------
6776 AC_DEFUN([PKG_CHECK_MODULES],
6777 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6778 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
6779 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
6780
6781 pkg_failed=no
6782 AC_MSG_CHECKING([for $1])
6783
6784 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
6785 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
6786
6787 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
6788 and $1[]_LIBS to avoid the need to call pkg-config.
6789 See the pkg-config man page for more details.])
6790
6791 if test $pkg_failed = yes; then
6792 _PKG_SHORT_ERRORS_SUPPORTED
6793 if test $_pkg_short_errors_supported = yes; then
6794 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
6795 else
6796 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
6797 fi
6798 # Put the nasty error message in config.log where it belongs
6799 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
6800
6801 ifelse([$4], , [AC_MSG_ERROR(dnl
6802 [Package requirements ($2) were not met:
6803
6804 $$1_PKG_ERRORS
6805
6806 Consider adjusting the PKG_CONFIG_PATH environment variable if you
6807 installed software in a non-standard prefix.
6808
6809 _PKG_TEXT
6810 ])],
6811 [AC_MSG_RESULT([no])
6812 $4])
6813 elif test $pkg_failed = untried; then
6814 ifelse([$4], , [AC_MSG_FAILURE(dnl
6815 [The pkg-config script could not be found or is too old. Make sure it
6816 is in your PATH or set the PKG_CONFIG environment variable to the full
6817 path to pkg-config.
6818
6819 _PKG_TEXT
6820
6821 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
6822 [$4])
6823 else
6824 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
6825 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
6826 AC_MSG_RESULT([yes])
6827 ifelse([$3], , :, [$3])
6828 fi[]dnl
6829 ])# PKG_CHECK_MODULES
6830
6831 # Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
6832 #
6833 # This file is free software; the Free Software Foundation
6834 # gives unlimited permission to copy and/or distribute it,
6835 # with or without modifications, as long as this notice is preserved.
6836
6837 # AM_AUTOMAKE_VERSION(VERSION)
6838 # ----------------------------
6839 # Automake X.Y traces this macro to ensure aclocal.m4 has been
6840 # generated from the m4 files accompanying Automake X.Y.
6841 # (This private macro should not be called outside this file.)
6842 AC_DEFUN([AM_AUTOMAKE_VERSION],
6843 [am__api_version='1.10'
6844 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
6845 dnl require some minimum version. Point them to the right macro.
6846 m4_if([$1], [1.10.1], [],
6847 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
6848 ])
6849
6850 # _AM_AUTOCONF_VERSION(VERSION)
6851 # -----------------------------
6852 # aclocal traces this macro to find the Autoconf version.
6853 # This is a private macro too. Using m4_define simplifies
6854 # the logic in aclocal, which can simply ignore this definition.
6855 m4_define([_AM_AUTOCONF_VERSION], [])
6856
6857 # AM_SET_CURRENT_AUTOMAKE_VERSION
6858 # -------------------------------
6859 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
6860 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6861 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6862 [AM_AUTOMAKE_VERSION([1.10.1])dnl
6863 m4_ifndef([AC_AUTOCONF_VERSION],
6864 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
6865 _AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
6866
6867 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
6868
6869 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
6870 #
6871 # This file is free software; the Free Software Foundation
6872 # gives unlimited permission to copy and/or distribute it,
6873 # with or without modifications, as long as this notice is preserved.
6874
6875 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6876 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
6877 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
6878 #
6879 # Of course, Automake must honor this variable whenever it calls a
6880 # tool from the auxiliary directory. The problem is that $srcdir (and
6881 # therefore $ac_aux_dir as well) can be either absolute or relative,
6882 # depending on how configure is run. This is pretty annoying, since
6883 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
6884 # source directory, any form will work fine, but in subdirectories a
6885 # relative path needs to be adjusted first.
6886 #
6887 # $ac_aux_dir/missing
6888 # fails when called from a subdirectory if $ac_aux_dir is relative
6889 # $top_srcdir/$ac_aux_dir/missing
6890 # fails if $ac_aux_dir is absolute,
6891 # fails when called from a subdirectory in a VPATH build with
6892 # a relative $ac_aux_dir
6893 #
6894 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
6895 # are both prefixed by $srcdir. In an in-source build this is usually
6896 # harmless because $srcdir is `.', but things will broke when you
6897 # start a VPATH build or use an absolute $srcdir.
6898 #
6899 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
6900 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
6901 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
6902 # and then we would define $MISSING as
6903 # MISSING="\${SHELL} $am_aux_dir/missing"
6904 # This will work as long as MISSING is not called from configure, because
6905 # unfortunately $(top_srcdir) has no meaning in configure.
6906 # However there are other variables, like CC, which are often used in
6907 # configure, and could therefore not use this "fixed" $ac_aux_dir.
6908 #
6909 # Another solution, used here, is to always expand $ac_aux_dir to an
6910 # absolute PATH. The drawback is that using absolute paths prevent a
6911 # configured tree to be moved without reconfiguration.
6912
6913 AC_DEFUN([AM_AUX_DIR_EXPAND],
6914 [dnl Rely on autoconf to set up CDPATH properly.
6915 AC_PREREQ([2.50])dnl
6916 # expand $ac_aux_dir to an absolute path
6917 am_aux_dir=`cd $ac_aux_dir && pwd`
6918 ])
6919
6920 # AM_CONDITIONAL -*- Autoconf -*-
6921
6922 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
6923 # Free Software Foundation, Inc.
6924 #
6925 # This file is free software; the Free Software Foundation
6926 # gives unlimited permission to copy and/or distribute it,
6927 # with or without modifications, as long as this notice is preserved.
6928
6929 # serial 8
6930
6931 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
6932 # -------------------------------------
6933 # Define a conditional.
6934 AC_DEFUN([AM_CONDITIONAL],
6935 [AC_PREREQ(2.52)dnl
6936 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
6937 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6938 AC_SUBST([$1_TRUE])dnl
6939 AC_SUBST([$1_FALSE])dnl
6940 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
6941 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
6942 if $2; then
6943 $1_TRUE=
6944 $1_FALSE='#'
6945 else
6946 $1_TRUE='#'
6947 $1_FALSE=
6948 fi
6949 AC_CONFIG_COMMANDS_PRE(
6950 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
6951 AC_MSG_ERROR([[conditional "$1" was never defined.
6952 Usually this means the macro was only invoked conditionally.]])
6953 fi])])
6954
6955 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6956 # Free Software Foundation, Inc.
6957 #
6958 # This file is free software; the Free Software Foundation
6959 # gives unlimited permission to copy and/or distribute it,
6960 # with or without modifications, as long as this notice is preserved.
6961
6962 # serial 9
6963
6964 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6965 # written in clear, in which case automake, when reading aclocal.m4,
6966 # will think it sees a *use*, and therefore will trigger all it's
6967 # C support machinery. Also note that it means that autoscan, seeing
6968 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
6969
6970
6971 # _AM_DEPENDENCIES(NAME)
6972 # ----------------------
6973 # See how the compiler implements dependency checking.
6974 # NAME is "CC", "CXX", "GCJ", or "OBJC".
6975 # We try a few techniques and use that to set a single cache variable.
6976 #
6977 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
6978 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
6979 # dependency, and given that the user is not expected to run this macro,
6980 # just rely on AC_PROG_CC.
6981 AC_DEFUN([_AM_DEPENDENCIES],
6982 [AC_REQUIRE([AM_SET_DEPDIR])dnl
6983 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
6984 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
6985 AC_REQUIRE([AM_DEP_TRACK])dnl
6986
6987 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
6988 [$1], CXX, [depcc="$CXX" am_compiler_list=],
6989 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
6990 [$1], UPC, [depcc="$UPC" am_compiler_list=],
6991 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
6992 [depcc="$$1" am_compiler_list=])
6993
6994 AC_CACHE_CHECK([dependency style of $depcc],
6995 [am_cv_$1_dependencies_compiler_type],
6996 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6997 # We make a subdir and do the tests there. Otherwise we can end up
6998 # making bogus files that we don't know about and never remove. For
6999 # instance it was reported that on HP-UX the gcc test will end up
7000 # making a dummy file named `D' -- because `-MD' means `put the output
7001 # in D'.
7002 mkdir conftest.dir
7003 # Copy depcomp to subdir because otherwise we won't find it if we're
7004 # using a relative directory.
7005 cp "$am_depcomp" conftest.dir
7006 cd conftest.dir
7007 # We will build objects and dependencies in a subdirectory because
7008 # it helps to detect inapplicable dependency modes. For instance
7009 # both Tru64's cc and ICC support -MD to output dependencies as a
7010 # side effect of compilation, but ICC will put the dependencies in
7011 # the current directory while Tru64 will put them in the object
7012 # directory.
7013 mkdir sub
7014
7015 am_cv_$1_dependencies_compiler_type=none
7016 if test "$am_compiler_list" = ""; then
7017 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
7018 fi
7019 for depmode in $am_compiler_list; do
7020 # Setup a source with many dependencies, because some compilers
7021 # like to wrap large dependency lists on column 80 (with \), and
7022 # we should not choose a depcomp mode which is confused by this.
7023 #
7024 # We need to recreate these files for each test, as the compiler may
7025 # overwrite some of them when testing with obscure command lines.
7026 # This happens at least with the AIX C compiler.
7027 : > sub/conftest.c
7028 for i in 1 2 3 4 5 6; do
7029 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7030 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7031 # Solaris 8's {/usr,}/bin/sh.
7032 touch sub/conftst$i.h
7033 done
7034 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7035
7036 case $depmode in
7037 nosideeffect)
7038 # after this tag, mechanisms are not by side-effect, so they'll
7039 # only be used when explicitly requested
7040 if test "x$enable_dependency_tracking" = xyes; then
7041 continue
7042 else
7043 break
7044 fi
7045 ;;
7046 none) break ;;
7047 esac
7048 # We check with `-c' and `-o' for the sake of the "dashmstdout"
7049 # mode. It turns out that the SunPro C++ compiler does not properly
7050 # handle `-M -o', and we need to detect this.
7051 if depmode=$depmode \
7052 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
7053 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7054 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
7055 >/dev/null 2>conftest.err &&
7056 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
7057 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7058 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
7059 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7060 # icc doesn't choke on unknown options, it will just issue warnings
7061 # or remarks (even with -Werror). So we grep stderr for any message
7062 # that says an option was ignored or not supported.
7063 # When given -MP, icc 7.0 and 7.1 complain thusly:
7064 # icc: Command line warning: ignoring option '-M'; no argument required
7065 # The diagnosis changed in icc 8.0:
7066 # icc: Command line remark: option '-MP' not supported
7067 if (grep 'ignoring option' conftest.err ||
7068 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7069 am_cv_$1_dependencies_compiler_type=$depmode
7070 break
7071 fi
7072 fi
7073 done
7074
7075 cd ..
7076 rm -rf conftest.dir
7077 else
7078 am_cv_$1_dependencies_compiler_type=none
7079 fi
7080 ])
7081 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
7082 AM_CONDITIONAL([am__fastdep$1], [
7083 test "x$enable_dependency_tracking" != xno \
7084 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
7085 ])
7086
7087
7088 # AM_SET_DEPDIR
7089 # -------------
7090 # Choose a directory name for dependency files.
7091 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
7092 AC_DEFUN([AM_SET_DEPDIR],
7093 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
7094 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
7095 ])
7096
7097
7098 # AM_DEP_TRACK
7099 # ------------
7100 AC_DEFUN([AM_DEP_TRACK],
7101 [AC_ARG_ENABLE(dependency-tracking,
7102 [ --disable-dependency-tracking speeds up one-time build
7103 --enable-dependency-tracking do not reject slow dependency extractors])
7104 if test "x$enable_dependency_tracking" != xno; then
7105 am_depcomp="$ac_aux_dir/depcomp"
7106 AMDEPBACKSLASH='\'
7107 fi
7108 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
7109 AC_SUBST([AMDEPBACKSLASH])dnl
7110 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
7111 ])
7112
7113 # Generate code to set up dependency tracking. -*- Autoconf -*-
7114
7115 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
7116 # Free Software Foundation, Inc.
7117 #
7118 # This file is free software; the Free Software Foundation
7119 # gives unlimited permission to copy and/or distribute it,
7120 # with or without modifications, as long as this notice is preserved.
7121
7122 #serial 3
7123
7124 # _AM_OUTPUT_DEPENDENCY_COMMANDS
7125 # ------------------------------
7126 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
7127 [for mf in $CONFIG_FILES; do
7128 # Strip MF so we end up with the name of the file.
7129 mf=`echo "$mf" | sed -e 's/:.*$//'`
7130 # Check whether this is an Automake generated Makefile or not.
7131 # We used to match only the files named `Makefile.in', but
7132 # some people rename them; so instead we look at the file content.
7133 # Grep'ing the first line is not enough: some people post-process
7134 # each Makefile.in and add a new line on top of each file to say so.
7135 # Grep'ing the whole file is not good either: AIX grep has a line
7136 # limit of 2048, but all sed's we know have understand at least 4000.
7137 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
7138 dirpart=`AS_DIRNAME("$mf")`
7139 else
7140 continue
7141 fi
7142 # Extract the definition of DEPDIR, am__include, and am__quote
7143 # from the Makefile without running `make'.
7144 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
7145 test -z "$DEPDIR" && continue
7146 am__include=`sed -n 's/^am__include = //p' < "$mf"`
7147 test -z "am__include" && continue
7148 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
7149 # When using ansi2knr, U may be empty or an underscore; expand it
7150 U=`sed -n 's/^U = //p' < "$mf"`
7151 # Find all dependency output files, they are included files with
7152 # $(DEPDIR) in their names. We invoke sed twice because it is the
7153 # simplest approach to changing $(DEPDIR) to its actual value in the
7154 # expansion.
7155 for file in `sed -n "
7156 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
7157 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
7158 # Make sure the directory exists.
7159 test -f "$dirpart/$file" && continue
7160 fdir=`AS_DIRNAME(["$file"])`
7161 AS_MKDIR_P([$dirpart/$fdir])
7162 # echo "creating $dirpart/$file"
7163 echo '# dummy' > "$dirpart/$file"
7164 done
7165 done
7166 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
7167
7168
7169 # AM_OUTPUT_DEPENDENCY_COMMANDS
7170 # -----------------------------
7171 # This macro should only be invoked once -- use via AC_REQUIRE.
7172 #
7173 # This code is only required when automatic dependency tracking
7174 # is enabled. FIXME. This creates each `.P' file that we will
7175 # need in order to bootstrap the dependency handling code.
7176 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
7177 [AC_CONFIG_COMMANDS([depfiles],
7178 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
7179 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
7180 ])
7181
7182 # Do all the work for Automake. -*- Autoconf -*-
7183
7184 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
7185 # 2005, 2006, 2008 Free Software Foundation, Inc.
7186 #
7187 # This file is free software; the Free Software Foundation
7188 # gives unlimited permission to copy and/or distribute it,
7189 # with or without modifications, as long as this notice is preserved.
7190
7191 # serial 13
7192
7193 # This macro actually does too much. Some checks are only needed if
7194 # your package does certain things. But this isn't really a big deal.
7195
7196 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
7197 # AM_INIT_AUTOMAKE([OPTIONS])
7198 # -----------------------------------------------
7199 # The call with PACKAGE and VERSION arguments is the old style
7200 # call (pre autoconf-2.50), which is being phased out. PACKAGE
7201 # and VERSION should now be passed to AC_INIT and removed from
7202 # the call to AM_INIT_AUTOMAKE.
7203 # We support both call styles for the transition. After
7204 # the next Automake release, Autoconf can make the AC_INIT
7205 # arguments mandatory, and then we can depend on a new Autoconf
7206 # release and drop the old call support.
7207 AC_DEFUN([AM_INIT_AUTOMAKE],
7208 [AC_PREREQ([2.60])dnl
7209 dnl Autoconf wants to disallow AM_ names. We explicitly allow
7210 dnl the ones we care about.
7211 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
7212 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
7213 AC_REQUIRE([AC_PROG_INSTALL])dnl
7214 if test "`cd $srcdir && pwd`" != "`pwd`"; then
7215 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
7216 # is not polluted with repeated "-I."
7217 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
7218 # test to see if srcdir already configured
7219 if test -f $srcdir/config.status; then
7220 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
7221 fi
7222 fi
7223
7224 # test whether we have cygpath
7225 if test -z "$CYGPATH_W"; then
7226 if (cygpath --version) >/dev/null 2>/dev/null; then
7227 CYGPATH_W='cygpath -w'
7228 else
7229 CYGPATH_W=echo
7230 fi
7231 fi
7232 AC_SUBST([CYGPATH_W])
7233
7234 # Define the identity of the package.
7235 dnl Distinguish between old-style and new-style calls.
7236 m4_ifval([$2],
7237 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
7238 AC_SUBST([PACKAGE], [$1])dnl
7239 AC_SUBST([VERSION], [$2])],
7240 [_AM_SET_OPTIONS([$1])dnl
7241 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
7242 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
7243 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
7244 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
7245 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
7246
7247 _AM_IF_OPTION([no-define],,
7248 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
7249 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
7250
7251 # Some tools Automake needs.
7252 AC_REQUIRE([AM_SANITY_CHECK])dnl
7253 AC_REQUIRE([AC_ARG_PROGRAM])dnl
7254 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
7255 AM_MISSING_PROG(AUTOCONF, autoconf)
7256 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
7257 AM_MISSING_PROG(AUTOHEADER, autoheader)
7258 AM_MISSING_PROG(MAKEINFO, makeinfo)
7259 AM_PROG_INSTALL_SH
7260 AM_PROG_INSTALL_STRIP
7261 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
7262 # We need awk for the "check" target. The system "awk" is bad on
7263 # some platforms.
7264 AC_REQUIRE([AC_PROG_AWK])dnl
7265 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
7266 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
7267 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
7268 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
7269 [_AM_PROG_TAR([v7])])])
7270 _AM_IF_OPTION([no-dependencies],,
7271 [AC_PROVIDE_IFELSE([AC_PROG_CC],
7272 [_AM_DEPENDENCIES(CC)],
7273 [define([AC_PROG_CC],
7274 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
7275 AC_PROVIDE_IFELSE([AC_PROG_CXX],
7276 [_AM_DEPENDENCIES(CXX)],
7277 [define([AC_PROG_CXX],
7278 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
7279 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
7280 [_AM_DEPENDENCIES(OBJC)],
7281 [define([AC_PROG_OBJC],
7282 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
7283 ])
7284 ])
7285
7286
7287 # When config.status generates a header, we must update the stamp-h file.
7288 # This file resides in the same directory as the config header
7289 # that is generated. The stamp files are numbered to have different names.
7290
7291 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
7292 # loop where config.status creates the headers, so we can generate
7293 # our stamp files there.
7294 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
7295 [# Compute $1's index in $config_headers.
7296 _am_arg=$1
7297 _am_stamp_count=1
7298 for _am_header in $config_headers :; do
7299 case $_am_header in
7300 $_am_arg | $_am_arg:* )
7301 break ;;
7302 * )
7303 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
7304 esac
7305 done
7306 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
7307
7308 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
7309 #
7310 # This file is free software; the Free Software Foundation
7311 # gives unlimited permission to copy and/or distribute it,
7312 # with or without modifications, as long as this notice is preserved.
7313
7314 # AM_PROG_INSTALL_SH
7315 # ------------------
7316 # Define $install_sh.
7317 AC_DEFUN([AM_PROG_INSTALL_SH],
7318 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7319 install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
7320 AC_SUBST(install_sh)])
7321
7322 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
7323 #
7324 # This file is free software; the Free Software Foundation
7325 # gives unlimited permission to copy and/or distribute it,
7326 # with or without modifications, as long as this notice is preserved.
7327
7328 # serial 2
7329
7330 # Check whether the underlying file-system supports filenames
7331 # with a leading dot. For instance MS-DOS doesn't.
7332 AC_DEFUN([AM_SET_LEADING_DOT],
7333 [rm -rf .tst 2>/dev/null
7334 mkdir .tst 2>/dev/null
7335 if test -d .tst; then
7336 am__leading_dot=.
7337 else
7338 am__leading_dot=_
7339 fi
7340 rmdir .tst 2>/dev/null
7341 AC_SUBST([am__leading_dot])])
7342
7343 # Check to see how 'make' treats includes. -*- Autoconf -*-
7344
7345 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
7346 #
7347 # This file is free software; the Free Software Foundation
7348 # gives unlimited permission to copy and/or distribute it,
7349 # with or without modifications, as long as this notice is preserved.
7350
7351 # serial 3
7352
7353 # AM_MAKE_INCLUDE()
7354 # -----------------
7355 # Check to see how make treats includes.
7356 AC_DEFUN([AM_MAKE_INCLUDE],
7357 [am_make=${MAKE-make}
7358 cat > confinc << 'END'
7359 am__doit:
7360 @echo done
7361 .PHONY: am__doit
7362 END
7363 # If we don't find an include directive, just comment out the code.
7364 AC_MSG_CHECKING([for style of include used by $am_make])
7365 am__include="#"
7366 am__quote=
7367 _am_result=none
7368 # First try GNU make style include.
7369 echo "include confinc" > confmf
7370 # We grep out `Entering directory' and `Leaving directory'
7371 # messages which can occur if `w' ends up in MAKEFLAGS.
7372 # In particular we don't look at `^make:' because GNU make might
7373 # be invoked under some other name (usually "gmake"), in which
7374 # case it prints its new name instead of `make'.
7375 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
7376 am__include=include
7377 am__quote=
7378 _am_result=GNU
7379 fi
7380 # Now try BSD make style include.
7381 if test "$am__include" = "#"; then
7382 echo '.include "confinc"' > confmf
7383 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
7384 am__include=.include
7385 am__quote="\""
7386 _am_result=BSD
7387 fi
7388 fi
7389 AC_SUBST([am__include])
7390 AC_SUBST([am__quote])
7391 AC_MSG_RESULT([$_am_result])
7392 rm -f confinc confmf
7393 ])
7394
7395 # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005
7396 # Free Software Foundation, Inc.
7397 #
7398 # This file is free software; the Free Software Foundation
7399 # gives unlimited permission to copy and/or distribute it,
7400 # with or without modifications, as long as this notice is preserved.
7401
7402 # serial 5
7403
7404 # AM_PROG_CC_C_O
7405 # --------------
7406 # Like AC_PROG_CC_C_O, but changed for automake.
7407 AC_DEFUN([AM_PROG_CC_C_O],
7408 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
7409 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7410 AC_REQUIRE_AUX_FILE([compile])dnl
7411 # FIXME: we rely on the cache variable name because
7412 # there is no other way.
7413 set dummy $CC
7414 ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
7415 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
7416 # Losing compiler, so override with the script.
7417 # FIXME: It is wrong to rewrite CC.
7418 # But if we don't then we get into trouble of one sort or another.
7419 # A longer-term fix would be to have automake use am__CC in this case,
7420 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
7421 CC="$am_aux_dir/compile $CC"
7422 fi
7423 dnl Make sure AC_PROG_CC is never called again, or it will override our
7424 dnl setting of CC.
7425 m4_define([AC_PROG_CC],
7426 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
7427 ])
7428
7429 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
7430
7431 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
7432 # Free Software Foundation, Inc.
7433 #
7434 # This file is free software; the Free Software Foundation
7435 # gives unlimited permission to copy and/or distribute it,
7436 # with or without modifications, as long as this notice is preserved.
7437
7438 # serial 5
7439
7440 # AM_MISSING_PROG(NAME, PROGRAM)
7441 # ------------------------------
7442 AC_DEFUN([AM_MISSING_PROG],
7443 [AC_REQUIRE([AM_MISSING_HAS_RUN])
7444 $1=${$1-"${am_missing_run}$2"}
7445 AC_SUBST($1)])
7446
7447
7448 # AM_MISSING_HAS_RUN
7449 # ------------------
7450 # Define MISSING if not defined so far and test if it supports --run.
7451 # If it does, set am_missing_run to use it, otherwise, to nothing.
7452 AC_DEFUN([AM_MISSING_HAS_RUN],
7453 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7454 AC_REQUIRE_AUX_FILE([missing])dnl
7455 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
7456 # Use eval to expand $SHELL
7457 if eval "$MISSING --run true"; then
7458 am_missing_run="$MISSING --run "
7459 else
7460 am_missing_run=
7461 AC_MSG_WARN([`missing' script is too old or missing])
7462 fi
7463 ])
7464
7465 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
7466 #
7467 # This file is free software; the Free Software Foundation
7468 # gives unlimited permission to copy and/or distribute it,
7469 # with or without modifications, as long as this notice is preserved.
7470
7471 # AM_PROG_MKDIR_P
7472 # ---------------
7473 # Check for `mkdir -p'.
7474 AC_DEFUN([AM_PROG_MKDIR_P],
7475 [AC_PREREQ([2.60])dnl
7476 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
7477 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
7478 dnl while keeping a definition of mkdir_p for backward compatibility.
7479 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
7480 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
7481 dnl Makefile.ins that do not define MKDIR_P, so we do our own
7482 dnl adjustment using top_builddir (which is defined more often than
7483 dnl MKDIR_P).
7484 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
7485 case $mkdir_p in
7486 [[\\/$]]* | ?:[[\\/]]*) ;;
7487 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
7488 esac
7489 ])
7490
7491 # Helper functions for option handling. -*- Autoconf -*-
7492
7493 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
7494 #
7495 # This file is free software; the Free Software Foundation
7496 # gives unlimited permission to copy and/or distribute it,
7497 # with or without modifications, as long as this notice is preserved.
7498
7499 # serial 3
7500
7501 # _AM_MANGLE_OPTION(NAME)
7502 # -----------------------
7503 AC_DEFUN([_AM_MANGLE_OPTION],
7504 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7505
7506 # _AM_SET_OPTION(NAME)
7507 # ------------------------------
7508 # Set option NAME. Presently that only means defining a flag for this option.
7509 AC_DEFUN([_AM_SET_OPTION],
7510 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7511
7512 # _AM_SET_OPTIONS(OPTIONS)
7513 # ----------------------------------
7514 # OPTIONS is a space-separated list of Automake options.
7515 AC_DEFUN([_AM_SET_OPTIONS],
7516 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7517
7518 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7519 # -------------------------------------------
7520 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7521 AC_DEFUN([_AM_IF_OPTION],
7522 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7523
7524 # Check to make sure that the build environment is sane. -*- Autoconf -*-
7525
7526 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
7527 # Free Software Foundation, Inc.
7528 #
7529 # This file is free software; the Free Software Foundation
7530 # gives unlimited permission to copy and/or distribute it,
7531 # with or without modifications, as long as this notice is preserved.
7532
7533 # serial 4
7534
7535 # AM_SANITY_CHECK
7536 # ---------------
7537 AC_DEFUN([AM_SANITY_CHECK],
7538 [AC_MSG_CHECKING([whether build environment is sane])
7539 # Just in case
7540 sleep 1
7541 echo timestamp > conftest.file
7542 # Do `set' in a subshell so we don't clobber the current shell's
7543 # arguments. Must try -L first in case configure is actually a
7544 # symlink; some systems play weird games with the mod time of symlinks
7545 # (eg FreeBSD returns the mod time of the symlink's containing
7546 # directory).
7547 if (
7548 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
7549 if test "$[*]" = "X"; then
7550 # -L didn't work.
7551 set X `ls -t $srcdir/configure conftest.file`
7552 fi
7553 rm -f conftest.file
7554 if test "$[*]" != "X $srcdir/configure conftest.file" \
7555 && test "$[*]" != "X conftest.file $srcdir/configure"; then
7556
7557 # If neither matched, then we have a broken ls. This can happen
7558 # if, for instance, CONFIG_SHELL is bash and it inherits a
7559 # broken ls alias from the environment. This has actually
7560 # happened. Such a system could not be considered "sane".
7561 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
7562 alias in your environment])
7563 fi
7564
7565 test "$[2]" = conftest.file
7566 )
7567 then
7568 # Ok.
7569 :
7570 else
7571 AC_MSG_ERROR([newly created file is older than distributed files!
7572 Check your system clock])
7573 fi
7574 AC_MSG_RESULT(yes)])
7575
7576 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
7577 #
7578 # This file is free software; the Free Software Foundation
7579 # gives unlimited permission to copy and/or distribute it,
7580 # with or without modifications, as long as this notice is preserved.
7581
7582 # AM_PROG_INSTALL_STRIP
7583 # ---------------------
7584 # One issue with vendor `install' (even GNU) is that you can't
7585 # specify the program used to strip binaries. This is especially
7586 # annoying in cross-compiling environments, where the build's strip
7587 # is unlikely to handle the host's binaries.
7588 # Fortunately install-sh will honor a STRIPPROG variable, so we
7589 # always use install-sh in `make install-strip', and initialize
7590 # STRIPPROG with the value of the STRIP variable (set by the user).
7591 AC_DEFUN([AM_PROG_INSTALL_STRIP],
7592 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
7593 # Installed binaries are usually stripped using `strip' when the user
7594 # run `make install-strip'. However `strip' might not be the right
7595 # tool to use in cross-compilation environments, therefore Automake
7596 # will honor the `STRIP' environment variable to overrule this program.
7597 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
7598 if test "$cross_compiling" != no; then
7599 AC_CHECK_TOOL([STRIP], [strip], :)
7600 fi
7601 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
7602 AC_SUBST([INSTALL_STRIP_PROGRAM])])
7603
7604 # Copyright (C) 2006 Free Software Foundation, Inc.
7605 #
7606 # This file is free software; the Free Software Foundation
7607 # gives unlimited permission to copy and/or distribute it,
7608 # with or without modifications, as long as this notice is preserved.
7609
7610 # _AM_SUBST_NOTMAKE(VARIABLE)
7611 # ---------------------------
7612 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
7613 # This macro is traced by Automake.
7614 AC_DEFUN([_AM_SUBST_NOTMAKE])
7615
7616 # Check how to create a tarball. -*- Autoconf -*-
7617
7618 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
7619 #
7620 # This file is free software; the Free Software Foundation
7621 # gives unlimited permission to copy and/or distribute it,
7622 # with or without modifications, as long as this notice is preserved.
7623
7624 # serial 2
7625
7626 # _AM_PROG_TAR(FORMAT)
7627 # --------------------
7628 # Check how to create a tarball in format FORMAT.
7629 # FORMAT should be one of `v7', `ustar', or `pax'.
7630 #
7631 # Substitute a variable $(am__tar) that is a command
7632 # writing to stdout a FORMAT-tarball containing the directory
7633 # $tardir.
7634 # tardir=directory && $(am__tar) > result.tar
7635 #
7636 # Substitute a variable $(am__untar) that extract such
7637 # a tarball read from stdin.
7638 # $(am__untar) < result.tar
7639 AC_DEFUN([_AM_PROG_TAR],
7640 [# Always define AMTAR for backward compatibility.
7641 AM_MISSING_PROG([AMTAR], [tar])
7642 m4_if([$1], [v7],
7643 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
7644 [m4_case([$1], [ustar],, [pax],,
7645 [m4_fatal([Unknown tar format])])
7646 AC_MSG_CHECKING([how to create a $1 tar archive])
7647 # Loop over all known methods to create a tar archive until one works.
7648 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
7649 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
7650 # Do not fold the above two line into one, because Tru64 sh and
7651 # Solaris sh will not grok spaces in the rhs of `-'.
7652 for _am_tool in $_am_tools
7653 do
7654 case $_am_tool in
7655 gnutar)
7656 for _am_tar in tar gnutar gtar;
7657 do
7658 AM_RUN_LOG([$_am_tar --version]) && break
7659 done
7660 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
7661 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
7662 am__untar="$_am_tar -xf -"
7663 ;;
7664 plaintar)
7665 # Must skip GNU tar: if it does not support --format= it doesn't create
7666 # ustar tarball either.
7667 (tar --version) >/dev/null 2>&1 && continue
7668 am__tar='tar chf - "$$tardir"'
7669 am__tar_='tar chf - "$tardir"'
7670 am__untar='tar xf -'
7671 ;;
7672 pax)
7673 am__tar='pax -L -x $1 -w "$$tardir"'
7674 am__tar_='pax -L -x $1 -w "$tardir"'
7675 am__untar='pax -r'
7676 ;;
7677 cpio)
7678 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
7679 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
7680 am__untar='cpio -i -H $1 -d'
7681 ;;
7682 none)
7683 am__tar=false
7684 am__tar_=false
7685 am__untar=false
7686 ;;
7687 esac
7688
7689 # If the value was cached, stop now. We just wanted to have am__tar
7690 # and am__untar set.
7691 test -n "${am_cv_prog_tar_$1}" && break
7692
7693 # tar/untar a dummy directory, and stop if the command works
7694 rm -rf conftest.dir
7695 mkdir conftest.dir
7696 echo GrepMe > conftest.dir/file
7697 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
7698 rm -rf conftest.dir
7699 if test -s conftest.tar; then
7700 AM_RUN_LOG([$am__untar <conftest.tar])
7701 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
7702 fi
7703 done
7704 rm -rf conftest.dir
7705
7706 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
7707 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
7708 AC_SUBST([am__tar])
7709 AC_SUBST([am__untar])
7710 ]) # _AM_PROG_TAR
7711
+0
-142
compile less more
0 #! /bin/sh
1 # Wrapper for compilers which do not understand `-c -o'.
2
3 scriptversion=2005-05-14.22
4
5 # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
6 # Written by Tom Tromey <tromey@cygnus.com>.
7 #
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
22 # As a special exception to the GNU General Public License, if you
23 # distribute this file as part of a program that contains a
24 # configuration script generated by Autoconf, you may include it under
25 # the same distribution terms that you use for the rest of that program.
26
27 # This file is maintained in Automake, please report
28 # bugs to <bug-automake@gnu.org> or send patches to
29 # <automake-patches@gnu.org>.
30
31 case $1 in
32 '')
33 echo "$0: No command. Try \`$0 --help' for more information." 1>&2
34 exit 1;
35 ;;
36 -h | --h*)
37 cat <<\EOF
38 Usage: compile [--help] [--version] PROGRAM [ARGS]
39
40 Wrapper for compilers which do not understand `-c -o'.
41 Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
42 arguments, and rename the output as expected.
43
44 If you are trying to build a whole package this is not the
45 right script to run: please start by reading the file `INSTALL'.
46
47 Report bugs to <bug-automake@gnu.org>.
48 EOF
49 exit $?
50 ;;
51 -v | --v*)
52 echo "compile $scriptversion"
53 exit $?
54 ;;
55 esac
56
57 ofile=
58 cfile=
59 eat=
60
61 for arg
62 do
63 if test -n "$eat"; then
64 eat=
65 else
66 case $1 in
67 -o)
68 # configure might choose to run compile as `compile cc -o foo foo.c'.
69 # So we strip `-o arg' only if arg is an object.
70 eat=1
71 case $2 in
72 *.o | *.obj)
73 ofile=$2
74 ;;
75 *)
76 set x "$@" -o "$2"
77 shift
78 ;;
79 esac
80 ;;
81 *.c)
82 cfile=$1
83 set x "$@" "$1"
84 shift
85 ;;
86 *)
87 set x "$@" "$1"
88 shift
89 ;;
90 esac
91 fi
92 shift
93 done
94
95 if test -z "$ofile" || test -z "$cfile"; then
96 # If no `-o' option was seen then we might have been invoked from a
97 # pattern rule where we don't need one. That is ok -- this is a
98 # normal compilation that the losing compiler can handle. If no
99 # `.c' file was seen then we are probably linking. That is also
100 # ok.
101 exec "$@"
102 fi
103
104 # Name of file we expect compiler to create.
105 cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
106
107 # Create the lock directory.
108 # Note: use `[/.-]' here to ensure that we don't use the same name
109 # that we are using for the .o file. Also, base the name on the expected
110 # object file name, since that is what matters with a parallel build.
111 lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
112 while true; do
113 if mkdir "$lockdir" >/dev/null 2>&1; then
114 break
115 fi
116 sleep 1
117 done
118 # FIXME: race condition here if user kills between mkdir and trap.
119 trap "rmdir '$lockdir'; exit 1" 1 2 15
120
121 # Run the compile.
122 "$@"
123 ret=$?
124
125 if test -f "$cofile"; then
126 mv "$cofile" "$ofile"
127 elif test -f "${cofile}bj"; then
128 mv "${cofile}bj" "$ofile"
129 fi
130
131 rmdir "$lockdir"
132 exit $ret
133
134 # Local Variables:
135 # mode: shell-script
136 # sh-indentation: 2
137 # eval: (add-hook 'write-file-hooks 'time-stamp)
138 # time-stamp-start: "scriptversion="
139 # time-stamp-format: "%:y-%02m-%02d.%02H"
140 # time-stamp-end: "$"
141 # End:
+0
-1516
config.guess less more
0 #! /bin/sh
1 # Attempt to guess a canonical system name.
2 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
4 # Inc.
5
6 timestamp='2007-07-22'
7
8 # This file is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
21 # 02110-1301, USA.
22 #
23 # As a special exception to the GNU General Public License, if you
24 # distribute this file as part of a program that contains a
25 # configuration script generated by Autoconf, you may include it under
26 # the same distribution terms that you use for the rest of that program.
27
28
29 # Originally written by Per Bothner <per@bothner.com>.
30 # Please send patches to <config-patches@gnu.org>. Submit a context
31 # diff and a properly formatted ChangeLog entry.
32 #
33 # This script attempts to guess a canonical system name similar to
34 # config.sub. If it succeeds, it prints the system name on stdout, and
35 # exits with 0. Otherwise, it exits with 1.
36 #
37 # The plan is that this can be called by configure scripts if you
38 # don't specify an explicit build system type.
39
40 me=`echo "$0" | sed -e 's,.*/,,'`
41
42 usage="\
43 Usage: $0 [OPTION]
44
45 Output the configuration name of the system \`$me' is run on.
46
47 Operation modes:
48 -h, --help print this help, then exit
49 -t, --time-stamp print date of last modification, then exit
50 -v, --version print version number, then exit
51
52 Report bugs and patches to <config-patches@gnu.org>."
53
54 version="\
55 GNU config.guess ($timestamp)
56
57 Originally written by Per Bothner.
58 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
59 Free Software Foundation, Inc.
60
61 This is free software; see the source for copying conditions. There is NO
62 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
63
64 help="
65 Try \`$me --help' for more information."
66
67 # Parse command line
68 while test $# -gt 0 ; do
69 case $1 in
70 --time-stamp | --time* | -t )
71 echo "$timestamp" ; exit ;;
72 --version | -v )
73 echo "$version" ; exit ;;
74 --help | --h* | -h )
75 echo "$usage"; exit ;;
76 -- ) # Stop option processing
77 shift; break ;;
78 - ) # Use stdin as input.
79 break ;;
80 -* )
81 echo "$me: invalid option $1$help" >&2
82 exit 1 ;;
83 * )
84 break ;;
85 esac
86 done
87
88 if test $# != 0; then
89 echo "$me: too many arguments$help" >&2
90 exit 1
91 fi
92
93 trap 'exit 1' 1 2 15
94
95 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
96 # compiler to aid in system detection is discouraged as it requires
97 # temporary files to be created and, as you can see below, it is a
98 # headache to deal with in a portable fashion.
99
100 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
101 # use `HOST_CC' if defined, but it is deprecated.
102
103 # Portable tmp directory creation inspired by the Autoconf team.
104
105 set_cc_for_build='
106 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
107 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
108 : ${TMPDIR=/tmp} ;
109 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
110 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
111 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
112 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
113 dummy=$tmp/dummy ;
114 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
115 case $CC_FOR_BUILD,$HOST_CC,$CC in
116 ,,) echo "int x;" > $dummy.c ;
117 for c in cc gcc c89 c99 ; do
118 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
119 CC_FOR_BUILD="$c"; break ;
120 fi ;
121 done ;
122 if test x"$CC_FOR_BUILD" = x ; then
123 CC_FOR_BUILD=no_compiler_found ;
124 fi
125 ;;
126 ,,*) CC_FOR_BUILD=$CC ;;
127 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
128 esac ; set_cc_for_build= ;'
129
130 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
131 # (ghazi@noc.rutgers.edu 1994-08-24)
132 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
133 PATH=$PATH:/.attbin ; export PATH
134 fi
135
136 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
137 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
138 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
139 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
140
141 # Note: order is significant - the case branches are not exclusive.
142
143 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
144 *:NetBSD:*:*)
145 # NetBSD (nbsd) targets should (where applicable) match one or
146 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
147 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
148 # switched to ELF, *-*-netbsd* would select the old
149 # object file format. This provides both forward
150 # compatibility and a consistent mechanism for selecting the
151 # object file format.
152 #
153 # Note: NetBSD doesn't particularly care about the vendor
154 # portion of the name. We always set it to "unknown".
155 sysctl="sysctl -n hw.machine_arch"
156 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
157 /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
158 case "${UNAME_MACHINE_ARCH}" in
159 armeb) machine=armeb-unknown ;;
160 arm*) machine=arm-unknown ;;
161 sh3el) machine=shl-unknown ;;
162 sh3eb) machine=sh-unknown ;;
163 sh5el) machine=sh5le-unknown ;;
164 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
165 esac
166 # The Operating System including object format, if it has switched
167 # to ELF recently, or will in the future.
168 case "${UNAME_MACHINE_ARCH}" in
169 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
170 eval $set_cc_for_build
171 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
172 | grep __ELF__ >/dev/null
173 then
174 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
175 # Return netbsd for either. FIX?
176 os=netbsd
177 else
178 os=netbsdelf
179 fi
180 ;;
181 *)
182 os=netbsd
183 ;;
184 esac
185 # The OS release
186 # Debian GNU/NetBSD machines have a different userland, and
187 # thus, need a distinct triplet. However, they do not need
188 # kernel version information, so it can be replaced with a
189 # suitable tag, in the style of linux-gnu.
190 case "${UNAME_VERSION}" in
191 Debian*)
192 release='-gnu'
193 ;;
194 *)
195 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
196 ;;
197 esac
198 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
199 # contains redundant information, the shorter form:
200 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
201 echo "${machine}-${os}${release}"
202 exit ;;
203 *:OpenBSD:*:*)
204 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
205 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
206 exit ;;
207 *:ekkoBSD:*:*)
208 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
209 exit ;;
210 *:SolidBSD:*:*)
211 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
212 exit ;;
213 macppc:MirBSD:*:*)
214 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
215 exit ;;
216 *:MirBSD:*:*)
217 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
218 exit ;;
219 alpha:OSF1:*:*)
220 case $UNAME_RELEASE in
221 *4.0)
222 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
223 ;;
224 *5.*)
225 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
226 ;;
227 esac
228 # According to Compaq, /usr/sbin/psrinfo has been available on
229 # OSF/1 and Tru64 systems produced since 1995. I hope that
230 # covers most systems running today. This code pipes the CPU
231 # types through head -n 1, so we only detect the type of CPU 0.
232 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
233 case "$ALPHA_CPU_TYPE" in
234 "EV4 (21064)")
235 UNAME_MACHINE="alpha" ;;
236 "EV4.5 (21064)")
237 UNAME_MACHINE="alpha" ;;
238 "LCA4 (21066/21068)")
239 UNAME_MACHINE="alpha" ;;
240 "EV5 (21164)")
241 UNAME_MACHINE="alphaev5" ;;
242 "EV5.6 (21164A)")
243 UNAME_MACHINE="alphaev56" ;;
244 "EV5.6 (21164PC)")
245 UNAME_MACHINE="alphapca56" ;;
246 "EV5.7 (21164PC)")
247 UNAME_MACHINE="alphapca57" ;;
248 "EV6 (21264)")
249 UNAME_MACHINE="alphaev6" ;;
250 "EV6.7 (21264A)")
251 UNAME_MACHINE="alphaev67" ;;
252 "EV6.8CB (21264C)")
253 UNAME_MACHINE="alphaev68" ;;
254 "EV6.8AL (21264B)")
255 UNAME_MACHINE="alphaev68" ;;
256 "EV6.8CX (21264D)")
257 UNAME_MACHINE="alphaev68" ;;
258 "EV6.9A (21264/EV69A)")
259 UNAME_MACHINE="alphaev69" ;;
260 "EV7 (21364)")
261 UNAME_MACHINE="alphaev7" ;;
262 "EV7.9 (21364A)")
263 UNAME_MACHINE="alphaev79" ;;
264 esac
265 # A Pn.n version is a patched version.
266 # A Vn.n version is a released version.
267 # A Tn.n version is a released field test version.
268 # A Xn.n version is an unreleased experimental baselevel.
269 # 1.2 uses "1.2" for uname -r.
270 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
271 exit ;;
272 Alpha\ *:Windows_NT*:*)
273 # How do we know it's Interix rather than the generic POSIX subsystem?
274 # Should we change UNAME_MACHINE based on the output of uname instead
275 # of the specific Alpha model?
276 echo alpha-pc-interix
277 exit ;;
278 21064:Windows_NT:50:3)
279 echo alpha-dec-winnt3.5
280 exit ;;
281 Amiga*:UNIX_System_V:4.0:*)
282 echo m68k-unknown-sysv4
283 exit ;;
284 *:[Aa]miga[Oo][Ss]:*:*)
285 echo ${UNAME_MACHINE}-unknown-amigaos
286 exit ;;
287 *:[Mm]orph[Oo][Ss]:*:*)
288 echo ${UNAME_MACHINE}-unknown-morphos
289 exit ;;
290 *:OS/390:*:*)
291 echo i370-ibm-openedition
292 exit ;;
293 *:z/VM:*:*)
294 echo s390-ibm-zvmoe
295 exit ;;
296 *:OS400:*:*)
297 echo powerpc-ibm-os400
298 exit ;;
299 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
300 echo arm-acorn-riscix${UNAME_RELEASE}
301 exit ;;
302 arm:riscos:*:*|arm:RISCOS:*:*)
303 echo arm-unknown-riscos
304 exit ;;
305 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
306 echo hppa1.1-hitachi-hiuxmpp
307 exit ;;
308 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
309 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
310 if test "`(/bin/universe) 2>/dev/null`" = att ; then
311 echo pyramid-pyramid-sysv3
312 else
313 echo pyramid-pyramid-bsd
314 fi
315 exit ;;
316 NILE*:*:*:dcosx)
317 echo pyramid-pyramid-svr4
318 exit ;;
319 DRS?6000:unix:4.0:6*)
320 echo sparc-icl-nx6
321 exit ;;
322 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
323 case `/usr/bin/uname -p` in
324 sparc) echo sparc-icl-nx7; exit ;;
325 esac ;;
326 sun4H:SunOS:5.*:*)
327 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
328 exit ;;
329 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
330 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
331 exit ;;
332 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
333 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
334 exit ;;
335 sun4*:SunOS:6*:*)
336 # According to config.sub, this is the proper way to canonicalize
337 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
338 # it's likely to be more like Solaris than SunOS4.
339 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
340 exit ;;
341 sun4*:SunOS:*:*)
342 case "`/usr/bin/arch -k`" in
343 Series*|S4*)
344 UNAME_RELEASE=`uname -v`
345 ;;
346 esac
347 # Japanese Language versions have a version number like `4.1.3-JL'.
348 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
349 exit ;;
350 sun3*:SunOS:*:*)
351 echo m68k-sun-sunos${UNAME_RELEASE}
352 exit ;;
353 sun*:*:4.2BSD:*)
354 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
355 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
356 case "`/bin/arch`" in
357 sun3)
358 echo m68k-sun-sunos${UNAME_RELEASE}
359 ;;
360 sun4)
361 echo sparc-sun-sunos${UNAME_RELEASE}
362 ;;
363 esac
364 exit ;;
365 aushp:SunOS:*:*)
366 echo sparc-auspex-sunos${UNAME_RELEASE}
367 exit ;;
368 # The situation for MiNT is a little confusing. The machine name
369 # can be virtually everything (everything which is not
370 # "atarist" or "atariste" at least should have a processor
371 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
372 # to the lowercase version "mint" (or "freemint"). Finally
373 # the system name "TOS" denotes a system which is actually not
374 # MiNT. But MiNT is downward compatible to TOS, so this should
375 # be no problem.
376 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
377 echo m68k-atari-mint${UNAME_RELEASE}
378 exit ;;
379 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
380 echo m68k-atari-mint${UNAME_RELEASE}
381 exit ;;
382 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
383 echo m68k-atari-mint${UNAME_RELEASE}
384 exit ;;
385 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
386 echo m68k-milan-mint${UNAME_RELEASE}
387 exit ;;
388 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
389 echo m68k-hades-mint${UNAME_RELEASE}
390 exit ;;
391 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
392 echo m68k-unknown-mint${UNAME_RELEASE}
393 exit ;;
394 m68k:machten:*:*)
395 echo m68k-apple-machten${UNAME_RELEASE}
396 exit ;;
397 powerpc:machten:*:*)
398 echo powerpc-apple-machten${UNAME_RELEASE}
399 exit ;;
400 RISC*:Mach:*:*)
401 echo mips-dec-mach_bsd4.3
402 exit ;;
403 RISC*:ULTRIX:*:*)
404 echo mips-dec-ultrix${UNAME_RELEASE}
405 exit ;;
406 VAX*:ULTRIX*:*:*)
407 echo vax-dec-ultrix${UNAME_RELEASE}
408 exit ;;
409 2020:CLIX:*:* | 2430:CLIX:*:*)
410 echo clipper-intergraph-clix${UNAME_RELEASE}
411 exit ;;
412 mips:*:*:UMIPS | mips:*:*:RISCos)
413 eval $set_cc_for_build
414 sed 's/^ //' << EOF >$dummy.c
415 #ifdef __cplusplus
416 #include <stdio.h> /* for printf() prototype */
417 int main (int argc, char *argv[]) {
418 #else
419 int main (argc, argv) int argc; char *argv[]; {
420 #endif
421 #if defined (host_mips) && defined (MIPSEB)
422 #if defined (SYSTYPE_SYSV)
423 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
424 #endif
425 #if defined (SYSTYPE_SVR4)
426 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
427 #endif
428 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
429 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
430 #endif
431 #endif
432 exit (-1);
433 }
434 EOF
435 $CC_FOR_BUILD -o $dummy $dummy.c &&
436 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
437 SYSTEM_NAME=`$dummy $dummyarg` &&
438 { echo "$SYSTEM_NAME"; exit; }
439 echo mips-mips-riscos${UNAME_RELEASE}
440 exit ;;
441 Motorola:PowerMAX_OS:*:*)
442 echo powerpc-motorola-powermax
443 exit ;;
444 Motorola:*:4.3:PL8-*)
445 echo powerpc-harris-powermax
446 exit ;;
447 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
448 echo powerpc-harris-powermax
449 exit ;;
450 Night_Hawk:Power_UNIX:*:*)
451 echo powerpc-harris-powerunix
452 exit ;;
453 m88k:CX/UX:7*:*)
454 echo m88k-harris-cxux7
455 exit ;;
456 m88k:*:4*:R4*)
457 echo m88k-motorola-sysv4
458 exit ;;
459 m88k:*:3*:R3*)
460 echo m88k-motorola-sysv3
461 exit ;;
462 AViiON:dgux:*:*)
463 # DG/UX returns AViiON for all architectures
464 UNAME_PROCESSOR=`/usr/bin/uname -p`
465 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
466 then
467 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
468 [ ${TARGET_BINARY_INTERFACE}x = x ]
469 then
470 echo m88k-dg-dgux${UNAME_RELEASE}
471 else
472 echo m88k-dg-dguxbcs${UNAME_RELEASE}
473 fi
474 else
475 echo i586-dg-dgux${UNAME_RELEASE}
476 fi
477 exit ;;
478 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
479 echo m88k-dolphin-sysv3
480 exit ;;
481 M88*:*:R3*:*)
482 # Delta 88k system running SVR3
483 echo m88k-motorola-sysv3
484 exit ;;
485 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
486 echo m88k-tektronix-sysv3
487 exit ;;
488 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
489 echo m68k-tektronix-bsd
490 exit ;;
491 *:IRIX*:*:*)
492 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
493 exit ;;
494 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
495 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
496 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
497 i*86:AIX:*:*)
498 echo i386-ibm-aix
499 exit ;;
500 ia64:AIX:*:*)
501 if [ -x /usr/bin/oslevel ] ; then
502 IBM_REV=`/usr/bin/oslevel`
503 else
504 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
505 fi
506 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
507 exit ;;
508 *:AIX:2:3)
509 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
510 eval $set_cc_for_build
511 sed 's/^ //' << EOF >$dummy.c
512 #include <sys/systemcfg.h>
513
514 main()
515 {
516 if (!__power_pc())
517 exit(1);
518 puts("powerpc-ibm-aix3.2.5");
519 exit(0);
520 }
521 EOF
522 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
523 then
524 echo "$SYSTEM_NAME"
525 else
526 echo rs6000-ibm-aix3.2.5
527 fi
528 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
529 echo rs6000-ibm-aix3.2.4
530 else
531 echo rs6000-ibm-aix3.2
532 fi
533 exit ;;
534 *:AIX:*:[45])
535 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
536 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
537 IBM_ARCH=rs6000
538 else
539 IBM_ARCH=powerpc
540 fi
541 if [ -x /usr/bin/oslevel ] ; then
542 IBM_REV=`/usr/bin/oslevel`
543 else
544 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
545 fi
546 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
547 exit ;;
548 *:AIX:*:*)
549 echo rs6000-ibm-aix
550 exit ;;
551 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
552 echo romp-ibm-bsd4.4
553 exit ;;
554 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
555 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
556 exit ;; # report: romp-ibm BSD 4.3
557 *:BOSX:*:*)
558 echo rs6000-bull-bosx
559 exit ;;
560 DPX/2?00:B.O.S.:*:*)
561 echo m68k-bull-sysv3
562 exit ;;
563 9000/[34]??:4.3bsd:1.*:*)
564 echo m68k-hp-bsd
565 exit ;;
566 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
567 echo m68k-hp-bsd4.4
568 exit ;;
569 9000/[34678]??:HP-UX:*:*)
570 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
571 case "${UNAME_MACHINE}" in
572 9000/31? ) HP_ARCH=m68000 ;;
573 9000/[34]?? ) HP_ARCH=m68k ;;
574 9000/[678][0-9][0-9])
575 if [ -x /usr/bin/getconf ]; then
576 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
577 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
578 case "${sc_cpu_version}" in
579 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
580 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
581 532) # CPU_PA_RISC2_0
582 case "${sc_kernel_bits}" in
583 32) HP_ARCH="hppa2.0n" ;;
584 64) HP_ARCH="hppa2.0w" ;;
585 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
586 esac ;;
587 esac
588 fi
589 if [ "${HP_ARCH}" = "" ]; then
590 eval $set_cc_for_build
591 sed 's/^ //' << EOF >$dummy.c
592
593 #define _HPUX_SOURCE
594 #include <stdlib.h>
595 #include <unistd.h>
596
597 int main ()
598 {
599 #if defined(_SC_KERNEL_BITS)
600 long bits = sysconf(_SC_KERNEL_BITS);
601 #endif
602 long cpu = sysconf (_SC_CPU_VERSION);
603
604 switch (cpu)
605 {
606 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
607 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
608 case CPU_PA_RISC2_0:
609 #if defined(_SC_KERNEL_BITS)
610 switch (bits)
611 {
612 case 64: puts ("hppa2.0w"); break;
613 case 32: puts ("hppa2.0n"); break;
614 default: puts ("hppa2.0"); break;
615 } break;
616 #else /* !defined(_SC_KERNEL_BITS) */
617 puts ("hppa2.0"); break;
618 #endif
619 default: puts ("hppa1.0"); break;
620 }
621 exit (0);
622 }
623 EOF
624 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
625 test -z "$HP_ARCH" && HP_ARCH=hppa
626 fi ;;
627 esac
628 if [ ${HP_ARCH} = "hppa2.0w" ]
629 then
630 eval $set_cc_for_build
631
632 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
633 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
634 # generating 64-bit code. GNU and HP use different nomenclature:
635 #
636 # $ CC_FOR_BUILD=cc ./config.guess
637 # => hppa2.0w-hp-hpux11.23
638 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
639 # => hppa64-hp-hpux11.23
640
641 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
642 grep __LP64__ >/dev/null
643 then
644 HP_ARCH="hppa2.0w"
645 else
646 HP_ARCH="hppa64"
647 fi
648 fi
649 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
650 exit ;;
651 ia64:HP-UX:*:*)
652 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
653 echo ia64-hp-hpux${HPUX_REV}
654 exit ;;
655 3050*:HI-UX:*:*)
656 eval $set_cc_for_build
657 sed 's/^ //' << EOF >$dummy.c
658 #include <unistd.h>
659 int
660 main ()
661 {
662 long cpu = sysconf (_SC_CPU_VERSION);
663 /* The order matters, because CPU_IS_HP_MC68K erroneously returns
664 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
665 results, however. */
666 if (CPU_IS_PA_RISC (cpu))
667 {
668 switch (cpu)
669 {
670 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
671 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
672 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
673 default: puts ("hppa-hitachi-hiuxwe2"); break;
674 }
675 }
676 else if (CPU_IS_HP_MC68K (cpu))
677 puts ("m68k-hitachi-hiuxwe2");
678 else puts ("unknown-hitachi-hiuxwe2");
679 exit (0);
680 }
681 EOF
682 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
683 { echo "$SYSTEM_NAME"; exit; }
684 echo unknown-hitachi-hiuxwe2
685 exit ;;
686 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
687 echo hppa1.1-hp-bsd
688 exit ;;
689 9000/8??:4.3bsd:*:*)
690 echo hppa1.0-hp-bsd
691 exit ;;
692 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
693 echo hppa1.0-hp-mpeix
694 exit ;;
695 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
696 echo hppa1.1-hp-osf
697 exit ;;
698 hp8??:OSF1:*:*)
699 echo hppa1.0-hp-osf
700 exit ;;
701 i*86:OSF1:*:*)
702 if [ -x /usr/sbin/sysversion ] ; then
703 echo ${UNAME_MACHINE}-unknown-osf1mk
704 else
705 echo ${UNAME_MACHINE}-unknown-osf1
706 fi
707 exit ;;
708 parisc*:Lites*:*:*)
709 echo hppa1.1-hp-lites
710 exit ;;
711 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
712 echo c1-convex-bsd
713 exit ;;
714 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
715 if getsysinfo -f scalar_acc
716 then echo c32-convex-bsd
717 else echo c2-convex-bsd
718 fi
719 exit ;;
720 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
721 echo c34-convex-bsd
722 exit ;;
723 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
724 echo c38-convex-bsd
725 exit ;;
726 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
727 echo c4-convex-bsd
728 exit ;;
729 CRAY*Y-MP:*:*:*)
730 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
731 exit ;;
732 CRAY*[A-Z]90:*:*:*)
733 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
734 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
735 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
736 -e 's/\.[^.]*$/.X/'
737 exit ;;
738 CRAY*TS:*:*:*)
739 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
740 exit ;;
741 CRAY*T3E:*:*:*)
742 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
743 exit ;;
744 CRAY*SV1:*:*:*)
745 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
746 exit ;;
747 *:UNICOS/mp:*:*)
748 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
749 exit ;;
750 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
751 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
752 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
753 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
754 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
755 exit ;;
756 5000:UNIX_System_V:4.*:*)
757 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
758 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
759 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
760 exit ;;
761 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
762 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
763 exit ;;
764 sparc*:BSD/OS:*:*)
765 echo sparc-unknown-bsdi${UNAME_RELEASE}
766 exit ;;
767 *:BSD/OS:*:*)
768 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
769 exit ;;
770 *:FreeBSD:*:*)
771 case ${UNAME_MACHINE} in
772 pc98)
773 echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
774 amd64)
775 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
776 *)
777 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
778 esac
779 exit ;;
780 i*:CYGWIN*:*)
781 echo ${UNAME_MACHINE}-pc-cygwin
782 exit ;;
783 *:MINGW*:*)
784 echo ${UNAME_MACHINE}-pc-mingw32
785 exit ;;
786 i*:windows32*:*)
787 # uname -m includes "-pc" on this system.
788 echo ${UNAME_MACHINE}-mingw32
789 exit ;;
790 i*:PW*:*)
791 echo ${UNAME_MACHINE}-pc-pw32
792 exit ;;
793 *:Interix*:[3456]*)
794 case ${UNAME_MACHINE} in
795 x86)
796 echo i586-pc-interix${UNAME_RELEASE}
797 exit ;;
798 EM64T | authenticamd)
799 echo x86_64-unknown-interix${UNAME_RELEASE}
800 exit ;;
801 esac ;;
802 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
803 echo i${UNAME_MACHINE}-pc-mks
804 exit ;;
805 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
806 # How do we know it's Interix rather than the generic POSIX subsystem?
807 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
808 # UNAME_MACHINE based on the output of uname instead of i386?
809 echo i586-pc-interix
810 exit ;;
811 i*:UWIN*:*)
812 echo ${UNAME_MACHINE}-pc-uwin
813 exit ;;
814 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
815 echo x86_64-unknown-cygwin
816 exit ;;
817 p*:CYGWIN*:*)
818 echo powerpcle-unknown-cygwin
819 exit ;;
820 prep*:SunOS:5.*:*)
821 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
822 exit ;;
823 *:GNU:*:*)
824 # the GNU system
825 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
826 exit ;;
827 *:GNU/*:*:*)
828 # other systems with GNU libc and userland
829 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
830 exit ;;
831 i*86:Minix:*:*)
832 echo ${UNAME_MACHINE}-pc-minix
833 exit ;;
834 arm*:Linux:*:*)
835 echo ${UNAME_MACHINE}-unknown-linux-gnu
836 exit ;;
837 avr32*:Linux:*:*)
838 echo ${UNAME_MACHINE}-unknown-linux-gnu
839 exit ;;
840 cris:Linux:*:*)
841 echo cris-axis-linux-gnu
842 exit ;;
843 crisv32:Linux:*:*)
844 echo crisv32-axis-linux-gnu
845 exit ;;
846 frv:Linux:*:*)
847 echo frv-unknown-linux-gnu
848 exit ;;
849 ia64:Linux:*:*)
850 echo ${UNAME_MACHINE}-unknown-linux-gnu
851 exit ;;
852 m32r*:Linux:*:*)
853 echo ${UNAME_MACHINE}-unknown-linux-gnu
854 exit ;;
855 m68*:Linux:*:*)
856 echo ${UNAME_MACHINE}-unknown-linux-gnu
857 exit ;;
858 mips:Linux:*:*)
859 eval $set_cc_for_build
860 sed 's/^ //' << EOF >$dummy.c
861 #undef CPU
862 #undef mips
863 #undef mipsel
864 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
865 CPU=mipsel
866 #else
867 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
868 CPU=mips
869 #else
870 CPU=
871 #endif
872 #endif
873 EOF
874 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
875 /^CPU/{
876 s: ::g
877 p
878 }'`"
879 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
880 ;;
881 mips64:Linux:*:*)
882 eval $set_cc_for_build
883 sed 's/^ //' << EOF >$dummy.c
884 #undef CPU
885 #undef mips64
886 #undef mips64el
887 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
888 CPU=mips64el
889 #else
890 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
891 CPU=mips64
892 #else
893 CPU=
894 #endif
895 #endif
896 EOF
897 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
898 /^CPU/{
899 s: ::g
900 p
901 }'`"
902 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
903 ;;
904 or32:Linux:*:*)
905 echo or32-unknown-linux-gnu
906 exit ;;
907 ppc:Linux:*:*)
908 echo powerpc-unknown-linux-gnu
909 exit ;;
910 ppc64:Linux:*:*)
911 echo powerpc64-unknown-linux-gnu
912 exit ;;
913 alpha:Linux:*:*)
914 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
915 EV5) UNAME_MACHINE=alphaev5 ;;
916 EV56) UNAME_MACHINE=alphaev56 ;;
917 PCA56) UNAME_MACHINE=alphapca56 ;;
918 PCA57) UNAME_MACHINE=alphapca56 ;;
919 EV6) UNAME_MACHINE=alphaev6 ;;
920 EV67) UNAME_MACHINE=alphaev67 ;;
921 EV68*) UNAME_MACHINE=alphaev68 ;;
922 esac
923 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
924 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
925 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
926 exit ;;
927 parisc:Linux:*:* | hppa:Linux:*:*)
928 # Look for CPU level
929 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
930 PA7*) echo hppa1.1-unknown-linux-gnu ;;
931 PA8*) echo hppa2.0-unknown-linux-gnu ;;
932 *) echo hppa-unknown-linux-gnu ;;
933 esac
934 exit ;;
935 parisc64:Linux:*:* | hppa64:Linux:*:*)
936 echo hppa64-unknown-linux-gnu
937 exit ;;
938 s390:Linux:*:* | s390x:Linux:*:*)
939 echo ${UNAME_MACHINE}-ibm-linux
940 exit ;;
941 sh64*:Linux:*:*)
942 echo ${UNAME_MACHINE}-unknown-linux-gnu
943 exit ;;
944 sh*:Linux:*:*)
945 echo ${UNAME_MACHINE}-unknown-linux-gnu
946 exit ;;
947 sparc:Linux:*:* | sparc64:Linux:*:*)
948 echo ${UNAME_MACHINE}-unknown-linux-gnu
949 exit ;;
950 vax:Linux:*:*)
951 echo ${UNAME_MACHINE}-dec-linux-gnu
952 exit ;;
953 x86_64:Linux:*:*)
954 echo x86_64-unknown-linux-gnu
955 exit ;;
956 xtensa:Linux:*:*)
957 echo xtensa-unknown-linux-gnu
958 exit ;;
959 i*86:Linux:*:*)
960 # The BFD linker knows what the default object file format is, so
961 # first see if it will tell us. cd to the root directory to prevent
962 # problems with other programs or directories called `ld' in the path.
963 # Set LC_ALL=C to ensure ld outputs messages in English.
964 ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
965 | sed -ne '/supported targets:/!d
966 s/[ ][ ]*/ /g
967 s/.*supported targets: *//
968 s/ .*//
969 p'`
970 case "$ld_supported_targets" in
971 elf32-i386)
972 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
973 ;;
974 a.out-i386-linux)
975 echo "${UNAME_MACHINE}-pc-linux-gnuaout"
976 exit ;;
977 coff-i386)
978 echo "${UNAME_MACHINE}-pc-linux-gnucoff"
979 exit ;;
980 "")
981 # Either a pre-BFD a.out linker (linux-gnuoldld) or
982 # one that does not give us useful --help.
983 echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
984 exit ;;
985 esac
986 # Determine whether the default compiler is a.out or elf
987 eval $set_cc_for_build
988 sed 's/^ //' << EOF >$dummy.c
989 #include <features.h>
990 #ifdef __ELF__
991 # ifdef __GLIBC__
992 # if __GLIBC__ >= 2
993 LIBC=gnu
994 # else
995 LIBC=gnulibc1
996 # endif
997 # else
998 LIBC=gnulibc1
999 # endif
1000 #else
1001 #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
1002 LIBC=gnu
1003 #else
1004 LIBC=gnuaout
1005 #endif
1006 #endif
1007 #ifdef __dietlibc__
1008 LIBC=dietlibc
1009 #endif
1010 EOF
1011 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
1012 /^LIBC/{
1013 s: ::g
1014 p
1015 }'`"
1016 test x"${LIBC}" != x && {
1017 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1018 exit
1019 }
1020 test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
1021 ;;
1022 i*86:DYNIX/ptx:4*:*)
1023 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1024 # earlier versions are messed up and put the nodename in both
1025 # sysname and nodename.
1026 echo i386-sequent-sysv4
1027 exit ;;
1028 i*86:UNIX_SV:4.2MP:2.*)
1029 # Unixware is an offshoot of SVR4, but it has its own version
1030 # number series starting with 2...
1031 # I am not positive that other SVR4 systems won't match this,
1032 # I just have to hope. -- rms.
1033 # Use sysv4.2uw... so that sysv4* matches it.
1034 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1035 exit ;;
1036 i*86:OS/2:*:*)
1037 # If we were able to find `uname', then EMX Unix compatibility
1038 # is probably installed.
1039 echo ${UNAME_MACHINE}-pc-os2-emx
1040 exit ;;
1041 i*86:XTS-300:*:STOP)
1042 echo ${UNAME_MACHINE}-unknown-stop
1043 exit ;;
1044 i*86:atheos:*:*)
1045 echo ${UNAME_MACHINE}-unknown-atheos
1046 exit ;;
1047 i*86:syllable:*:*)
1048 echo ${UNAME_MACHINE}-pc-syllable
1049 exit ;;
1050 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
1051 echo i386-unknown-lynxos${UNAME_RELEASE}
1052 exit ;;
1053 i*86:*DOS:*:*)
1054 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1055 exit ;;
1056 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1057 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1058 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1059 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1060 else
1061 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1062 fi
1063 exit ;;
1064 i*86:*:5:[678]*)
1065 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1066 case `/bin/uname -X | grep "^Machine"` in
1067 *486*) UNAME_MACHINE=i486 ;;
1068 *Pentium) UNAME_MACHINE=i586 ;;
1069 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1070 esac
1071 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1072 exit ;;
1073 i*86:*:3.2:*)
1074 if test -f /usr/options/cb.name; then
1075 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1076 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1077 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1078 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1079 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1080 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1081 && UNAME_MACHINE=i586
1082 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1083 && UNAME_MACHINE=i686
1084 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1085 && UNAME_MACHINE=i686
1086 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1087 else
1088 echo ${UNAME_MACHINE}-pc-sysv32
1089 fi
1090 exit ;;
1091 pc:*:*:*)
1092 # Left here for compatibility:
1093 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1094 # the processor, so we play safe by assuming i386.
1095 echo i386-pc-msdosdjgpp
1096 exit ;;
1097 Intel:Mach:3*:*)
1098 echo i386-pc-mach3
1099 exit ;;
1100 paragon:*:*:*)
1101 echo i860-intel-osf1
1102 exit ;;
1103 i860:*:4.*:*) # i860-SVR4
1104 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1105 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1106 else # Add other i860-SVR4 vendors below as they are discovered.
1107 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1108 fi
1109 exit ;;
1110 mini*:CTIX:SYS*5:*)
1111 # "miniframe"
1112 echo m68010-convergent-sysv
1113 exit ;;
1114 mc68k:UNIX:SYSTEM5:3.51m)
1115 echo m68k-convergent-sysv
1116 exit ;;
1117 M680?0:D-NIX:5.3:*)
1118 echo m68k-diab-dnix
1119 exit ;;
1120 M68*:*:R3V[5678]*:*)
1121 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1122 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
1123 OS_REL=''
1124 test -r /etc/.relid \
1125 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1126 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1127 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1128 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1129 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1130 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1131 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1132 && { echo i486-ncr-sysv4; exit; } ;;
1133 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1134 echo m68k-unknown-lynxos${UNAME_RELEASE}
1135 exit ;;
1136 mc68030:UNIX_System_V:4.*:*)
1137 echo m68k-atari-sysv4
1138 exit ;;
1139 TSUNAMI:LynxOS:2.*:*)
1140 echo sparc-unknown-lynxos${UNAME_RELEASE}
1141 exit ;;
1142 rs6000:LynxOS:2.*:*)
1143 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1144 exit ;;
1145 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1146 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1147 exit ;;
1148 SM[BE]S:UNIX_SV:*:*)
1149 echo mips-dde-sysv${UNAME_RELEASE}
1150 exit ;;
1151 RM*:ReliantUNIX-*:*:*)
1152 echo mips-sni-sysv4
1153 exit ;;
1154 RM*:SINIX-*:*:*)
1155 echo mips-sni-sysv4
1156 exit ;;
1157 *:SINIX-*:*:*)
1158 if uname -p 2>/dev/null >/dev/null ; then
1159 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1160 echo ${UNAME_MACHINE}-sni-sysv4
1161 else
1162 echo ns32k-sni-sysv
1163 fi
1164 exit ;;
1165 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1166 # says <Richard.M.Bartel@ccMail.Census.GOV>
1167 echo i586-unisys-sysv4
1168 exit ;;
1169 *:UNIX_System_V:4*:FTX*)
1170 # From Gerald Hewes <hewes@openmarket.com>.
1171 # How about differentiating between stratus architectures? -djm
1172 echo hppa1.1-stratus-sysv4
1173 exit ;;
1174 *:*:*:FTX*)
1175 # From seanf@swdc.stratus.com.
1176 echo i860-stratus-sysv4
1177 exit ;;
1178 i*86:VOS:*:*)
1179 # From Paul.Green@stratus.com.
1180 echo ${UNAME_MACHINE}-stratus-vos
1181 exit ;;
1182 *:VOS:*:*)
1183 # From Paul.Green@stratus.com.
1184 echo hppa1.1-stratus-vos
1185 exit ;;
1186 mc68*:A/UX:*:*)
1187 echo m68k-apple-aux${UNAME_RELEASE}
1188 exit ;;
1189 news*:NEWS-OS:6*:*)
1190 echo mips-sony-newsos6
1191 exit ;;
1192 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1193 if [ -d /usr/nec ]; then
1194 echo mips-nec-sysv${UNAME_RELEASE}
1195 else
1196 echo mips-unknown-sysv${UNAME_RELEASE}
1197 fi
1198 exit ;;
1199 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1200 echo powerpc-be-beos
1201 exit ;;
1202 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1203 echo powerpc-apple-beos
1204 exit ;;
1205 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1206 echo i586-pc-beos
1207 exit ;;
1208 SX-4:SUPER-UX:*:*)
1209 echo sx4-nec-superux${UNAME_RELEASE}
1210 exit ;;
1211 SX-5:SUPER-UX:*:*)
1212 echo sx5-nec-superux${UNAME_RELEASE}
1213 exit ;;
1214 SX-6:SUPER-UX:*:*)
1215 echo sx6-nec-superux${UNAME_RELEASE}
1216 exit ;;
1217 SX-7:SUPER-UX:*:*)
1218 echo sx7-nec-superux${UNAME_RELEASE}
1219 exit ;;
1220 SX-8:SUPER-UX:*:*)
1221 echo sx8-nec-superux${UNAME_RELEASE}
1222 exit ;;
1223 SX-8R:SUPER-UX:*:*)
1224 echo sx8r-nec-superux${UNAME_RELEASE}
1225 exit ;;
1226 Power*:Rhapsody:*:*)
1227 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1228 exit ;;
1229 *:Rhapsody:*:*)
1230 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1231 exit ;;
1232 *:Darwin:*:*)
1233 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1234 case $UNAME_PROCESSOR in
1235 unknown) UNAME_PROCESSOR=powerpc ;;
1236 esac
1237 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1238 exit ;;
1239 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1240 UNAME_PROCESSOR=`uname -p`
1241 if test "$UNAME_PROCESSOR" = "x86"; then
1242 UNAME_PROCESSOR=i386
1243 UNAME_MACHINE=pc
1244 fi
1245 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1246 exit ;;
1247 *:QNX:*:4*)
1248 echo i386-pc-qnx
1249 exit ;;
1250 NSE-?:NONSTOP_KERNEL:*:*)
1251 echo nse-tandem-nsk${UNAME_RELEASE}
1252 exit ;;
1253 NSR-?:NONSTOP_KERNEL:*:*)
1254 echo nsr-tandem-nsk${UNAME_RELEASE}
1255 exit ;;
1256 *:NonStop-UX:*:*)
1257 echo mips-compaq-nonstopux
1258 exit ;;
1259 BS2000:POSIX*:*:*)
1260 echo bs2000-siemens-sysv
1261 exit ;;
1262 DS/*:UNIX_System_V:*:*)
1263 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1264 exit ;;
1265 *:Plan9:*:*)
1266 # "uname -m" is not consistent, so use $cputype instead. 386
1267 # is converted to i386 for consistency with other x86
1268 # operating systems.
1269 if test "$cputype" = "386"; then
1270 UNAME_MACHINE=i386
1271 else
1272 UNAME_MACHINE="$cputype"
1273 fi
1274 echo ${UNAME_MACHINE}-unknown-plan9
1275 exit ;;
1276 *:TOPS-10:*:*)
1277 echo pdp10-unknown-tops10
1278 exit ;;
1279 *:TENEX:*:*)
1280 echo pdp10-unknown-tenex
1281 exit ;;
1282 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1283 echo pdp10-dec-tops20
1284 exit ;;
1285 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1286 echo pdp10-xkl-tops20
1287 exit ;;
1288 *:TOPS-20:*:*)
1289 echo pdp10-unknown-tops20
1290 exit ;;
1291 *:ITS:*:*)
1292 echo pdp10-unknown-its
1293 exit ;;
1294 SEI:*:*:SEIUX)
1295 echo mips-sei-seiux${UNAME_RELEASE}
1296 exit ;;
1297 *:DragonFly:*:*)
1298 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1299 exit ;;
1300 *:*VMS:*:*)
1301 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1302 case "${UNAME_MACHINE}" in
1303 A*) echo alpha-dec-vms ; exit ;;
1304 I*) echo ia64-dec-vms ; exit ;;
1305 V*) echo vax-dec-vms ; exit ;;
1306 esac ;;
1307 *:XENIX:*:SysV)
1308 echo i386-pc-xenix
1309 exit ;;
1310 i*86:skyos:*:*)
1311 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1312 exit ;;
1313 i*86:rdos:*:*)
1314 echo ${UNAME_MACHINE}-pc-rdos
1315 exit ;;
1316 esac
1317
1318 #echo '(No uname command or uname output not recognized.)' 1>&2
1319 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1320
1321 eval $set_cc_for_build
1322 cat >$dummy.c <<EOF
1323 #ifdef _SEQUENT_
1324 # include <sys/types.h>
1325 # include <sys/utsname.h>
1326 #endif
1327 main ()
1328 {
1329 #if defined (sony)
1330 #if defined (MIPSEB)
1331 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1332 I don't know.... */
1333 printf ("mips-sony-bsd\n"); exit (0);
1334 #else
1335 #include <sys/param.h>
1336 printf ("m68k-sony-newsos%s\n",
1337 #ifdef NEWSOS4
1338 "4"
1339 #else
1340 ""
1341 #endif
1342 ); exit (0);
1343 #endif
1344 #endif
1345
1346 #if defined (__arm) && defined (__acorn) && defined (__unix)
1347 printf ("arm-acorn-riscix\n"); exit (0);
1348 #endif
1349
1350 #if defined (hp300) && !defined (hpux)
1351 printf ("m68k-hp-bsd\n"); exit (0);
1352 #endif
1353
1354 #if defined (NeXT)
1355 #if !defined (__ARCHITECTURE__)
1356 #define __ARCHITECTURE__ "m68k"
1357 #endif
1358 int version;
1359 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1360 if (version < 4)
1361 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1362 else
1363 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1364 exit (0);
1365 #endif
1366
1367 #if defined (MULTIMAX) || defined (n16)
1368 #if defined (UMAXV)
1369 printf ("ns32k-encore-sysv\n"); exit (0);
1370 #else
1371 #if defined (CMU)
1372 printf ("ns32k-encore-mach\n"); exit (0);
1373 #else
1374 printf ("ns32k-encore-bsd\n"); exit (0);
1375 #endif
1376 #endif
1377 #endif
1378
1379 #if defined (__386BSD__)
1380 printf ("i386-pc-bsd\n"); exit (0);
1381 #endif
1382
1383 #if defined (sequent)
1384 #if defined (i386)
1385 printf ("i386-sequent-dynix\n"); exit (0);
1386 #endif
1387 #if defined (ns32000)
1388 printf ("ns32k-sequent-dynix\n"); exit (0);
1389 #endif
1390 #endif
1391
1392 #if defined (_SEQUENT_)
1393 struct utsname un;
1394
1395 uname(&un);
1396
1397 if (strncmp(un.version, "V2", 2) == 0) {
1398 printf ("i386-sequent-ptx2\n"); exit (0);
1399 }
1400 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1401 printf ("i386-sequent-ptx1\n"); exit (0);
1402 }
1403 printf ("i386-sequent-ptx\n"); exit (0);
1404
1405 #endif
1406
1407 #if defined (vax)
1408 # if !defined (ultrix)
1409 # include <sys/param.h>
1410 # if defined (BSD)
1411 # if BSD == 43
1412 printf ("vax-dec-bsd4.3\n"); exit (0);
1413 # else
1414 # if BSD == 199006
1415 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1416 # else
1417 printf ("vax-dec-bsd\n"); exit (0);
1418 # endif
1419 # endif
1420 # else
1421 printf ("vax-dec-bsd\n"); exit (0);
1422 # endif
1423 # else
1424 printf ("vax-dec-ultrix\n"); exit (0);
1425 # endif
1426 #endif
1427
1428 #if defined (alliant) && defined (i860)
1429 printf ("i860-alliant-bsd\n"); exit (0);
1430 #endif
1431
1432 exit (1);
1433 }
1434 EOF
1435
1436 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1437 { echo "$SYSTEM_NAME"; exit; }
1438
1439 # Apollos put the system type in the environment.
1440
1441 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1442
1443 # Convex versions that predate uname can use getsysinfo(1)
1444
1445 if [ -x /usr/convex/getsysinfo ]
1446 then
1447 case `getsysinfo -f cpu_type` in
1448 c1*)
1449 echo c1-convex-bsd
1450 exit ;;
1451 c2*)
1452 if getsysinfo -f scalar_acc
1453 then echo c32-convex-bsd
1454 else echo c2-convex-bsd
1455 fi
1456 exit ;;
1457 c34*)
1458 echo c34-convex-bsd
1459 exit ;;
1460 c38*)
1461 echo c38-convex-bsd
1462 exit ;;
1463 c4*)
1464 echo c4-convex-bsd
1465 exit ;;
1466 esac
1467 fi
1468
1469 cat >&2 <<EOF
1470 $0: unable to guess system type
1471
1472 This script, last modified $timestamp, has failed to recognize
1473 the operating system you are using. It is advised that you
1474 download the most up to date version of the config scripts from
1475
1476 http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
1477 and
1478 http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
1479
1480 If the version you run ($0) is already up to date, please
1481 send the following data and any information you think might be
1482 pertinent to <config-patches@gnu.org> in order to provide the needed
1483 information to handle your system.
1484
1485 config.guess timestamp = $timestamp
1486
1487 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1488 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1489 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1490 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1491
1492 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1493 /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1494
1495 hostinfo = `(hostinfo) 2>/dev/null`
1496 /bin/universe = `(/bin/universe) 2>/dev/null`
1497 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1498 /bin/arch = `(/bin/arch) 2>/dev/null`
1499 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1500 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1501
1502 UNAME_MACHINE = ${UNAME_MACHINE}
1503 UNAME_RELEASE = ${UNAME_RELEASE}
1504 UNAME_SYSTEM = ${UNAME_SYSTEM}
1505 UNAME_VERSION = ${UNAME_VERSION}
1506 EOF
1507
1508 exit 1
1509
1510 # Local variables:
1511 # eval: (add-hook 'write-file-hooks 'time-stamp)
1512 # time-stamp-start: "timestamp='"
1513 # time-stamp-format: "%:y-%02m-%02d"
1514 # time-stamp-end: "'"
1515 # End:
+0
-1626
config.sub less more
0 #! /bin/sh
1 # Configuration validation subroutine script.
2 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
4 # Inc.
5
6 timestamp='2007-06-28'
7
8 # This file is (in principle) common to ALL GNU software.
9 # The presence of a machine in this file suggests that SOME GNU software
10 # can handle that machine. It does not imply ALL GNU software can.
11 #
12 # This file is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; either version 2 of the License, or
15 # (at your option) any later version.
16 #
17 # This program is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
21 #
22 # You should have received a copy of the GNU General Public License
23 # along with this program; if not, write to the Free Software
24 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
25 # 02110-1301, USA.
26 #
27 # As a special exception to the GNU General Public License, if you
28 # distribute this file as part of a program that contains a
29 # configuration script generated by Autoconf, you may include it under
30 # the same distribution terms that you use for the rest of that program.
31
32
33 # Please send patches to <config-patches@gnu.org>. Submit a context
34 # diff and a properly formatted ChangeLog entry.
35 #
36 # Configuration subroutine to validate and canonicalize a configuration type.
37 # Supply the specified configuration type as an argument.
38 # If it is invalid, we print an error message on stderr and exit with code 1.
39 # Otherwise, we print the canonical config type on stdout and succeed.
40
41 # This file is supposed to be the same for all GNU packages
42 # and recognize all the CPU types, system types and aliases
43 # that are meaningful with *any* GNU software.
44 # Each package is responsible for reporting which valid configurations
45 # it does not support. The user should be able to distinguish
46 # a failure to support a valid configuration from a meaningless
47 # configuration.
48
49 # The goal of this file is to map all the various variations of a given
50 # machine specification into a single specification in the form:
51 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
52 # or in some cases, the newer four-part form:
53 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
54 # It is wrong to echo any other type of specification.
55
56 me=`echo "$0" | sed -e 's,.*/,,'`
57
58 usage="\
59 Usage: $0 [OPTION] CPU-MFR-OPSYS
60 $0 [OPTION] ALIAS
61
62 Canonicalize a configuration name.
63
64 Operation modes:
65 -h, --help print this help, then exit
66 -t, --time-stamp print date of last modification, then exit
67 -v, --version print version number, then exit
68
69 Report bugs and patches to <config-patches@gnu.org>."
70
71 version="\
72 GNU config.sub ($timestamp)
73
74 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
75 Free Software Foundation, Inc.
76
77 This is free software; see the source for copying conditions. There is NO
78 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
79
80 help="
81 Try \`$me --help' for more information."
82
83 # Parse command line
84 while test $# -gt 0 ; do
85 case $1 in
86 --time-stamp | --time* | -t )
87 echo "$timestamp" ; exit ;;
88 --version | -v )
89 echo "$version" ; exit ;;
90 --help | --h* | -h )
91 echo "$usage"; exit ;;
92 -- ) # Stop option processing
93 shift; break ;;
94 - ) # Use stdin as input.
95 break ;;
96 -* )
97 echo "$me: invalid option $1$help"
98 exit 1 ;;
99
100 *local*)
101 # First pass through any local machine types.
102 echo $1
103 exit ;;
104
105 * )
106 break ;;
107 esac
108 done
109
110 case $# in
111 0) echo "$me: missing argument$help" >&2
112 exit 1;;
113 1) ;;
114 *) echo "$me: too many arguments$help" >&2
115 exit 1;;
116 esac
117
118 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
119 # Here we must recognize all the valid KERNEL-OS combinations.
120 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
121 case $maybe_os in
122 nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
123 uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
124 storm-chaos* | os2-emx* | rtmk-nova*)
125 os=-$maybe_os
126 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
127 ;;
128 *)
129 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
130 if [ $basic_machine != $1 ]
131 then os=`echo $1 | sed 's/.*-/-/'`
132 else os=; fi
133 ;;
134 esac
135
136 ### Let's recognize common machines as not being operating systems so
137 ### that things like config.sub decstation-3100 work. We also
138 ### recognize some manufacturers as not being operating systems, so we
139 ### can provide default operating systems below.
140 case $os in
141 -sun*os*)
142 # Prevent following clause from handling this invalid input.
143 ;;
144 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
145 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
146 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
147 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
148 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
149 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
150 -apple | -axis | -knuth | -cray)
151 os=
152 basic_machine=$1
153 ;;
154 -sim | -cisco | -oki | -wec | -winbond)
155 os=
156 basic_machine=$1
157 ;;
158 -scout)
159 ;;
160 -wrs)
161 os=-vxworks
162 basic_machine=$1
163 ;;
164 -chorusos*)
165 os=-chorusos
166 basic_machine=$1
167 ;;
168 -chorusrdb)
169 os=-chorusrdb
170 basic_machine=$1
171 ;;
172 -hiux*)
173 os=-hiuxwe2
174 ;;
175 -sco6)
176 os=-sco5v6
177 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
178 ;;
179 -sco5)
180 os=-sco3.2v5
181 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
182 ;;
183 -sco4)
184 os=-sco3.2v4
185 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
186 ;;
187 -sco3.2.[4-9]*)
188 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
189 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
190 ;;
191 -sco3.2v[4-9]*)
192 # Don't forget version if it is 3.2v4 or newer.
193 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
194 ;;
195 -sco5v6*)
196 # Don't forget version if it is 3.2v4 or newer.
197 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
198 ;;
199 -sco*)
200 os=-sco3.2v2
201 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
202 ;;
203 -udk*)
204 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
205 ;;
206 -isc)
207 os=-isc2.2
208 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
209 ;;
210 -clix*)
211 basic_machine=clipper-intergraph
212 ;;
213 -isc*)
214 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
215 ;;
216 -lynx*)
217 os=-lynxos
218 ;;
219 -ptx*)
220 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
221 ;;
222 -windowsnt*)
223 os=`echo $os | sed -e 's/windowsnt/winnt/'`
224 ;;
225 -psos*)
226 os=-psos
227 ;;
228 -mint | -mint[0-9]*)
229 basic_machine=m68k-atari
230 os=-mint
231 ;;
232 esac
233
234 # Decode aliases for certain CPU-COMPANY combinations.
235 case $basic_machine in
236 # Recognize the basic CPU types without company name.
237 # Some are omitted here because they have special meanings below.
238 1750a | 580 \
239 | a29k \
240 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
241 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
242 | am33_2.0 \
243 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
244 | bfin \
245 | c4x | clipper \
246 | d10v | d30v | dlx | dsp16xx \
247 | fido | fr30 | frv \
248 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
249 | i370 | i860 | i960 | ia64 \
250 | ip2k | iq2000 \
251 | m32c | m32r | m32rle | m68000 | m68k | m88k \
252 | maxq | mb | microblaze | mcore | mep \
253 | mips | mipsbe | mipseb | mipsel | mipsle \
254 | mips16 \
255 | mips64 | mips64el \
256 | mips64vr | mips64vrel \
257 | mips64orion | mips64orionel \
258 | mips64vr4100 | mips64vr4100el \
259 | mips64vr4300 | mips64vr4300el \
260 | mips64vr5000 | mips64vr5000el \
261 | mips64vr5900 | mips64vr5900el \
262 | mipsisa32 | mipsisa32el \
263 | mipsisa32r2 | mipsisa32r2el \
264 | mipsisa64 | mipsisa64el \
265 | mipsisa64r2 | mipsisa64r2el \
266 | mipsisa64sb1 | mipsisa64sb1el \
267 | mipsisa64sr71k | mipsisa64sr71kel \
268 | mipstx39 | mipstx39el \
269 | mn10200 | mn10300 \
270 | mt \
271 | msp430 \
272 | nios | nios2 \
273 | ns16k | ns32k \
274 | or32 \
275 | pdp10 | pdp11 | pj | pjl \
276 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
277 | pyramid \
278 | score \
279 | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
280 | sh64 | sh64le \
281 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
282 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
283 | spu | strongarm \
284 | tahoe | thumb | tic4x | tic80 | tron \
285 | v850 | v850e \
286 | we32k \
287 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
288 | z8k)
289 basic_machine=$basic_machine-unknown
290 ;;
291 m6811 | m68hc11 | m6812 | m68hc12)
292 # Motorola 68HC11/12.
293 basic_machine=$basic_machine-unknown
294 os=-none
295 ;;
296 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
297 ;;
298 ms1)
299 basic_machine=mt-unknown
300 ;;
301
302 # We use `pc' rather than `unknown'
303 # because (1) that's what they normally are, and
304 # (2) the word "unknown" tends to confuse beginning users.
305 i*86 | x86_64)
306 basic_machine=$basic_machine-pc
307 ;;
308 # Object if more than one company name word.
309 *-*-*)
310 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
311 exit 1
312 ;;
313 # Recognize the basic CPU types with company name.
314 580-* \
315 | a29k-* \
316 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
317 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
318 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
319 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
320 | avr-* | avr32-* \
321 | bfin-* | bs2000-* \
322 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
323 | clipper-* | craynv-* | cydra-* \
324 | d10v-* | d30v-* | dlx-* \
325 | elxsi-* \
326 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
327 | h8300-* | h8500-* \
328 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
329 | i*86-* | i860-* | i960-* | ia64-* \
330 | ip2k-* | iq2000-* \
331 | m32c-* | m32r-* | m32rle-* \
332 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
333 | m88110-* | m88k-* | maxq-* | mcore-* \
334 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
335 | mips16-* \
336 | mips64-* | mips64el-* \
337 | mips64vr-* | mips64vrel-* \
338 | mips64orion-* | mips64orionel-* \
339 | mips64vr4100-* | mips64vr4100el-* \
340 | mips64vr4300-* | mips64vr4300el-* \
341 | mips64vr5000-* | mips64vr5000el-* \
342 | mips64vr5900-* | mips64vr5900el-* \
343 | mipsisa32-* | mipsisa32el-* \
344 | mipsisa32r2-* | mipsisa32r2el-* \
345 | mipsisa64-* | mipsisa64el-* \
346 | mipsisa64r2-* | mipsisa64r2el-* \
347 | mipsisa64sb1-* | mipsisa64sb1el-* \
348 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
349 | mipstx39-* | mipstx39el-* \
350 | mmix-* \
351 | mt-* \
352 | msp430-* \
353 | nios-* | nios2-* \
354 | none-* | np1-* | ns16k-* | ns32k-* \
355 | orion-* \
356 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
357 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
358 | pyramid-* \
359 | romp-* | rs6000-* \
360 | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
361 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
362 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
363 | sparclite-* \
364 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
365 | tahoe-* | thumb-* \
366 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
367 | tron-* \
368 | v850-* | v850e-* | vax-* \
369 | we32k-* \
370 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
371 | xstormy16-* | xtensa-* \
372 | ymp-* \
373 | z8k-*)
374 ;;
375 # Recognize the various machine names and aliases which stand
376 # for a CPU type and a company and sometimes even an OS.
377 386bsd)
378 basic_machine=i386-unknown
379 os=-bsd
380 ;;
381 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
382 basic_machine=m68000-att
383 ;;
384 3b*)
385 basic_machine=we32k-att
386 ;;
387 a29khif)
388 basic_machine=a29k-amd
389 os=-udi
390 ;;
391 abacus)
392 basic_machine=abacus-unknown
393 ;;
394 adobe68k)
395 basic_machine=m68010-adobe
396 os=-scout
397 ;;
398 alliant | fx80)
399 basic_machine=fx80-alliant
400 ;;
401 altos | altos3068)
402 basic_machine=m68k-altos
403 ;;
404 am29k)
405 basic_machine=a29k-none
406 os=-bsd
407 ;;
408 amd64)
409 basic_machine=x86_64-pc
410 ;;
411 amd64-*)
412 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
413 ;;
414 amdahl)
415 basic_machine=580-amdahl
416 os=-sysv
417 ;;
418 amiga | amiga-*)
419 basic_machine=m68k-unknown
420 ;;
421 amigaos | amigados)
422 basic_machine=m68k-unknown
423 os=-amigaos
424 ;;
425 amigaunix | amix)
426 basic_machine=m68k-unknown
427 os=-sysv4
428 ;;
429 apollo68)
430 basic_machine=m68k-apollo
431 os=-sysv
432 ;;
433 apollo68bsd)
434 basic_machine=m68k-apollo
435 os=-bsd
436 ;;
437 aux)
438 basic_machine=m68k-apple
439 os=-aux
440 ;;
441 balance)
442 basic_machine=ns32k-sequent
443 os=-dynix
444 ;;
445 c90)
446 basic_machine=c90-cray
447 os=-unicos
448 ;;
449 convex-c1)
450 basic_machine=c1-convex
451 os=-bsd
452 ;;
453 convex-c2)
454 basic_machine=c2-convex
455 os=-bsd
456 ;;
457 convex-c32)
458 basic_machine=c32-convex
459 os=-bsd
460 ;;
461 convex-c34)
462 basic_machine=c34-convex
463 os=-bsd
464 ;;
465 convex-c38)
466 basic_machine=c38-convex
467 os=-bsd
468 ;;
469 cray | j90)
470 basic_machine=j90-cray
471 os=-unicos
472 ;;
473 craynv)
474 basic_machine=craynv-cray
475 os=-unicosmp
476 ;;
477 cr16)
478 basic_machine=cr16-unknown
479 os=-elf
480 ;;
481 crds | unos)
482 basic_machine=m68k-crds
483 ;;
484 crisv32 | crisv32-* | etraxfs*)
485 basic_machine=crisv32-axis
486 ;;
487 cris | cris-* | etrax*)
488 basic_machine=cris-axis
489 ;;
490 crx)
491 basic_machine=crx-unknown
492 os=-elf
493 ;;
494 da30 | da30-*)
495 basic_machine=m68k-da30
496 ;;
497 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
498 basic_machine=mips-dec
499 ;;
500 decsystem10* | dec10*)
501 basic_machine=pdp10-dec
502 os=-tops10
503 ;;
504 decsystem20* | dec20*)
505 basic_machine=pdp10-dec
506 os=-tops20
507 ;;
508 delta | 3300 | motorola-3300 | motorola-delta \
509 | 3300-motorola | delta-motorola)
510 basic_machine=m68k-motorola
511 ;;
512 delta88)
513 basic_machine=m88k-motorola
514 os=-sysv3
515 ;;
516 djgpp)
517 basic_machine=i586-pc
518 os=-msdosdjgpp
519 ;;
520 dpx20 | dpx20-*)
521 basic_machine=rs6000-bull
522 os=-bosx
523 ;;
524 dpx2* | dpx2*-bull)
525 basic_machine=m68k-bull
526 os=-sysv3
527 ;;
528 ebmon29k)
529 basic_machine=a29k-amd
530 os=-ebmon
531 ;;
532 elxsi)
533 basic_machine=elxsi-elxsi
534 os=-bsd
535 ;;
536 encore | umax | mmax)
537 basic_machine=ns32k-encore
538 ;;
539 es1800 | OSE68k | ose68k | ose | OSE)
540 basic_machine=m68k-ericsson
541 os=-ose
542 ;;
543 fx2800)
544 basic_machine=i860-alliant
545 ;;
546 genix)
547 basic_machine=ns32k-ns
548 ;;
549 gmicro)
550 basic_machine=tron-gmicro
551 os=-sysv
552 ;;
553 go32)
554 basic_machine=i386-pc
555 os=-go32
556 ;;
557 h3050r* | hiux*)
558 basic_machine=hppa1.1-hitachi
559 os=-hiuxwe2
560 ;;
561 h8300hms)
562 basic_machine=h8300-hitachi
563 os=-hms
564 ;;
565 h8300xray)
566 basic_machine=h8300-hitachi
567 os=-xray
568 ;;
569 h8500hms)
570 basic_machine=h8500-hitachi
571 os=-hms
572 ;;
573 harris)
574 basic_machine=m88k-harris
575 os=-sysv3
576 ;;
577 hp300-*)
578 basic_machine=m68k-hp
579 ;;
580 hp300bsd)
581 basic_machine=m68k-hp
582 os=-bsd
583 ;;
584 hp300hpux)
585 basic_machine=m68k-hp
586 os=-hpux
587 ;;
588 hp3k9[0-9][0-9] | hp9[0-9][0-9])
589 basic_machine=hppa1.0-hp
590 ;;
591 hp9k2[0-9][0-9] | hp9k31[0-9])
592 basic_machine=m68000-hp
593 ;;
594 hp9k3[2-9][0-9])
595 basic_machine=m68k-hp
596 ;;
597 hp9k6[0-9][0-9] | hp6[0-9][0-9])
598 basic_machine=hppa1.0-hp
599 ;;
600 hp9k7[0-79][0-9] | hp7[0-79][0-9])
601 basic_machine=hppa1.1-hp
602 ;;
603 hp9k78[0-9] | hp78[0-9])
604 # FIXME: really hppa2.0-hp
605 basic_machine=hppa1.1-hp
606 ;;
607 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
608 # FIXME: really hppa2.0-hp
609 basic_machine=hppa1.1-hp
610 ;;
611 hp9k8[0-9][13679] | hp8[0-9][13679])
612 basic_machine=hppa1.1-hp
613 ;;
614 hp9k8[0-9][0-9] | hp8[0-9][0-9])
615 basic_machine=hppa1.0-hp
616 ;;
617 hppa-next)
618 os=-nextstep3
619 ;;
620 hppaosf)
621 basic_machine=hppa1.1-hp
622 os=-osf
623 ;;
624 hppro)
625 basic_machine=hppa1.1-hp
626 os=-proelf
627 ;;
628 i370-ibm* | ibm*)
629 basic_machine=i370-ibm
630 ;;
631 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
632 i*86v32)
633 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
634 os=-sysv32
635 ;;
636 i*86v4*)
637 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
638 os=-sysv4
639 ;;
640 i*86v)
641 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
642 os=-sysv
643 ;;
644 i*86sol2)
645 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
646 os=-solaris2
647 ;;
648 i386mach)
649 basic_machine=i386-mach
650 os=-mach
651 ;;
652 i386-vsta | vsta)
653 basic_machine=i386-unknown
654 os=-vsta
655 ;;
656 iris | iris4d)
657 basic_machine=mips-sgi
658 case $os in
659 -irix*)
660 ;;
661 *)
662 os=-irix4
663 ;;
664 esac
665 ;;
666 isi68 | isi)
667 basic_machine=m68k-isi
668 os=-sysv
669 ;;
670 m88k-omron*)
671 basic_machine=m88k-omron
672 ;;
673 magnum | m3230)
674 basic_machine=mips-mips
675 os=-sysv
676 ;;
677 merlin)
678 basic_machine=ns32k-utek
679 os=-sysv
680 ;;
681 mingw32)
682 basic_machine=i386-pc
683 os=-mingw32
684 ;;
685 mingw32ce)
686 basic_machine=arm-unknown
687 os=-mingw32ce
688 ;;
689 miniframe)
690 basic_machine=m68000-convergent
691 ;;
692 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
693 basic_machine=m68k-atari
694 os=-mint
695 ;;
696 mips3*-*)
697 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
698 ;;
699 mips3*)
700 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
701 ;;
702 monitor)
703 basic_machine=m68k-rom68k
704 os=-coff
705 ;;
706 morphos)
707 basic_machine=powerpc-unknown
708 os=-morphos
709 ;;
710 msdos)
711 basic_machine=i386-pc
712 os=-msdos
713 ;;
714 ms1-*)
715 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
716 ;;
717 mvs)
718 basic_machine=i370-ibm
719 os=-mvs
720 ;;
721 ncr3000)
722 basic_machine=i486-ncr
723 os=-sysv4
724 ;;
725 netbsd386)
726 basic_machine=i386-unknown
727 os=-netbsd
728 ;;
729 netwinder)
730 basic_machine=armv4l-rebel
731 os=-linux
732 ;;
733 news | news700 | news800 | news900)
734 basic_machine=m68k-sony
735 os=-newsos
736 ;;
737 news1000)
738 basic_machine=m68030-sony
739 os=-newsos
740 ;;
741 news-3600 | risc-news)
742 basic_machine=mips-sony
743 os=-newsos
744 ;;
745 necv70)
746 basic_machine=v70-nec
747 os=-sysv
748 ;;
749 next | m*-next )
750 basic_machine=m68k-next
751 case $os in
752 -nextstep* )
753 ;;
754 -ns2*)
755 os=-nextstep2
756 ;;
757 *)
758 os=-nextstep3
759 ;;
760 esac
761 ;;
762 nh3000)
763 basic_machine=m68k-harris
764 os=-cxux
765 ;;
766 nh[45]000)
767 basic_machine=m88k-harris
768 os=-cxux
769 ;;
770 nindy960)
771 basic_machine=i960-intel
772 os=-nindy
773 ;;
774 mon960)
775 basic_machine=i960-intel
776 os=-mon960
777 ;;
778 nonstopux)
779 basic_machine=mips-compaq
780 os=-nonstopux
781 ;;
782 np1)
783 basic_machine=np1-gould
784 ;;
785 nsr-tandem)
786 basic_machine=nsr-tandem
787 ;;
788 op50n-* | op60c-*)
789 basic_machine=hppa1.1-oki
790 os=-proelf
791 ;;
792 openrisc | openrisc-*)
793 basic_machine=or32-unknown
794 ;;
795 os400)
796 basic_machine=powerpc-ibm
797 os=-os400
798 ;;
799 OSE68000 | ose68000)
800 basic_machine=m68000-ericsson
801 os=-ose
802 ;;
803 os68k)
804 basic_machine=m68k-none
805 os=-os68k
806 ;;
807 pa-hitachi)
808 basic_machine=hppa1.1-hitachi
809 os=-hiuxwe2
810 ;;
811 paragon)
812 basic_machine=i860-intel
813 os=-osf
814 ;;
815 pbd)
816 basic_machine=sparc-tti
817 ;;
818 pbb)
819 basic_machine=m68k-tti
820 ;;
821 pc532 | pc532-*)
822 basic_machine=ns32k-pc532
823 ;;
824 pc98)
825 basic_machine=i386-pc
826 ;;
827 pc98-*)
828 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
829 ;;
830 pentium | p5 | k5 | k6 | nexgen | viac3)
831 basic_machine=i586-pc
832 ;;
833 pentiumpro | p6 | 6x86 | athlon | athlon_*)
834 basic_machine=i686-pc
835 ;;
836 pentiumii | pentium2 | pentiumiii | pentium3)
837 basic_machine=i686-pc
838 ;;
839 pentium4)
840 basic_machine=i786-pc
841 ;;
842 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
843 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
844 ;;
845 pentiumpro-* | p6-* | 6x86-* | athlon-*)
846 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
847 ;;
848 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
849 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
850 ;;
851 pentium4-*)
852 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
853 ;;
854 pn)
855 basic_machine=pn-gould
856 ;;
857 power) basic_machine=power-ibm
858 ;;
859 ppc) basic_machine=powerpc-unknown
860 ;;
861 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
862 ;;
863 ppcle | powerpclittle | ppc-le | powerpc-little)
864 basic_machine=powerpcle-unknown
865 ;;
866 ppcle-* | powerpclittle-*)
867 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
868 ;;
869 ppc64) basic_machine=powerpc64-unknown
870 ;;
871 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
872 ;;
873 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
874 basic_machine=powerpc64le-unknown
875 ;;
876 ppc64le-* | powerpc64little-*)
877 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
878 ;;
879 ps2)
880 basic_machine=i386-ibm
881 ;;
882 pw32)
883 basic_machine=i586-unknown
884 os=-pw32
885 ;;
886 rdos)
887 basic_machine=i386-pc
888 os=-rdos
889 ;;
890 rom68k)
891 basic_machine=m68k-rom68k
892 os=-coff
893 ;;
894 rm[46]00)
895 basic_machine=mips-siemens
896 ;;
897 rtpc | rtpc-*)
898 basic_machine=romp-ibm
899 ;;
900 s390 | s390-*)
901 basic_machine=s390-ibm
902 ;;
903 s390x | s390x-*)
904 basic_machine=s390x-ibm
905 ;;
906 sa29200)
907 basic_machine=a29k-amd
908 os=-udi
909 ;;
910 sb1)
911 basic_machine=mipsisa64sb1-unknown
912 ;;
913 sb1el)
914 basic_machine=mipsisa64sb1el-unknown
915 ;;
916 sde)
917 basic_machine=mipsisa32-sde
918 os=-elf
919 ;;
920 sei)
921 basic_machine=mips-sei
922 os=-seiux
923 ;;
924 sequent)
925 basic_machine=i386-sequent
926 ;;
927 sh)
928 basic_machine=sh-hitachi
929 os=-hms
930 ;;
931 sh5el)
932 basic_machine=sh5le-unknown
933 ;;
934 sh64)
935 basic_machine=sh64-unknown
936 ;;
937 sparclite-wrs | simso-wrs)
938 basic_machine=sparclite-wrs
939 os=-vxworks
940 ;;
941 sps7)
942 basic_machine=m68k-bull
943 os=-sysv2
944 ;;
945 spur)
946 basic_machine=spur-unknown
947 ;;
948 st2000)
949 basic_machine=m68k-tandem
950 ;;
951 stratus)
952 basic_machine=i860-stratus
953 os=-sysv4
954 ;;
955 sun2)
956 basic_machine=m68000-sun
957 ;;
958 sun2os3)
959 basic_machine=m68000-sun
960 os=-sunos3
961 ;;
962 sun2os4)
963 basic_machine=m68000-sun
964 os=-sunos4
965 ;;
966 sun3os3)
967 basic_machine=m68k-sun
968 os=-sunos3
969 ;;
970 sun3os4)
971 basic_machine=m68k-sun
972 os=-sunos4
973 ;;
974 sun4os3)
975 basic_machine=sparc-sun
976 os=-sunos3
977 ;;
978 sun4os4)
979 basic_machine=sparc-sun
980 os=-sunos4
981 ;;
982 sun4sol2)
983 basic_machine=sparc-sun
984 os=-solaris2
985 ;;
986 sun3 | sun3-*)
987 basic_machine=m68k-sun
988 ;;
989 sun4)
990 basic_machine=sparc-sun
991 ;;
992 sun386 | sun386i | roadrunner)
993 basic_machine=i386-sun
994 ;;
995 sv1)
996 basic_machine=sv1-cray
997 os=-unicos
998 ;;
999 symmetry)
1000 basic_machine=i386-sequent
1001 os=-dynix
1002 ;;
1003 t3e)
1004 basic_machine=alphaev5-cray
1005 os=-unicos
1006 ;;
1007 t90)
1008 basic_machine=t90-cray
1009 os=-unicos
1010 ;;
1011 tic54x | c54x*)
1012 basic_machine=tic54x-unknown
1013 os=-coff
1014 ;;
1015 tic55x | c55x*)
1016 basic_machine=tic55x-unknown
1017 os=-coff
1018 ;;
1019 tic6x | c6x*)
1020 basic_machine=tic6x-unknown
1021 os=-coff
1022 ;;
1023 tx39)
1024 basic_machine=mipstx39-unknown
1025 ;;
1026 tx39el)
1027 basic_machine=mipstx39el-unknown
1028 ;;
1029 toad1)
1030 basic_machine=pdp10-xkl
1031 os=-tops20
1032 ;;
1033 tower | tower-32)
1034 basic_machine=m68k-ncr
1035 ;;
1036 tpf)
1037 basic_machine=s390x-ibm
1038 os=-tpf
1039 ;;
1040 udi29k)
1041 basic_machine=a29k-amd
1042 os=-udi
1043 ;;
1044 ultra3)
1045 basic_machine=a29k-nyu
1046 os=-sym1
1047 ;;
1048 v810 | necv810)
1049 basic_machine=v810-nec
1050 os=-none
1051 ;;
1052 vaxv)
1053 basic_machine=vax-dec
1054 os=-sysv
1055 ;;
1056 vms)
1057 basic_machine=vax-dec
1058 os=-vms
1059 ;;
1060 vpp*|vx|vx-*)
1061 basic_machine=f301-fujitsu
1062 ;;
1063 vxworks960)
1064 basic_machine=i960-wrs
1065 os=-vxworks
1066 ;;
1067 vxworks68)
1068 basic_machine=m68k-wrs
1069 os=-vxworks
1070 ;;
1071 vxworks29k)
1072 basic_machine=a29k-wrs
1073 os=-vxworks
1074 ;;
1075 w65*)
1076 basic_machine=w65-wdc
1077 os=-none
1078 ;;
1079 w89k-*)
1080 basic_machine=hppa1.1-winbond
1081 os=-proelf
1082 ;;
1083 xbox)
1084 basic_machine=i686-pc
1085 os=-mingw32
1086 ;;
1087 xps | xps100)
1088 basic_machine=xps100-honeywell
1089 ;;
1090 ymp)
1091 basic_machine=ymp-cray
1092 os=-unicos
1093 ;;
1094 z8k-*-coff)
1095 basic_machine=z8k-unknown
1096 os=-sim
1097 ;;
1098 none)
1099 basic_machine=none-none
1100 os=-none
1101 ;;
1102
1103 # Here we handle the default manufacturer of certain CPU types. It is in
1104 # some cases the only manufacturer, in others, it is the most popular.
1105 w89k)
1106 basic_machine=hppa1.1-winbond
1107 ;;
1108 op50n)
1109 basic_machine=hppa1.1-oki
1110 ;;
1111 op60c)
1112 basic_machine=hppa1.1-oki
1113 ;;
1114 romp)
1115 basic_machine=romp-ibm
1116 ;;
1117 mmix)
1118 basic_machine=mmix-knuth
1119 ;;
1120 rs6000)
1121 basic_machine=rs6000-ibm
1122 ;;
1123 vax)
1124 basic_machine=vax-dec
1125 ;;
1126 pdp10)
1127 # there are many clones, so DEC is not a safe bet
1128 basic_machine=pdp10-unknown
1129 ;;
1130 pdp11)
1131 basic_machine=pdp11-dec
1132 ;;
1133 we32k)
1134 basic_machine=we32k-att
1135 ;;
1136 sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
1137 basic_machine=sh-unknown
1138 ;;
1139 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1140 basic_machine=sparc-sun
1141 ;;
1142 cydra)
1143 basic_machine=cydra-cydrome
1144 ;;
1145 orion)
1146 basic_machine=orion-highlevel
1147 ;;
1148 orion105)
1149 basic_machine=clipper-highlevel
1150 ;;
1151 mac | mpw | mac-mpw)
1152 basic_machine=m68k-apple
1153 ;;
1154 pmac | pmac-mpw)
1155 basic_machine=powerpc-apple
1156 ;;
1157 *-unknown)
1158 # Make sure to match an already-canonicalized machine name.
1159 ;;
1160 *)
1161 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1162 exit 1
1163 ;;
1164 esac
1165
1166 # Here we canonicalize certain aliases for manufacturers.
1167 case $basic_machine in
1168 *-digital*)
1169 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1170 ;;
1171 *-commodore*)
1172 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1173 ;;
1174 *)
1175 ;;
1176 esac
1177
1178 # Decode manufacturer-specific aliases for certain operating systems.
1179
1180 if [ x"$os" != x"" ]
1181 then
1182 case $os in
1183 # First match some system type aliases
1184 # that might get confused with valid system types.
1185 # -solaris* is a basic system type, with this one exception.
1186 -solaris1 | -solaris1.*)
1187 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1188 ;;
1189 -solaris)
1190 os=-solaris2
1191 ;;
1192 -svr4*)
1193 os=-sysv4
1194 ;;
1195 -unixware*)
1196 os=-sysv4.2uw
1197 ;;
1198 -gnu/linux*)
1199 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1200 ;;
1201 # First accept the basic system types.
1202 # The portable systems comes first.
1203 # Each alternative MUST END IN A *, to match a version number.
1204 # -sysv* is not here because it comes later, after sysvr4.
1205 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1206 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1207 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1208 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1209 | -aos* \
1210 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1211 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1212 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1213 | -openbsd* | -solidbsd* \
1214 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1215 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1216 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1217 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1218 | -chorusos* | -chorusrdb* \
1219 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1220 | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1221 | -uxpv* | -beos* | -mpeix* | -udk* \
1222 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1223 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1224 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1225 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1226 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1227 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1228 | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
1229 # Remember, each alternative MUST END IN *, to match a version number.
1230 ;;
1231 -qnx*)
1232 case $basic_machine in
1233 x86-* | i*86-*)
1234 ;;
1235 *)
1236 os=-nto$os
1237 ;;
1238 esac
1239 ;;
1240 -nto-qnx*)
1241 ;;
1242 -nto*)
1243 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1244 ;;
1245 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1246 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1247 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1248 ;;
1249 -mac*)
1250 os=`echo $os | sed -e 's|mac|macos|'`
1251 ;;
1252 -linux-dietlibc)
1253 os=-linux-dietlibc
1254 ;;
1255 -linux*)
1256 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1257 ;;
1258 -sunos5*)
1259 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1260 ;;
1261 -sunos6*)
1262 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1263 ;;
1264 -opened*)
1265 os=-openedition
1266 ;;
1267 -os400*)
1268 os=-os400
1269 ;;
1270 -wince*)
1271 os=-wince
1272 ;;
1273 -osfrose*)
1274 os=-osfrose
1275 ;;
1276 -osf*)
1277 os=-osf
1278 ;;
1279 -utek*)
1280 os=-bsd
1281 ;;
1282 -dynix*)
1283 os=-bsd
1284 ;;
1285 -acis*)
1286 os=-aos
1287 ;;
1288 -atheos*)
1289 os=-atheos
1290 ;;
1291 -syllable*)
1292 os=-syllable
1293 ;;
1294 -386bsd)
1295 os=-bsd
1296 ;;
1297 -ctix* | -uts*)
1298 os=-sysv
1299 ;;
1300 -nova*)
1301 os=-rtmk-nova
1302 ;;
1303 -ns2 )
1304 os=-nextstep2
1305 ;;
1306 -nsk*)
1307 os=-nsk
1308 ;;
1309 # Preserve the version number of sinix5.
1310 -sinix5.*)
1311 os=`echo $os | sed -e 's|sinix|sysv|'`
1312 ;;
1313 -sinix*)
1314 os=-sysv4
1315 ;;
1316 -tpf*)
1317 os=-tpf
1318 ;;
1319 -triton*)
1320 os=-sysv3
1321 ;;
1322 -oss*)
1323 os=-sysv3
1324 ;;
1325 -svr4)
1326 os=-sysv4
1327 ;;
1328 -svr3)
1329 os=-sysv3
1330 ;;
1331 -sysvr4)
1332 os=-sysv4
1333 ;;
1334 # This must come after -sysvr4.
1335 -sysv*)
1336 ;;
1337 -ose*)
1338 os=-ose
1339 ;;
1340 -es1800*)
1341 os=-ose
1342 ;;
1343 -xenix)
1344 os=-xenix
1345 ;;
1346 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1347 os=-mint
1348 ;;
1349 -aros*)
1350 os=-aros
1351 ;;
1352 -kaos*)
1353 os=-kaos
1354 ;;
1355 -zvmoe)
1356 os=-zvmoe
1357 ;;
1358 -none)
1359 ;;
1360 *)
1361 # Get rid of the `-' at the beginning of $os.
1362 os=`echo $os | sed 's/[^-]*-//'`
1363 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1364 exit 1
1365 ;;
1366 esac
1367 else
1368
1369 # Here we handle the default operating systems that come with various machines.
1370 # The value should be what the vendor currently ships out the door with their
1371 # machine or put another way, the most popular os provided with the machine.
1372
1373 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1374 # "-sun"), then you have to tell the case statement up towards the top
1375 # that MANUFACTURER isn't an operating system. Otherwise, code above
1376 # will signal an error saying that MANUFACTURER isn't an operating
1377 # system, and we'll never get to this point.
1378
1379 case $basic_machine in
1380 score-*)
1381 os=-elf
1382 ;;
1383 spu-*)
1384 os=-elf
1385 ;;
1386 *-acorn)
1387 os=-riscix1.2
1388 ;;
1389 arm*-rebel)
1390 os=-linux
1391 ;;
1392 arm*-semi)
1393 os=-aout
1394 ;;
1395 c4x-* | tic4x-*)
1396 os=-coff
1397 ;;
1398 # This must come before the *-dec entry.
1399 pdp10-*)
1400 os=-tops20
1401 ;;
1402 pdp11-*)
1403 os=-none
1404 ;;
1405 *-dec | vax-*)
1406 os=-ultrix4.2
1407 ;;
1408 m68*-apollo)
1409 os=-domain
1410 ;;
1411 i386-sun)
1412 os=-sunos4.0.2
1413 ;;
1414 m68000-sun)
1415 os=-sunos3
1416 # This also exists in the configure program, but was not the
1417 # default.
1418 # os=-sunos4
1419 ;;
1420 m68*-cisco)
1421 os=-aout
1422 ;;
1423 mep-*)
1424 os=-elf
1425 ;;
1426 mips*-cisco)
1427 os=-elf
1428 ;;
1429 mips*-*)
1430 os=-elf
1431 ;;
1432 or32-*)
1433 os=-coff
1434 ;;
1435 *-tti) # must be before sparc entry or we get the wrong os.
1436 os=-sysv3
1437 ;;
1438 sparc-* | *-sun)
1439 os=-sunos4.1.1
1440 ;;
1441 *-be)
1442 os=-beos
1443 ;;
1444 *-haiku)
1445 os=-haiku
1446 ;;
1447 *-ibm)
1448 os=-aix
1449 ;;
1450 *-knuth)
1451 os=-mmixware
1452 ;;
1453 *-wec)
1454 os=-proelf
1455 ;;
1456 *-winbond)
1457 os=-proelf
1458 ;;
1459 *-oki)
1460 os=-proelf
1461 ;;
1462 *-hp)
1463 os=-hpux
1464 ;;
1465 *-hitachi)
1466 os=-hiux
1467 ;;
1468 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1469 os=-sysv
1470 ;;
1471 *-cbm)
1472 os=-amigaos
1473 ;;
1474 *-dg)
1475 os=-dgux
1476 ;;
1477 *-dolphin)
1478 os=-sysv3
1479 ;;
1480 m68k-ccur)
1481 os=-rtu
1482 ;;
1483 m88k-omron*)
1484 os=-luna
1485 ;;
1486 *-next )
1487 os=-nextstep
1488 ;;
1489 *-sequent)
1490 os=-ptx
1491 ;;
1492 *-crds)
1493 os=-unos
1494 ;;
1495 *-ns)
1496 os=-genix
1497 ;;
1498 i370-*)
1499 os=-mvs
1500 ;;
1501 *-next)
1502 os=-nextstep3
1503 ;;
1504 *-gould)
1505 os=-sysv
1506 ;;
1507 *-highlevel)
1508 os=-bsd
1509 ;;
1510 *-encore)
1511 os=-bsd
1512 ;;
1513 *-sgi)
1514 os=-irix
1515 ;;
1516 *-siemens)
1517 os=-sysv4
1518 ;;
1519 *-masscomp)
1520 os=-rtu
1521 ;;
1522 f30[01]-fujitsu | f700-fujitsu)
1523 os=-uxpv
1524 ;;
1525 *-rom68k)
1526 os=-coff
1527 ;;
1528 *-*bug)
1529 os=-coff
1530 ;;
1531 *-apple)
1532 os=-macos
1533 ;;
1534 *-atari*)
1535 os=-mint
1536 ;;
1537 *)
1538 os=-none
1539 ;;
1540 esac
1541 fi
1542
1543 # Here we handle the case where we know the os, and the CPU type, but not the
1544 # manufacturer. We pick the logical manufacturer.
1545 vendor=unknown
1546 case $basic_machine in
1547 *-unknown)
1548 case $os in
1549 -riscix*)
1550 vendor=acorn
1551 ;;
1552 -sunos*)
1553 vendor=sun
1554 ;;
1555 -aix*)
1556 vendor=ibm
1557 ;;
1558 -beos*)
1559 vendor=be
1560 ;;
1561 -hpux*)
1562 vendor=hp
1563 ;;
1564 -mpeix*)
1565 vendor=hp
1566 ;;
1567 -hiux*)
1568 vendor=hitachi
1569 ;;
1570 -unos*)
1571 vendor=crds
1572 ;;
1573 -dgux*)
1574 vendor=dg
1575 ;;
1576 -luna*)
1577 vendor=omron
1578 ;;
1579 -genix*)
1580 vendor=ns
1581 ;;
1582 -mvs* | -opened*)
1583 vendor=ibm
1584 ;;
1585 -os400*)
1586 vendor=ibm
1587 ;;
1588 -ptx*)
1589 vendor=sequent
1590 ;;
1591 -tpf*)
1592 vendor=ibm
1593 ;;
1594 -vxsim* | -vxworks* | -windiss*)
1595 vendor=wrs
1596 ;;
1597 -aux*)
1598 vendor=apple
1599 ;;
1600 -hms*)
1601 vendor=hitachi
1602 ;;
1603 -mpw* | -macos*)
1604 vendor=apple
1605 ;;
1606 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1607 vendor=atari
1608 ;;
1609 -vos*)
1610 vendor=stratus
1611 ;;
1612 esac
1613 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1614 ;;
1615 esac
1616
1617 echo $basic_machine$os
1618 exit
1619
1620 # Local variables:
1621 # eval: (add-hook 'write-file-hooks 'time-stamp)
1622 # time-stamp-start: "timestamp='"
1623 # time-stamp-format: "%:y-%02m-%02d"
1624 # time-stamp-end: "'"
1625 # End:
+0
-21995
configure less more
0 #! /bin/sh
1 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.61 for ffmpeg2theora 0.21.
3 #
4 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
5 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
6 # This configure script is free software; the Free Software Foundation
7 # gives unlimited permission to copy, distribute and modify it.
8 ## --------------------- ##
9 ## M4sh Initialization. ##
10 ## --------------------- ##
11
12 # Be more Bourne compatible
13 DUALCASE=1; export DUALCASE # for MKS sh
14 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15 emulate sh
16 NULLCMD=:
17 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18 # is contrary to our usage. Disable this feature.
19 alias -g '${1+"$@"}'='"$@"'
20 setopt NO_GLOB_SUBST
21 else
22 case `(set -o) 2>/dev/null` in
23 *posix*) set -o posix ;;
24 esac
25
26 fi
27
28
29
30
31 # PATH needs CR
32 # Avoid depending upon Character Ranges.
33 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
34 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
35 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
36 as_cr_digits='0123456789'
37 as_cr_alnum=$as_cr_Letters$as_cr_digits
38
39 # The user is always right.
40 if test "${PATH_SEPARATOR+set}" != set; then
41 echo "#! /bin/sh" >conf$$.sh
42 echo "exit 0" >>conf$$.sh
43 chmod +x conf$$.sh
44 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
45 PATH_SEPARATOR=';'
46 else
47 PATH_SEPARATOR=:
48 fi
49 rm -f conf$$.sh
50 fi
51
52 # Support unset when possible.
53 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
54 as_unset=unset
55 else
56 as_unset=false
57 fi
58
59
60 # IFS
61 # We need space, tab and new line, in precisely that order. Quoting is
62 # there to prevent editors from complaining about space-tab.
63 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
64 # splitting by setting IFS to empty value.)
65 as_nl='
66 '
67 IFS=" "" $as_nl"
68
69 # Find who we are. Look in the path if we contain no directory separator.
70 case $0 in
71 *[\\/]* ) as_myself=$0 ;;
72 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
73 for as_dir in $PATH
74 do
75 IFS=$as_save_IFS
76 test -z "$as_dir" && as_dir=.
77 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
78 done
79 IFS=$as_save_IFS
80
81 ;;
82 esac
83 # We did not find ourselves, most probably we were run as `sh COMMAND'
84 # in which case we are not to be found in the path.
85 if test "x$as_myself" = x; then
86 as_myself=$0
87 fi
88 if test ! -f "$as_myself"; then
89 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
90 { (exit 1); exit 1; }
91 fi
92
93 # Work around bugs in pre-3.0 UWIN ksh.
94 for as_var in ENV MAIL MAILPATH
95 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
96 done
97 PS1='$ '
98 PS2='> '
99 PS4='+ '
100
101 # NLS nuisances.
102 for as_var in \
103 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
104 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
105 LC_TELEPHONE LC_TIME
106 do
107 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
108 eval $as_var=C; export $as_var
109 else
110 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
111 fi
112 done
113
114 # Required to use basename.
115 if expr a : '\(a\)' >/dev/null 2>&1 &&
116 test "X`expr 00001 : '.*\(...\)'`" = X001; then
117 as_expr=expr
118 else
119 as_expr=false
120 fi
121
122 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
123 as_basename=basename
124 else
125 as_basename=false
126 fi
127
128
129 # Name of the executable.
130 as_me=`$as_basename -- "$0" ||
131 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
132 X"$0" : 'X\(//\)$' \| \
133 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
134 echo X/"$0" |
135 sed '/^.*\/\([^/][^/]*\)\/*$/{
136 s//\1/
137 q
138 }
139 /^X\/\(\/\/\)$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\).*/{
144 s//\1/
145 q
146 }
147 s/.*/./; q'`
148
149 # CDPATH.
150 $as_unset CDPATH
151
152
153 if test "x$CONFIG_SHELL" = x; then
154 if (eval ":") 2>/dev/null; then
155 as_have_required=yes
156 else
157 as_have_required=no
158 fi
159
160 if test $as_have_required = yes && (eval ":
161 (as_func_return () {
162 (exit \$1)
163 }
164 as_func_success () {
165 as_func_return 0
166 }
167 as_func_failure () {
168 as_func_return 1
169 }
170 as_func_ret_success () {
171 return 0
172 }
173 as_func_ret_failure () {
174 return 1
175 }
176
177 exitcode=0
178 if as_func_success; then
179 :
180 else
181 exitcode=1
182 echo as_func_success failed.
183 fi
184
185 if as_func_failure; then
186 exitcode=1
187 echo as_func_failure succeeded.
188 fi
189
190 if as_func_ret_success; then
191 :
192 else
193 exitcode=1
194 echo as_func_ret_success failed.
195 fi
196
197 if as_func_ret_failure; then
198 exitcode=1
199 echo as_func_ret_failure succeeded.
200 fi
201
202 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
203 :
204 else
205 exitcode=1
206 echo positional parameters were not saved.
207 fi
208
209 test \$exitcode = 0) || { (exit 1); exit 1; }
210
211 (
212 as_lineno_1=\$LINENO
213 as_lineno_2=\$LINENO
214 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
215 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
216 ") 2> /dev/null; then
217 :
218 else
219 as_candidate_shells=
220 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
221 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
222 do
223 IFS=$as_save_IFS
224 test -z "$as_dir" && as_dir=.
225 case $as_dir in
226 /*)
227 for as_base in sh bash ksh sh5; do
228 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
229 done;;
230 esac
231 done
232 IFS=$as_save_IFS
233
234
235 for as_shell in $as_candidate_shells $SHELL; do
236 # Try only shells that exist, to save several forks.
237 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
238 { ("$as_shell") 2> /dev/null <<\_ASEOF
239 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
240 emulate sh
241 NULLCMD=:
242 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
243 # is contrary to our usage. Disable this feature.
244 alias -g '${1+"$@"}'='"$@"'
245 setopt NO_GLOB_SUBST
246 else
247 case `(set -o) 2>/dev/null` in
248 *posix*) set -o posix ;;
249 esac
250
251 fi
252
253
254 :
255 _ASEOF
256 }; then
257 CONFIG_SHELL=$as_shell
258 as_have_required=yes
259 if { "$as_shell" 2> /dev/null <<\_ASEOF
260 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
261 emulate sh
262 NULLCMD=:
263 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
264 # is contrary to our usage. Disable this feature.
265 alias -g '${1+"$@"}'='"$@"'
266 setopt NO_GLOB_SUBST
267 else
268 case `(set -o) 2>/dev/null` in
269 *posix*) set -o posix ;;
270 esac
271
272 fi
273
274
275 :
276 (as_func_return () {
277 (exit $1)
278 }
279 as_func_success () {
280 as_func_return 0
281 }
282 as_func_failure () {
283 as_func_return 1
284 }
285 as_func_ret_success () {
286 return 0
287 }
288 as_func_ret_failure () {
289 return 1
290 }
291
292 exitcode=0
293 if as_func_success; then
294 :
295 else
296 exitcode=1
297 echo as_func_success failed.
298 fi
299
300 if as_func_failure; then
301 exitcode=1
302 echo as_func_failure succeeded.
303 fi
304
305 if as_func_ret_success; then
306 :
307 else
308 exitcode=1
309 echo as_func_ret_success failed.
310 fi
311
312 if as_func_ret_failure; then
313 exitcode=1
314 echo as_func_ret_failure succeeded.
315 fi
316
317 if ( set x; as_func_ret_success y && test x = "$1" ); then
318 :
319 else
320 exitcode=1
321 echo positional parameters were not saved.
322 fi
323
324 test $exitcode = 0) || { (exit 1); exit 1; }
325
326 (
327 as_lineno_1=$LINENO
328 as_lineno_2=$LINENO
329 test "x$as_lineno_1" != "x$as_lineno_2" &&
330 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
331
332 _ASEOF
333 }; then
334 break
335 fi
336
337 fi
338
339 done
340
341 if test "x$CONFIG_SHELL" != x; then
342 for as_var in BASH_ENV ENV
343 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
344 done
345 export CONFIG_SHELL
346 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
347 fi
348
349
350 if test $as_have_required = no; then
351 echo This script requires a shell more modern than all the
352 echo shells that I found on your system. Please install a
353 echo modern shell, or manually run the script under such a
354 echo shell if you do have one.
355 { (exit 1); exit 1; }
356 fi
357
358
359 fi
360
361 fi
362
363
364
365 (eval "as_func_return () {
366 (exit \$1)
367 }
368 as_func_success () {
369 as_func_return 0
370 }
371 as_func_failure () {
372 as_func_return 1
373 }
374 as_func_ret_success () {
375 return 0
376 }
377 as_func_ret_failure () {
378 return 1
379 }
380
381 exitcode=0
382 if as_func_success; then
383 :
384 else
385 exitcode=1
386 echo as_func_success failed.
387 fi
388
389 if as_func_failure; then
390 exitcode=1
391 echo as_func_failure succeeded.
392 fi
393
394 if as_func_ret_success; then
395 :
396 else
397 exitcode=1
398 echo as_func_ret_success failed.
399 fi
400
401 if as_func_ret_failure; then
402 exitcode=1
403 echo as_func_ret_failure succeeded.
404 fi
405
406 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
407 :
408 else
409 exitcode=1
410 echo positional parameters were not saved.
411 fi
412
413 test \$exitcode = 0") || {
414 echo No shell found that supports shell functions.
415 echo Please tell autoconf@gnu.org about your system,
416 echo including any error possibly output before this
417 echo message
418 }
419
420
421
422 as_lineno_1=$LINENO
423 as_lineno_2=$LINENO
424 test "x$as_lineno_1" != "x$as_lineno_2" &&
425 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
426
427 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
428 # uniformly replaced by the line number. The first 'sed' inserts a
429 # line-number line after each line using $LINENO; the second 'sed'
430 # does the real work. The second script uses 'N' to pair each
431 # line-number line with the line containing $LINENO, and appends
432 # trailing '-' during substitution so that $LINENO is not a special
433 # case at line end.
434 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
435 # scripts with optimization help from Paolo Bonzini. Blame Lee
436 # E. McMahon (1931-1989) for sed's syntax. :-)
437 sed -n '
438 p
439 /[$]LINENO/=
440 ' <$as_myself |
441 sed '
442 s/[$]LINENO.*/&-/
443 t lineno
444 b
445 :lineno
446 N
447 :loop
448 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
449 t loop
450 s/-\n.*//
451 ' >$as_me.lineno &&
452 chmod +x "$as_me.lineno" ||
453 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
454 { (exit 1); exit 1; }; }
455
456 # Don't try to exec as it changes $[0], causing all sort of problems
457 # (the dirname of $[0] is not the place where we might find the
458 # original and so on. Autoconf is especially sensitive to this).
459 . "./$as_me.lineno"
460 # Exit status is that of the last command.
461 exit
462 }
463
464
465 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
466 as_dirname=dirname
467 else
468 as_dirname=false
469 fi
470
471 ECHO_C= ECHO_N= ECHO_T=
472 case `echo -n x` in
473 -n*)
474 case `echo 'x\c'` in
475 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
476 *) ECHO_C='\c';;
477 esac;;
478 *)
479 ECHO_N='-n';;
480 esac
481
482 if expr a : '\(a\)' >/dev/null 2>&1 &&
483 test "X`expr 00001 : '.*\(...\)'`" = X001; then
484 as_expr=expr
485 else
486 as_expr=false
487 fi
488
489 rm -f conf$$ conf$$.exe conf$$.file
490 if test -d conf$$.dir; then
491 rm -f conf$$.dir/conf$$.file
492 else
493 rm -f conf$$.dir
494 mkdir conf$$.dir
495 fi
496 echo >conf$$.file
497 if ln -s conf$$.file conf$$ 2>/dev/null; then
498 as_ln_s='ln -s'
499 # ... but there are two gotchas:
500 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
501 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
502 # In both cases, we have to default to `cp -p'.
503 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
504 as_ln_s='cp -p'
505 elif ln conf$$.file conf$$ 2>/dev/null; then
506 as_ln_s=ln
507 else
508 as_ln_s='cp -p'
509 fi
510 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
511 rmdir conf$$.dir 2>/dev/null
512
513 if mkdir -p . 2>/dev/null; then
514 as_mkdir_p=:
515 else
516 test -d ./-p && rmdir ./-p
517 as_mkdir_p=false
518 fi
519
520 if test -x / >/dev/null 2>&1; then
521 as_test_x='test -x'
522 else
523 if ls -dL / >/dev/null 2>&1; then
524 as_ls_L_option=L
525 else
526 as_ls_L_option=
527 fi
528 as_test_x='
529 eval sh -c '\''
530 if test -d "$1"; then
531 test -d "$1/.";
532 else
533 case $1 in
534 -*)set "./$1";;
535 esac;
536 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
537 ???[sx]*):;;*)false;;esac;fi
538 '\'' sh
539 '
540 fi
541 as_executable_p=$as_test_x
542
543 # Sed expression to map a string onto a valid CPP name.
544 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
545
546 # Sed expression to map a string onto a valid variable name.
547 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
548
549
550
551
552 # Check that we are running under the correct shell.
553 SHELL=${CONFIG_SHELL-/bin/sh}
554
555 case X$ECHO in
556 X*--fallback-echo)
557 # Remove one level of quotation (which was required for Make).
558 ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
559 ;;
560 esac
561
562 echo=${ECHO-echo}
563 if test "X$1" = X--no-reexec; then
564 # Discard the --no-reexec flag, and continue.
565 shift
566 elif test "X$1" = X--fallback-echo; then
567 # Avoid inline document here, it may be left over
568 :
569 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
570 # Yippee, $echo works!
571 :
572 else
573 # Restart under the correct shell.
574 exec $SHELL "$0" --no-reexec ${1+"$@"}
575 fi
576
577 if test "X$1" = X--fallback-echo; then
578 # used as fallback echo
579 shift
580 cat <<EOF
581 $*
582 EOF
583 exit 0
584 fi
585
586 # The HP-UX ksh and POSIX shell print the target directory to stdout
587 # if CDPATH is set.
588 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
589
590 if test -z "$ECHO"; then
591 if test "X${echo_test_string+set}" != Xset; then
592 # find a string as large as possible, as long as the shell can cope with it
593 for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
594 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
595 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
596 echo_test_string=`eval $cmd` &&
597 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
598 then
599 break
600 fi
601 done
602 fi
603
604 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
605 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
606 test "X$echo_testing_string" = "X$echo_test_string"; then
607 :
608 else
609 # The Solaris, AIX, and Digital Unix default echo programs unquote
610 # backslashes. This makes it impossible to quote backslashes using
611 # echo "$something" | sed 's/\\/\\\\/g'
612 #
613 # So, first we look for a working echo in the user's PATH.
614
615 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
616 for dir in $PATH /usr/ucb; do
617 IFS="$lt_save_ifs"
618 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
619 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
620 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
621 test "X$echo_testing_string" = "X$echo_test_string"; then
622 echo="$dir/echo"
623 break
624 fi
625 done
626 IFS="$lt_save_ifs"
627
628 if test "X$echo" = Xecho; then
629 # We didn't find a better echo, so look for alternatives.
630 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
631 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
632 test "X$echo_testing_string" = "X$echo_test_string"; then
633 # This shell has a builtin print -r that does the trick.
634 echo='print -r'
635 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
636 test "X$CONFIG_SHELL" != X/bin/ksh; then
637 # If we have ksh, try running configure again with it.
638 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
639 export ORIGINAL_CONFIG_SHELL
640 CONFIG_SHELL=/bin/ksh
641 export CONFIG_SHELL
642 exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
643 else
644 # Try using printf.
645 echo='printf %s\n'
646 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
647 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
648 test "X$echo_testing_string" = "X$echo_test_string"; then
649 # Cool, printf works
650 :
651 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
652 test "X$echo_testing_string" = 'X\t' &&
653 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
654 test "X$echo_testing_string" = "X$echo_test_string"; then
655 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
656 export CONFIG_SHELL
657 SHELL="$CONFIG_SHELL"
658 export SHELL
659 echo="$CONFIG_SHELL $0 --fallback-echo"
660 elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
661 test "X$echo_testing_string" = 'X\t' &&
662 echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
663 test "X$echo_testing_string" = "X$echo_test_string"; then
664 echo="$CONFIG_SHELL $0 --fallback-echo"
665 else
666 # maybe with a smaller string...
667 prev=:
668
669 for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
670 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
671 then
672 break
673 fi
674 prev="$cmd"
675 done
676
677 if test "$prev" != 'sed 50q "$0"'; then
678 echo_test_string=`eval $prev`
679 export echo_test_string
680 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
681 else
682 # Oops. We lost completely, so just stick with echo.
683 echo=echo
684 fi
685 fi
686 fi
687 fi
688 fi
689 fi
690
691 # Copy echo and quote the copy suitably for passing to libtool from
692 # the Makefile, instead of quoting the original, which is used later.
693 ECHO=$echo
694 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
695 ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
696 fi
697
698
699
700
701 tagnames=${tagnames+${tagnames},}CXX
702
703 tagnames=${tagnames+${tagnames},}F77
704
705 exec 7<&0 </dev/null 6>&1
706
707 # Name of the host.
708 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
709 # so uname gets run too.
710 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
711
712 #
713 # Initializations.
714 #
715 ac_default_prefix=/usr/local
716 ac_clean_files=
717 ac_config_libobj_dir=.
718 LIBOBJS=
719 cross_compiling=no
720 subdirs=
721 MFLAGS=
722 MAKEFLAGS=
723 SHELL=${CONFIG_SHELL-/bin/sh}
724
725 # Identity of this package.
726 PACKAGE_NAME='ffmpeg2theora'
727 PACKAGE_TARNAME='ffmpeg2theora'
728 PACKAGE_VERSION='0.21'
729 PACKAGE_STRING='ffmpeg2theora 0.21'
730 PACKAGE_BUGREPORT=''
731
732 ac_unique_file="Makefile.am"
733 # Factoring default headers for most tests.
734 ac_includes_default="\
735 #include <stdio.h>
736 #ifdef HAVE_SYS_TYPES_H
737 # include <sys/types.h>
738 #endif
739 #ifdef HAVE_SYS_STAT_H
740 # include <sys/stat.h>
741 #endif
742 #ifdef STDC_HEADERS
743 # include <stdlib.h>
744 # include <stddef.h>
745 #else
746 # ifdef HAVE_STDLIB_H
747 # include <stdlib.h>
748 # endif
749 #endif
750 #ifdef HAVE_STRING_H
751 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
752 # include <memory.h>
753 # endif
754 # include <string.h>
755 #endif
756 #ifdef HAVE_STRINGS_H
757 # include <strings.h>
758 #endif
759 #ifdef HAVE_INTTYPES_H
760 # include <inttypes.h>
761 #endif
762 #ifdef HAVE_STDINT_H
763 # include <stdint.h>
764 #endif
765 #ifdef HAVE_UNISTD_H
766 # include <unistd.h>
767 #endif"
768
769 ac_subst_vars='SHELL
770 PATH_SEPARATOR
771 PACKAGE_NAME
772 PACKAGE_TARNAME
773 PACKAGE_VERSION
774 PACKAGE_STRING
775 PACKAGE_BUGREPORT
776 exec_prefix
777 prefix
778 program_transform_name
779 bindir
780 sbindir
781 libexecdir
782 datarootdir
783 datadir
784 sysconfdir
785 sharedstatedir
786 localstatedir
787 includedir
788 oldincludedir
789 docdir
790 infodir
791 htmldir
792 dvidir
793 pdfdir
794 psdir
795 libdir
796 localedir
797 mandir
798 DEFS
799 ECHO_C
800 ECHO_N
801 ECHO_T
802 LIBS
803 build_alias
804 host_alias
805 target_alias
806 INSTALL_PROGRAM
807 INSTALL_SCRIPT
808 INSTALL_DATA
809 am__isrc
810 CYGPATH_W
811 PACKAGE
812 VERSION
813 ACLOCAL
814 AUTOCONF
815 AUTOMAKE
816 AUTOHEADER
817 MAKEINFO
818 install_sh
819 STRIP
820 INSTALL_STRIP_PROGRAM
821 mkdir_p
822 AWK
823 SET_MAKE
824 am__leading_dot
825 AMTAR
826 am__tar
827 am__untar
828 CC
829 CFLAGS
830 LDFLAGS
831 CPPFLAGS
832 ac_ct_CC
833 EXEEXT
834 OBJEXT
835 DEPDIR
836 am__include
837 am__quote
838 AMDEP_TRUE
839 AMDEP_FALSE
840 AMDEPBACKSLASH
841 CCDEPMODE
842 am__fastdepCC_TRUE
843 am__fastdepCC_FALSE
844 build
845 build_cpu
846 build_vendor
847 build_os
848 host
849 host_cpu
850 host_vendor
851 host_os
852 SED
853 GREP
854 EGREP
855 LN_S
856 ECHO
857 AR
858 RANLIB
859 DSYMUTIL
860 NMEDIT
861 CPP
862 CXX
863 CXXFLAGS
864 ac_ct_CXX
865 CXXDEPMODE
866 am__fastdepCXX_TRUE
867 am__fastdepCXX_FALSE
868 CXXCPP
869 F77
870 FFLAGS
871 ac_ct_F77
872 LIBTOOL
873 PKG_CONFIG
874 XIPH_CFLAGS
875 XIPH_LIBS
876 KATE_CFLAGS
877 KATE_LIBS
878 FFMPEG_CFLAGS
879 FFMPEG_LIBS
880 LIBOBJS
881 LTLIBOBJS'
882 ac_subst_files=''
883 ac_precious_vars='build_alias
884 host_alias
885 target_alias
886 CC
887 CFLAGS
888 LDFLAGS
889 LIBS
890 CPPFLAGS
891 CPP
892 CXX
893 CXXFLAGS
894 CCC
895 CXXCPP
896 F77
897 FFLAGS
898 PKG_CONFIG
899 XIPH_CFLAGS
900 XIPH_LIBS
901 KATE_CFLAGS
902 KATE_LIBS
903 FFMPEG_CFLAGS
904 FFMPEG_LIBS'
905
906
907 # Initialize some variables set by options.
908 ac_init_help=
909 ac_init_version=false
910 # The variables have the same names as the options, with
911 # dashes changed to underlines.
912 cache_file=/dev/null
913 exec_prefix=NONE
914 no_create=
915 no_recursion=
916 prefix=NONE
917 program_prefix=NONE
918 program_suffix=NONE
919 program_transform_name=s,x,x,
920 silent=
921 site=
922 srcdir=
923 verbose=
924 x_includes=NONE
925 x_libraries=NONE
926
927 # Installation directory options.
928 # These are left unexpanded so users can "make install exec_prefix=/foo"
929 # and all the variables that are supposed to be based on exec_prefix
930 # by default will actually change.
931 # Use braces instead of parens because sh, perl, etc. also accept them.
932 # (The list follows the same order as the GNU Coding Standards.)
933 bindir='${exec_prefix}/bin'
934 sbindir='${exec_prefix}/sbin'
935 libexecdir='${exec_prefix}/libexec'
936 datarootdir='${prefix}/share'
937 datadir='${datarootdir}'
938 sysconfdir='${prefix}/etc'
939 sharedstatedir='${prefix}/com'
940 localstatedir='${prefix}/var'
941 includedir='${prefix}/include'
942 oldincludedir='/usr/include'
943 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
944 infodir='${datarootdir}/info'
945 htmldir='${docdir}'
946 dvidir='${docdir}'
947 pdfdir='${docdir}'
948 psdir='${docdir}'
949 libdir='${exec_prefix}/lib'
950 localedir='${datarootdir}/locale'
951 mandir='${datarootdir}/man'
952
953 ac_prev=
954 ac_dashdash=
955 for ac_option
956 do
957 # If the previous option needs an argument, assign it.
958 if test -n "$ac_prev"; then
959 eval $ac_prev=\$ac_option
960 ac_prev=
961 continue
962 fi
963
964 case $ac_option in
965 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
966 *) ac_optarg=yes ;;
967 esac
968
969 # Accept the important Cygnus configure options, so we can diagnose typos.
970
971 case $ac_dashdash$ac_option in
972 --)
973 ac_dashdash=yes ;;
974
975 -bindir | --bindir | --bindi | --bind | --bin | --bi)
976 ac_prev=bindir ;;
977 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
978 bindir=$ac_optarg ;;
979
980 -build | --build | --buil | --bui | --bu)
981 ac_prev=build_alias ;;
982 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
983 build_alias=$ac_optarg ;;
984
985 -cache-file | --cache-file | --cache-fil | --cache-fi \
986 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
987 ac_prev=cache_file ;;
988 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
989 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
990 cache_file=$ac_optarg ;;
991
992 --config-cache | -C)
993 cache_file=config.cache ;;
994
995 -datadir | --datadir | --datadi | --datad)
996 ac_prev=datadir ;;
997 -datadir=* | --datadir=* | --datadi=* | --datad=*)
998 datadir=$ac_optarg ;;
999
1000 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1001 | --dataroo | --dataro | --datar)
1002 ac_prev=datarootdir ;;
1003 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1004 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1005 datarootdir=$ac_optarg ;;
1006
1007 -disable-* | --disable-*)
1008 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1009 # Reject names that are not valid shell variable names.
1010 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1011 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
1012 { (exit 1); exit 1; }; }
1013 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
1014 eval enable_$ac_feature=no ;;
1015
1016 -docdir | --docdir | --docdi | --doc | --do)
1017 ac_prev=docdir ;;
1018 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1019 docdir=$ac_optarg ;;
1020
1021 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1022 ac_prev=dvidir ;;
1023 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1024 dvidir=$ac_optarg ;;
1025
1026 -enable-* | --enable-*)
1027 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1028 # Reject names that are not valid shell variable names.
1029 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1030 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
1031 { (exit 1); exit 1; }; }
1032 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
1033 eval enable_$ac_feature=\$ac_optarg ;;
1034
1035 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1036 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1037 | --exec | --exe | --ex)
1038 ac_prev=exec_prefix ;;
1039 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1040 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1041 | --exec=* | --exe=* | --ex=*)
1042 exec_prefix=$ac_optarg ;;
1043
1044 -gas | --gas | --ga | --g)
1045 # Obsolete; use --with-gas.
1046 with_gas=yes ;;
1047
1048 -help | --help | --hel | --he | -h)
1049 ac_init_help=long ;;
1050 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1051 ac_init_help=recursive ;;
1052 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1053 ac_init_help=short ;;
1054
1055 -host | --host | --hos | --ho)
1056 ac_prev=host_alias ;;
1057 -host=* | --host=* | --hos=* | --ho=*)
1058 host_alias=$ac_optarg ;;
1059
1060 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1061 ac_prev=htmldir ;;
1062 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1063 | --ht=*)
1064 htmldir=$ac_optarg ;;
1065
1066 -includedir | --includedir | --includedi | --included | --include \
1067 | --includ | --inclu | --incl | --inc)
1068 ac_prev=includedir ;;
1069 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1070 | --includ=* | --inclu=* | --incl=* | --inc=*)
1071 includedir=$ac_optarg ;;
1072
1073 -infodir | --infodir | --infodi | --infod | --info | --inf)
1074 ac_prev=infodir ;;
1075 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1076 infodir=$ac_optarg ;;
1077
1078 -libdir | --libdir | --libdi | --libd)
1079 ac_prev=libdir ;;
1080 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1081 libdir=$ac_optarg ;;
1082
1083 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1084 | --libexe | --libex | --libe)
1085 ac_prev=libexecdir ;;
1086 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1087 | --libexe=* | --libex=* | --libe=*)
1088 libexecdir=$ac_optarg ;;
1089
1090 -localedir | --localedir | --localedi | --localed | --locale)
1091 ac_prev=localedir ;;
1092 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1093 localedir=$ac_optarg ;;
1094
1095 -localstatedir | --localstatedir | --localstatedi | --localstated \
1096 | --localstate | --localstat | --localsta | --localst | --locals)
1097 ac_prev=localstatedir ;;
1098 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1099 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1100 localstatedir=$ac_optarg ;;
1101
1102 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1103 ac_prev=mandir ;;
1104 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1105 mandir=$ac_optarg ;;
1106
1107 -nfp | --nfp | --nf)
1108 # Obsolete; use --without-fp.
1109 with_fp=no ;;
1110
1111 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1112 | --no-cr | --no-c | -n)
1113 no_create=yes ;;
1114
1115 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1116 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1117 no_recursion=yes ;;
1118
1119 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1120 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1121 | --oldin | --oldi | --old | --ol | --o)
1122 ac_prev=oldincludedir ;;
1123 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1124 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1125 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1126 oldincludedir=$ac_optarg ;;
1127
1128 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1129 ac_prev=prefix ;;
1130 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1131 prefix=$ac_optarg ;;
1132
1133 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1134 | --program-pre | --program-pr | --program-p)
1135 ac_prev=program_prefix ;;
1136 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1137 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1138 program_prefix=$ac_optarg ;;
1139
1140 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1141 | --program-suf | --program-su | --program-s)
1142 ac_prev=program_suffix ;;
1143 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1144 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1145 program_suffix=$ac_optarg ;;
1146
1147 -program-transform-name | --program-transform-name \
1148 | --program-transform-nam | --program-transform-na \
1149 | --program-transform-n | --program-transform- \
1150 | --program-transform | --program-transfor \
1151 | --program-transfo | --program-transf \
1152 | --program-trans | --program-tran \
1153 | --progr-tra | --program-tr | --program-t)
1154 ac_prev=program_transform_name ;;
1155 -program-transform-name=* | --program-transform-name=* \
1156 | --program-transform-nam=* | --program-transform-na=* \
1157 | --program-transform-n=* | --program-transform-=* \
1158 | --program-transform=* | --program-transfor=* \
1159 | --program-transfo=* | --program-transf=* \
1160 | --program-trans=* | --program-tran=* \
1161 | --progr-tra=* | --program-tr=* | --program-t=*)
1162 program_transform_name=$ac_optarg ;;
1163
1164 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1165 ac_prev=pdfdir ;;
1166 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1167 pdfdir=$ac_optarg ;;
1168
1169 -psdir | --psdir | --psdi | --psd | --ps)
1170 ac_prev=psdir ;;
1171 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1172 psdir=$ac_optarg ;;
1173
1174 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1175 | -silent | --silent | --silen | --sile | --sil)
1176 silent=yes ;;
1177
1178 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1179 ac_prev=sbindir ;;
1180 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1181 | --sbi=* | --sb=*)
1182 sbindir=$ac_optarg ;;
1183
1184 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1185 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1186 | --sharedst | --shareds | --shared | --share | --shar \
1187 | --sha | --sh)
1188 ac_prev=sharedstatedir ;;
1189 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1190 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1191 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1192 | --sha=* | --sh=*)
1193 sharedstatedir=$ac_optarg ;;
1194
1195 -site | --site | --sit)
1196 ac_prev=site ;;
1197 -site=* | --site=* | --sit=*)
1198 site=$ac_optarg ;;
1199
1200 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1201 ac_prev=srcdir ;;
1202 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1203 srcdir=$ac_optarg ;;
1204
1205 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1206 | --syscon | --sysco | --sysc | --sys | --sy)
1207 ac_prev=sysconfdir ;;
1208 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1209 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1210 sysconfdir=$ac_optarg ;;
1211
1212 -target | --target | --targe | --targ | --tar | --ta | --t)
1213 ac_prev=target_alias ;;
1214 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1215 target_alias=$ac_optarg ;;
1216
1217 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1218 verbose=yes ;;
1219
1220 -version | --version | --versio | --versi | --vers | -V)
1221 ac_init_version=: ;;
1222
1223 -with-* | --with-*)
1224 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1225 # Reject names that are not valid shell variable names.
1226 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1227 { echo "$as_me: error: invalid package name: $ac_package" >&2
1228 { (exit 1); exit 1; }; }
1229 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1230 eval with_$ac_package=\$ac_optarg ;;
1231
1232 -without-* | --without-*)
1233 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1234 # Reject names that are not valid shell variable names.
1235 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1236 { echo "$as_me: error: invalid package name: $ac_package" >&2
1237 { (exit 1); exit 1; }; }
1238 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1239 eval with_$ac_package=no ;;
1240
1241 --x)
1242 # Obsolete; use --with-x.
1243 with_x=yes ;;
1244
1245 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1246 | --x-incl | --x-inc | --x-in | --x-i)
1247 ac_prev=x_includes ;;
1248 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1249 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1250 x_includes=$ac_optarg ;;
1251
1252 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1253 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1254 ac_prev=x_libraries ;;
1255 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1256 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1257 x_libraries=$ac_optarg ;;
1258
1259 -*) { echo "$as_me: error: unrecognized option: $ac_option
1260 Try \`$0 --help' for more information." >&2
1261 { (exit 1); exit 1; }; }
1262 ;;
1263
1264 *=*)
1265 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1266 # Reject names that are not valid shell variable names.
1267 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1268 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1269 { (exit 1); exit 1; }; }
1270 eval $ac_envvar=\$ac_optarg
1271 export $ac_envvar ;;
1272
1273 *)
1274 # FIXME: should be removed in autoconf 3.0.
1275 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1276 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1277 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1278 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1279 ;;
1280
1281 esac
1282 done
1283
1284 if test -n "$ac_prev"; then
1285 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1286 { echo "$as_me: error: missing argument to $ac_option" >&2
1287 { (exit 1); exit 1; }; }
1288 fi
1289
1290 # Be sure to have absolute directory names.
1291 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1292 datadir sysconfdir sharedstatedir localstatedir includedir \
1293 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1294 libdir localedir mandir
1295 do
1296 eval ac_val=\$$ac_var
1297 case $ac_val in
1298 [\\/$]* | ?:[\\/]* ) continue;;
1299 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1300 esac
1301 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1302 { (exit 1); exit 1; }; }
1303 done
1304
1305 # There might be people who depend on the old broken behavior: `$host'
1306 # used to hold the argument of --host etc.
1307 # FIXME: To remove some day.
1308 build=$build_alias
1309 host=$host_alias
1310 target=$target_alias
1311
1312 # FIXME: To remove some day.
1313 if test "x$host_alias" != x; then
1314 if test "x$build_alias" = x; then
1315 cross_compiling=maybe
1316 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1317 If a cross compiler is detected then cross compile mode will be used." >&2
1318 elif test "x$build_alias" != "x$host_alias"; then
1319 cross_compiling=yes
1320 fi
1321 fi
1322
1323 ac_tool_prefix=
1324 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1325
1326 test "$silent" = yes && exec 6>/dev/null
1327
1328
1329 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1330 ac_ls_di=`ls -di .` &&
1331 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1332 { echo "$as_me: error: Working directory cannot be determined" >&2
1333 { (exit 1); exit 1; }; }
1334 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1335 { echo "$as_me: error: pwd does not report name of working directory" >&2
1336 { (exit 1); exit 1; }; }
1337
1338
1339 # Find the source files, if location was not specified.
1340 if test -z "$srcdir"; then
1341 ac_srcdir_defaulted=yes
1342 # Try the directory containing this script, then the parent directory.
1343 ac_confdir=`$as_dirname -- "$0" ||
1344 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1345 X"$0" : 'X\(//\)[^/]' \| \
1346 X"$0" : 'X\(//\)$' \| \
1347 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1348 echo X"$0" |
1349 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1350 s//\1/
1351 q
1352 }
1353 /^X\(\/\/\)[^/].*/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\/\)$/{
1358 s//\1/
1359 q
1360 }
1361 /^X\(\/\).*/{
1362 s//\1/
1363 q
1364 }
1365 s/.*/./; q'`
1366 srcdir=$ac_confdir
1367 if test ! -r "$srcdir/$ac_unique_file"; then
1368 srcdir=..
1369 fi
1370 else
1371 ac_srcdir_defaulted=no
1372 fi
1373 if test ! -r "$srcdir/$ac_unique_file"; then
1374 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1375 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1376 { (exit 1); exit 1; }; }
1377 fi
1378 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1379 ac_abs_confdir=`(
1380 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1381 { (exit 1); exit 1; }; }
1382 pwd)`
1383 # When building in place, set srcdir=.
1384 if test "$ac_abs_confdir" = "$ac_pwd"; then
1385 srcdir=.
1386 fi
1387 # Remove unnecessary trailing slashes from srcdir.
1388 # Double slashes in file names in object file debugging info
1389 # mess up M-x gdb in Emacs.
1390 case $srcdir in
1391 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1392 esac
1393 for ac_var in $ac_precious_vars; do
1394 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1395 eval ac_env_${ac_var}_value=\$${ac_var}
1396 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1397 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1398 done
1399
1400 #
1401 # Report the --help message.
1402 #
1403 if test "$ac_init_help" = "long"; then
1404 # Omit some internal or obsolete options to make the list less imposing.
1405 # This message is too long to be a string in the A/UX 3.1 sh.
1406 cat <<_ACEOF
1407 \`configure' configures ffmpeg2theora 0.21 to adapt to many kinds of systems.
1408
1409 Usage: $0 [OPTION]... [VAR=VALUE]...
1410
1411 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1412 VAR=VALUE. See below for descriptions of some of the useful variables.
1413
1414 Defaults for the options are specified in brackets.
1415
1416 Configuration:
1417 -h, --help display this help and exit
1418 --help=short display options specific to this package
1419 --help=recursive display the short help of all the included packages
1420 -V, --version display version information and exit
1421 -q, --quiet, --silent do not print \`checking...' messages
1422 --cache-file=FILE cache test results in FILE [disabled]
1423 -C, --config-cache alias for \`--cache-file=config.cache'
1424 -n, --no-create do not create output files
1425 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1426
1427 Installation directories:
1428 --prefix=PREFIX install architecture-independent files in PREFIX
1429 [$ac_default_prefix]
1430 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1431 [PREFIX]
1432
1433 By default, \`make install' will install all the files in
1434 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1435 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1436 for instance \`--prefix=\$HOME'.
1437
1438 For better control, use the options below.
1439
1440 Fine tuning of the installation directories:
1441 --bindir=DIR user executables [EPREFIX/bin]
1442 --sbindir=DIR system admin executables [EPREFIX/sbin]
1443 --libexecdir=DIR program executables [EPREFIX/libexec]
1444 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1445 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1446 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1447 --libdir=DIR object code libraries [EPREFIX/lib]
1448 --includedir=DIR C header files [PREFIX/include]
1449 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1450 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1451 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1452 --infodir=DIR info documentation [DATAROOTDIR/info]
1453 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1454 --mandir=DIR man documentation [DATAROOTDIR/man]
1455 --docdir=DIR documentation root [DATAROOTDIR/doc/ffmpeg2theora]
1456 --htmldir=DIR html documentation [DOCDIR]
1457 --dvidir=DIR dvi documentation [DOCDIR]
1458 --pdfdir=DIR pdf documentation [DOCDIR]
1459 --psdir=DIR ps documentation [DOCDIR]
1460 _ACEOF
1461
1462 cat <<\_ACEOF
1463
1464 Program names:
1465 --program-prefix=PREFIX prepend PREFIX to installed program names
1466 --program-suffix=SUFFIX append SUFFIX to installed program names
1467 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1468
1469 System types:
1470 --build=BUILD configure for building on BUILD [guessed]
1471 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1472 _ACEOF
1473 fi
1474
1475 if test -n "$ac_init_help"; then
1476 case $ac_init_help in
1477 short | recursive ) echo "Configuration of ffmpeg2theora 0.21:";;
1478 esac
1479 cat <<\_ACEOF
1480
1481 Optional Features:
1482 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1483 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1484 --disable-dependency-tracking speeds up one-time build
1485 --enable-dependency-tracking do not reject slow dependency extractors
1486 --enable-shared[=PKGS] build shared libraries [default=yes]
1487 --enable-static[=PKGS] build static libraries [default=yes]
1488 --enable-fast-install[=PKGS]
1489 optimize for fast installation [default=yes]
1490 --disable-libtool-lock avoid locking (might break parallel builds)
1491 --disable-largefile omit support for large files
1492
1493 Optional Packages:
1494 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1495 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1496 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1497 --with-pic try to use only PIC/non-PIC objects [default=use
1498 both]
1499 --with-tags[=TAGS] include additional configurations [automatic]
1500 --with-static-linking Link binaries statically
1501
1502 Some influential environment variables:
1503 CC C compiler command
1504 CFLAGS C compiler flags
1505 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1506 nonstandard directory <lib dir>
1507 LIBS libraries to pass to the linker, e.g. -l<library>
1508 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1509 you have headers in a nonstandard directory <include dir>
1510 CPP C preprocessor
1511 CXX C++ compiler command
1512 CXXFLAGS C++ compiler flags
1513 CXXCPP C++ preprocessor
1514 F77 Fortran 77 compiler command
1515 FFLAGS Fortran 77 compiler flags
1516 PKG_CONFIG path to pkg-config utility
1517 XIPH_CFLAGS C compiler flags for XIPH, overriding pkg-config
1518 XIPH_LIBS linker flags for XIPH, overriding pkg-config
1519 KATE_CFLAGS C compiler flags for KATE, overriding pkg-config
1520 KATE_LIBS linker flags for KATE, overriding pkg-config
1521 FFMPEG_CFLAGS
1522 C compiler flags for FFMPEG, overriding pkg-config
1523 FFMPEG_LIBS linker flags for FFMPEG, overriding pkg-config
1524
1525 Use these variables to override the choices made by `configure' or to help
1526 it to find libraries and programs with nonstandard names/locations.
1527
1528 _ACEOF
1529 ac_status=$?
1530 fi
1531
1532 if test "$ac_init_help" = "recursive"; then
1533 # If there are subdirs, report their specific --help.
1534 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1535 test -d "$ac_dir" || continue
1536 ac_builddir=.
1537
1538 case "$ac_dir" in
1539 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1540 *)
1541 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1542 # A ".." for each directory in $ac_dir_suffix.
1543 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1544 case $ac_top_builddir_sub in
1545 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1546 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1547 esac ;;
1548 esac
1549 ac_abs_top_builddir=$ac_pwd
1550 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1551 # for backward compatibility:
1552 ac_top_builddir=$ac_top_build_prefix
1553
1554 case $srcdir in
1555 .) # We are building in place.
1556 ac_srcdir=.
1557 ac_top_srcdir=$ac_top_builddir_sub
1558 ac_abs_top_srcdir=$ac_pwd ;;
1559 [\\/]* | ?:[\\/]* ) # Absolute name.
1560 ac_srcdir=$srcdir$ac_dir_suffix;
1561 ac_top_srcdir=$srcdir
1562 ac_abs_top_srcdir=$srcdir ;;
1563 *) # Relative name.
1564 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1565 ac_top_srcdir=$ac_top_build_prefix$srcdir
1566 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1567 esac
1568 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1569
1570 cd "$ac_dir" || { ac_status=$?; continue; }
1571 # Check for guested configure.
1572 if test -f "$ac_srcdir/configure.gnu"; then
1573 echo &&
1574 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1575 elif test -f "$ac_srcdir/configure"; then
1576 echo &&
1577 $SHELL "$ac_srcdir/configure" --help=recursive
1578 else
1579 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1580 fi || ac_status=$?
1581 cd "$ac_pwd" || { ac_status=$?; break; }
1582 done
1583 fi
1584
1585 test -n "$ac_init_help" && exit $ac_status
1586 if $ac_init_version; then
1587 cat <<\_ACEOF
1588 ffmpeg2theora configure 0.21
1589 generated by GNU Autoconf 2.61
1590
1591 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1592 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1593 This configure script is free software; the Free Software Foundation
1594 gives unlimited permission to copy, distribute and modify it.
1595 _ACEOF
1596 exit
1597 fi
1598 cat >config.log <<_ACEOF
1599 This file contains any messages produced by compilers while
1600 running configure, to aid debugging if configure makes a mistake.
1601
1602 It was created by ffmpeg2theora $as_me 0.21, which was
1603 generated by GNU Autoconf 2.61. Invocation command line was
1604
1605 $ $0 $@
1606
1607 _ACEOF
1608 exec 5>>config.log
1609 {
1610 cat <<_ASUNAME
1611 ## --------- ##
1612 ## Platform. ##
1613 ## --------- ##
1614
1615 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1616 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1617 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1618 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1619 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1620
1621 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1622 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1623
1624 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1625 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1626 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1627 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1628 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1629 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1630 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1631
1632 _ASUNAME
1633
1634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1635 for as_dir in $PATH
1636 do
1637 IFS=$as_save_IFS
1638 test -z "$as_dir" && as_dir=.
1639 echo "PATH: $as_dir"
1640 done
1641 IFS=$as_save_IFS
1642
1643 } >&5
1644
1645 cat >&5 <<_ACEOF
1646
1647
1648 ## ----------- ##
1649 ## Core tests. ##
1650 ## ----------- ##
1651
1652 _ACEOF
1653
1654
1655 # Keep a trace of the command line.
1656 # Strip out --no-create and --no-recursion so they do not pile up.
1657 # Strip out --silent because we don't want to record it for future runs.
1658 # Also quote any args containing shell meta-characters.
1659 # Make two passes to allow for proper duplicate-argument suppression.
1660 ac_configure_args=
1661 ac_configure_args0=
1662 ac_configure_args1=
1663 ac_must_keep_next=false
1664 for ac_pass in 1 2
1665 do
1666 for ac_arg
1667 do
1668 case $ac_arg in
1669 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1670 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1671 | -silent | --silent | --silen | --sile | --sil)
1672 continue ;;
1673 *\'*)
1674 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1675 esac
1676 case $ac_pass in
1677 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1678 2)
1679 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1680 if test $ac_must_keep_next = true; then
1681 ac_must_keep_next=false # Got value, back to normal.
1682 else
1683 case $ac_arg in
1684 *=* | --config-cache | -C | -disable-* | --disable-* \
1685 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1686 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1687 | -with-* | --with-* | -without-* | --without-* | --x)
1688 case "$ac_configure_args0 " in
1689 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1690 esac
1691 ;;
1692 -* ) ac_must_keep_next=true ;;
1693 esac
1694 fi
1695 ac_configure_args="$ac_configure_args '$ac_arg'"
1696 ;;
1697 esac
1698 done
1699 done
1700 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1701 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1702
1703 # When interrupted or exit'd, cleanup temporary files, and complete
1704 # config.log. We remove comments because anyway the quotes in there
1705 # would cause problems or look ugly.
1706 # WARNING: Use '\'' to represent an apostrophe within the trap.
1707 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1708 trap 'exit_status=$?
1709 # Save into config.log some information that might help in debugging.
1710 {
1711 echo
1712
1713 cat <<\_ASBOX
1714 ## ---------------- ##
1715 ## Cache variables. ##
1716 ## ---------------- ##
1717 _ASBOX
1718 echo
1719 # The following way of writing the cache mishandles newlines in values,
1720 (
1721 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1722 eval ac_val=\$$ac_var
1723 case $ac_val in #(
1724 *${as_nl}*)
1725 case $ac_var in #(
1726 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1727 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1728 esac
1729 case $ac_var in #(
1730 _ | IFS | as_nl) ;; #(
1731 *) $as_unset $ac_var ;;
1732 esac ;;
1733 esac
1734 done
1735 (set) 2>&1 |
1736 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1737 *${as_nl}ac_space=\ *)
1738 sed -n \
1739 "s/'\''/'\''\\\\'\'''\''/g;
1740 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1741 ;; #(
1742 *)
1743 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1744 ;;
1745 esac |
1746 sort
1747 )
1748 echo
1749
1750 cat <<\_ASBOX
1751 ## ----------------- ##
1752 ## Output variables. ##
1753 ## ----------------- ##
1754 _ASBOX
1755 echo
1756 for ac_var in $ac_subst_vars
1757 do
1758 eval ac_val=\$$ac_var
1759 case $ac_val in
1760 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1761 esac
1762 echo "$ac_var='\''$ac_val'\''"
1763 done | sort
1764 echo
1765
1766 if test -n "$ac_subst_files"; then
1767 cat <<\_ASBOX
1768 ## ------------------- ##
1769 ## File substitutions. ##
1770 ## ------------------- ##
1771 _ASBOX
1772 echo
1773 for ac_var in $ac_subst_files
1774 do
1775 eval ac_val=\$$ac_var
1776 case $ac_val in
1777 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1778 esac
1779 echo "$ac_var='\''$ac_val'\''"
1780 done | sort
1781 echo
1782 fi
1783
1784 if test -s confdefs.h; then
1785 cat <<\_ASBOX
1786 ## ----------- ##
1787 ## confdefs.h. ##
1788 ## ----------- ##
1789 _ASBOX
1790 echo
1791 cat confdefs.h
1792 echo
1793 fi
1794 test "$ac_signal" != 0 &&
1795 echo "$as_me: caught signal $ac_signal"
1796 echo "$as_me: exit $exit_status"
1797 } >&5
1798 rm -f core *.core core.conftest.* &&
1799 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1800 exit $exit_status
1801 ' 0
1802 for ac_signal in 1 2 13 15; do
1803 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1804 done
1805 ac_signal=0
1806
1807 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1808 rm -f -r conftest* confdefs.h
1809
1810 # Predefined preprocessor variables.
1811
1812 cat >>confdefs.h <<_ACEOF
1813 #define PACKAGE_NAME "$PACKAGE_NAME"
1814 _ACEOF
1815
1816
1817 cat >>confdefs.h <<_ACEOF
1818 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1819 _ACEOF
1820
1821
1822 cat >>confdefs.h <<_ACEOF
1823 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1824 _ACEOF
1825
1826
1827 cat >>confdefs.h <<_ACEOF
1828 #define PACKAGE_STRING "$PACKAGE_STRING"
1829 _ACEOF
1830
1831
1832 cat >>confdefs.h <<_ACEOF
1833 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1834 _ACEOF
1835
1836
1837 # Let the site file select an alternate cache file if it wants to.
1838 # Prefer explicitly selected file to automatically selected ones.
1839 if test -n "$CONFIG_SITE"; then
1840 set x "$CONFIG_SITE"
1841 elif test "x$prefix" != xNONE; then
1842 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1843 else
1844 set x "$ac_default_prefix/share/config.site" \
1845 "$ac_default_prefix/etc/config.site"
1846 fi
1847 shift
1848 for ac_site_file
1849 do
1850 if test -r "$ac_site_file"; then
1851 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1852 echo "$as_me: loading site script $ac_site_file" >&6;}
1853 sed 's/^/| /' "$ac_site_file" >&5
1854 . "$ac_site_file"
1855 fi
1856 done
1857
1858 if test -r "$cache_file"; then
1859 # Some versions of bash will fail to source /dev/null (special
1860 # files actually), so we avoid doing that.
1861 if test -f "$cache_file"; then
1862 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1863 echo "$as_me: loading cache $cache_file" >&6;}
1864 case $cache_file in
1865 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1866 *) . "./$cache_file";;
1867 esac
1868 fi
1869 else
1870 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1871 echo "$as_me: creating cache $cache_file" >&6;}
1872 >$cache_file
1873 fi
1874
1875 # Check that the precious variables saved in the cache have kept the same
1876 # value.
1877 ac_cache_corrupted=false
1878 for ac_var in $ac_precious_vars; do
1879 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1880 eval ac_new_set=\$ac_env_${ac_var}_set
1881 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1882 eval ac_new_val=\$ac_env_${ac_var}_value
1883 case $ac_old_set,$ac_new_set in
1884 set,)
1885 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1886 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1887 ac_cache_corrupted=: ;;
1888 ,set)
1889 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1890 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1891 ac_cache_corrupted=: ;;
1892 ,);;
1893 *)
1894 if test "x$ac_old_val" != "x$ac_new_val"; then
1895 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1896 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1897 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1898 echo "$as_me: former value: $ac_old_val" >&2;}
1899 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1900 echo "$as_me: current value: $ac_new_val" >&2;}
1901 ac_cache_corrupted=:
1902 fi;;
1903 esac
1904 # Pass precious variables to config.status.
1905 if test "$ac_new_set" = set; then
1906 case $ac_new_val in
1907 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1908 *) ac_arg=$ac_var=$ac_new_val ;;
1909 esac
1910 case " $ac_configure_args " in
1911 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1912 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1913 esac
1914 fi
1915 done
1916 if $ac_cache_corrupted; then
1917 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1918 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1919 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1920 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1921 { (exit 1); exit 1; }; }
1922 fi
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948 ac_ext=c
1949 ac_cpp='$CPP $CPPFLAGS'
1950 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1951 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1952 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1953
1954
1955
1956 am__api_version='1.10'
1957
1958 ac_aux_dir=
1959 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
1960 if test -f "$ac_dir/install-sh"; then
1961 ac_aux_dir=$ac_dir
1962 ac_install_sh="$ac_aux_dir/install-sh -c"
1963 break
1964 elif test -f "$ac_dir/install.sh"; then
1965 ac_aux_dir=$ac_dir
1966 ac_install_sh="$ac_aux_dir/install.sh -c"
1967 break
1968 elif test -f "$ac_dir/shtool"; then
1969 ac_aux_dir=$ac_dir
1970 ac_install_sh="$ac_aux_dir/shtool install -c"
1971 break
1972 fi
1973 done
1974 if test -z "$ac_aux_dir"; then
1975 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
1976 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
1977 { (exit 1); exit 1; }; }
1978 fi
1979
1980 # These three variables are undocumented and unsupported,
1981 # and are intended to be withdrawn in a future Autoconf release.
1982 # They can cause serious problems if a builder's source tree is in a directory
1983 # whose full name contains unusual characters.
1984 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
1985 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
1986 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
1987
1988
1989 # Find a good install program. We prefer a C program (faster),
1990 # so one script is as good as another. But avoid the broken or
1991 # incompatible versions:
1992 # SysV /etc/install, /usr/sbin/install
1993 # SunOS /usr/etc/install
1994 # IRIX /sbin/install
1995 # AIX /bin/install
1996 # AmigaOS /C/install, which installs bootblocks on floppy discs
1997 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1998 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1999 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2000 # OS/2's system install, which has a completely different semantic
2001 # ./install, which can be erroneously created by make from ./install.sh.
2002 { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2003 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
2004 if test -z "$INSTALL"; then
2005 if test "${ac_cv_path_install+set}" = set; then
2006 echo $ECHO_N "(cached) $ECHO_C" >&6
2007 else
2008 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2009 for as_dir in $PATH
2010 do
2011 IFS=$as_save_IFS
2012 test -z "$as_dir" && as_dir=.
2013 # Account for people who put trailing slashes in PATH elements.
2014 case $as_dir/ in
2015 ./ | .// | /cC/* | \
2016 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2017 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
2018 /usr/ucb/* ) ;;
2019 *)
2020 # OSF1 and SCO ODT 3.0 have their own names for install.
2021 # Don't use installbsd from OSF since it installs stuff as root
2022 # by default.
2023 for ac_prog in ginstall scoinst install; do
2024 for ac_exec_ext in '' $ac_executable_extensions; do
2025 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
2026 if test $ac_prog = install &&
2027 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2028 # AIX install. It has an incompatible calling convention.
2029 :
2030 elif test $ac_prog = install &&
2031 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2032 # program-specific install script used by HP pwplus--don't use.
2033 :
2034 else
2035 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2036 break 3
2037 fi
2038 fi
2039 done
2040 done
2041 ;;
2042 esac
2043 done
2044 IFS=$as_save_IFS
2045
2046
2047 fi
2048 if test "${ac_cv_path_install+set}" = set; then
2049 INSTALL=$ac_cv_path_install
2050 else
2051 # As a last resort, use the slow shell script. Don't cache a
2052 # value for INSTALL within a source directory, because that will
2053 # break other packages using the cache if that directory is
2054 # removed, or if the value is a relative name.
2055 INSTALL=$ac_install_sh
2056 fi
2057 fi
2058 { echo "$as_me:$LINENO: result: $INSTALL" >&5
2059 echo "${ECHO_T}$INSTALL" >&6; }
2060
2061 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2062 # It thinks the first close brace ends the variable substitution.
2063 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2064
2065 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2066
2067 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2068
2069 { echo "$as_me:$LINENO: checking whether build environment is sane" >&5
2070 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
2071 # Just in case
2072 sleep 1
2073 echo timestamp > conftest.file
2074 # Do `set' in a subshell so we don't clobber the current shell's
2075 # arguments. Must try -L first in case configure is actually a
2076 # symlink; some systems play weird games with the mod time of symlinks
2077 # (eg FreeBSD returns the mod time of the symlink's containing
2078 # directory).
2079 if (
2080 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
2081 if test "$*" = "X"; then
2082 # -L didn't work.
2083 set X `ls -t $srcdir/configure conftest.file`
2084 fi
2085 rm -f conftest.file
2086 if test "$*" != "X $srcdir/configure conftest.file" \
2087 && test "$*" != "X conftest.file $srcdir/configure"; then
2088
2089 # If neither matched, then we have a broken ls. This can happen
2090 # if, for instance, CONFIG_SHELL is bash and it inherits a
2091 # broken ls alias from the environment. This has actually
2092 # happened. Such a system could not be considered "sane".
2093 { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
2094 alias in your environment" >&5
2095 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
2096 alias in your environment" >&2;}
2097 { (exit 1); exit 1; }; }
2098 fi
2099
2100 test "$2" = conftest.file
2101 )
2102 then
2103 # Ok.
2104 :
2105 else
2106 { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
2107 Check your system clock" >&5
2108 echo "$as_me: error: newly created file is older than distributed files!
2109 Check your system clock" >&2;}
2110 { (exit 1); exit 1; }; }
2111 fi
2112 { echo "$as_me:$LINENO: result: yes" >&5
2113 echo "${ECHO_T}yes" >&6; }
2114 test "$program_prefix" != NONE &&
2115 program_transform_name="s&^&$program_prefix&;$program_transform_name"
2116 # Use a double $ so make ignores it.
2117 test "$program_suffix" != NONE &&
2118 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2119 # Double any \ or $. echo might interpret backslashes.
2120 # By default was `s,x,x', remove it if useless.
2121 cat <<\_ACEOF >conftest.sed
2122 s/[\\$]/&&/g;s/;s,x,x,$//
2123 _ACEOF
2124 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2125 rm -f conftest.sed
2126
2127 # expand $ac_aux_dir to an absolute path
2128 am_aux_dir=`cd $ac_aux_dir && pwd`
2129
2130 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
2131 # Use eval to expand $SHELL
2132 if eval "$MISSING --run true"; then
2133 am_missing_run="$MISSING --run "
2134 else
2135 am_missing_run=
2136 { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
2137 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
2138 fi
2139
2140 { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
2141 echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
2142 if test -z "$MKDIR_P"; then
2143 if test "${ac_cv_path_mkdir+set}" = set; then
2144 echo $ECHO_N "(cached) $ECHO_C" >&6
2145 else
2146 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2147 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
2148 do
2149 IFS=$as_save_IFS
2150 test -z "$as_dir" && as_dir=.
2151 for ac_prog in mkdir gmkdir; do
2152 for ac_exec_ext in '' $ac_executable_extensions; do
2153 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
2154 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
2155 'mkdir (GNU coreutils) '* | \
2156 'mkdir (coreutils) '* | \
2157 'mkdir (fileutils) '4.1*)
2158 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
2159 break 3;;
2160 esac
2161 done
2162 done
2163 done
2164 IFS=$as_save_IFS
2165
2166 fi
2167
2168 if test "${ac_cv_path_mkdir+set}" = set; then
2169 MKDIR_P="$ac_cv_path_mkdir -p"
2170 else
2171 # As a last resort, use the slow shell script. Don't cache a
2172 # value for MKDIR_P within a source directory, because that will
2173 # break other packages using the cache if that directory is
2174 # removed, or if the value is a relative name.
2175 test -d ./--version && rmdir ./--version
2176 MKDIR_P="$ac_install_sh -d"
2177 fi
2178 fi
2179 { echo "$as_me:$LINENO: result: $MKDIR_P" >&5
2180 echo "${ECHO_T}$MKDIR_P" >&6; }
2181
2182 mkdir_p="$MKDIR_P"
2183 case $mkdir_p in
2184 [\\/$]* | ?:[\\/]*) ;;
2185 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
2186 esac
2187
2188 for ac_prog in gawk mawk nawk awk
2189 do
2190 # Extract the first word of "$ac_prog", so it can be a program name with args.
2191 set dummy $ac_prog; ac_word=$2
2192 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2193 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2194 if test "${ac_cv_prog_AWK+set}" = set; then
2195 echo $ECHO_N "(cached) $ECHO_C" >&6
2196 else
2197 if test -n "$AWK"; then
2198 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2199 else
2200 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2201 for as_dir in $PATH
2202 do
2203 IFS=$as_save_IFS
2204 test -z "$as_dir" && as_dir=.
2205 for ac_exec_ext in '' $ac_executable_extensions; do
2206 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2207 ac_cv_prog_AWK="$ac_prog"
2208 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2209 break 2
2210 fi
2211 done
2212 done
2213 IFS=$as_save_IFS
2214
2215 fi
2216 fi
2217 AWK=$ac_cv_prog_AWK
2218 if test -n "$AWK"; then
2219 { echo "$as_me:$LINENO: result: $AWK" >&5
2220 echo "${ECHO_T}$AWK" >&6; }
2221 else
2222 { echo "$as_me:$LINENO: result: no" >&5
2223 echo "${ECHO_T}no" >&6; }
2224 fi
2225
2226
2227 test -n "$AWK" && break
2228 done
2229
2230 { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2231 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
2232 set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2233 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
2234 echo $ECHO_N "(cached) $ECHO_C" >&6
2235 else
2236 cat >conftest.make <<\_ACEOF
2237 SHELL = /bin/sh
2238 all:
2239 @echo '@@@%%%=$(MAKE)=@@@%%%'
2240 _ACEOF
2241 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2242 case `${MAKE-make} -f conftest.make 2>/dev/null` in
2243 *@@@%%%=?*=@@@%%%*)
2244 eval ac_cv_prog_make_${ac_make}_set=yes;;
2245 *)
2246 eval ac_cv_prog_make_${ac_make}_set=no;;
2247 esac
2248 rm -f conftest.make
2249 fi
2250 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2251 { echo "$as_me:$LINENO: result: yes" >&5
2252 echo "${ECHO_T}yes" >&6; }
2253 SET_MAKE=
2254 else
2255 { echo "$as_me:$LINENO: result: no" >&5
2256 echo "${ECHO_T}no" >&6; }
2257 SET_MAKE="MAKE=${MAKE-make}"
2258 fi
2259
2260 rm -rf .tst 2>/dev/null
2261 mkdir .tst 2>/dev/null
2262 if test -d .tst; then
2263 am__leading_dot=.
2264 else
2265 am__leading_dot=_
2266 fi
2267 rmdir .tst 2>/dev/null
2268
2269 if test "`cd $srcdir && pwd`" != "`pwd`"; then
2270 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
2271 # is not polluted with repeated "-I."
2272 am__isrc=' -I$(srcdir)'
2273 # test to see if srcdir already configured
2274 if test -f $srcdir/config.status; then
2275 { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
2276 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
2277 { (exit 1); exit 1; }; }
2278 fi
2279 fi
2280
2281 # test whether we have cygpath
2282 if test -z "$CYGPATH_W"; then
2283 if (cygpath --version) >/dev/null 2>/dev/null; then
2284 CYGPATH_W='cygpath -w'
2285 else
2286 CYGPATH_W=echo
2287 fi
2288 fi
2289
2290
2291 # Define the identity of the package.
2292 PACKAGE='ffmpeg2theora'
2293 VERSION='0.21'
2294
2295
2296 cat >>confdefs.h <<_ACEOF
2297 #define PACKAGE "$PACKAGE"
2298 _ACEOF
2299
2300
2301 cat >>confdefs.h <<_ACEOF
2302 #define VERSION "$VERSION"
2303 _ACEOF
2304
2305 # Some tools Automake needs.
2306
2307 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
2308
2309
2310 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
2311
2312
2313 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
2314
2315
2316 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
2317
2318
2319 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
2320
2321 install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
2322
2323 # Installed binaries are usually stripped using `strip' when the user
2324 # run `make install-strip'. However `strip' might not be the right
2325 # tool to use in cross-compilation environments, therefore Automake
2326 # will honor the `STRIP' environment variable to overrule this program.
2327 if test "$cross_compiling" != no; then
2328 if test -n "$ac_tool_prefix"; then
2329 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2330 set dummy ${ac_tool_prefix}strip; ac_word=$2
2331 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2332 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2333 if test "${ac_cv_prog_STRIP+set}" = set; then
2334 echo $ECHO_N "(cached) $ECHO_C" >&6
2335 else
2336 if test -n "$STRIP"; then
2337 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2338 else
2339 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2340 for as_dir in $PATH
2341 do
2342 IFS=$as_save_IFS
2343 test -z "$as_dir" && as_dir=.
2344 for ac_exec_ext in '' $ac_executable_extensions; do
2345 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2346 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2347 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2348 break 2
2349 fi
2350 done
2351 done
2352 IFS=$as_save_IFS
2353
2354 fi
2355 fi
2356 STRIP=$ac_cv_prog_STRIP
2357 if test -n "$STRIP"; then
2358 { echo "$as_me:$LINENO: result: $STRIP" >&5
2359 echo "${ECHO_T}$STRIP" >&6; }
2360 else
2361 { echo "$as_me:$LINENO: result: no" >&5
2362 echo "${ECHO_T}no" >&6; }
2363 fi
2364
2365
2366 fi
2367 if test -z "$ac_cv_prog_STRIP"; then
2368 ac_ct_STRIP=$STRIP
2369 # Extract the first word of "strip", so it can be a program name with args.
2370 set dummy strip; ac_word=$2
2371 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2372 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2373 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
2374 echo $ECHO_N "(cached) $ECHO_C" >&6
2375 else
2376 if test -n "$ac_ct_STRIP"; then
2377 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2378 else
2379 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2380 for as_dir in $PATH
2381 do
2382 IFS=$as_save_IFS
2383 test -z "$as_dir" && as_dir=.
2384 for ac_exec_ext in '' $ac_executable_extensions; do
2385 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2386 ac_cv_prog_ac_ct_STRIP="strip"
2387 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2388 break 2
2389 fi
2390 done
2391 done
2392 IFS=$as_save_IFS
2393
2394 fi
2395 fi
2396 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2397 if test -n "$ac_ct_STRIP"; then
2398 { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
2399 echo "${ECHO_T}$ac_ct_STRIP" >&6; }
2400 else
2401 { echo "$as_me:$LINENO: result: no" >&5
2402 echo "${ECHO_T}no" >&6; }
2403 fi
2404
2405 if test "x$ac_ct_STRIP" = x; then
2406 STRIP=":"
2407 else
2408 case $cross_compiling:$ac_tool_warned in
2409 yes:)
2410 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2411 whose name does not start with the host triplet. If you think this
2412 configuration is useful to you, please write to autoconf@gnu.org." >&5
2413 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2414 whose name does not start with the host triplet. If you think this
2415 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2416 ac_tool_warned=yes ;;
2417 esac
2418 STRIP=$ac_ct_STRIP
2419 fi
2420 else
2421 STRIP="$ac_cv_prog_STRIP"
2422 fi
2423
2424 fi
2425 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2426
2427 # We need awk for the "check" target. The system "awk" is bad on
2428 # some platforms.
2429 # Always define AMTAR for backward compatibility.
2430
2431 AMTAR=${AMTAR-"${am_missing_run}tar"}
2432
2433 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
2434
2435
2436
2437
2438
2439
2440 ac_ext=c
2441 ac_cpp='$CPP $CPPFLAGS'
2442 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2443 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2444 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2445 if test -n "$ac_tool_prefix"; then
2446 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2447 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2448 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2449 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2450 if test "${ac_cv_prog_CC+set}" = set; then
2451 echo $ECHO_N "(cached) $ECHO_C" >&6
2452 else
2453 if test -n "$CC"; then
2454 ac_cv_prog_CC="$CC" # Let the user override the test.
2455 else
2456 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2457 for as_dir in $PATH
2458 do
2459 IFS=$as_save_IFS
2460 test -z "$as_dir" && as_dir=.
2461 for ac_exec_ext in '' $ac_executable_extensions; do
2462 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2463 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2464 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2465 break 2
2466 fi
2467 done
2468 done
2469 IFS=$as_save_IFS
2470
2471 fi
2472 fi
2473 CC=$ac_cv_prog_CC
2474 if test -n "$CC"; then
2475 { echo "$as_me:$LINENO: result: $CC" >&5
2476 echo "${ECHO_T}$CC" >&6; }
2477 else
2478 { echo "$as_me:$LINENO: result: no" >&5
2479 echo "${ECHO_T}no" >&6; }
2480 fi
2481
2482
2483 fi
2484 if test -z "$ac_cv_prog_CC"; then
2485 ac_ct_CC=$CC
2486 # Extract the first word of "gcc", so it can be a program name with args.
2487 set dummy gcc; ac_word=$2
2488 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2489 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2490 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2491 echo $ECHO_N "(cached) $ECHO_C" >&6
2492 else
2493 if test -n "$ac_ct_CC"; then
2494 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2495 else
2496 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2497 for as_dir in $PATH
2498 do
2499 IFS=$as_save_IFS
2500 test -z "$as_dir" && as_dir=.
2501 for ac_exec_ext in '' $ac_executable_extensions; do
2502 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2503 ac_cv_prog_ac_ct_CC="gcc"
2504 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2505 break 2
2506 fi
2507 done
2508 done
2509 IFS=$as_save_IFS
2510
2511 fi
2512 fi
2513 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2514 if test -n "$ac_ct_CC"; then
2515 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2516 echo "${ECHO_T}$ac_ct_CC" >&6; }
2517 else
2518 { echo "$as_me:$LINENO: result: no" >&5
2519 echo "${ECHO_T}no" >&6; }
2520 fi
2521
2522 if test "x$ac_ct_CC" = x; then
2523 CC=""
2524 else
2525 case $cross_compiling:$ac_tool_warned in
2526 yes:)
2527 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2528 whose name does not start with the host triplet. If you think this
2529 configuration is useful to you, please write to autoconf@gnu.org." >&5
2530 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2531 whose name does not start with the host triplet. If you think this
2532 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2533 ac_tool_warned=yes ;;
2534 esac
2535 CC=$ac_ct_CC
2536 fi
2537 else
2538 CC="$ac_cv_prog_CC"
2539 fi
2540
2541 if test -z "$CC"; then
2542 if test -n "$ac_tool_prefix"; then
2543 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2544 set dummy ${ac_tool_prefix}cc; ac_word=$2
2545 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2546 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2547 if test "${ac_cv_prog_CC+set}" = set; then
2548 echo $ECHO_N "(cached) $ECHO_C" >&6
2549 else
2550 if test -n "$CC"; then
2551 ac_cv_prog_CC="$CC" # Let the user override the test.
2552 else
2553 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2554 for as_dir in $PATH
2555 do
2556 IFS=$as_save_IFS
2557 test -z "$as_dir" && as_dir=.
2558 for ac_exec_ext in '' $ac_executable_extensions; do
2559 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2560 ac_cv_prog_CC="${ac_tool_prefix}cc"
2561 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2562 break 2
2563 fi
2564 done
2565 done
2566 IFS=$as_save_IFS
2567
2568 fi
2569 fi
2570 CC=$ac_cv_prog_CC
2571 if test -n "$CC"; then
2572 { echo "$as_me:$LINENO: result: $CC" >&5
2573 echo "${ECHO_T}$CC" >&6; }
2574 else
2575 { echo "$as_me:$LINENO: result: no" >&5
2576 echo "${ECHO_T}no" >&6; }
2577 fi
2578
2579
2580 fi
2581 fi
2582 if test -z "$CC"; then
2583 # Extract the first word of "cc", so it can be a program name with args.
2584 set dummy cc; ac_word=$2
2585 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2586 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2587 if test "${ac_cv_prog_CC+set}" = set; then
2588 echo $ECHO_N "(cached) $ECHO_C" >&6
2589 else
2590 if test -n "$CC"; then
2591 ac_cv_prog_CC="$CC" # Let the user override the test.
2592 else
2593 ac_prog_rejected=no
2594 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2595 for as_dir in $PATH
2596 do
2597 IFS=$as_save_IFS
2598 test -z "$as_dir" && as_dir=.
2599 for ac_exec_ext in '' $ac_executable_extensions; do
2600 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2601 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2602 ac_prog_rejected=yes
2603 continue
2604 fi
2605 ac_cv_prog_CC="cc"
2606 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2607 break 2
2608 fi
2609 done
2610 done
2611 IFS=$as_save_IFS
2612
2613 if test $ac_prog_rejected = yes; then
2614 # We found a bogon in the path, so make sure we never use it.
2615 set dummy $ac_cv_prog_CC
2616 shift
2617 if test $# != 0; then
2618 # We chose a different compiler from the bogus one.
2619 # However, it has the same basename, so the bogon will be chosen
2620 # first if we set CC to just the basename; use the full file name.
2621 shift
2622 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2623 fi
2624 fi
2625 fi
2626 fi
2627 CC=$ac_cv_prog_CC
2628 if test -n "$CC"; then
2629 { echo "$as_me:$LINENO: result: $CC" >&5
2630 echo "${ECHO_T}$CC" >&6; }
2631 else
2632 { echo "$as_me:$LINENO: result: no" >&5
2633 echo "${ECHO_T}no" >&6; }
2634 fi
2635
2636
2637 fi
2638 if test -z "$CC"; then
2639 if test -n "$ac_tool_prefix"; then
2640 for ac_prog in cl.exe
2641 do
2642 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2643 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2644 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2645 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2646 if test "${ac_cv_prog_CC+set}" = set; then
2647 echo $ECHO_N "(cached) $ECHO_C" >&6
2648 else
2649 if test -n "$CC"; then
2650 ac_cv_prog_CC="$CC" # Let the user override the test.
2651 else
2652 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2653 for as_dir in $PATH
2654 do
2655 IFS=$as_save_IFS
2656 test -z "$as_dir" && as_dir=.
2657 for ac_exec_ext in '' $ac_executable_extensions; do
2658 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2659 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2660 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2661 break 2
2662 fi
2663 done
2664 done
2665 IFS=$as_save_IFS
2666
2667 fi
2668 fi
2669 CC=$ac_cv_prog_CC
2670 if test -n "$CC"; then
2671 { echo "$as_me:$LINENO: result: $CC" >&5
2672 echo "${ECHO_T}$CC" >&6; }
2673 else
2674 { echo "$as_me:$LINENO: result: no" >&5
2675 echo "${ECHO_T}no" >&6; }
2676 fi
2677
2678
2679 test -n "$CC" && break
2680 done
2681 fi
2682 if test -z "$CC"; then
2683 ac_ct_CC=$CC
2684 for ac_prog in cl.exe
2685 do
2686 # Extract the first word of "$ac_prog", so it can be a program name with args.
2687 set dummy $ac_prog; ac_word=$2
2688 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2689 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2690 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2691 echo $ECHO_N "(cached) $ECHO_C" >&6
2692 else
2693 if test -n "$ac_ct_CC"; then
2694 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2695 else
2696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2697 for as_dir in $PATH
2698 do
2699 IFS=$as_save_IFS
2700 test -z "$as_dir" && as_dir=.
2701 for ac_exec_ext in '' $ac_executable_extensions; do
2702 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2703 ac_cv_prog_ac_ct_CC="$ac_prog"
2704 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2705 break 2
2706 fi
2707 done
2708 done
2709 IFS=$as_save_IFS
2710
2711 fi
2712 fi
2713 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2714 if test -n "$ac_ct_CC"; then
2715 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2716 echo "${ECHO_T}$ac_ct_CC" >&6; }
2717 else
2718 { echo "$as_me:$LINENO: result: no" >&5
2719 echo "${ECHO_T}no" >&6; }
2720 fi
2721
2722
2723 test -n "$ac_ct_CC" && break
2724 done
2725
2726 if test "x$ac_ct_CC" = x; then
2727 CC=""
2728 else
2729 case $cross_compiling:$ac_tool_warned in
2730 yes:)
2731 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2732 whose name does not start with the host triplet. If you think this
2733 configuration is useful to you, please write to autoconf@gnu.org." >&5
2734 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2735 whose name does not start with the host triplet. If you think this
2736 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2737 ac_tool_warned=yes ;;
2738 esac
2739 CC=$ac_ct_CC
2740 fi
2741 fi
2742
2743 fi
2744
2745
2746 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2747 See \`config.log' for more details." >&5
2748 echo "$as_me: error: no acceptable C compiler found in \$PATH
2749 See \`config.log' for more details." >&2;}
2750 { (exit 1); exit 1; }; }
2751
2752 # Provide some information about the compiler.
2753 echo "$as_me:$LINENO: checking for C compiler version" >&5
2754 ac_compiler=`set X $ac_compile; echo $2`
2755 { (ac_try="$ac_compiler --version >&5"
2756 case "(($ac_try" in
2757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2758 *) ac_try_echo=$ac_try;;
2759 esac
2760 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2761 (eval "$ac_compiler --version >&5") 2>&5
2762 ac_status=$?
2763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2764 (exit $ac_status); }
2765 { (ac_try="$ac_compiler -v >&5"
2766 case "(($ac_try" in
2767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2768 *) ac_try_echo=$ac_try;;
2769 esac
2770 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2771 (eval "$ac_compiler -v >&5") 2>&5
2772 ac_status=$?
2773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2774 (exit $ac_status); }
2775 { (ac_try="$ac_compiler -V >&5"
2776 case "(($ac_try" in
2777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2778 *) ac_try_echo=$ac_try;;
2779 esac
2780 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2781 (eval "$ac_compiler -V >&5") 2>&5
2782 ac_status=$?
2783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2784 (exit $ac_status); }
2785
2786 cat >conftest.$ac_ext <<_ACEOF
2787 /* confdefs.h. */
2788 _ACEOF
2789 cat confdefs.h >>conftest.$ac_ext
2790 cat >>conftest.$ac_ext <<_ACEOF
2791 /* end confdefs.h. */
2792
2793 int
2794 main ()
2795 {
2796
2797 ;
2798 return 0;
2799 }
2800 _ACEOF
2801 ac_clean_files_save=$ac_clean_files
2802 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2803 # Try to create an executable without -o first, disregard a.out.
2804 # It will help us diagnose broken compilers, and finding out an intuition
2805 # of exeext.
2806 { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2807 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2808 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2809 #
2810 # List of possible output files, starting from the most likely.
2811 # The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2812 # only as a last resort. b.out is created by i960 compilers.
2813 ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2814 #
2815 # The IRIX 6 linker writes into existing files which may not be
2816 # executable, retaining their permissions. Remove them first so a
2817 # subsequent execution test works.
2818 ac_rmfiles=
2819 for ac_file in $ac_files
2820 do
2821 case $ac_file in
2822 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2823 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2824 esac
2825 done
2826 rm -f $ac_rmfiles
2827
2828 if { (ac_try="$ac_link_default"
2829 case "(($ac_try" in
2830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2831 *) ac_try_echo=$ac_try;;
2832 esac
2833 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2834 (eval "$ac_link_default") 2>&5
2835 ac_status=$?
2836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2837 (exit $ac_status); }; then
2838 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2839 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2840 # in a Makefile. We should not override ac_cv_exeext if it was cached,
2841 # so that the user can short-circuit this test for compilers unknown to
2842 # Autoconf.
2843 for ac_file in $ac_files ''
2844 do
2845 test -f "$ac_file" || continue
2846 case $ac_file in
2847 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2848 ;;
2849 [ab].out )
2850 # We found the default executable, but exeext='' is most
2851 # certainly right.
2852 break;;
2853 *.* )
2854 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2855 then :; else
2856 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2857 fi
2858 # We set ac_cv_exeext here because the later test for it is not
2859 # safe: cross compilers may not add the suffix if given an `-o'
2860 # argument, so we may need to know it at that point already.
2861 # Even if this section looks crufty: it has the advantage of
2862 # actually working.
2863 break;;
2864 * )
2865 break;;
2866 esac
2867 done
2868 test "$ac_cv_exeext" = no && ac_cv_exeext=
2869
2870 else
2871 ac_file=''
2872 fi
2873
2874 { echo "$as_me:$LINENO: result: $ac_file" >&5
2875 echo "${ECHO_T}$ac_file" >&6; }
2876 if test -z "$ac_file"; then
2877 echo "$as_me: failed program was:" >&5
2878 sed 's/^/| /' conftest.$ac_ext >&5
2879
2880 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2881 See \`config.log' for more details." >&5
2882 echo "$as_me: error: C compiler cannot create executables
2883 See \`config.log' for more details." >&2;}
2884 { (exit 77); exit 77; }; }
2885 fi
2886
2887 ac_exeext=$ac_cv_exeext
2888
2889 # Check that the compiler produces executables we can run. If not, either
2890 # the compiler is broken, or we cross compile.
2891 { echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2892 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2893 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2894 # If not cross compiling, check that we can run a simple program.
2895 if test "$cross_compiling" != yes; then
2896 if { ac_try='./$ac_file'
2897 { (case "(($ac_try" in
2898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2899 *) ac_try_echo=$ac_try;;
2900 esac
2901 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2902 (eval "$ac_try") 2>&5
2903 ac_status=$?
2904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2905 (exit $ac_status); }; }; then
2906 cross_compiling=no
2907 else
2908 if test "$cross_compiling" = maybe; then
2909 cross_compiling=yes
2910 else
2911 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2912 If you meant to cross compile, use \`--host'.
2913 See \`config.log' for more details." >&5
2914 echo "$as_me: error: cannot run C compiled programs.
2915 If you meant to cross compile, use \`--host'.
2916 See \`config.log' for more details." >&2;}
2917 { (exit 1); exit 1; }; }
2918 fi
2919 fi
2920 fi
2921 { echo "$as_me:$LINENO: result: yes" >&5
2922 echo "${ECHO_T}yes" >&6; }
2923
2924 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2925 ac_clean_files=$ac_clean_files_save
2926 # Check that the compiler produces executables we can run. If not, either
2927 # the compiler is broken, or we cross compile.
2928 { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2929 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2930 { echo "$as_me:$LINENO: result: $cross_compiling" >&5
2931 echo "${ECHO_T}$cross_compiling" >&6; }
2932
2933 { echo "$as_me:$LINENO: checking for suffix of executables" >&5
2934 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2935 if { (ac_try="$ac_link"
2936 case "(($ac_try" in
2937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2938 *) ac_try_echo=$ac_try;;
2939 esac
2940 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2941 (eval "$ac_link") 2>&5
2942 ac_status=$?
2943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2944 (exit $ac_status); }; then
2945 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2946 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2947 # work properly (i.e., refer to `conftest.exe'), while it won't with
2948 # `rm'.
2949 for ac_file in conftest.exe conftest conftest.*; do
2950 test -f "$ac_file" || continue
2951 case $ac_file in
2952 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2953 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2954 break;;
2955 * ) break;;
2956 esac
2957 done
2958 else
2959 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2960 See \`config.log' for more details." >&5
2961 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2962 See \`config.log' for more details." >&2;}
2963 { (exit 1); exit 1; }; }
2964 fi
2965
2966 rm -f conftest$ac_cv_exeext
2967 { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2968 echo "${ECHO_T}$ac_cv_exeext" >&6; }
2969
2970 rm -f conftest.$ac_ext
2971 EXEEXT=$ac_cv_exeext
2972 ac_exeext=$EXEEXT
2973 { echo "$as_me:$LINENO: checking for suffix of object files" >&5
2974 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
2975 if test "${ac_cv_objext+set}" = set; then
2976 echo $ECHO_N "(cached) $ECHO_C" >&6
2977 else
2978 cat >conftest.$ac_ext <<_ACEOF
2979 /* confdefs.h. */
2980 _ACEOF
2981 cat confdefs.h >>conftest.$ac_ext
2982 cat >>conftest.$ac_ext <<_ACEOF
2983 /* end confdefs.h. */
2984
2985 int
2986 main ()
2987 {
2988
2989 ;
2990 return 0;
2991 }
2992 _ACEOF
2993 rm -f conftest.o conftest.obj
2994 if { (ac_try="$ac_compile"
2995 case "(($ac_try" in
2996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2997 *) ac_try_echo=$ac_try;;
2998 esac
2999 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3000 (eval "$ac_compile") 2>&5
3001 ac_status=$?
3002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3003 (exit $ac_status); }; then
3004 for ac_file in conftest.o conftest.obj conftest.*; do
3005 test -f "$ac_file" || continue;
3006 case $ac_file in
3007 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
3008 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3009 break;;
3010 esac
3011 done
3012 else
3013 echo "$as_me: failed program was:" >&5
3014 sed 's/^/| /' conftest.$ac_ext >&5
3015
3016 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3017 See \`config.log' for more details." >&5
3018 echo "$as_me: error: cannot compute suffix of object files: cannot compile
3019 See \`config.log' for more details." >&2;}
3020 { (exit 1); exit 1; }; }
3021 fi
3022
3023 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3024 fi
3025 { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3026 echo "${ECHO_T}$ac_cv_objext" >&6; }
3027 OBJEXT=$ac_cv_objext
3028 ac_objext=$OBJEXT
3029 { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3030 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
3031 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3032 echo $ECHO_N "(cached) $ECHO_C" >&6
3033 else
3034 cat >conftest.$ac_ext <<_ACEOF
3035 /* confdefs.h. */
3036 _ACEOF
3037 cat confdefs.h >>conftest.$ac_ext
3038 cat >>conftest.$ac_ext <<_ACEOF
3039 /* end confdefs.h. */
3040
3041 int
3042 main ()
3043 {
3044 #ifndef __GNUC__
3045 choke me
3046 #endif
3047
3048 ;
3049 return 0;
3050 }
3051 _ACEOF
3052 rm -f conftest.$ac_objext
3053 if { (ac_try="$ac_compile"
3054 case "(($ac_try" in
3055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3056 *) ac_try_echo=$ac_try;;
3057 esac
3058 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3059 (eval "$ac_compile") 2>conftest.er1
3060 ac_status=$?
3061 grep -v '^ *+' conftest.er1 >conftest.err
3062 rm -f conftest.er1
3063 cat conftest.err >&5
3064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3065 (exit $ac_status); } && {
3066 test -z "$ac_c_werror_flag" ||
3067 test ! -s conftest.err
3068 } && test -s conftest.$ac_objext; then
3069 ac_compiler_gnu=yes
3070 else
3071 echo "$as_me: failed program was:" >&5
3072 sed 's/^/| /' conftest.$ac_ext >&5
3073
3074 ac_compiler_gnu=no
3075 fi
3076
3077 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3078 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3079
3080 fi
3081 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3082 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3083 GCC=`test $ac_compiler_gnu = yes && echo yes`
3084 ac_test_CFLAGS=${CFLAGS+set}
3085 ac_save_CFLAGS=$CFLAGS
3086 { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3087 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
3088 if test "${ac_cv_prog_cc_g+set}" = set; then
3089 echo $ECHO_N "(cached) $ECHO_C" >&6
3090 else
3091 ac_save_c_werror_flag=$ac_c_werror_flag
3092 ac_c_werror_flag=yes
3093 ac_cv_prog_cc_g=no
3094 CFLAGS="-g"
3095 cat >conftest.$ac_ext <<_ACEOF
3096 /* confdefs.h. */
3097 _ACEOF
3098 cat confdefs.h >>conftest.$ac_ext
3099 cat >>conftest.$ac_ext <<_ACEOF
3100 /* end confdefs.h. */
3101
3102 int
3103 main ()
3104 {
3105
3106 ;
3107 return 0;
3108 }
3109 _ACEOF
3110 rm -f conftest.$ac_objext
3111 if { (ac_try="$ac_compile"
3112 case "(($ac_try" in
3113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3114 *) ac_try_echo=$ac_try;;
3115 esac
3116 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3117 (eval "$ac_compile") 2>conftest.er1
3118 ac_status=$?
3119 grep -v '^ *+' conftest.er1 >conftest.err
3120 rm -f conftest.er1
3121 cat conftest.err >&5
3122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3123 (exit $ac_status); } && {
3124 test -z "$ac_c_werror_flag" ||
3125 test ! -s conftest.err
3126 } && test -s conftest.$ac_objext; then
3127 ac_cv_prog_cc_g=yes
3128 else
3129 echo "$as_me: failed program was:" >&5
3130 sed 's/^/| /' conftest.$ac_ext >&5
3131
3132 CFLAGS=""
3133 cat >conftest.$ac_ext <<_ACEOF
3134 /* confdefs.h. */
3135 _ACEOF
3136 cat confdefs.h >>conftest.$ac_ext
3137 cat >>conftest.$ac_ext <<_ACEOF
3138 /* end confdefs.h. */
3139
3140 int
3141 main ()
3142 {
3143
3144 ;
3145 return 0;
3146 }
3147 _ACEOF
3148 rm -f conftest.$ac_objext
3149 if { (ac_try="$ac_compile"
3150 case "(($ac_try" in
3151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3152 *) ac_try_echo=$ac_try;;
3153 esac
3154 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3155 (eval "$ac_compile") 2>conftest.er1
3156 ac_status=$?
3157 grep -v '^ *+' conftest.er1 >conftest.err
3158 rm -f conftest.er1
3159 cat conftest.err >&5
3160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3161 (exit $ac_status); } && {
3162 test -z "$ac_c_werror_flag" ||
3163 test ! -s conftest.err
3164 } && test -s conftest.$ac_objext; then
3165 :
3166 else
3167 echo "$as_me: failed program was:" >&5
3168 sed 's/^/| /' conftest.$ac_ext >&5
3169
3170 ac_c_werror_flag=$ac_save_c_werror_flag
3171 CFLAGS="-g"
3172 cat >conftest.$ac_ext <<_ACEOF
3173 /* confdefs.h. */
3174 _ACEOF
3175 cat confdefs.h >>conftest.$ac_ext
3176 cat >>conftest.$ac_ext <<_ACEOF
3177 /* end confdefs.h. */
3178
3179 int
3180 main ()
3181 {
3182
3183 ;
3184 return 0;
3185 }
3186 _ACEOF
3187 rm -f conftest.$ac_objext
3188 if { (ac_try="$ac_compile"
3189 case "(($ac_try" in
3190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3191 *) ac_try_echo=$ac_try;;
3192 esac
3193 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3194 (eval "$ac_compile") 2>conftest.er1
3195 ac_status=$?
3196 grep -v '^ *+' conftest.er1 >conftest.err
3197 rm -f conftest.er1
3198 cat conftest.err >&5
3199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3200 (exit $ac_status); } && {
3201 test -z "$ac_c_werror_flag" ||
3202 test ! -s conftest.err
3203 } && test -s conftest.$ac_objext; then
3204 ac_cv_prog_cc_g=yes
3205 else
3206 echo "$as_me: failed program was:" >&5
3207 sed 's/^/| /' conftest.$ac_ext >&5
3208
3209
3210 fi
3211
3212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3213 fi
3214
3215 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3216 fi
3217
3218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3219 ac_c_werror_flag=$ac_save_c_werror_flag
3220 fi
3221 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3222 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3223 if test "$ac_test_CFLAGS" = set; then
3224 CFLAGS=$ac_save_CFLAGS
3225 elif test $ac_cv_prog_cc_g = yes; then
3226 if test "$GCC" = yes; then
3227 CFLAGS="-g -O2"
3228 else
3229 CFLAGS="-g"
3230 fi
3231 else
3232 if test "$GCC" = yes; then
3233 CFLAGS="-O2"
3234 else
3235 CFLAGS=
3236 fi
3237 fi
3238 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3239 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3240 if test "${ac_cv_prog_cc_c89+set}" = set; then
3241 echo $ECHO_N "(cached) $ECHO_C" >&6
3242 else
3243 ac_cv_prog_cc_c89=no
3244 ac_save_CC=$CC
3245 cat >conftest.$ac_ext <<_ACEOF
3246 /* confdefs.h. */
3247 _ACEOF
3248 cat confdefs.h >>conftest.$ac_ext
3249 cat >>conftest.$ac_ext <<_ACEOF
3250 /* end confdefs.h. */
3251 #include <stdarg.h>
3252 #include <stdio.h>
3253 #include <sys/types.h>
3254 #include <sys/stat.h>
3255 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3256 struct buf { int x; };
3257 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3258 static char *e (p, i)
3259 char **p;
3260 int i;
3261 {
3262 return p[i];
3263 }
3264 static char *f (char * (*g) (char **, int), char **p, ...)
3265 {
3266 char *s;
3267 va_list v;
3268 va_start (v,p);
3269 s = g (p, va_arg (v,int));
3270 va_end (v);
3271 return s;
3272 }
3273
3274 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3275 function prototypes and stuff, but not '\xHH' hex character constants.
3276 These don't provoke an error unfortunately, instead are silently treated
3277 as 'x'. The following induces an error, until -std is added to get
3278 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3279 array size at least. It's necessary to write '\x00'==0 to get something
3280 that's true only with -std. */
3281 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3282
3283 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3284 inside strings and character constants. */
3285 #define FOO(x) 'x'
3286 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3287
3288 int test (int i, double x);
3289 struct s1 {int (*f) (int a);};
3290 struct s2 {int (*f) (double a);};
3291 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3292 int argc;
3293 char **argv;
3294 int
3295 main ()
3296 {
3297 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3298 ;
3299 return 0;
3300 }
3301 _ACEOF
3302 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3303 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3304 do
3305 CC="$ac_save_CC $ac_arg"
3306 rm -f conftest.$ac_objext
3307 if { (ac_try="$ac_compile"
3308 case "(($ac_try" in
3309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3310 *) ac_try_echo=$ac_try;;
3311 esac
3312 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3313 (eval "$ac_compile") 2>conftest.er1
3314 ac_status=$?
3315 grep -v '^ *+' conftest.er1 >conftest.err
3316 rm -f conftest.er1
3317 cat conftest.err >&5
3318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3319 (exit $ac_status); } && {
3320 test -z "$ac_c_werror_flag" ||
3321 test ! -s conftest.err
3322 } && test -s conftest.$ac_objext; then
3323 ac_cv_prog_cc_c89=$ac_arg
3324 else
3325 echo "$as_me: failed program was:" >&5
3326 sed 's/^/| /' conftest.$ac_ext >&5
3327
3328
3329 fi
3330
3331 rm -f core conftest.err conftest.$ac_objext
3332 test "x$ac_cv_prog_cc_c89" != "xno" && break
3333 done
3334 rm -f conftest.$ac_ext
3335 CC=$ac_save_CC
3336
3337 fi
3338 # AC_CACHE_VAL
3339 case "x$ac_cv_prog_cc_c89" in
3340 x)
3341 { echo "$as_me:$LINENO: result: none needed" >&5
3342 echo "${ECHO_T}none needed" >&6; } ;;
3343 xno)
3344 { echo "$as_me:$LINENO: result: unsupported" >&5
3345 echo "${ECHO_T}unsupported" >&6; } ;;
3346 *)
3347 CC="$CC $ac_cv_prog_cc_c89"
3348 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3349 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3350 esac
3351
3352
3353 ac_ext=c
3354 ac_cpp='$CPP $CPPFLAGS'
3355 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3356 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3357 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3358 DEPDIR="${am__leading_dot}deps"
3359
3360 ac_config_commands="$ac_config_commands depfiles"
3361
3362
3363 am_make=${MAKE-make}
3364 cat > confinc << 'END'
3365 am__doit:
3366 @echo done
3367 .PHONY: am__doit
3368 END
3369 # If we don't find an include directive, just comment out the code.
3370 { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
3371 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
3372 am__include="#"
3373 am__quote=
3374 _am_result=none
3375 # First try GNU make style include.
3376 echo "include confinc" > confmf
3377 # We grep out `Entering directory' and `Leaving directory'
3378 # messages which can occur if `w' ends up in MAKEFLAGS.
3379 # In particular we don't look at `^make:' because GNU make might
3380 # be invoked under some other name (usually "gmake"), in which
3381 # case it prints its new name instead of `make'.
3382 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
3383 am__include=include
3384 am__quote=
3385 _am_result=GNU
3386 fi
3387 # Now try BSD make style include.
3388 if test "$am__include" = "#"; then
3389 echo '.include "confinc"' > confmf
3390 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
3391 am__include=.include
3392 am__quote="\""
3393 _am_result=BSD
3394 fi
3395 fi
3396
3397
3398 { echo "$as_me:$LINENO: result: $_am_result" >&5
3399 echo "${ECHO_T}$_am_result" >&6; }
3400 rm -f confinc confmf
3401
3402 # Check whether --enable-dependency-tracking was given.
3403 if test "${enable_dependency_tracking+set}" = set; then
3404 enableval=$enable_dependency_tracking;
3405 fi
3406
3407 if test "x$enable_dependency_tracking" != xno; then
3408 am_depcomp="$ac_aux_dir/depcomp"
3409 AMDEPBACKSLASH='\'
3410 fi
3411 if test "x$enable_dependency_tracking" != xno; then
3412 AMDEP_TRUE=
3413 AMDEP_FALSE='#'
3414 else
3415 AMDEP_TRUE='#'
3416 AMDEP_FALSE=
3417 fi
3418
3419
3420
3421 depcc="$CC" am_compiler_list=
3422
3423 { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
3424 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
3425 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
3426 echo $ECHO_N "(cached) $ECHO_C" >&6
3427 else
3428 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
3429 # We make a subdir and do the tests there. Otherwise we can end up
3430 # making bogus files that we don't know about and never remove. For
3431 # instance it was reported that on HP-UX the gcc test will end up
3432 # making a dummy file named `D' -- because `-MD' means `put the output
3433 # in D'.
3434 mkdir conftest.dir
3435 # Copy depcomp to subdir because otherwise we won't find it if we're
3436 # using a relative directory.
3437 cp "$am_depcomp" conftest.dir
3438 cd conftest.dir
3439 # We will build objects and dependencies in a subdirectory because
3440 # it helps to detect inapplicable dependency modes. For instance
3441 # both Tru64's cc and ICC support -MD to output dependencies as a
3442 # side effect of compilation, but ICC will put the dependencies in
3443 # the current directory while Tru64 will put them in the object
3444 # directory.
3445 mkdir sub
3446
3447 am_cv_CC_dependencies_compiler_type=none
3448 if test "$am_compiler_list" = ""; then
3449 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
3450 fi
3451 for depmode in $am_compiler_list; do
3452 # Setup a source with many dependencies, because some compilers
3453 # like to wrap large dependency lists on column 80 (with \), and
3454 # we should not choose a depcomp mode which is confused by this.
3455 #
3456 # We need to recreate these files for each test, as the compiler may
3457 # overwrite some of them when testing with obscure command lines.
3458 # This happens at least with the AIX C compiler.
3459 : > sub/conftest.c
3460 for i in 1 2 3 4 5 6; do
3461 echo '#include "conftst'$i'.h"' >> sub/conftest.c
3462 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
3463 # Solaris 8's {/usr,}/bin/sh.
3464 touch sub/conftst$i.h
3465 done
3466 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
3467
3468 case $depmode in
3469 nosideeffect)
3470 # after this tag, mechanisms are not by side-effect, so they'll
3471 # only be used when explicitly requested
3472 if test "x$enable_dependency_tracking" = xyes; then
3473 continue
3474 else
3475 break
3476 fi
3477 ;;
3478 none) break ;;
3479 esac
3480 # We check with `-c' and `-o' for the sake of the "dashmstdout"
3481 # mode. It turns out that the SunPro C++ compiler does not properly
3482 # handle `-M -o', and we need to detect this.
3483 if depmode=$depmode \
3484 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
3485 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3486 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
3487 >/dev/null 2>conftest.err &&
3488 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
3489 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
3490 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
3491 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
3492 # icc doesn't choke on unknown options, it will just issue warnings
3493 # or remarks (even with -Werror). So we grep stderr for any message
3494 # that says an option was ignored or not supported.
3495 # When given -MP, icc 7.0 and 7.1 complain thusly:
3496 # icc: Command line warning: ignoring option '-M'; no argument required
3497 # The diagnosis changed in icc 8.0:
3498 # icc: Command line remark: option '-MP' not supported
3499 if (grep 'ignoring option' conftest.err ||
3500 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3501 am_cv_CC_dependencies_compiler_type=$depmode
3502 break
3503 fi
3504 fi
3505 done
3506
3507 cd ..
3508 rm -rf conftest.dir
3509 else
3510 am_cv_CC_dependencies_compiler_type=none
3511 fi
3512
3513 fi
3514 { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
3515 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
3516 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
3517
3518 if
3519 test "x$enable_dependency_tracking" != xno \
3520 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
3521 am__fastdepCC_TRUE=
3522 am__fastdepCC_FALSE='#'
3523 else
3524 am__fastdepCC_TRUE='#'
3525 am__fastdepCC_FALSE=
3526 fi
3527
3528
3529 if test "x$CC" != xcc; then
3530 { echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
3531 echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6; }
3532 else
3533 { echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
3534 echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6; }
3535 fi
3536 set dummy $CC; ac_cc=`echo $2 |
3537 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
3538 if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then
3539 echo $ECHO_N "(cached) $ECHO_C" >&6
3540 else
3541 cat >conftest.$ac_ext <<_ACEOF
3542 /* confdefs.h. */
3543 _ACEOF
3544 cat confdefs.h >>conftest.$ac_ext
3545 cat >>conftest.$ac_ext <<_ACEOF
3546 /* end confdefs.h. */
3547
3548 int
3549 main ()
3550 {
3551
3552 ;
3553 return 0;
3554 }
3555 _ACEOF
3556 # Make sure it works both with $CC and with simple cc.
3557 # We do the test twice because some compilers refuse to overwrite an
3558 # existing .o file with -o, though they will create one.
3559 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3560 rm -f conftest2.*
3561 if { (case "(($ac_try" in
3562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3563 *) ac_try_echo=$ac_try;;
3564 esac
3565 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3566 (eval "$ac_try") 2>&5
3567 ac_status=$?
3568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3569 (exit $ac_status); } &&
3570 test -f conftest2.$ac_objext && { (case "(($ac_try" in
3571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3572 *) ac_try_echo=$ac_try;;
3573 esac
3574 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3575 (eval "$ac_try") 2>&5
3576 ac_status=$?
3577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3578 (exit $ac_status); };
3579 then
3580 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
3581 if test "x$CC" != xcc; then
3582 # Test first that cc exists at all.
3583 if { ac_try='cc -c conftest.$ac_ext >&5'
3584 { (case "(($ac_try" in
3585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3586 *) ac_try_echo=$ac_try;;
3587 esac
3588 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3589 (eval "$ac_try") 2>&5
3590 ac_status=$?
3591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3592 (exit $ac_status); }; }; then
3593 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3594 rm -f conftest2.*
3595 if { (case "(($ac_try" in
3596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3597 *) ac_try_echo=$ac_try;;
3598 esac
3599 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3600 (eval "$ac_try") 2>&5
3601 ac_status=$?
3602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3603 (exit $ac_status); } &&
3604 test -f conftest2.$ac_objext && { (case "(($ac_try" in
3605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3606 *) ac_try_echo=$ac_try;;
3607 esac
3608 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3609 (eval "$ac_try") 2>&5
3610 ac_status=$?
3611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3612 (exit $ac_status); };
3613 then
3614 # cc works too.
3615 :
3616 else
3617 # cc exists but doesn't like -o.
3618 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3619 fi
3620 fi
3621 fi
3622 else
3623 eval ac_cv_prog_cc_${ac_cc}_c_o=no
3624 fi
3625 rm -f core conftest*
3626
3627 fi
3628 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
3629 { echo "$as_me:$LINENO: result: yes" >&5
3630 echo "${ECHO_T}yes" >&6; }
3631 else
3632 { echo "$as_me:$LINENO: result: no" >&5
3633 echo "${ECHO_T}no" >&6; }
3634
3635 cat >>confdefs.h <<\_ACEOF
3636 #define NO_MINUS_C_MINUS_O 1
3637 _ACEOF
3638
3639 fi
3640
3641 # FIXME: we rely on the cache variable name because
3642 # there is no other way.
3643 set dummy $CC
3644 ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
3645 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
3646 # Losing compiler, so override with the script.
3647 # FIXME: It is wrong to rewrite CC.
3648 # But if we don't then we get into trouble of one sort or another.
3649 # A longer-term fix would be to have automake use am__CC in this case,
3650 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
3651 CC="$am_aux_dir/compile $CC"
3652 fi
3653
3654
3655 # Check whether --enable-shared was given.
3656 if test "${enable_shared+set}" = set; then
3657 enableval=$enable_shared; p=${PACKAGE-default}
3658 case $enableval in
3659 yes) enable_shared=yes ;;
3660 no) enable_shared=no ;;
3661 *)
3662 enable_shared=no
3663 # Look at the argument we got. We use all the common list separators.
3664 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3665 for pkg in $enableval; do
3666 IFS="$lt_save_ifs"
3667 if test "X$pkg" = "X$p"; then
3668 enable_shared=yes
3669 fi
3670 done
3671 IFS="$lt_save_ifs"
3672 ;;
3673 esac
3674 else
3675 enable_shared=yes
3676 fi
3677
3678
3679 # Check whether --enable-static was given.
3680 if test "${enable_static+set}" = set; then
3681 enableval=$enable_static; p=${PACKAGE-default}
3682 case $enableval in
3683 yes) enable_static=yes ;;
3684 no) enable_static=no ;;
3685 *)
3686 enable_static=no
3687 # Look at the argument we got. We use all the common list separators.
3688 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3689 for pkg in $enableval; do
3690 IFS="$lt_save_ifs"
3691 if test "X$pkg" = "X$p"; then
3692 enable_static=yes
3693 fi
3694 done
3695 IFS="$lt_save_ifs"
3696 ;;
3697 esac
3698 else
3699 enable_static=yes
3700 fi
3701
3702
3703 # Check whether --enable-fast-install was given.
3704 if test "${enable_fast_install+set}" = set; then
3705 enableval=$enable_fast_install; p=${PACKAGE-default}
3706 case $enableval in
3707 yes) enable_fast_install=yes ;;
3708 no) enable_fast_install=no ;;
3709 *)
3710 enable_fast_install=no
3711 # Look at the argument we got. We use all the common list separators.
3712 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3713 for pkg in $enableval; do
3714 IFS="$lt_save_ifs"
3715 if test "X$pkg" = "X$p"; then
3716 enable_fast_install=yes
3717 fi
3718 done
3719 IFS="$lt_save_ifs"
3720 ;;
3721 esac
3722 else
3723 enable_fast_install=yes
3724 fi
3725
3726
3727 # Make sure we can run config.sub.
3728 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3729 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
3730 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
3731 { (exit 1); exit 1; }; }
3732
3733 { echo "$as_me:$LINENO: checking build system type" >&5
3734 echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
3735 if test "${ac_cv_build+set}" = set; then
3736 echo $ECHO_N "(cached) $ECHO_C" >&6
3737 else
3738 ac_build_alias=$build_alias
3739 test "x$ac_build_alias" = x &&
3740 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3741 test "x$ac_build_alias" = x &&
3742 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
3743 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
3744 { (exit 1); exit 1; }; }
3745 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3746 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
3747 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
3748 { (exit 1); exit 1; }; }
3749
3750 fi
3751 { echo "$as_me:$LINENO: result: $ac_cv_build" >&5
3752 echo "${ECHO_T}$ac_cv_build" >&6; }
3753 case $ac_cv_build in
3754 *-*-*) ;;
3755 *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
3756 echo "$as_me: error: invalid value of canonical build" >&2;}
3757 { (exit 1); exit 1; }; };;
3758 esac
3759 build=$ac_cv_build
3760 ac_save_IFS=$IFS; IFS='-'
3761 set x $ac_cv_build
3762 shift
3763 build_cpu=$1
3764 build_vendor=$2
3765 shift; shift
3766 # Remember, the first character of IFS is used to create $*,
3767 # except with old shells:
3768 build_os=$*
3769 IFS=$ac_save_IFS
3770 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3771
3772
3773 { echo "$as_me:$LINENO: checking host system type" >&5
3774 echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
3775 if test "${ac_cv_host+set}" = set; then
3776 echo $ECHO_N "(cached) $ECHO_C" >&6
3777 else
3778 if test "x$host_alias" = x; then
3779 ac_cv_host=$ac_cv_build
3780 else
3781 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3782 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
3783 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
3784 { (exit 1); exit 1; }; }
3785 fi
3786
3787 fi
3788 { echo "$as_me:$LINENO: result: $ac_cv_host" >&5
3789 echo "${ECHO_T}$ac_cv_host" >&6; }
3790 case $ac_cv_host in
3791 *-*-*) ;;
3792 *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
3793 echo "$as_me: error: invalid value of canonical host" >&2;}
3794 { (exit 1); exit 1; }; };;
3795 esac
3796 host=$ac_cv_host
3797 ac_save_IFS=$IFS; IFS='-'
3798 set x $ac_cv_host
3799 shift
3800 host_cpu=$1
3801 host_vendor=$2
3802 shift; shift
3803 # Remember, the first character of IFS is used to create $*,
3804 # except with old shells:
3805 host_os=$*
3806 IFS=$ac_save_IFS
3807 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3808
3809
3810 { echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
3811 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; }
3812 if test "${lt_cv_path_SED+set}" = set; then
3813 echo $ECHO_N "(cached) $ECHO_C" >&6
3814 else
3815 # Loop through the user's path and test for sed and gsed.
3816 # Then use that list of sed's as ones to test for truncation.
3817 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3818 for as_dir in $PATH
3819 do
3820 IFS=$as_save_IFS
3821 test -z "$as_dir" && as_dir=.
3822 for lt_ac_prog in sed gsed; do
3823 for ac_exec_ext in '' $ac_executable_extensions; do
3824 if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then
3825 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
3826 fi
3827 done
3828 done
3829 done
3830 IFS=$as_save_IFS
3831 lt_ac_max=0
3832 lt_ac_count=0
3833 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3834 # along with /bin/sed that truncates output.
3835 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
3836 test ! -f $lt_ac_sed && continue
3837 cat /dev/null > conftest.in
3838 lt_ac_count=0
3839 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
3840 # Check for GNU sed and select it if it is found.
3841 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
3842 lt_cv_path_SED=$lt_ac_sed
3843 break
3844 fi
3845 while true; do
3846 cat conftest.in conftest.in >conftest.tmp
3847 mv conftest.tmp conftest.in
3848 cp conftest.in conftest.nl
3849 echo >>conftest.nl
3850 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
3851 cmp -s conftest.out conftest.nl || break
3852 # 10000 chars as input seems more than enough
3853 test $lt_ac_count -gt 10 && break
3854 lt_ac_count=`expr $lt_ac_count + 1`
3855 if test $lt_ac_count -gt $lt_ac_max; then
3856 lt_ac_max=$lt_ac_count
3857 lt_cv_path_SED=$lt_ac_sed
3858 fi
3859 done
3860 done
3861
3862 fi
3863
3864 SED=$lt_cv_path_SED
3865
3866 { echo "$as_me:$LINENO: result: $SED" >&5
3867 echo "${ECHO_T}$SED" >&6; }
3868
3869 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3870 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3871 if test "${ac_cv_path_GREP+set}" = set; then
3872 echo $ECHO_N "(cached) $ECHO_C" >&6
3873 else
3874 # Extract the first word of "grep ggrep" to use in msg output
3875 if test -z "$GREP"; then
3876 set dummy grep ggrep; ac_prog_name=$2
3877 if test "${ac_cv_path_GREP+set}" = set; then
3878 echo $ECHO_N "(cached) $ECHO_C" >&6
3879 else
3880 ac_path_GREP_found=false
3881 # Loop through the user's path and test for each of PROGNAME-LIST
3882 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3883 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3884 do
3885 IFS=$as_save_IFS
3886 test -z "$as_dir" && as_dir=.
3887 for ac_prog in grep ggrep; do
3888 for ac_exec_ext in '' $ac_executable_extensions; do
3889 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3890 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3891 # Check for GNU ac_path_GREP and select it if it is found.
3892 # Check for GNU $ac_path_GREP
3893 case `"$ac_path_GREP" --version 2>&1` in
3894 *GNU*)
3895 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3896 *)
3897 ac_count=0
3898 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3899 while :
3900 do
3901 cat "conftest.in" "conftest.in" >"conftest.tmp"
3902 mv "conftest.tmp" "conftest.in"
3903 cp "conftest.in" "conftest.nl"
3904 echo 'GREP' >> "conftest.nl"
3905 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3906 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3907 ac_count=`expr $ac_count + 1`
3908 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3909 # Best one so far, save it but keep looking for a better one
3910 ac_cv_path_GREP="$ac_path_GREP"
3911 ac_path_GREP_max=$ac_count
3912 fi
3913 # 10*(2^10) chars as input seems more than enough
3914 test $ac_count -gt 10 && break
3915 done
3916 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3917 esac
3918
3919
3920 $ac_path_GREP_found && break 3
3921 done
3922 done
3923
3924 done
3925 IFS=$as_save_IFS
3926
3927
3928 fi
3929
3930 GREP="$ac_cv_path_GREP"
3931 if test -z "$GREP"; then
3932 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3933 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3934 { (exit 1); exit 1; }; }
3935 fi
3936
3937 else
3938 ac_cv_path_GREP=$GREP
3939 fi
3940
3941
3942 fi
3943 { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3944 echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3945 GREP="$ac_cv_path_GREP"
3946
3947
3948 { echo "$as_me:$LINENO: checking for egrep" >&5
3949 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3950 if test "${ac_cv_path_EGREP+set}" = set; then
3951 echo $ECHO_N "(cached) $ECHO_C" >&6
3952 else
3953 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3954 then ac_cv_path_EGREP="$GREP -E"
3955 else
3956 # Extract the first word of "egrep" to use in msg output
3957 if test -z "$EGREP"; then
3958 set dummy egrep; ac_prog_name=$2
3959 if test "${ac_cv_path_EGREP+set}" = set; then
3960 echo $ECHO_N "(cached) $ECHO_C" >&6
3961 else
3962 ac_path_EGREP_found=false
3963 # Loop through the user's path and test for each of PROGNAME-LIST
3964 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3965 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3966 do
3967 IFS=$as_save_IFS
3968 test -z "$as_dir" && as_dir=.
3969 for ac_prog in egrep; do
3970 for ac_exec_ext in '' $ac_executable_extensions; do
3971 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3972 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3973 # Check for GNU ac_path_EGREP and select it if it is found.
3974 # Check for GNU $ac_path_EGREP
3975 case `"$ac_path_EGREP" --version 2>&1` in
3976 *GNU*)
3977 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3978 *)
3979 ac_count=0
3980 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3981 while :
3982 do
3983 cat "conftest.in" "conftest.in" >"conftest.tmp"
3984 mv "conftest.tmp" "conftest.in"
3985 cp "conftest.in" "conftest.nl"
3986 echo 'EGREP' >> "conftest.nl"
3987 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3988 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3989 ac_count=`expr $ac_count + 1`
3990 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3991 # Best one so far, save it but keep looking for a better one
3992 ac_cv_path_EGREP="$ac_path_EGREP"
3993 ac_path_EGREP_max=$ac_count
3994 fi
3995 # 10*(2^10) chars as input seems more than enough
3996 test $ac_count -gt 10 && break
3997 done
3998 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3999 esac
4000
4001
4002 $ac_path_EGREP_found && break 3
4003 done
4004 done
4005
4006 done
4007 IFS=$as_save_IFS
4008
4009
4010 fi
4011
4012 EGREP="$ac_cv_path_EGREP"
4013 if test -z "$EGREP"; then
4014 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4015 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4016 { (exit 1); exit 1; }; }
4017 fi
4018
4019 else
4020 ac_cv_path_EGREP=$EGREP
4021 fi
4022
4023
4024 fi
4025 fi
4026 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4027 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4028 EGREP="$ac_cv_path_EGREP"
4029
4030
4031
4032 # Check whether --with-gnu-ld was given.
4033 if test "${with_gnu_ld+set}" = set; then
4034 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
4035 else
4036 with_gnu_ld=no
4037 fi
4038
4039 ac_prog=ld
4040 if test "$GCC" = yes; then
4041 # Check if gcc -print-prog-name=ld gives a path.
4042 { echo "$as_me:$LINENO: checking for ld used by $CC" >&5
4043 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
4044 case $host in
4045 *-*-mingw*)
4046 # gcc leaves a trailing carriage return which upsets mingw
4047 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4048 *)
4049 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4050 esac
4051 case $ac_prog in
4052 # Accept absolute paths.
4053 [\\/]* | ?:[\\/]*)
4054 re_direlt='/[^/][^/]*/\.\./'
4055 # Canonicalize the pathname of ld
4056 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
4057 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4058 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
4059 done
4060 test -z "$LD" && LD="$ac_prog"
4061 ;;
4062 "")
4063 # If it fails, then pretend we aren't using GCC.
4064 ac_prog=ld
4065 ;;
4066 *)
4067 # If it is relative, then search for the first ld in PATH.
4068 with_gnu_ld=unknown
4069 ;;
4070 esac
4071 elif test "$with_gnu_ld" = yes; then
4072 { echo "$as_me:$LINENO: checking for GNU ld" >&5
4073 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
4074 else
4075 { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
4076 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
4077 fi
4078 if test "${lt_cv_path_LD+set}" = set; then
4079 echo $ECHO_N "(cached) $ECHO_C" >&6
4080 else
4081 if test -z "$LD"; then
4082 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4083 for ac_dir in $PATH; do
4084 IFS="$lt_save_ifs"
4085 test -z "$ac_dir" && ac_dir=.
4086 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4087 lt_cv_path_LD="$ac_dir/$ac_prog"
4088 # Check to see if the program is GNU ld. I'd rather use --version,
4089 # but apparently some variants of GNU ld only accept -v.
4090 # Break only if it was the GNU/non-GNU ld that we prefer.
4091 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4092 *GNU* | *'with BFD'*)
4093 test "$with_gnu_ld" != no && break
4094 ;;
4095 *)
4096 test "$with_gnu_ld" != yes && break
4097 ;;
4098 esac
4099 fi
4100 done
4101 IFS="$lt_save_ifs"
4102 else
4103 lt_cv_path_LD="$LD" # Let the user override the test with a path.
4104 fi
4105 fi
4106
4107 LD="$lt_cv_path_LD"
4108 if test -n "$LD"; then
4109 { echo "$as_me:$LINENO: result: $LD" >&5
4110 echo "${ECHO_T}$LD" >&6; }
4111 else
4112 { echo "$as_me:$LINENO: result: no" >&5
4113 echo "${ECHO_T}no" >&6; }
4114 fi
4115 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
4116 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
4117 { (exit 1); exit 1; }; }
4118 { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
4119 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
4120 if test "${lt_cv_prog_gnu_ld+set}" = set; then
4121 echo $ECHO_N "(cached) $ECHO_C" >&6
4122 else
4123 # I'd rather use --version here, but apparently some GNU lds only accept -v.
4124 case `$LD -v 2>&1 </dev/null` in
4125 *GNU* | *'with BFD'*)
4126 lt_cv_prog_gnu_ld=yes
4127 ;;
4128 *)
4129 lt_cv_prog_gnu_ld=no
4130 ;;
4131 esac
4132 fi
4133 { echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
4134 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; }
4135 with_gnu_ld=$lt_cv_prog_gnu_ld
4136
4137
4138 { echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
4139 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; }
4140 if test "${lt_cv_ld_reload_flag+set}" = set; then
4141 echo $ECHO_N "(cached) $ECHO_C" >&6
4142 else
4143 lt_cv_ld_reload_flag='-r'
4144 fi
4145 { echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
4146 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; }
4147 reload_flag=$lt_cv_ld_reload_flag
4148 case $reload_flag in
4149 "" | " "*) ;;
4150 *) reload_flag=" $reload_flag" ;;
4151 esac
4152 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4153 case $host_os in
4154 darwin*)
4155 if test "$GCC" = yes; then
4156 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4157 else
4158 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4159 fi
4160 ;;
4161 esac
4162
4163 { echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
4164 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; }
4165 if test "${lt_cv_path_NM+set}" = set; then
4166 echo $ECHO_N "(cached) $ECHO_C" >&6
4167 else
4168 if test -n "$NM"; then
4169 # Let the user override the test.
4170 lt_cv_path_NM="$NM"
4171 else
4172 lt_nm_to_check="${ac_tool_prefix}nm"
4173 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4174 lt_nm_to_check="$lt_nm_to_check nm"
4175 fi
4176 for lt_tmp_nm in $lt_nm_to_check; do
4177 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4178 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4179 IFS="$lt_save_ifs"
4180 test -z "$ac_dir" && ac_dir=.
4181 tmp_nm="$ac_dir/$lt_tmp_nm"
4182 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4183 # Check to see if the nm accepts a BSD-compat flag.
4184 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4185 # nm: unknown option "B" ignored
4186 # Tru64's nm complains that /dev/null is an invalid object file
4187 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4188 */dev/null* | *'Invalid file or object type'*)
4189 lt_cv_path_NM="$tmp_nm -B"
4190 break
4191 ;;
4192 *)
4193 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4194 */dev/null*)
4195 lt_cv_path_NM="$tmp_nm -p"
4196 break
4197 ;;
4198 *)
4199 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4200 continue # so that we can try to find one that supports BSD flags
4201 ;;
4202 esac
4203 ;;
4204 esac
4205 fi
4206 done
4207 IFS="$lt_save_ifs"
4208 done
4209 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4210 fi
4211 fi
4212 { echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
4213 echo "${ECHO_T}$lt_cv_path_NM" >&6; }
4214 NM="$lt_cv_path_NM"
4215
4216 { echo "$as_me:$LINENO: checking whether ln -s works" >&5
4217 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
4218 LN_S=$as_ln_s
4219 if test "$LN_S" = "ln -s"; then
4220 { echo "$as_me:$LINENO: result: yes" >&5
4221 echo "${ECHO_T}yes" >&6; }
4222 else
4223 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4224 echo "${ECHO_T}no, using $LN_S" >&6; }
4225 fi
4226
4227 { echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
4228 echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; }
4229 if test "${lt_cv_deplibs_check_method+set}" = set; then
4230 echo $ECHO_N "(cached) $ECHO_C" >&6
4231 else
4232 lt_cv_file_magic_cmd='$MAGIC_CMD'
4233 lt_cv_file_magic_test_file=
4234 lt_cv_deplibs_check_method='unknown'
4235 # Need to set the preceding variable on all platforms that support
4236 # interlibrary dependencies.
4237 # 'none' -- dependencies not supported.
4238 # `unknown' -- same as none, but documents that we really don't know.
4239 # 'pass_all' -- all dependencies passed with no checks.
4240 # 'test_compile' -- check by making test program.
4241 # 'file_magic [[regex]]' -- check by looking for files in library path
4242 # which responds to the $file_magic_cmd with a given extended regex.
4243 # If you have `file' or equivalent on your system and you're not sure
4244 # whether `pass_all' will *always* work, you probably want this one.
4245
4246 case $host_os in
4247 aix[4-9]*)
4248 lt_cv_deplibs_check_method=pass_all
4249 ;;
4250
4251 beos*)
4252 lt_cv_deplibs_check_method=pass_all
4253 ;;
4254
4255 bsdi[45]*)
4256 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
4257 lt_cv_file_magic_cmd='/usr/bin/file -L'
4258 lt_cv_file_magic_test_file=/shlib/libc.so
4259 ;;
4260
4261 cygwin*)
4262 # func_win32_libid is a shell function defined in ltmain.sh
4263 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4264 lt_cv_file_magic_cmd='func_win32_libid'
4265 ;;
4266
4267 mingw* | pw32*)
4268 # Base MSYS/MinGW do not provide the 'file' command needed by
4269 # func_win32_libid shell function, so use a weaker test based on 'objdump',
4270 # unless we find 'file', for example because we are cross-compiling.
4271 if ( file / ) >/dev/null 2>&1; then
4272 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4273 lt_cv_file_magic_cmd='func_win32_libid'
4274 else
4275 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4276 lt_cv_file_magic_cmd='$OBJDUMP -f'
4277 fi
4278 ;;
4279
4280 darwin* | rhapsody*)
4281 lt_cv_deplibs_check_method=pass_all
4282 ;;
4283
4284 freebsd* | dragonfly*)
4285 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4286 case $host_cpu in
4287 i*86 )
4288 # Not sure whether the presence of OpenBSD here was a mistake.
4289 # Let's accept both of them until this is cleared up.
4290 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
4291 lt_cv_file_magic_cmd=/usr/bin/file
4292 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4293 ;;
4294 esac
4295 else
4296 lt_cv_deplibs_check_method=pass_all
4297 fi
4298 ;;
4299
4300 gnu*)
4301 lt_cv_deplibs_check_method=pass_all
4302 ;;
4303
4304 hpux10.20* | hpux11*)
4305 lt_cv_file_magic_cmd=/usr/bin/file
4306 case $host_cpu in
4307 ia64*)
4308 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
4309 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4310 ;;
4311 hppa*64*)
4312 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]'
4313 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4314 ;;
4315 *)
4316 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
4317 lt_cv_file_magic_test_file=/usr/lib/libc.sl
4318 ;;
4319 esac
4320 ;;
4321
4322 interix[3-9]*)
4323 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4324 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
4325 ;;
4326
4327 irix5* | irix6* | nonstopux*)
4328 case $LD in
4329 *-32|*"-32 ") libmagic=32-bit;;
4330 *-n32|*"-n32 ") libmagic=N32;;
4331 *-64|*"-64 ") libmagic=64-bit;;
4332 *) libmagic=never-match;;
4333 esac
4334 lt_cv_deplibs_check_method=pass_all
4335 ;;
4336
4337 # This must be Linux ELF.
4338 linux* | k*bsd*-gnu)
4339 lt_cv_deplibs_check_method=pass_all
4340 ;;
4341
4342 netbsd* | netbsdelf*-gnu)
4343 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4344 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
4345 else
4346 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
4347 fi
4348 ;;
4349
4350 newos6*)
4351 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
4352 lt_cv_file_magic_cmd=/usr/bin/file
4353 lt_cv_file_magic_test_file=/usr/lib/libnls.so
4354 ;;
4355
4356 nto-qnx*)
4357 lt_cv_deplibs_check_method=unknown
4358 ;;
4359
4360 openbsd*)
4361 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4362 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
4363 else
4364 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
4365 fi
4366 ;;
4367
4368 osf3* | osf4* | osf5*)
4369 lt_cv_deplibs_check_method=pass_all
4370 ;;
4371
4372 rdos*)
4373 lt_cv_deplibs_check_method=pass_all
4374 ;;
4375
4376 solaris*)
4377 lt_cv_deplibs_check_method=pass_all
4378 ;;
4379
4380 sysv4 | sysv4.3*)
4381 case $host_vendor in
4382 motorola)
4383 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
4384 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4385 ;;
4386 ncr)
4387 lt_cv_deplibs_check_method=pass_all
4388 ;;
4389 sequent)
4390 lt_cv_file_magic_cmd='/bin/file'
4391 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
4392 ;;
4393 sni)
4394 lt_cv_file_magic_cmd='/bin/file'
4395 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
4396 lt_cv_file_magic_test_file=/lib/libc.so
4397 ;;
4398 siemens)
4399 lt_cv_deplibs_check_method=pass_all
4400 ;;
4401 pc)
4402 lt_cv_deplibs_check_method=pass_all
4403 ;;
4404 esac
4405 ;;
4406
4407 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4408 lt_cv_deplibs_check_method=pass_all
4409 ;;
4410 esac
4411
4412 fi
4413 { echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
4414 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; }
4415 file_magic_cmd=$lt_cv_file_magic_cmd
4416 deplibs_check_method=$lt_cv_deplibs_check_method
4417 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4418
4419
4420
4421
4422 # If no C compiler was specified, use CC.
4423 LTCC=${LTCC-"$CC"}
4424
4425 # If no C compiler flags were specified, use CFLAGS.
4426 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
4427
4428 # Allow CC to be a program name with arguments.
4429 compiler=$CC
4430
4431
4432 # Check whether --enable-libtool-lock was given.
4433 if test "${enable_libtool_lock+set}" = set; then
4434 enableval=$enable_libtool_lock;
4435 fi
4436
4437 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4438
4439 # Some flags need to be propagated to the compiler or linker for good
4440 # libtool support.
4441 case $host in
4442 ia64-*-hpux*)
4443 # Find out which ABI we are using.
4444 echo 'int i;' > conftest.$ac_ext
4445 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4446 (eval $ac_compile) 2>&5
4447 ac_status=$?
4448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4449 (exit $ac_status); }; then
4450 case `/usr/bin/file conftest.$ac_objext` in
4451 *ELF-32*)
4452 HPUX_IA64_MODE="32"
4453 ;;
4454 *ELF-64*)
4455 HPUX_IA64_MODE="64"
4456 ;;
4457 esac
4458 fi
4459 rm -rf conftest*
4460 ;;
4461 *-*-irix6*)
4462 # Find out which ABI we are using.
4463 echo '#line 4464 "configure"' > conftest.$ac_ext
4464 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4465 (eval $ac_compile) 2>&5
4466 ac_status=$?
4467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4468 (exit $ac_status); }; then
4469 if test "$lt_cv_prog_gnu_ld" = yes; then
4470 case `/usr/bin/file conftest.$ac_objext` in
4471 *32-bit*)
4472 LD="${LD-ld} -melf32bsmip"
4473 ;;
4474 *N32*)
4475 LD="${LD-ld} -melf32bmipn32"
4476 ;;
4477 *64-bit*)
4478 LD="${LD-ld} -melf64bmip"
4479 ;;
4480 esac
4481 else
4482 case `/usr/bin/file conftest.$ac_objext` in
4483 *32-bit*)
4484 LD="${LD-ld} -32"
4485 ;;
4486 *N32*)
4487 LD="${LD-ld} -n32"
4488 ;;
4489 *64-bit*)
4490 LD="${LD-ld} -64"
4491 ;;
4492 esac
4493 fi
4494 fi
4495 rm -rf conftest*
4496 ;;
4497
4498 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
4499 s390*-*linux*|sparc*-*linux*)
4500 # Find out which ABI we are using.
4501 echo 'int i;' > conftest.$ac_ext
4502 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4503 (eval $ac_compile) 2>&5
4504 ac_status=$?
4505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4506 (exit $ac_status); }; then
4507 case `/usr/bin/file conftest.o` in
4508 *32-bit*)
4509 case $host in
4510 x86_64-*kfreebsd*-gnu)
4511 LD="${LD-ld} -m elf_i386_fbsd"
4512 ;;
4513 x86_64-*linux*)
4514 LD="${LD-ld} -m elf_i386"
4515 ;;
4516 ppc64-*linux*|powerpc64-*linux*)
4517 LD="${LD-ld} -m elf32ppclinux"
4518 ;;
4519 s390x-*linux*)
4520 LD="${LD-ld} -m elf_s390"
4521 ;;
4522 sparc64-*linux*)
4523 LD="${LD-ld} -m elf32_sparc"
4524 ;;
4525 esac
4526 ;;
4527 *64-bit*)
4528 case $host in
4529 x86_64-*kfreebsd*-gnu)
4530 LD="${LD-ld} -m elf_x86_64_fbsd"
4531 ;;
4532 x86_64-*linux*)
4533 LD="${LD-ld} -m elf_x86_64"
4534 ;;
4535 ppc*-*linux*|powerpc*-*linux*)
4536 LD="${LD-ld} -m elf64ppc"
4537 ;;
4538 s390*-*linux*)
4539 LD="${LD-ld} -m elf64_s390"
4540 ;;
4541 sparc*-*linux*)
4542 LD="${LD-ld} -m elf64_sparc"
4543 ;;
4544 esac
4545 ;;
4546 esac
4547 fi
4548 rm -rf conftest*
4549 ;;
4550
4551 *-*-sco3.2v5*)
4552 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4553 SAVE_CFLAGS="$CFLAGS"
4554 CFLAGS="$CFLAGS -belf"
4555 { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
4556 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; }
4557 if test "${lt_cv_cc_needs_belf+set}" = set; then
4558 echo $ECHO_N "(cached) $ECHO_C" >&6
4559 else
4560 ac_ext=c
4561 ac_cpp='$CPP $CPPFLAGS'
4562 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4563 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4564 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4565
4566 cat >conftest.$ac_ext <<_ACEOF
4567 /* confdefs.h. */
4568 _ACEOF
4569 cat confdefs.h >>conftest.$ac_ext
4570 cat >>conftest.$ac_ext <<_ACEOF
4571 /* end confdefs.h. */
4572
4573 int
4574 main ()
4575 {
4576
4577 ;
4578 return 0;
4579 }
4580 _ACEOF
4581 rm -f conftest.$ac_objext conftest$ac_exeext
4582 if { (ac_try="$ac_link"
4583 case "(($ac_try" in
4584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4585 *) ac_try_echo=$ac_try;;
4586 esac
4587 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4588 (eval "$ac_link") 2>conftest.er1
4589 ac_status=$?
4590 grep -v '^ *+' conftest.er1 >conftest.err
4591 rm -f conftest.er1
4592 cat conftest.err >&5
4593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4594 (exit $ac_status); } && {
4595 test -z "$ac_c_werror_flag" ||
4596 test ! -s conftest.err
4597 } && test -s conftest$ac_exeext &&
4598 $as_test_x conftest$ac_exeext; then
4599 lt_cv_cc_needs_belf=yes
4600 else
4601 echo "$as_me: failed program was:" >&5
4602 sed 's/^/| /' conftest.$ac_ext >&5
4603
4604 lt_cv_cc_needs_belf=no
4605 fi
4606
4607 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4608 conftest$ac_exeext conftest.$ac_ext
4609 ac_ext=c
4610 ac_cpp='$CPP $CPPFLAGS'
4611 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4612 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4613 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4614
4615 fi
4616 { echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
4617 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; }
4618 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4619 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4620 CFLAGS="$SAVE_CFLAGS"
4621 fi
4622 ;;
4623 sparc*-*solaris*)
4624 # Find out which ABI we are using.
4625 echo 'int i;' > conftest.$ac_ext
4626 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4627 (eval $ac_compile) 2>&5
4628 ac_status=$?
4629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4630 (exit $ac_status); }; then
4631 case `/usr/bin/file conftest.o` in
4632 *64-bit*)
4633 case $lt_cv_prog_gnu_ld in
4634 yes*) LD="${LD-ld} -m elf64_sparc" ;;
4635 *)
4636 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
4637 LD="${LD-ld} -64"
4638 fi
4639 ;;
4640 esac
4641 ;;
4642 esac
4643 fi
4644 rm -rf conftest*
4645 ;;
4646
4647
4648 esac
4649
4650 need_locks="$enable_libtool_lock"
4651
4652
4653 ac_ext=c
4654 ac_cpp='$CPP $CPPFLAGS'
4655 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4656 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4657 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4658 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4659 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
4660 # On Suns, sometimes $CPP names a directory.
4661 if test -n "$CPP" && test -d "$CPP"; then
4662 CPP=
4663 fi
4664 if test -z "$CPP"; then
4665 if test "${ac_cv_prog_CPP+set}" = set; then
4666 echo $ECHO_N "(cached) $ECHO_C" >&6
4667 else
4668 # Double quotes because CPP needs to be expanded
4669 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4670 do
4671 ac_preproc_ok=false
4672 for ac_c_preproc_warn_flag in '' yes
4673 do
4674 # Use a header file that comes with gcc, so configuring glibc
4675 # with a fresh cross-compiler works.
4676 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4677 # <limits.h> exists even on freestanding compilers.
4678 # On the NeXT, cc -E runs the code through the compiler's parser,
4679 # not just through cpp. "Syntax error" is here to catch this case.
4680 cat >conftest.$ac_ext <<_ACEOF
4681 /* confdefs.h. */
4682 _ACEOF
4683 cat confdefs.h >>conftest.$ac_ext
4684 cat >>conftest.$ac_ext <<_ACEOF
4685 /* end confdefs.h. */
4686 #ifdef __STDC__
4687 # include <limits.h>
4688 #else
4689 # include <assert.h>
4690 #endif
4691 Syntax error
4692 _ACEOF
4693 if { (ac_try="$ac_cpp conftest.$ac_ext"
4694 case "(($ac_try" in
4695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4696 *) ac_try_echo=$ac_try;;
4697 esac
4698 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4699 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4700 ac_status=$?
4701 grep -v '^ *+' conftest.er1 >conftest.err
4702 rm -f conftest.er1
4703 cat conftest.err >&5
4704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4705 (exit $ac_status); } >/dev/null && {
4706 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4707 test ! -s conftest.err
4708 }; then
4709 :
4710 else
4711 echo "$as_me: failed program was:" >&5
4712 sed 's/^/| /' conftest.$ac_ext >&5
4713
4714 # Broken: fails on valid input.
4715 continue
4716 fi
4717
4718 rm -f conftest.err conftest.$ac_ext
4719
4720 # OK, works on sane cases. Now check whether nonexistent headers
4721 # can be detected and how.
4722 cat >conftest.$ac_ext <<_ACEOF
4723 /* confdefs.h. */
4724 _ACEOF
4725 cat confdefs.h >>conftest.$ac_ext
4726 cat >>conftest.$ac_ext <<_ACEOF
4727 /* end confdefs.h. */
4728 #include <ac_nonexistent.h>
4729 _ACEOF
4730 if { (ac_try="$ac_cpp conftest.$ac_ext"
4731 case "(($ac_try" in
4732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4733 *) ac_try_echo=$ac_try;;
4734 esac
4735 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4736 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4737 ac_status=$?
4738 grep -v '^ *+' conftest.er1 >conftest.err
4739 rm -f conftest.er1
4740 cat conftest.err >&5
4741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4742 (exit $ac_status); } >/dev/null && {
4743 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4744 test ! -s conftest.err
4745 }; then
4746 # Broken: success on invalid input.
4747 continue
4748 else
4749 echo "$as_me: failed program was:" >&5
4750 sed 's/^/| /' conftest.$ac_ext >&5
4751
4752 # Passes both tests.
4753 ac_preproc_ok=:
4754 break
4755 fi
4756
4757 rm -f conftest.err conftest.$ac_ext
4758
4759 done
4760 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4761 rm -f conftest.err conftest.$ac_ext
4762 if $ac_preproc_ok; then
4763 break
4764 fi
4765
4766 done
4767 ac_cv_prog_CPP=$CPP
4768
4769 fi
4770 CPP=$ac_cv_prog_CPP
4771 else
4772 ac_cv_prog_CPP=$CPP
4773 fi
4774 { echo "$as_me:$LINENO: result: $CPP" >&5
4775 echo "${ECHO_T}$CPP" >&6; }
4776 ac_preproc_ok=false
4777 for ac_c_preproc_warn_flag in '' yes
4778 do
4779 # Use a header file that comes with gcc, so configuring glibc
4780 # with a fresh cross-compiler works.
4781 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4782 # <limits.h> exists even on freestanding compilers.
4783 # On the NeXT, cc -E runs the code through the compiler's parser,
4784 # not just through cpp. "Syntax error" is here to catch this case.
4785 cat >conftest.$ac_ext <<_ACEOF
4786 /* confdefs.h. */
4787 _ACEOF
4788 cat confdefs.h >>conftest.$ac_ext
4789 cat >>conftest.$ac_ext <<_ACEOF
4790 /* end confdefs.h. */
4791 #ifdef __STDC__
4792 # include <limits.h>
4793 #else
4794 # include <assert.h>
4795 #endif
4796 Syntax error
4797 _ACEOF
4798 if { (ac_try="$ac_cpp conftest.$ac_ext"
4799 case "(($ac_try" in
4800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4801 *) ac_try_echo=$ac_try;;
4802 esac
4803 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4804 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4805 ac_status=$?
4806 grep -v '^ *+' conftest.er1 >conftest.err
4807 rm -f conftest.er1
4808 cat conftest.err >&5
4809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4810 (exit $ac_status); } >/dev/null && {
4811 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4812 test ! -s conftest.err
4813 }; then
4814 :
4815 else
4816 echo "$as_me: failed program was:" >&5
4817 sed 's/^/| /' conftest.$ac_ext >&5
4818
4819 # Broken: fails on valid input.
4820 continue
4821 fi
4822
4823 rm -f conftest.err conftest.$ac_ext
4824
4825 # OK, works on sane cases. Now check whether nonexistent headers
4826 # can be detected and how.
4827 cat >conftest.$ac_ext <<_ACEOF
4828 /* confdefs.h. */
4829 _ACEOF
4830 cat confdefs.h >>conftest.$ac_ext
4831 cat >>conftest.$ac_ext <<_ACEOF
4832 /* end confdefs.h. */
4833 #include <ac_nonexistent.h>
4834 _ACEOF
4835 if { (ac_try="$ac_cpp conftest.$ac_ext"
4836 case "(($ac_try" in
4837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4838 *) ac_try_echo=$ac_try;;
4839 esac
4840 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4841 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4842 ac_status=$?
4843 grep -v '^ *+' conftest.er1 >conftest.err
4844 rm -f conftest.er1
4845 cat conftest.err >&5
4846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4847 (exit $ac_status); } >/dev/null && {
4848 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4849 test ! -s conftest.err
4850 }; then
4851 # Broken: success on invalid input.
4852 continue
4853 else
4854 echo "$as_me: failed program was:" >&5
4855 sed 's/^/| /' conftest.$ac_ext >&5
4856
4857 # Passes both tests.
4858 ac_preproc_ok=:
4859 break
4860 fi
4861
4862 rm -f conftest.err conftest.$ac_ext
4863
4864 done
4865 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4866 rm -f conftest.err conftest.$ac_ext
4867 if $ac_preproc_ok; then
4868 :
4869 else
4870 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4871 See \`config.log' for more details." >&5
4872 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4873 See \`config.log' for more details." >&2;}
4874 { (exit 1); exit 1; }; }
4875 fi
4876
4877 ac_ext=c
4878 ac_cpp='$CPP $CPPFLAGS'
4879 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4880 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4881 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4882
4883
4884 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4885 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4886 if test "${ac_cv_header_stdc+set}" = set; then
4887 echo $ECHO_N "(cached) $ECHO_C" >&6
4888 else
4889 cat >conftest.$ac_ext <<_ACEOF
4890 /* confdefs.h. */
4891 _ACEOF
4892 cat confdefs.h >>conftest.$ac_ext
4893 cat >>conftest.$ac_ext <<_ACEOF
4894 /* end confdefs.h. */
4895 #include <stdlib.h>
4896 #include <stdarg.h>
4897 #include <string.h>
4898 #include <float.h>
4899
4900 int
4901 main ()
4902 {
4903
4904 ;
4905 return 0;
4906 }
4907 _ACEOF
4908 rm -f conftest.$ac_objext
4909 if { (ac_try="$ac_compile"
4910 case "(($ac_try" in
4911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4912 *) ac_try_echo=$ac_try;;
4913 esac
4914 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4915 (eval "$ac_compile") 2>conftest.er1
4916 ac_status=$?
4917 grep -v '^ *+' conftest.er1 >conftest.err
4918 rm -f conftest.er1
4919 cat conftest.err >&5
4920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4921 (exit $ac_status); } && {
4922 test -z "$ac_c_werror_flag" ||
4923 test ! -s conftest.err
4924 } && test -s conftest.$ac_objext; then
4925 ac_cv_header_stdc=yes
4926 else
4927 echo "$as_me: failed program was:" >&5
4928 sed 's/^/| /' conftest.$ac_ext >&5
4929
4930 ac_cv_header_stdc=no
4931 fi
4932
4933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4934
4935 if test $ac_cv_header_stdc = yes; then
4936 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4937 cat >conftest.$ac_ext <<_ACEOF
4938 /* confdefs.h. */
4939 _ACEOF
4940 cat confdefs.h >>conftest.$ac_ext
4941 cat >>conftest.$ac_ext <<_ACEOF
4942 /* end confdefs.h. */
4943 #include <string.h>
4944
4945 _ACEOF
4946 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4947 $EGREP "memchr" >/dev/null 2>&1; then
4948 :
4949 else
4950 ac_cv_header_stdc=no
4951 fi
4952 rm -f conftest*
4953
4954 fi
4955
4956 if test $ac_cv_header_stdc = yes; then
4957 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4958 cat >conftest.$ac_ext <<_ACEOF
4959 /* confdefs.h. */
4960 _ACEOF
4961 cat confdefs.h >>conftest.$ac_ext
4962 cat >>conftest.$ac_ext <<_ACEOF
4963 /* end confdefs.h. */
4964 #include <stdlib.h>
4965
4966 _ACEOF
4967 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4968 $EGREP "free" >/dev/null 2>&1; then
4969 :
4970 else
4971 ac_cv_header_stdc=no
4972 fi
4973 rm -f conftest*
4974
4975 fi
4976
4977 if test $ac_cv_header_stdc = yes; then
4978 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4979 if test "$cross_compiling" = yes; then
4980 :
4981 else
4982 cat >conftest.$ac_ext <<_ACEOF
4983 /* confdefs.h. */
4984 _ACEOF
4985 cat confdefs.h >>conftest.$ac_ext
4986 cat >>conftest.$ac_ext <<_ACEOF
4987 /* end confdefs.h. */
4988 #include <ctype.h>
4989 #include <stdlib.h>
4990 #if ((' ' & 0x0FF) == 0x020)
4991 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4992 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4993 #else
4994 # define ISLOWER(c) \
4995 (('a' <= (c) && (c) <= 'i') \
4996 || ('j' <= (c) && (c) <= 'r') \
4997 || ('s' <= (c) && (c) <= 'z'))
4998 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4999 #endif
5000
5001 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5002 int
5003 main ()
5004 {
5005 int i;
5006 for (i = 0; i < 256; i++)
5007 if (XOR (islower (i), ISLOWER (i))
5008 || toupper (i) != TOUPPER (i))
5009 return 2;
5010 return 0;
5011 }
5012 _ACEOF
5013 rm -f conftest$ac_exeext
5014 if { (ac_try="$ac_link"
5015 case "(($ac_try" in
5016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5017 *) ac_try_echo=$ac_try;;
5018 esac
5019 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5020 (eval "$ac_link") 2>&5
5021 ac_status=$?
5022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5023 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5024 { (case "(($ac_try" in
5025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5026 *) ac_try_echo=$ac_try;;
5027 esac
5028 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5029 (eval "$ac_try") 2>&5
5030 ac_status=$?
5031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5032 (exit $ac_status); }; }; then
5033 :
5034 else
5035 echo "$as_me: program exited with status $ac_status" >&5
5036 echo "$as_me: failed program was:" >&5
5037 sed 's/^/| /' conftest.$ac_ext >&5
5038
5039 ( exit $ac_status )
5040 ac_cv_header_stdc=no
5041 fi
5042 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5043 fi
5044
5045
5046 fi
5047 fi
5048 { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5049 echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
5050 if test $ac_cv_header_stdc = yes; then
5051
5052 cat >>confdefs.h <<\_ACEOF
5053 #define STDC_HEADERS 1
5054 _ACEOF
5055
5056 fi
5057
5058 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5069 inttypes.h stdint.h unistd.h
5070 do
5071 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5072 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5073 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5074 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5075 echo $ECHO_N "(cached) $ECHO_C" >&6
5076 else
5077 cat >conftest.$ac_ext <<_ACEOF
5078 /* confdefs.h. */
5079 _ACEOF
5080 cat confdefs.h >>conftest.$ac_ext
5081 cat >>conftest.$ac_ext <<_ACEOF
5082 /* end confdefs.h. */
5083 $ac_includes_default
5084
5085 #include <$ac_header>
5086 _ACEOF
5087 rm -f conftest.$ac_objext
5088 if { (ac_try="$ac_compile"
5089 case "(($ac_try" in
5090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5091 *) ac_try_echo=$ac_try;;
5092 esac
5093 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5094 (eval "$ac_compile") 2>conftest.er1
5095 ac_status=$?
5096 grep -v '^ *+' conftest.er1 >conftest.err
5097 rm -f conftest.er1
5098 cat conftest.err >&5
5099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5100 (exit $ac_status); } && {
5101 test -z "$ac_c_werror_flag" ||
5102 test ! -s conftest.err
5103 } && test -s conftest.$ac_objext; then
5104 eval "$as_ac_Header=yes"
5105 else
5106 echo "$as_me: failed program was:" >&5
5107 sed 's/^/| /' conftest.$ac_ext >&5
5108
5109 eval "$as_ac_Header=no"
5110 fi
5111
5112 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5113 fi
5114 ac_res=`eval echo '${'$as_ac_Header'}'`
5115 { echo "$as_me:$LINENO: result: $ac_res" >&5
5116 echo "${ECHO_T}$ac_res" >&6; }
5117 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5118 cat >>confdefs.h <<_ACEOF
5119 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5120 _ACEOF
5121
5122 fi
5123
5124 done
5125
5126
5127
5128 for ac_header in dlfcn.h
5129 do
5130 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5131 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5132 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5133 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5134 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5135 echo $ECHO_N "(cached) $ECHO_C" >&6
5136 fi
5137 ac_res=`eval echo '${'$as_ac_Header'}'`
5138 { echo "$as_me:$LINENO: result: $ac_res" >&5
5139 echo "${ECHO_T}$ac_res" >&6; }
5140 else
5141 # Is the header compilable?
5142 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
5143 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
5144 cat >conftest.$ac_ext <<_ACEOF
5145 /* confdefs.h. */
5146 _ACEOF
5147 cat confdefs.h >>conftest.$ac_ext
5148 cat >>conftest.$ac_ext <<_ACEOF
5149 /* end confdefs.h. */
5150 $ac_includes_default
5151 #include <$ac_header>
5152 _ACEOF
5153 rm -f conftest.$ac_objext
5154 if { (ac_try="$ac_compile"
5155 case "(($ac_try" in
5156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5157 *) ac_try_echo=$ac_try;;
5158 esac
5159 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5160 (eval "$ac_compile") 2>conftest.er1
5161 ac_status=$?
5162 grep -v '^ *+' conftest.er1 >conftest.err
5163 rm -f conftest.er1
5164 cat conftest.err >&5
5165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5166 (exit $ac_status); } && {
5167 test -z "$ac_c_werror_flag" ||
5168 test ! -s conftest.err
5169 } && test -s conftest.$ac_objext; then
5170 ac_header_compiler=yes
5171 else
5172 echo "$as_me: failed program was:" >&5
5173 sed 's/^/| /' conftest.$ac_ext >&5
5174
5175 ac_header_compiler=no
5176 fi
5177
5178 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5179 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5180 echo "${ECHO_T}$ac_header_compiler" >&6; }
5181
5182 # Is the header present?
5183 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
5184 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
5185 cat >conftest.$ac_ext <<_ACEOF
5186 /* confdefs.h. */
5187 _ACEOF
5188 cat confdefs.h >>conftest.$ac_ext
5189 cat >>conftest.$ac_ext <<_ACEOF
5190 /* end confdefs.h. */
5191 #include <$ac_header>
5192 _ACEOF
5193 if { (ac_try="$ac_cpp conftest.$ac_ext"
5194 case "(($ac_try" in
5195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5196 *) ac_try_echo=$ac_try;;
5197 esac
5198 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5199 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5200 ac_status=$?
5201 grep -v '^ *+' conftest.er1 >conftest.err
5202 rm -f conftest.er1
5203 cat conftest.err >&5
5204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5205 (exit $ac_status); } >/dev/null && {
5206 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5207 test ! -s conftest.err
5208 }; then
5209 ac_header_preproc=yes
5210 else
5211 echo "$as_me: failed program was:" >&5
5212 sed 's/^/| /' conftest.$ac_ext >&5
5213
5214 ac_header_preproc=no
5215 fi
5216
5217 rm -f conftest.err conftest.$ac_ext
5218 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5219 echo "${ECHO_T}$ac_header_preproc" >&6; }
5220
5221 # So? What about this header?
5222 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5223 yes:no: )
5224 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5225 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5226 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5227 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5228 ac_header_preproc=yes
5229 ;;
5230 no:yes:* )
5231 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5232 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5233 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5234 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5235 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5236 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5237 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5238 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5239 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5240 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5241 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5242 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5243
5244 ;;
5245 esac
5246 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5247 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5248 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5249 echo $ECHO_N "(cached) $ECHO_C" >&6
5250 else
5251 eval "$as_ac_Header=\$ac_header_preproc"
5252 fi
5253 ac_res=`eval echo '${'$as_ac_Header'}'`
5254 { echo "$as_me:$LINENO: result: $ac_res" >&5
5255 echo "${ECHO_T}$ac_res" >&6; }
5256
5257 fi
5258 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5259 cat >>confdefs.h <<_ACEOF
5260 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5261 _ACEOF
5262
5263 fi
5264
5265 done
5266
5267 ac_ext=cpp
5268 ac_cpp='$CXXCPP $CPPFLAGS'
5269 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5270 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5271 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5272 if test -z "$CXX"; then
5273 if test -n "$CCC"; then
5274 CXX=$CCC
5275 else
5276 if test -n "$ac_tool_prefix"; then
5277 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
5278 do
5279 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5280 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5281 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5282 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5283 if test "${ac_cv_prog_CXX+set}" = set; then
5284 echo $ECHO_N "(cached) $ECHO_C" >&6
5285 else
5286 if test -n "$CXX"; then
5287 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5288 else
5289 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5290 for as_dir in $PATH
5291 do
5292 IFS=$as_save_IFS
5293 test -z "$as_dir" && as_dir=.
5294 for ac_exec_ext in '' $ac_executable_extensions; do
5295 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5296 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
5297 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5298 break 2
5299 fi
5300 done
5301 done
5302 IFS=$as_save_IFS
5303
5304 fi
5305 fi
5306 CXX=$ac_cv_prog_CXX
5307 if test -n "$CXX"; then
5308 { echo "$as_me:$LINENO: result: $CXX" >&5
5309 echo "${ECHO_T}$CXX" >&6; }
5310 else
5311 { echo "$as_me:$LINENO: result: no" >&5
5312 echo "${ECHO_T}no" >&6; }
5313 fi
5314
5315
5316 test -n "$CXX" && break
5317 done
5318 fi
5319 if test -z "$CXX"; then
5320 ac_ct_CXX=$CXX
5321 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
5322 do
5323 # Extract the first word of "$ac_prog", so it can be a program name with args.
5324 set dummy $ac_prog; ac_word=$2
5325 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5326 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5327 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
5328 echo $ECHO_N "(cached) $ECHO_C" >&6
5329 else
5330 if test -n "$ac_ct_CXX"; then
5331 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5332 else
5333 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5334 for as_dir in $PATH
5335 do
5336 IFS=$as_save_IFS
5337 test -z "$as_dir" && as_dir=.
5338 for ac_exec_ext in '' $ac_executable_extensions; do
5339 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5340 ac_cv_prog_ac_ct_CXX="$ac_prog"
5341 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5342 break 2
5343 fi
5344 done
5345 done
5346 IFS=$as_save_IFS
5347
5348 fi
5349 fi
5350 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5351 if test -n "$ac_ct_CXX"; then
5352 { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
5353 echo "${ECHO_T}$ac_ct_CXX" >&6; }
5354 else
5355 { echo "$as_me:$LINENO: result: no" >&5
5356 echo "${ECHO_T}no" >&6; }
5357 fi
5358
5359
5360 test -n "$ac_ct_CXX" && break
5361 done
5362
5363 if test "x$ac_ct_CXX" = x; then
5364 CXX="g++"
5365 else
5366 case $cross_compiling:$ac_tool_warned in
5367 yes:)
5368 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5369 whose name does not start with the host triplet. If you think this
5370 configuration is useful to you, please write to autoconf@gnu.org." >&5
5371 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5372 whose name does not start with the host triplet. If you think this
5373 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5374 ac_tool_warned=yes ;;
5375 esac
5376 CXX=$ac_ct_CXX
5377 fi
5378 fi
5379
5380 fi
5381 fi
5382 # Provide some information about the compiler.
5383 echo "$as_me:$LINENO: checking for C++ compiler version" >&5
5384 ac_compiler=`set X $ac_compile; echo $2`
5385 { (ac_try="$ac_compiler --version >&5"
5386 case "(($ac_try" in
5387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5388 *) ac_try_echo=$ac_try;;
5389 esac
5390 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5391 (eval "$ac_compiler --version >&5") 2>&5
5392 ac_status=$?
5393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5394 (exit $ac_status); }
5395 { (ac_try="$ac_compiler -v >&5"
5396 case "(($ac_try" in
5397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5398 *) ac_try_echo=$ac_try;;
5399 esac
5400 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5401 (eval "$ac_compiler -v >&5") 2>&5
5402 ac_status=$?
5403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5404 (exit $ac_status); }
5405 { (ac_try="$ac_compiler -V >&5"
5406 case "(($ac_try" in
5407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5408 *) ac_try_echo=$ac_try;;
5409 esac
5410 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5411 (eval "$ac_compiler -V >&5") 2>&5
5412 ac_status=$?
5413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5414 (exit $ac_status); }
5415
5416 { echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
5417 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; }
5418 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
5419 echo $ECHO_N "(cached) $ECHO_C" >&6
5420 else
5421 cat >conftest.$ac_ext <<_ACEOF
5422 /* confdefs.h. */
5423 _ACEOF
5424 cat confdefs.h >>conftest.$ac_ext
5425 cat >>conftest.$ac_ext <<_ACEOF
5426 /* end confdefs.h. */
5427
5428 int
5429 main ()
5430 {
5431 #ifndef __GNUC__
5432 choke me
5433 #endif
5434
5435 ;
5436 return 0;
5437 }
5438 _ACEOF
5439 rm -f conftest.$ac_objext
5440 if { (ac_try="$ac_compile"
5441 case "(($ac_try" in
5442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5443 *) ac_try_echo=$ac_try;;
5444 esac
5445 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5446 (eval "$ac_compile") 2>conftest.er1
5447 ac_status=$?
5448 grep -v '^ *+' conftest.er1 >conftest.err
5449 rm -f conftest.er1
5450 cat conftest.err >&5
5451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5452 (exit $ac_status); } && {
5453 test -z "$ac_cxx_werror_flag" ||
5454 test ! -s conftest.err
5455 } && test -s conftest.$ac_objext; then
5456 ac_compiler_gnu=yes
5457 else
5458 echo "$as_me: failed program was:" >&5
5459 sed 's/^/| /' conftest.$ac_ext >&5
5460
5461 ac_compiler_gnu=no
5462 fi
5463
5464 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5465 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
5466
5467 fi
5468 { echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
5469 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
5470 GXX=`test $ac_compiler_gnu = yes && echo yes`
5471 ac_test_CXXFLAGS=${CXXFLAGS+set}
5472 ac_save_CXXFLAGS=$CXXFLAGS
5473 { echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
5474 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
5475 if test "${ac_cv_prog_cxx_g+set}" = set; then
5476 echo $ECHO_N "(cached) $ECHO_C" >&6
5477 else
5478 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5479 ac_cxx_werror_flag=yes
5480 ac_cv_prog_cxx_g=no
5481 CXXFLAGS="-g"
5482 cat >conftest.$ac_ext <<_ACEOF
5483 /* confdefs.h. */
5484 _ACEOF
5485 cat confdefs.h >>conftest.$ac_ext
5486 cat >>conftest.$ac_ext <<_ACEOF
5487 /* end confdefs.h. */
5488
5489 int
5490 main ()
5491 {
5492
5493 ;
5494 return 0;
5495 }
5496 _ACEOF
5497 rm -f conftest.$ac_objext
5498 if { (ac_try="$ac_compile"
5499 case "(($ac_try" in
5500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5501 *) ac_try_echo=$ac_try;;
5502 esac
5503 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5504 (eval "$ac_compile") 2>conftest.er1
5505 ac_status=$?
5506 grep -v '^ *+' conftest.er1 >conftest.err
5507 rm -f conftest.er1
5508 cat conftest.err >&5
5509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5510 (exit $ac_status); } && {
5511 test -z "$ac_cxx_werror_flag" ||
5512 test ! -s conftest.err
5513 } && test -s conftest.$ac_objext; then
5514 ac_cv_prog_cxx_g=yes
5515 else
5516 echo "$as_me: failed program was:" >&5
5517 sed 's/^/| /' conftest.$ac_ext >&5
5518
5519 CXXFLAGS=""
5520 cat >conftest.$ac_ext <<_ACEOF
5521 /* confdefs.h. */
5522 _ACEOF
5523 cat confdefs.h >>conftest.$ac_ext
5524 cat >>conftest.$ac_ext <<_ACEOF
5525 /* end confdefs.h. */
5526
5527 int
5528 main ()
5529 {
5530
5531 ;
5532 return 0;
5533 }
5534 _ACEOF
5535 rm -f conftest.$ac_objext
5536 if { (ac_try="$ac_compile"
5537 case "(($ac_try" in
5538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5539 *) ac_try_echo=$ac_try;;
5540 esac
5541 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5542 (eval "$ac_compile") 2>conftest.er1
5543 ac_status=$?
5544 grep -v '^ *+' conftest.er1 >conftest.err
5545 rm -f conftest.er1
5546 cat conftest.err >&5
5547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5548 (exit $ac_status); } && {
5549 test -z "$ac_cxx_werror_flag" ||
5550 test ! -s conftest.err
5551 } && test -s conftest.$ac_objext; then
5552 :
5553 else
5554 echo "$as_me: failed program was:" >&5
5555 sed 's/^/| /' conftest.$ac_ext >&5
5556
5557 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5558 CXXFLAGS="-g"
5559 cat >conftest.$ac_ext <<_ACEOF
5560 /* confdefs.h. */
5561 _ACEOF
5562 cat confdefs.h >>conftest.$ac_ext
5563 cat >>conftest.$ac_ext <<_ACEOF
5564 /* end confdefs.h. */
5565
5566 int
5567 main ()
5568 {
5569
5570 ;
5571 return 0;
5572 }
5573 _ACEOF
5574 rm -f conftest.$ac_objext
5575 if { (ac_try="$ac_compile"
5576 case "(($ac_try" in
5577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5578 *) ac_try_echo=$ac_try;;
5579 esac
5580 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5581 (eval "$ac_compile") 2>conftest.er1
5582 ac_status=$?
5583 grep -v '^ *+' conftest.er1 >conftest.err
5584 rm -f conftest.er1
5585 cat conftest.err >&5
5586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5587 (exit $ac_status); } && {
5588 test -z "$ac_cxx_werror_flag" ||
5589 test ! -s conftest.err
5590 } && test -s conftest.$ac_objext; then
5591 ac_cv_prog_cxx_g=yes
5592 else
5593 echo "$as_me: failed program was:" >&5
5594 sed 's/^/| /' conftest.$ac_ext >&5
5595
5596
5597 fi
5598
5599 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5600 fi
5601
5602 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5603 fi
5604
5605 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5606 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5607 fi
5608 { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
5609 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; }
5610 if test "$ac_test_CXXFLAGS" = set; then
5611 CXXFLAGS=$ac_save_CXXFLAGS
5612 elif test $ac_cv_prog_cxx_g = yes; then
5613 if test "$GXX" = yes; then
5614 CXXFLAGS="-g -O2"
5615 else
5616 CXXFLAGS="-g"
5617 fi
5618 else
5619 if test "$GXX" = yes; then
5620 CXXFLAGS="-O2"
5621 else
5622 CXXFLAGS=
5623 fi
5624 fi
5625 ac_ext=cpp
5626 ac_cpp='$CXXCPP $CPPFLAGS'
5627 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5628 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5629 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5630
5631 depcc="$CXX" am_compiler_list=
5632
5633 { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
5634 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
5635 if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
5636 echo $ECHO_N "(cached) $ECHO_C" >&6
5637 else
5638 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5639 # We make a subdir and do the tests there. Otherwise we can end up
5640 # making bogus files that we don't know about and never remove. For
5641 # instance it was reported that on HP-UX the gcc test will end up
5642 # making a dummy file named `D' -- because `-MD' means `put the output
5643 # in D'.
5644 mkdir conftest.dir
5645 # Copy depcomp to subdir because otherwise we won't find it if we're
5646 # using a relative directory.
5647 cp "$am_depcomp" conftest.dir
5648 cd conftest.dir
5649 # We will build objects and dependencies in a subdirectory because
5650 # it helps to detect inapplicable dependency modes. For instance
5651 # both Tru64's cc and ICC support -MD to output dependencies as a
5652 # side effect of compilation, but ICC will put the dependencies in
5653 # the current directory while Tru64 will put them in the object
5654 # directory.
5655 mkdir sub
5656
5657 am_cv_CXX_dependencies_compiler_type=none
5658 if test "$am_compiler_list" = ""; then
5659 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5660 fi
5661 for depmode in $am_compiler_list; do
5662 # Setup a source with many dependencies, because some compilers
5663 # like to wrap large dependency lists on column 80 (with \), and
5664 # we should not choose a depcomp mode which is confused by this.
5665 #
5666 # We need to recreate these files for each test, as the compiler may
5667 # overwrite some of them when testing with obscure command lines.
5668 # This happens at least with the AIX C compiler.
5669 : > sub/conftest.c
5670 for i in 1 2 3 4 5 6; do
5671 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5672 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5673 # Solaris 8's {/usr,}/bin/sh.
5674 touch sub/conftst$i.h
5675 done
5676 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5677
5678 case $depmode in
5679 nosideeffect)
5680 # after this tag, mechanisms are not by side-effect, so they'll
5681 # only be used when explicitly requested
5682 if test "x$enable_dependency_tracking" = xyes; then
5683 continue
5684 else
5685 break
5686 fi
5687 ;;
5688 none) break ;;
5689 esac
5690 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5691 # mode. It turns out that the SunPro C++ compiler does not properly
5692 # handle `-M -o', and we need to detect this.
5693 if depmode=$depmode \
5694 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5695 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5696 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
5697 >/dev/null 2>conftest.err &&
5698 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5699 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5700 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
5701 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5702 # icc doesn't choke on unknown options, it will just issue warnings
5703 # or remarks (even with -Werror). So we grep stderr for any message
5704 # that says an option was ignored or not supported.
5705 # When given -MP, icc 7.0 and 7.1 complain thusly:
5706 # icc: Command line warning: ignoring option '-M'; no argument required
5707 # The diagnosis changed in icc 8.0:
5708 # icc: Command line remark: option '-MP' not supported
5709 if (grep 'ignoring option' conftest.err ||
5710 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5711 am_cv_CXX_dependencies_compiler_type=$depmode
5712 break
5713 fi
5714 fi
5715 done
5716
5717 cd ..
5718 rm -rf conftest.dir
5719 else
5720 am_cv_CXX_dependencies_compiler_type=none
5721 fi
5722
5723 fi
5724 { echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
5725 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; }
5726 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
5727
5728 if
5729 test "x$enable_dependency_tracking" != xno \
5730 && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
5731 am__fastdepCXX_TRUE=
5732 am__fastdepCXX_FALSE='#'
5733 else
5734 am__fastdepCXX_TRUE='#'
5735 am__fastdepCXX_FALSE=
5736 fi
5737
5738
5739
5740
5741 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5742 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5743 (test "X$CXX" != "Xg++"))) ; then
5744 ac_ext=cpp
5745 ac_cpp='$CXXCPP $CPPFLAGS'
5746 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5747 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5748 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5749 { echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
5750 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; }
5751 if test -z "$CXXCPP"; then
5752 if test "${ac_cv_prog_CXXCPP+set}" = set; then
5753 echo $ECHO_N "(cached) $ECHO_C" >&6
5754 else
5755 # Double quotes because CXXCPP needs to be expanded
5756 for CXXCPP in "$CXX -E" "/lib/cpp"
5757 do
5758 ac_preproc_ok=false
5759 for ac_cxx_preproc_warn_flag in '' yes
5760 do
5761 # Use a header file that comes with gcc, so configuring glibc
5762 # with a fresh cross-compiler works.
5763 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5764 # <limits.h> exists even on freestanding compilers.
5765 # On the NeXT, cc -E runs the code through the compiler's parser,
5766 # not just through cpp. "Syntax error" is here to catch this case.
5767 cat >conftest.$ac_ext <<_ACEOF
5768 /* confdefs.h. */
5769 _ACEOF
5770 cat confdefs.h >>conftest.$ac_ext
5771 cat >>conftest.$ac_ext <<_ACEOF
5772 /* end confdefs.h. */
5773 #ifdef __STDC__
5774 # include <limits.h>
5775 #else
5776 # include <assert.h>
5777 #endif
5778 Syntax error
5779 _ACEOF
5780 if { (ac_try="$ac_cpp conftest.$ac_ext"
5781 case "(($ac_try" in
5782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5783 *) ac_try_echo=$ac_try;;
5784 esac
5785 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5786 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5787 ac_status=$?
5788 grep -v '^ *+' conftest.er1 >conftest.err
5789 rm -f conftest.er1
5790 cat conftest.err >&5
5791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5792 (exit $ac_status); } >/dev/null && {
5793 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
5794 test ! -s conftest.err
5795 }; then
5796 :
5797 else
5798 echo "$as_me: failed program was:" >&5
5799 sed 's/^/| /' conftest.$ac_ext >&5
5800
5801 # Broken: fails on valid input.
5802 continue
5803 fi
5804
5805 rm -f conftest.err conftest.$ac_ext
5806
5807 # OK, works on sane cases. Now check whether nonexistent headers
5808 # can be detected and how.
5809 cat >conftest.$ac_ext <<_ACEOF
5810 /* confdefs.h. */
5811 _ACEOF
5812 cat confdefs.h >>conftest.$ac_ext
5813 cat >>conftest.$ac_ext <<_ACEOF
5814 /* end confdefs.h. */
5815 #include <ac_nonexistent.h>
5816 _ACEOF
5817 if { (ac_try="$ac_cpp conftest.$ac_ext"
5818 case "(($ac_try" in
5819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5820 *) ac_try_echo=$ac_try;;
5821 esac
5822 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5823 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5824 ac_status=$?
5825 grep -v '^ *+' conftest.er1 >conftest.err
5826 rm -f conftest.er1
5827 cat conftest.err >&5
5828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5829 (exit $ac_status); } >/dev/null && {
5830 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
5831 test ! -s conftest.err
5832 }; then
5833 # Broken: success on invalid input.
5834 continue
5835 else
5836 echo "$as_me: failed program was:" >&5
5837 sed 's/^/| /' conftest.$ac_ext >&5
5838
5839 # Passes both tests.
5840 ac_preproc_ok=:
5841 break
5842 fi
5843
5844 rm -f conftest.err conftest.$ac_ext
5845
5846 done
5847 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5848 rm -f conftest.err conftest.$ac_ext
5849 if $ac_preproc_ok; then
5850 break
5851 fi
5852
5853 done
5854 ac_cv_prog_CXXCPP=$CXXCPP
5855
5856 fi
5857 CXXCPP=$ac_cv_prog_CXXCPP
5858 else
5859 ac_cv_prog_CXXCPP=$CXXCPP
5860 fi
5861 { echo "$as_me:$LINENO: result: $CXXCPP" >&5
5862 echo "${ECHO_T}$CXXCPP" >&6; }
5863 ac_preproc_ok=false
5864 for ac_cxx_preproc_warn_flag in '' yes
5865 do
5866 # Use a header file that comes with gcc, so configuring glibc
5867 # with a fresh cross-compiler works.
5868 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5869 # <limits.h> exists even on freestanding compilers.
5870 # On the NeXT, cc -E runs the code through the compiler's parser,
5871 # not just through cpp. "Syntax error" is here to catch this case.
5872 cat >conftest.$ac_ext <<_ACEOF
5873 /* confdefs.h. */
5874 _ACEOF
5875 cat confdefs.h >>conftest.$ac_ext
5876 cat >>conftest.$ac_ext <<_ACEOF
5877 /* end confdefs.h. */
5878 #ifdef __STDC__
5879 # include <limits.h>
5880 #else
5881 # include <assert.h>
5882 #endif
5883 Syntax error
5884 _ACEOF
5885 if { (ac_try="$ac_cpp conftest.$ac_ext"
5886 case "(($ac_try" in
5887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5888 *) ac_try_echo=$ac_try;;
5889 esac
5890 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5891 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5892 ac_status=$?
5893 grep -v '^ *+' conftest.er1 >conftest.err
5894 rm -f conftest.er1
5895 cat conftest.err >&5
5896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5897 (exit $ac_status); } >/dev/null && {
5898 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
5899 test ! -s conftest.err
5900 }; then
5901 :
5902 else
5903 echo "$as_me: failed program was:" >&5
5904 sed 's/^/| /' conftest.$ac_ext >&5
5905
5906 # Broken: fails on valid input.
5907 continue
5908 fi
5909
5910 rm -f conftest.err conftest.$ac_ext
5911
5912 # OK, works on sane cases. Now check whether nonexistent headers
5913 # can be detected and how.
5914 cat >conftest.$ac_ext <<_ACEOF
5915 /* confdefs.h. */
5916 _ACEOF
5917 cat confdefs.h >>conftest.$ac_ext
5918 cat >>conftest.$ac_ext <<_ACEOF
5919 /* end confdefs.h. */
5920 #include <ac_nonexistent.h>
5921 _ACEOF
5922 if { (ac_try="$ac_cpp conftest.$ac_ext"
5923 case "(($ac_try" in
5924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5925 *) ac_try_echo=$ac_try;;
5926 esac
5927 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5928 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5929 ac_status=$?
5930 grep -v '^ *+' conftest.er1 >conftest.err
5931 rm -f conftest.er1
5932 cat conftest.err >&5
5933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5934 (exit $ac_status); } >/dev/null && {
5935 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
5936 test ! -s conftest.err
5937 }; then
5938 # Broken: success on invalid input.
5939 continue
5940 else
5941 echo "$as_me: failed program was:" >&5
5942 sed 's/^/| /' conftest.$ac_ext >&5
5943
5944 # Passes both tests.
5945 ac_preproc_ok=:
5946 break
5947 fi
5948
5949 rm -f conftest.err conftest.$ac_ext
5950
5951 done
5952 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5953 rm -f conftest.err conftest.$ac_ext
5954 if $ac_preproc_ok; then
5955 :
5956 else
5957 { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
5958 See \`config.log' for more details." >&5
5959 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
5960 See \`config.log' for more details." >&2;}
5961 { (exit 1); exit 1; }; }
5962 fi
5963
5964 ac_ext=cpp
5965 ac_cpp='$CXXCPP $CPPFLAGS'
5966 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5967 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5968 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5969
5970 fi
5971
5972
5973 ac_ext=f
5974 ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
5975 ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5976 ac_compiler_gnu=$ac_cv_f77_compiler_gnu
5977 if test -n "$ac_tool_prefix"; then
5978 for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
5979 do
5980 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5981 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5982 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5983 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5984 if test "${ac_cv_prog_F77+set}" = set; then
5985 echo $ECHO_N "(cached) $ECHO_C" >&6
5986 else
5987 if test -n "$F77"; then
5988 ac_cv_prog_F77="$F77" # Let the user override the test.
5989 else
5990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5991 for as_dir in $PATH
5992 do
5993 IFS=$as_save_IFS
5994 test -z "$as_dir" && as_dir=.
5995 for ac_exec_ext in '' $ac_executable_extensions; do
5996 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5997 ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
5998 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5999 break 2
6000 fi
6001 done
6002 done
6003 IFS=$as_save_IFS
6004
6005 fi
6006 fi
6007 F77=$ac_cv_prog_F77
6008 if test -n "$F77"; then
6009 { echo "$as_me:$LINENO: result: $F77" >&5
6010 echo "${ECHO_T}$F77" >&6; }
6011 else
6012 { echo "$as_me:$LINENO: result: no" >&5
6013 echo "${ECHO_T}no" >&6; }
6014 fi
6015
6016
6017 test -n "$F77" && break
6018 done
6019 fi
6020 if test -z "$F77"; then
6021 ac_ct_F77=$F77
6022 for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
6023 do
6024 # Extract the first word of "$ac_prog", so it can be a program name with args.
6025 set dummy $ac_prog; ac_word=$2
6026 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6027 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6028 if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
6029 echo $ECHO_N "(cached) $ECHO_C" >&6
6030 else
6031 if test -n "$ac_ct_F77"; then
6032 ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
6033 else
6034 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6035 for as_dir in $PATH
6036 do
6037 IFS=$as_save_IFS
6038 test -z "$as_dir" && as_dir=.
6039 for ac_exec_ext in '' $ac_executable_extensions; do
6040 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6041 ac_cv_prog_ac_ct_F77="$ac_prog"
6042 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6043 break 2
6044 fi
6045 done
6046 done
6047 IFS=$as_save_IFS
6048
6049 fi
6050 fi
6051 ac_ct_F77=$ac_cv_prog_ac_ct_F77
6052 if test -n "$ac_ct_F77"; then
6053 { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
6054 echo "${ECHO_T}$ac_ct_F77" >&6; }
6055 else
6056 { echo "$as_me:$LINENO: result: no" >&5
6057 echo "${ECHO_T}no" >&6; }
6058 fi
6059
6060
6061 test -n "$ac_ct_F77" && break
6062 done
6063
6064 if test "x$ac_ct_F77" = x; then
6065 F77=""
6066 else
6067 case $cross_compiling:$ac_tool_warned in
6068 yes:)
6069 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
6070 whose name does not start with the host triplet. If you think this
6071 configuration is useful to you, please write to autoconf@gnu.org." >&5
6072 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
6073 whose name does not start with the host triplet. If you think this
6074 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
6075 ac_tool_warned=yes ;;
6076 esac
6077 F77=$ac_ct_F77
6078 fi
6079 fi
6080
6081
6082 # Provide some information about the compiler.
6083 echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5
6084 ac_compiler=`set X $ac_compile; echo $2`
6085 { (ac_try="$ac_compiler --version >&5"
6086 case "(($ac_try" in
6087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6088 *) ac_try_echo=$ac_try;;
6089 esac
6090 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6091 (eval "$ac_compiler --version >&5") 2>&5
6092 ac_status=$?
6093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6094 (exit $ac_status); }
6095 { (ac_try="$ac_compiler -v >&5"
6096 case "(($ac_try" in
6097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6098 *) ac_try_echo=$ac_try;;
6099 esac
6100 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6101 (eval "$ac_compiler -v >&5") 2>&5
6102 ac_status=$?
6103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6104 (exit $ac_status); }
6105 { (ac_try="$ac_compiler -V >&5"
6106 case "(($ac_try" in
6107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6108 *) ac_try_echo=$ac_try;;
6109 esac
6110 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6111 (eval "$ac_compiler -V >&5") 2>&5
6112 ac_status=$?
6113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6114 (exit $ac_status); }
6115 rm -f a.out
6116
6117 # If we don't use `.F' as extension, the preprocessor is not run on the
6118 # input file. (Note that this only needs to work for GNU compilers.)
6119 ac_save_ext=$ac_ext
6120 ac_ext=F
6121 { echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
6122 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; }
6123 if test "${ac_cv_f77_compiler_gnu+set}" = set; then
6124 echo $ECHO_N "(cached) $ECHO_C" >&6
6125 else
6126 cat >conftest.$ac_ext <<_ACEOF
6127 program main
6128 #ifndef __GNUC__
6129 choke me
6130 #endif
6131
6132 end
6133 _ACEOF
6134 rm -f conftest.$ac_objext
6135 if { (ac_try="$ac_compile"
6136 case "(($ac_try" in
6137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6138 *) ac_try_echo=$ac_try;;
6139 esac
6140 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6141 (eval "$ac_compile") 2>conftest.er1
6142 ac_status=$?
6143 grep -v '^ *+' conftest.er1 >conftest.err
6144 rm -f conftest.er1
6145 cat conftest.err >&5
6146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6147 (exit $ac_status); } && {
6148 test -z "$ac_f77_werror_flag" ||
6149 test ! -s conftest.err
6150 } && test -s conftest.$ac_objext; then
6151 ac_compiler_gnu=yes
6152 else
6153 echo "$as_me: failed program was:" >&5
6154 sed 's/^/| /' conftest.$ac_ext >&5
6155
6156 ac_compiler_gnu=no
6157 fi
6158
6159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6160 ac_cv_f77_compiler_gnu=$ac_compiler_gnu
6161
6162 fi
6163 { echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
6164 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; }
6165 ac_ext=$ac_save_ext
6166 ac_test_FFLAGS=${FFLAGS+set}
6167 ac_save_FFLAGS=$FFLAGS
6168 FFLAGS=
6169 { echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
6170 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; }
6171 if test "${ac_cv_prog_f77_g+set}" = set; then
6172 echo $ECHO_N "(cached) $ECHO_C" >&6
6173 else
6174 FFLAGS=-g
6175 cat >conftest.$ac_ext <<_ACEOF
6176 program main
6177
6178 end
6179 _ACEOF
6180 rm -f conftest.$ac_objext
6181 if { (ac_try="$ac_compile"
6182 case "(($ac_try" in
6183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6184 *) ac_try_echo=$ac_try;;
6185 esac
6186 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6187 (eval "$ac_compile") 2>conftest.er1
6188 ac_status=$?
6189 grep -v '^ *+' conftest.er1 >conftest.err
6190 rm -f conftest.er1
6191 cat conftest.err >&5
6192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6193 (exit $ac_status); } && {
6194 test -z "$ac_f77_werror_flag" ||
6195 test ! -s conftest.err
6196 } && test -s conftest.$ac_objext; then
6197 ac_cv_prog_f77_g=yes
6198 else
6199 echo "$as_me: failed program was:" >&5
6200 sed 's/^/| /' conftest.$ac_ext >&5
6201
6202 ac_cv_prog_f77_g=no
6203 fi
6204
6205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6206
6207 fi
6208 { echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
6209 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; }
6210 if test "$ac_test_FFLAGS" = set; then
6211 FFLAGS=$ac_save_FFLAGS
6212 elif test $ac_cv_prog_f77_g = yes; then
6213 if test "x$ac_cv_f77_compiler_gnu" = xyes; then
6214 FFLAGS="-g -O2"
6215 else
6216 FFLAGS="-g"
6217 fi
6218 else
6219 if test "x$ac_cv_f77_compiler_gnu" = xyes; then
6220 FFLAGS="-O2"
6221 else
6222 FFLAGS=
6223 fi
6224 fi
6225
6226 G77=`test $ac_compiler_gnu = yes && echo yes`
6227 ac_ext=c
6228 ac_cpp='$CPP $CPPFLAGS'
6229 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6230 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6231 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6232
6233
6234
6235 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
6236 # find the maximum length of command line arguments
6237 { echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
6238 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; }
6239 if test "${lt_cv_sys_max_cmd_len+set}" = set; then
6240 echo $ECHO_N "(cached) $ECHO_C" >&6
6241 else
6242 i=0
6243 teststring="ABCD"
6244
6245 case $build_os in
6246 msdosdjgpp*)
6247 # On DJGPP, this test can blow up pretty badly due to problems in libc
6248 # (any single argument exceeding 2000 bytes causes a buffer overrun
6249 # during glob expansion). Even if it were fixed, the result of this
6250 # check would be larger than it should be.
6251 lt_cv_sys_max_cmd_len=12288; # 12K is about right
6252 ;;
6253
6254 gnu*)
6255 # Under GNU Hurd, this test is not required because there is
6256 # no limit to the length of command line arguments.
6257 # Libtool will interpret -1 as no limit whatsoever
6258 lt_cv_sys_max_cmd_len=-1;
6259 ;;
6260
6261 cygwin* | mingw*)
6262 # On Win9x/ME, this test blows up -- it succeeds, but takes
6263 # about 5 minutes as the teststring grows exponentially.
6264 # Worse, since 9x/ME are not pre-emptively multitasking,
6265 # you end up with a "frozen" computer, even though with patience
6266 # the test eventually succeeds (with a max line length of 256k).
6267 # Instead, let's just punt: use the minimum linelength reported by
6268 # all of the supported platforms: 8192 (on NT/2K/XP).
6269 lt_cv_sys_max_cmd_len=8192;
6270 ;;
6271
6272 amigaos*)
6273 # On AmigaOS with pdksh, this test takes hours, literally.
6274 # So we just punt and use a minimum line length of 8192.
6275 lt_cv_sys_max_cmd_len=8192;
6276 ;;
6277
6278 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
6279 # This has been around since 386BSD, at least. Likely further.
6280 if test -x /sbin/sysctl; then
6281 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
6282 elif test -x /usr/sbin/sysctl; then
6283 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
6284 else
6285 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
6286 fi
6287 # And add a safety zone
6288 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6289 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6290 ;;
6291
6292 interix*)
6293 # We know the value 262144 and hardcode it with a safety zone (like BSD)
6294 lt_cv_sys_max_cmd_len=196608
6295 ;;
6296
6297 osf*)
6298 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
6299 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
6300 # nice to cause kernel panics so lets avoid the loop below.
6301 # First set a reasonable default.
6302 lt_cv_sys_max_cmd_len=16384
6303 #
6304 if test -x /sbin/sysconfig; then
6305 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
6306 *1*) lt_cv_sys_max_cmd_len=-1 ;;
6307 esac
6308 fi
6309 ;;
6310 sco3.2v5*)
6311 lt_cv_sys_max_cmd_len=102400
6312 ;;
6313 sysv5* | sco5v6* | sysv4.2uw2*)
6314 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
6315 if test -n "$kargmax"; then
6316 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
6317 else
6318 lt_cv_sys_max_cmd_len=32768
6319 fi
6320 ;;
6321 *)
6322 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
6323 if test -n "$lt_cv_sys_max_cmd_len"; then
6324 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6325 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6326 else
6327 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
6328 while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
6329 = "XX$teststring") >/dev/null 2>&1 &&
6330 new_result=`expr "X$teststring" : ".*" 2>&1` &&
6331 lt_cv_sys_max_cmd_len=$new_result &&
6332 test $i != 17 # 1/2 MB should be enough
6333 do
6334 i=`expr $i + 1`
6335 teststring=$teststring$teststring
6336 done
6337 teststring=
6338 # Add a significant safety factor because C++ compilers can tack on massive
6339 # amounts of additional arguments before passing them to the linker.
6340 # It appears as though 1/2 is a usable value.
6341 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6342 fi
6343 ;;
6344 esac
6345
6346 fi
6347
6348 if test -n $lt_cv_sys_max_cmd_len ; then
6349 { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
6350 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; }
6351 else
6352 { echo "$as_me:$LINENO: result: none" >&5
6353 echo "${ECHO_T}none" >&6; }
6354 fi
6355
6356
6357
6358
6359
6360 # Check for command to grab the raw symbol name followed by C symbol from nm.
6361 { echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
6362 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; }
6363 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
6364 echo $ECHO_N "(cached) $ECHO_C" >&6
6365 else
6366
6367 # These are sane defaults that work on at least a few old systems.
6368 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
6369
6370 # Character class describing NM global symbol codes.
6371 symcode='[BCDEGRST]'
6372
6373 # Regexp to match symbols that can be accessed directly from C.
6374 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
6375
6376 # Transform an extracted symbol line into a proper C declaration
6377 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
6378
6379 # Transform an extracted symbol line into symbol name and symbol address
6380 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
6381
6382 # Define system-specific variables.
6383 case $host_os in
6384 aix*)
6385 symcode='[BCDT]'
6386 ;;
6387 cygwin* | mingw* | pw32*)
6388 symcode='[ABCDGISTW]'
6389 ;;
6390 hpux*) # Its linker distinguishes data from code symbols
6391 if test "$host_cpu" = ia64; then
6392 symcode='[ABCDEGRST]'
6393 fi
6394 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6395 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
6396 ;;
6397 linux* | k*bsd*-gnu)
6398 if test "$host_cpu" = ia64; then
6399 symcode='[ABCDGIRSTW]'
6400 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6401 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
6402 fi
6403 ;;
6404 irix* | nonstopux*)
6405 symcode='[BCDEGRST]'
6406 ;;
6407 osf*)
6408 symcode='[BCDEGQRST]'
6409 ;;
6410 solaris*)
6411 symcode='[BDRT]'
6412 ;;
6413 sco3.2v5*)
6414 symcode='[DT]'
6415 ;;
6416 sysv4.2uw2*)
6417 symcode='[DT]'
6418 ;;
6419 sysv5* | sco5v6* | unixware* | OpenUNIX*)
6420 symcode='[ABDT]'
6421 ;;
6422 sysv4)
6423 symcode='[DFNSTU]'
6424 ;;
6425 esac
6426
6427 # Handle CRLF in mingw tool chain
6428 opt_cr=
6429 case $build_os in
6430 mingw*)
6431 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6432 ;;
6433 esac
6434
6435 # If we're using GNU nm, then use its standard symbol codes.
6436 case `$NM -V 2>&1` in
6437 *GNU* | *'with BFD'*)
6438 symcode='[ABCDGIRSTW]' ;;
6439 esac
6440
6441 # Try without a prefix undercore, then with it.
6442 for ac_symprfx in "" "_"; do
6443
6444 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6445 symxfrm="\\1 $ac_symprfx\\2 \\2"
6446
6447 # Write the raw and C identifiers.
6448 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6449
6450 # Check to see that the pipe works correctly.
6451 pipe_works=no
6452
6453 rm -f conftest*
6454 cat > conftest.$ac_ext <<EOF
6455 #ifdef __cplusplus
6456 extern "C" {
6457 #endif
6458 char nm_test_var;
6459 void nm_test_func(){}
6460 #ifdef __cplusplus
6461 }
6462 #endif
6463 int main(){nm_test_var='a';nm_test_func();return(0);}
6464 EOF
6465
6466 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6467 (eval $ac_compile) 2>&5
6468 ac_status=$?
6469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6470 (exit $ac_status); }; then
6471 # Now try to grab the symbols.
6472 nlist=conftest.nm
6473 if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
6474 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
6475 ac_status=$?
6476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6477 (exit $ac_status); } && test -s "$nlist"; then
6478 # Try sorting and uniquifying the output.
6479 if sort "$nlist" | uniq > "$nlist"T; then
6480 mv -f "$nlist"T "$nlist"
6481 else
6482 rm -f "$nlist"T
6483 fi
6484
6485 # Make sure that we snagged all the symbols we need.
6486 if grep ' nm_test_var$' "$nlist" >/dev/null; then
6487 if grep ' nm_test_func$' "$nlist" >/dev/null; then
6488 cat <<EOF > conftest.$ac_ext
6489 #ifdef __cplusplus
6490 extern "C" {
6491 #endif
6492
6493 EOF
6494 # Now generate the symbol file.
6495 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
6496
6497 cat <<EOF >> conftest.$ac_ext
6498 #if defined (__STDC__) && __STDC__
6499 # define lt_ptr_t void *
6500 #else
6501 # define lt_ptr_t char *
6502 # define const
6503 #endif
6504
6505 /* The mapping between symbol names and symbols. */
6506 const struct {
6507 const char *name;
6508 lt_ptr_t address;
6509 }
6510 lt_preloaded_symbols[] =
6511 {
6512 EOF
6513 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
6514 cat <<\EOF >> conftest.$ac_ext
6515 {0, (lt_ptr_t) 0}
6516 };
6517
6518 #ifdef __cplusplus
6519 }
6520 #endif
6521 EOF
6522 # Now try linking the two files.
6523 mv conftest.$ac_objext conftstm.$ac_objext
6524 lt_save_LIBS="$LIBS"
6525 lt_save_CFLAGS="$CFLAGS"
6526 LIBS="conftstm.$ac_objext"
6527 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
6528 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6529 (eval $ac_link) 2>&5
6530 ac_status=$?
6531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6532 (exit $ac_status); } && test -s conftest${ac_exeext}; then
6533 pipe_works=yes
6534 fi
6535 LIBS="$lt_save_LIBS"
6536 CFLAGS="$lt_save_CFLAGS"
6537 else
6538 echo "cannot find nm_test_func in $nlist" >&5
6539 fi
6540 else
6541 echo "cannot find nm_test_var in $nlist" >&5
6542 fi
6543 else
6544 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
6545 fi
6546 else
6547 echo "$progname: failed program was:" >&5
6548 cat conftest.$ac_ext >&5
6549 fi
6550 rm -rf conftest* conftst*
6551
6552 # Do not use the global_symbol_pipe unless it works.
6553 if test "$pipe_works" = yes; then
6554 break
6555 else
6556 lt_cv_sys_global_symbol_pipe=
6557 fi
6558 done
6559
6560 fi
6561
6562 if test -z "$lt_cv_sys_global_symbol_pipe"; then
6563 lt_cv_sys_global_symbol_to_cdecl=
6564 fi
6565 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6566 { echo "$as_me:$LINENO: result: failed" >&5
6567 echo "${ECHO_T}failed" >&6; }
6568 else
6569 { echo "$as_me:$LINENO: result: ok" >&5
6570 echo "${ECHO_T}ok" >&6; }
6571 fi
6572
6573 { echo "$as_me:$LINENO: checking for objdir" >&5
6574 echo $ECHO_N "checking for objdir... $ECHO_C" >&6; }
6575 if test "${lt_cv_objdir+set}" = set; then
6576 echo $ECHO_N "(cached) $ECHO_C" >&6
6577 else
6578 rm -f .libs 2>/dev/null
6579 mkdir .libs 2>/dev/null
6580 if test -d .libs; then
6581 lt_cv_objdir=.libs
6582 else
6583 # MS-DOS does not allow filenames that begin with a dot.
6584 lt_cv_objdir=_libs
6585 fi
6586 rmdir .libs 2>/dev/null
6587 fi
6588 { echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
6589 echo "${ECHO_T}$lt_cv_objdir" >&6; }
6590 objdir=$lt_cv_objdir
6591
6592
6593
6594
6595
6596 case $host_os in
6597 aix3*)
6598 # AIX sometimes has problems with the GCC collect2 program. For some
6599 # reason, if we set the COLLECT_NAMES environment variable, the problems
6600 # vanish in a puff of smoke.
6601 if test "X${COLLECT_NAMES+set}" != Xset; then
6602 COLLECT_NAMES=
6603 export COLLECT_NAMES
6604 fi
6605 ;;
6606 esac
6607
6608 # Sed substitution that helps us do robust quoting. It backslashifies
6609 # metacharacters that are still active within double-quoted strings.
6610 Xsed='sed -e 1s/^X//'
6611 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
6612
6613 # Same as above, but do not quote variable references.
6614 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
6615
6616 # Sed substitution to delay expansion of an escaped shell variable in a
6617 # double_quote_subst'ed string.
6618 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6619
6620 # Sed substitution to avoid accidental globbing in evaled expressions
6621 no_glob_subst='s/\*/\\\*/g'
6622
6623 # Constants:
6624 rm="rm -f"
6625
6626 # Global variables:
6627 default_ofile=libtool
6628 can_build_shared=yes
6629
6630 # All known linkers require a `.a' archive for static linking (except MSVC,
6631 # which needs '.lib').
6632 libext=a
6633 ltmain="$ac_aux_dir/ltmain.sh"
6634 ofile="$default_ofile"
6635 with_gnu_ld="$lt_cv_prog_gnu_ld"
6636
6637 if test -n "$ac_tool_prefix"; then
6638 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6639 set dummy ${ac_tool_prefix}ar; ac_word=$2
6640 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6641 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6642 if test "${ac_cv_prog_AR+set}" = set; then
6643 echo $ECHO_N "(cached) $ECHO_C" >&6
6644 else
6645 if test -n "$AR"; then
6646 ac_cv_prog_AR="$AR" # Let the user override the test.
6647 else
6648 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6649 for as_dir in $PATH
6650 do
6651 IFS=$as_save_IFS
6652 test -z "$as_dir" && as_dir=.
6653 for ac_exec_ext in '' $ac_executable_extensions; do
6654 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6655 ac_cv_prog_AR="${ac_tool_prefix}ar"
6656 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6657 break 2
6658 fi
6659 done
6660 done
6661 IFS=$as_save_IFS
6662
6663 fi
6664 fi
6665 AR=$ac_cv_prog_AR
6666 if test -n "$AR"; then
6667 { echo "$as_me:$LINENO: result: $AR" >&5
6668 echo "${ECHO_T}$AR" >&6; }
6669 else
6670 { echo "$as_me:$LINENO: result: no" >&5
6671 echo "${ECHO_T}no" >&6; }
6672 fi
6673
6674
6675 fi
6676 if test -z "$ac_cv_prog_AR"; then
6677 ac_ct_AR=$AR
6678 # Extract the first word of "ar", so it can be a program name with args.
6679 set dummy ar; ac_word=$2
6680 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6681 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6682 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
6683 echo $ECHO_N "(cached) $ECHO_C" >&6
6684 else
6685 if test -n "$ac_ct_AR"; then
6686 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6687 else
6688 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6689 for as_dir in $PATH
6690 do
6691 IFS=$as_save_IFS
6692 test -z "$as_dir" && as_dir=.
6693 for ac_exec_ext in '' $ac_executable_extensions; do
6694 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6695 ac_cv_prog_ac_ct_AR="ar"
6696 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6697 break 2
6698 fi
6699 done
6700 done
6701 IFS=$as_save_IFS
6702
6703 fi
6704 fi
6705 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6706 if test -n "$ac_ct_AR"; then
6707 { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
6708 echo "${ECHO_T}$ac_ct_AR" >&6; }
6709 else
6710 { echo "$as_me:$LINENO: result: no" >&5
6711 echo "${ECHO_T}no" >&6; }
6712 fi
6713
6714 if test "x$ac_ct_AR" = x; then
6715 AR="false"
6716 else
6717 case $cross_compiling:$ac_tool_warned in
6718 yes:)
6719 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
6720 whose name does not start with the host triplet. If you think this
6721 configuration is useful to you, please write to autoconf@gnu.org." >&5
6722 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
6723 whose name does not start with the host triplet. If you think this
6724 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
6725 ac_tool_warned=yes ;;
6726 esac
6727 AR=$ac_ct_AR
6728 fi
6729 else
6730 AR="$ac_cv_prog_AR"
6731 fi
6732
6733 if test -n "$ac_tool_prefix"; then
6734 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6735 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6736 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6737 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6738 if test "${ac_cv_prog_RANLIB+set}" = set; then
6739 echo $ECHO_N "(cached) $ECHO_C" >&6
6740 else
6741 if test -n "$RANLIB"; then
6742 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6743 else
6744 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6745 for as_dir in $PATH
6746 do
6747 IFS=$as_save_IFS
6748 test -z "$as_dir" && as_dir=.
6749 for ac_exec_ext in '' $ac_executable_extensions; do
6750 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6751 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6752 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6753 break 2
6754 fi
6755 done
6756 done
6757 IFS=$as_save_IFS
6758
6759 fi
6760 fi
6761 RANLIB=$ac_cv_prog_RANLIB
6762 if test -n "$RANLIB"; then
6763 { echo "$as_me:$LINENO: result: $RANLIB" >&5
6764 echo "${ECHO_T}$RANLIB" >&6; }
6765 else
6766 { echo "$as_me:$LINENO: result: no" >&5
6767 echo "${ECHO_T}no" >&6; }
6768 fi
6769
6770
6771 fi
6772 if test -z "$ac_cv_prog_RANLIB"; then
6773 ac_ct_RANLIB=$RANLIB
6774 # Extract the first word of "ranlib", so it can be a program name with args.
6775 set dummy ranlib; ac_word=$2
6776 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6777 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6778 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
6779 echo $ECHO_N "(cached) $ECHO_C" >&6
6780 else
6781 if test -n "$ac_ct_RANLIB"; then
6782 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6783 else
6784 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6785 for as_dir in $PATH
6786 do
6787 IFS=$as_save_IFS
6788 test -z "$as_dir" && as_dir=.
6789 for ac_exec_ext in '' $ac_executable_extensions; do
6790 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6791 ac_cv_prog_ac_ct_RANLIB="ranlib"
6792 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6793 break 2
6794 fi
6795 done
6796 done
6797 IFS=$as_save_IFS
6798
6799 fi
6800 fi
6801 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6802 if test -n "$ac_ct_RANLIB"; then
6803 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6804 echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
6805 else
6806 { echo "$as_me:$LINENO: result: no" >&5
6807 echo "${ECHO_T}no" >&6; }
6808 fi
6809
6810 if test "x$ac_ct_RANLIB" = x; then
6811 RANLIB=":"
6812 else
6813 case $cross_compiling:$ac_tool_warned in
6814 yes:)
6815 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
6816 whose name does not start with the host triplet. If you think this
6817 configuration is useful to you, please write to autoconf@gnu.org." >&5
6818 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
6819 whose name does not start with the host triplet. If you think this
6820 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
6821 ac_tool_warned=yes ;;
6822 esac
6823 RANLIB=$ac_ct_RANLIB
6824 fi
6825 else
6826 RANLIB="$ac_cv_prog_RANLIB"
6827 fi
6828
6829 if test -n "$ac_tool_prefix"; then
6830 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6831 set dummy ${ac_tool_prefix}strip; ac_word=$2
6832 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6833 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6834 if test "${ac_cv_prog_STRIP+set}" = set; then
6835 echo $ECHO_N "(cached) $ECHO_C" >&6
6836 else
6837 if test -n "$STRIP"; then
6838 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6839 else
6840 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6841 for as_dir in $PATH
6842 do
6843 IFS=$as_save_IFS
6844 test -z "$as_dir" && as_dir=.
6845 for ac_exec_ext in '' $ac_executable_extensions; do
6846 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6847 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6848 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6849 break 2
6850 fi
6851 done
6852 done
6853 IFS=$as_save_IFS
6854
6855 fi
6856 fi
6857 STRIP=$ac_cv_prog_STRIP
6858 if test -n "$STRIP"; then
6859 { echo "$as_me:$LINENO: result: $STRIP" >&5
6860 echo "${ECHO_T}$STRIP" >&6; }
6861 else
6862 { echo "$as_me:$LINENO: result: no" >&5
6863 echo "${ECHO_T}no" >&6; }
6864 fi
6865
6866
6867 fi
6868 if test -z "$ac_cv_prog_STRIP"; then
6869 ac_ct_STRIP=$STRIP
6870 # Extract the first word of "strip", so it can be a program name with args.
6871 set dummy strip; ac_word=$2
6872 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6873 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6874 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
6875 echo $ECHO_N "(cached) $ECHO_C" >&6
6876 else
6877 if test -n "$ac_ct_STRIP"; then
6878 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6879 else
6880 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6881 for as_dir in $PATH
6882 do
6883 IFS=$as_save_IFS
6884 test -z "$as_dir" && as_dir=.
6885 for ac_exec_ext in '' $ac_executable_extensions; do
6886 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6887 ac_cv_prog_ac_ct_STRIP="strip"
6888 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6889 break 2
6890 fi
6891 done
6892 done
6893 IFS=$as_save_IFS
6894
6895 fi
6896 fi
6897 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6898 if test -n "$ac_ct_STRIP"; then
6899 { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
6900 echo "${ECHO_T}$ac_ct_STRIP" >&6; }
6901 else
6902 { echo "$as_me:$LINENO: result: no" >&5
6903 echo "${ECHO_T}no" >&6; }
6904 fi
6905
6906 if test "x$ac_ct_STRIP" = x; then
6907 STRIP=":"
6908 else
6909 case $cross_compiling:$ac_tool_warned in
6910 yes:)
6911 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
6912 whose name does not start with the host triplet. If you think this
6913 configuration is useful to you, please write to autoconf@gnu.org." >&5
6914 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
6915 whose name does not start with the host triplet. If you think this
6916 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
6917 ac_tool_warned=yes ;;
6918 esac
6919 STRIP=$ac_ct_STRIP
6920 fi
6921 else
6922 STRIP="$ac_cv_prog_STRIP"
6923 fi
6924
6925
6926 old_CC="$CC"
6927 old_CFLAGS="$CFLAGS"
6928
6929 # Set sane defaults for various variables
6930 test -z "$AR" && AR=ar
6931 test -z "$AR_FLAGS" && AR_FLAGS=cru
6932 test -z "$AS" && AS=as
6933 test -z "$CC" && CC=cc
6934 test -z "$LTCC" && LTCC=$CC
6935 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
6936 test -z "$DLLTOOL" && DLLTOOL=dlltool
6937 test -z "$LD" && LD=ld
6938 test -z "$LN_S" && LN_S="ln -s"
6939 test -z "$MAGIC_CMD" && MAGIC_CMD=file
6940 test -z "$NM" && NM=nm
6941 test -z "$SED" && SED=sed
6942 test -z "$OBJDUMP" && OBJDUMP=objdump
6943 test -z "$RANLIB" && RANLIB=:
6944 test -z "$STRIP" && STRIP=:
6945 test -z "$ac_objext" && ac_objext=o
6946
6947 # Determine commands to create old-style static archives.
6948 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
6949 old_postinstall_cmds='chmod 644 $oldlib'
6950 old_postuninstall_cmds=
6951
6952 if test -n "$RANLIB"; then
6953 case $host_os in
6954 openbsd*)
6955 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
6956 ;;
6957 *)
6958 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
6959 ;;
6960 esac
6961 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
6962 fi
6963
6964 for cc_temp in $compiler""; do
6965 case $cc_temp in
6966 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
6967 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
6968 \-*) ;;
6969 *) break;;
6970 esac
6971 done
6972 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
6973
6974
6975 # Only perform the check for file, if the check method requires it
6976 case $deplibs_check_method in
6977 file_magic*)
6978 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
6979 { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
6980 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; }
6981 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
6982 echo $ECHO_N "(cached) $ECHO_C" >&6
6983 else
6984 case $MAGIC_CMD in
6985 [\\/*] | ?:[\\/]*)
6986 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
6987 ;;
6988 *)
6989 lt_save_MAGIC_CMD="$MAGIC_CMD"
6990 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6991 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
6992 for ac_dir in $ac_dummy; do
6993 IFS="$lt_save_ifs"
6994 test -z "$ac_dir" && ac_dir=.
6995 if test -f $ac_dir/${ac_tool_prefix}file; then
6996 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
6997 if test -n "$file_magic_test_file"; then
6998 case $deplibs_check_method in
6999 "file_magic "*)
7000 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7001 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7002 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7003 $EGREP "$file_magic_regex" > /dev/null; then
7004 :
7005 else
7006 cat <<EOF 1>&2
7007
7008 *** Warning: the command libtool uses to detect shared libraries,
7009 *** $file_magic_cmd, produces output that libtool cannot recognize.
7010 *** The result is that libtool may fail to recognize shared libraries
7011 *** as such. This will affect the creation of libtool libraries that
7012 *** depend on shared libraries, but programs linked with such libtool
7013 *** libraries will work regardless of this problem. Nevertheless, you
7014 *** may want to report the problem to your system manager and/or to
7015 *** bug-libtool@gnu.org
7016
7017 EOF
7018 fi ;;
7019 esac
7020 fi
7021 break
7022 fi
7023 done
7024 IFS="$lt_save_ifs"
7025 MAGIC_CMD="$lt_save_MAGIC_CMD"
7026 ;;
7027 esac
7028 fi
7029
7030 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7031 if test -n "$MAGIC_CMD"; then
7032 { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
7033 echo "${ECHO_T}$MAGIC_CMD" >&6; }
7034 else
7035 { echo "$as_me:$LINENO: result: no" >&5
7036 echo "${ECHO_T}no" >&6; }
7037 fi
7038
7039 if test -z "$lt_cv_path_MAGIC_CMD"; then
7040 if test -n "$ac_tool_prefix"; then
7041 { echo "$as_me:$LINENO: checking for file" >&5
7042 echo $ECHO_N "checking for file... $ECHO_C" >&6; }
7043 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
7044 echo $ECHO_N "(cached) $ECHO_C" >&6
7045 else
7046 case $MAGIC_CMD in
7047 [\\/*] | ?:[\\/]*)
7048 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7049 ;;
7050 *)
7051 lt_save_MAGIC_CMD="$MAGIC_CMD"
7052 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7053 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7054 for ac_dir in $ac_dummy; do
7055 IFS="$lt_save_ifs"
7056 test -z "$ac_dir" && ac_dir=.
7057 if test -f $ac_dir/file; then
7058 lt_cv_path_MAGIC_CMD="$ac_dir/file"
7059 if test -n "$file_magic_test_file"; then
7060 case $deplibs_check_method in
7061 "file_magic "*)
7062 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7063 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7064 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7065 $EGREP "$file_magic_regex" > /dev/null; then
7066 :
7067 else
7068 cat <<EOF 1>&2
7069
7070 *** Warning: the command libtool uses to detect shared libraries,
7071 *** $file_magic_cmd, produces output that libtool cannot recognize.
7072 *** The result is that libtool may fail to recognize shared libraries
7073 *** as such. This will affect the creation of libtool libraries that
7074 *** depend on shared libraries, but programs linked with such libtool
7075 *** libraries will work regardless of this problem. Nevertheless, you
7076 *** may want to report the problem to your system manager and/or to
7077 *** bug-libtool@gnu.org
7078
7079 EOF
7080 fi ;;
7081 esac
7082 fi
7083 break
7084 fi
7085 done
7086 IFS="$lt_save_ifs"
7087 MAGIC_CMD="$lt_save_MAGIC_CMD"
7088 ;;
7089 esac
7090 fi
7091
7092 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7093 if test -n "$MAGIC_CMD"; then
7094 { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
7095 echo "${ECHO_T}$MAGIC_CMD" >&6; }
7096 else
7097 { echo "$as_me:$LINENO: result: no" >&5
7098 echo "${ECHO_T}no" >&6; }
7099 fi
7100
7101 else
7102 MAGIC_CMD=:
7103 fi
7104 fi
7105
7106 fi
7107 ;;
7108 esac
7109
7110
7111 case $host_os in
7112 rhapsody* | darwin*)
7113 if test -n "$ac_tool_prefix"; then
7114 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
7115 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
7116 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7117 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7118 if test "${ac_cv_prog_DSYMUTIL+set}" = set; then
7119 echo $ECHO_N "(cached) $ECHO_C" >&6
7120 else
7121 if test -n "$DSYMUTIL"; then
7122 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
7123 else
7124 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7125 for as_dir in $PATH
7126 do
7127 IFS=$as_save_IFS
7128 test -z "$as_dir" && as_dir=.
7129 for ac_exec_ext in '' $ac_executable_extensions; do
7130 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7131 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
7132 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7133 break 2
7134 fi
7135 done
7136 done
7137 IFS=$as_save_IFS
7138
7139 fi
7140 fi
7141 DSYMUTIL=$ac_cv_prog_DSYMUTIL
7142 if test -n "$DSYMUTIL"; then
7143 { echo "$as_me:$LINENO: result: $DSYMUTIL" >&5
7144 echo "${ECHO_T}$DSYMUTIL" >&6; }
7145 else
7146 { echo "$as_me:$LINENO: result: no" >&5
7147 echo "${ECHO_T}no" >&6; }
7148 fi
7149
7150
7151 fi
7152 if test -z "$ac_cv_prog_DSYMUTIL"; then
7153 ac_ct_DSYMUTIL=$DSYMUTIL
7154 # Extract the first word of "dsymutil", so it can be a program name with args.
7155 set dummy dsymutil; ac_word=$2
7156 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7157 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7158 if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then
7159 echo $ECHO_N "(cached) $ECHO_C" >&6
7160 else
7161 if test -n "$ac_ct_DSYMUTIL"; then
7162 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
7163 else
7164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7165 for as_dir in $PATH
7166 do
7167 IFS=$as_save_IFS
7168 test -z "$as_dir" && as_dir=.
7169 for ac_exec_ext in '' $ac_executable_extensions; do
7170 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7171 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
7172 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7173 break 2
7174 fi
7175 done
7176 done
7177 IFS=$as_save_IFS
7178
7179 fi
7180 fi
7181 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
7182 if test -n "$ac_ct_DSYMUTIL"; then
7183 { echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5
7184 echo "${ECHO_T}$ac_ct_DSYMUTIL" >&6; }
7185 else
7186 { echo "$as_me:$LINENO: result: no" >&5
7187 echo "${ECHO_T}no" >&6; }
7188 fi
7189
7190 if test "x$ac_ct_DSYMUTIL" = x; then
7191 DSYMUTIL=":"
7192 else
7193 case $cross_compiling:$ac_tool_warned in
7194 yes:)
7195 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
7196 whose name does not start with the host triplet. If you think this
7197 configuration is useful to you, please write to autoconf@gnu.org." >&5
7198 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
7199 whose name does not start with the host triplet. If you think this
7200 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
7201 ac_tool_warned=yes ;;
7202 esac
7203 DSYMUTIL=$ac_ct_DSYMUTIL
7204 fi
7205 else
7206 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
7207 fi
7208
7209 if test -n "$ac_tool_prefix"; then
7210 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
7211 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
7212 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7213 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7214 if test "${ac_cv_prog_NMEDIT+set}" = set; then
7215 echo $ECHO_N "(cached) $ECHO_C" >&6
7216 else
7217 if test -n "$NMEDIT"; then
7218 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
7219 else
7220 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7221 for as_dir in $PATH
7222 do
7223 IFS=$as_save_IFS
7224 test -z "$as_dir" && as_dir=.
7225 for ac_exec_ext in '' $ac_executable_extensions; do
7226 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7227 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
7228 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7229 break 2
7230 fi
7231 done
7232 done
7233 IFS=$as_save_IFS
7234
7235 fi
7236 fi
7237 NMEDIT=$ac_cv_prog_NMEDIT
7238 if test -n "$NMEDIT"; then
7239 { echo "$as_me:$LINENO: result: $NMEDIT" >&5
7240 echo "${ECHO_T}$NMEDIT" >&6; }
7241 else
7242 { echo "$as_me:$LINENO: result: no" >&5
7243 echo "${ECHO_T}no" >&6; }
7244 fi
7245
7246
7247 fi
7248 if test -z "$ac_cv_prog_NMEDIT"; then
7249 ac_ct_NMEDIT=$NMEDIT
7250 # Extract the first word of "nmedit", so it can be a program name with args.
7251 set dummy nmedit; ac_word=$2
7252 { echo "$as_me:$LINENO: checking for $ac_word" >&5
7253 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7254 if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then
7255 echo $ECHO_N "(cached) $ECHO_C" >&6
7256 else
7257 if test -n "$ac_ct_NMEDIT"; then
7258 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
7259 else
7260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7261 for as_dir in $PATH
7262 do
7263 IFS=$as_save_IFS
7264 test -z "$as_dir" && as_dir=.
7265 for ac_exec_ext in '' $ac_executable_extensions; do
7266 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7267 ac_cv_prog_ac_ct_NMEDIT="nmedit"
7268 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7269 break 2
7270 fi
7271 done
7272 done
7273 IFS=$as_save_IFS
7274
7275 fi
7276 fi
7277 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
7278 if test -n "$ac_ct_NMEDIT"; then
7279 { echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5
7280 echo "${ECHO_T}$ac_ct_NMEDIT" >&6; }
7281 else
7282 { echo "$as_me:$LINENO: result: no" >&5
7283 echo "${ECHO_T}no" >&6; }
7284 fi
7285
7286 if test "x$ac_ct_NMEDIT" = x; then
7287 NMEDIT=":"
7288 else
7289 case $cross_compiling:$ac_tool_warned in
7290 yes:)
7291 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
7292 whose name does not start with the host triplet. If you think this
7293 configuration is useful to you, please write to autoconf@gnu.org." >&5
7294 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
7295 whose name does not start with the host triplet. If you think this
7296 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
7297 ac_tool_warned=yes ;;
7298 esac
7299 NMEDIT=$ac_ct_NMEDIT
7300 fi
7301 else
7302 NMEDIT="$ac_cv_prog_NMEDIT"
7303 fi
7304
7305
7306 { echo "$as_me:$LINENO: checking for -single_module linker flag" >&5
7307 echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6; }
7308 if test "${lt_cv_apple_cc_single_mod+set}" = set; then
7309 echo $ECHO_N "(cached) $ECHO_C" >&6
7310 else
7311 lt_cv_apple_cc_single_mod=no
7312 if test -z "${LT_MULTI_MODULE}"; then
7313 # By default we will add the -single_module flag. You can override
7314 # by either setting the environment variable LT_MULTI_MODULE
7315 # non-empty at configure time, or by adding -multi_module to the
7316 # link flags.
7317 echo "int foo(void){return 1;}" > conftest.c
7318 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
7319 -dynamiclib ${wl}-single_module conftest.c
7320 if test -f libconftest.dylib; then
7321 lt_cv_apple_cc_single_mod=yes
7322 rm -rf libconftest.dylib*
7323 fi
7324 rm conftest.c
7325 fi
7326 fi
7327 { echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5
7328 echo "${ECHO_T}$lt_cv_apple_cc_single_mod" >&6; }
7329 { echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5
7330 echo $ECHO_N "checking for -exported_symbols_list linker flag... $ECHO_C" >&6; }
7331 if test "${lt_cv_ld_exported_symbols_list+set}" = set; then
7332 echo $ECHO_N "(cached) $ECHO_C" >&6
7333 else
7334 lt_cv_ld_exported_symbols_list=no
7335 save_LDFLAGS=$LDFLAGS
7336 echo "_main" > conftest.sym
7337 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
7338 cat >conftest.$ac_ext <<_ACEOF
7339 /* confdefs.h. */
7340 _ACEOF
7341 cat confdefs.h >>conftest.$ac_ext
7342 cat >>conftest.$ac_ext <<_ACEOF
7343 /* end confdefs.h. */
7344
7345 int
7346 main ()
7347 {
7348
7349 ;
7350 return 0;
7351 }
7352 _ACEOF
7353 rm -f conftest.$ac_objext conftest$ac_exeext
7354 if { (ac_try="$ac_link"
7355 case "(($ac_try" in
7356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7357 *) ac_try_echo=$ac_try;;
7358 esac
7359 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7360 (eval "$ac_link") 2>conftest.er1
7361 ac_status=$?
7362 grep -v '^ *+' conftest.er1 >conftest.err
7363 rm -f conftest.er1
7364 cat conftest.err >&5
7365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7366 (exit $ac_status); } && {
7367 test -z "$ac_c_werror_flag" ||
7368 test ! -s conftest.err
7369 } && test -s conftest$ac_exeext &&
7370 $as_test_x conftest$ac_exeext; then
7371 lt_cv_ld_exported_symbols_list=yes
7372 else
7373 echo "$as_me: failed program was:" >&5
7374 sed 's/^/| /' conftest.$ac_ext >&5
7375
7376 lt_cv_ld_exported_symbols_list=no
7377 fi
7378
7379 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7380 conftest$ac_exeext conftest.$ac_ext
7381 LDFLAGS="$save_LDFLAGS"
7382
7383 fi
7384 { echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5
7385 echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6; }
7386 case $host_os in
7387 rhapsody* | darwin1.[0123])
7388 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
7389 darwin1.*)
7390 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
7391 darwin*)
7392 # if running on 10.5 or later, the deployment target defaults
7393 # to the OS version, if on x86, and 10.4, the deployment
7394 # target defaults to 10.4. Don't you love it?
7395 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
7396 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
7397 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
7398 10.[012]*)
7399 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
7400 10.*)
7401 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
7402 esac
7403 ;;
7404 esac
7405 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
7406 _lt_dar_single_mod='$single_module'
7407 fi
7408 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
7409 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
7410 else
7411 _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
7412 fi
7413 if test "$DSYMUTIL" != ":"; then
7414 _lt_dsymutil="~$DSYMUTIL \$lib || :"
7415 else
7416 _lt_dsymutil=
7417 fi
7418 ;;
7419 esac
7420
7421
7422 enable_dlopen=no
7423 enable_win32_dll=no
7424
7425 # Check whether --enable-libtool-lock was given.
7426 if test "${enable_libtool_lock+set}" = set; then
7427 enableval=$enable_libtool_lock;
7428 fi
7429
7430 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
7431
7432
7433 # Check whether --with-pic was given.
7434 if test "${with_pic+set}" = set; then
7435 withval=$with_pic; pic_mode="$withval"
7436 else
7437 pic_mode=default
7438 fi
7439
7440 test -z "$pic_mode" && pic_mode=default
7441
7442 # Use C for the default configuration in the libtool script
7443 tagname=
7444 lt_save_CC="$CC"
7445 ac_ext=c
7446 ac_cpp='$CPP $CPPFLAGS'
7447 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7448 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7449 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7450
7451
7452 # Source file extension for C test sources.
7453 ac_ext=c
7454
7455 # Object file extension for compiled C test sources.
7456 objext=o
7457 objext=$objext
7458
7459 # Code to be used in simple compile tests
7460 lt_simple_compile_test_code="int some_variable = 0;"
7461
7462 # Code to be used in simple link tests
7463 lt_simple_link_test_code='int main(){return(0);}'
7464
7465
7466 # If no C compiler was specified, use CC.
7467 LTCC=${LTCC-"$CC"}
7468
7469 # If no C compiler flags were specified, use CFLAGS.
7470 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
7471
7472 # Allow CC to be a program name with arguments.
7473 compiler=$CC
7474
7475
7476 # save warnings/boilerplate of simple test code
7477 ac_outfile=conftest.$ac_objext
7478 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
7479 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
7480 _lt_compiler_boilerplate=`cat conftest.err`
7481 $rm conftest*
7482
7483 ac_outfile=conftest.$ac_objext
7484 echo "$lt_simple_link_test_code" >conftest.$ac_ext
7485 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
7486 _lt_linker_boilerplate=`cat conftest.err`
7487 $rm -r conftest*
7488
7489
7490
7491 lt_prog_compiler_no_builtin_flag=
7492
7493 if test "$GCC" = yes; then
7494 lt_prog_compiler_no_builtin_flag=' -fno-builtin'
7495
7496
7497 { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
7498 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; }
7499 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
7500 echo $ECHO_N "(cached) $ECHO_C" >&6
7501 else
7502 lt_cv_prog_compiler_rtti_exceptions=no
7503 ac_outfile=conftest.$ac_objext
7504 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7505 lt_compiler_flag="-fno-rtti -fno-exceptions"
7506 # Insert the option either (1) after the last *FLAGS variable, or
7507 # (2) before a word containing "conftest.", or (3) at the end.
7508 # Note that $ac_compile itself does not contain backslashes and begins
7509 # with a dollar sign (not a hyphen), so the echo should work correctly.
7510 # The option is referenced via a variable to avoid confusing sed.
7511 lt_compile=`echo "$ac_compile" | $SED \
7512 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7513 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7514 -e 's:$: $lt_compiler_flag:'`
7515 (eval echo "\"\$as_me:7516: $lt_compile\"" >&5)
7516 (eval "$lt_compile" 2>conftest.err)
7517 ac_status=$?
7518 cat conftest.err >&5
7519 echo "$as_me:7520: \$? = $ac_status" >&5
7520 if (exit $ac_status) && test -s "$ac_outfile"; then
7521 # The compiler can only warn and ignore the option if not recognized
7522 # So say no if there are warnings other than the usual output.
7523 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
7524 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
7525 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
7526 lt_cv_prog_compiler_rtti_exceptions=yes
7527 fi
7528 fi
7529 $rm conftest*
7530
7531 fi
7532 { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
7533 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; }
7534
7535 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
7536 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
7537 else
7538 :
7539 fi
7540
7541 fi
7542
7543 lt_prog_compiler_wl=
7544 lt_prog_compiler_pic=
7545 lt_prog_compiler_static=
7546
7547 { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
7548 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
7549
7550 if test "$GCC" = yes; then
7551 lt_prog_compiler_wl='-Wl,'
7552 lt_prog_compiler_static='-static'
7553
7554 case $host_os in
7555 aix*)
7556 # All AIX code is PIC.
7557 if test "$host_cpu" = ia64; then
7558 # AIX 5 now supports IA64 processor
7559 lt_prog_compiler_static='-Bstatic'
7560 fi
7561 ;;
7562
7563 amigaos*)
7564 # FIXME: we need at least 68020 code to build shared libraries, but
7565 # adding the `-m68020' flag to GCC prevents building anything better,
7566 # like `-m68040'.
7567 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
7568 ;;
7569
7570 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7571 # PIC is the default for these OSes.
7572 ;;
7573
7574 mingw* | cygwin* | pw32* | os2*)
7575 # This hack is so that the source file can tell whether it is being
7576 # built for inclusion in a dll (and should export symbols for example).
7577 # Although the cygwin gcc ignores -fPIC, still need this for old-style
7578 # (--disable-auto-import) libraries
7579 lt_prog_compiler_pic='-DDLL_EXPORT'
7580 ;;
7581
7582 darwin* | rhapsody*)
7583 # PIC is the default on this platform
7584 # Common symbols not allowed in MH_DYLIB files
7585 lt_prog_compiler_pic='-fno-common'
7586 ;;
7587
7588 interix[3-9]*)
7589 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
7590 # Instead, we relocate shared libraries at runtime.
7591 ;;
7592
7593 msdosdjgpp*)
7594 # Just because we use GCC doesn't mean we suddenly get shared libraries
7595 # on systems that don't support them.
7596 lt_prog_compiler_can_build_shared=no
7597 enable_shared=no
7598 ;;
7599
7600 sysv4*MP*)
7601 if test -d /usr/nec; then
7602 lt_prog_compiler_pic=-Kconform_pic
7603 fi
7604 ;;
7605
7606 hpux*)
7607 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7608 # not for PA HP-UX.
7609 case $host_cpu in
7610 hppa*64*|ia64*)
7611 # +Z the default
7612 ;;
7613 *)
7614 lt_prog_compiler_pic='-fPIC'
7615 ;;
7616 esac
7617 ;;
7618
7619 *)
7620 lt_prog_compiler_pic='-fPIC'
7621 ;;
7622 esac
7623 else
7624 # PORTME Check for flag to pass linker flags through the system compiler.
7625 case $host_os in
7626 aix*)
7627 lt_prog_compiler_wl='-Wl,'
7628 if test "$host_cpu" = ia64; then
7629 # AIX 5 now supports IA64 processor
7630 lt_prog_compiler_static='-Bstatic'
7631 else
7632 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
7633 fi
7634 ;;
7635 darwin*)
7636 # PIC is the default on this platform
7637 # Common symbols not allowed in MH_DYLIB files
7638 case $cc_basename in
7639 xlc*)
7640 lt_prog_compiler_pic='-qnocommon'
7641 lt_prog_compiler_wl='-Wl,'
7642 ;;
7643 esac
7644 ;;
7645
7646 mingw* | cygwin* | pw32* | os2*)
7647 # This hack is so that the source file can tell whether it is being
7648 # built for inclusion in a dll (and should export symbols for example).
7649 lt_prog_compiler_pic='-DDLL_EXPORT'
7650 ;;
7651
7652 hpux9* | hpux10* | hpux11*)
7653 lt_prog_compiler_wl='-Wl,'
7654 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7655 # not for PA HP-UX.
7656 case $host_cpu in
7657 hppa*64*|ia64*)
7658 # +Z the default
7659 ;;
7660 *)
7661 lt_prog_compiler_pic='+Z'
7662 ;;
7663 esac
7664 # Is there a better lt_prog_compiler_static that works with the bundled CC?
7665 lt_prog_compiler_static='${wl}-a ${wl}archive'
7666 ;;
7667
7668 irix5* | irix6* | nonstopux*)
7669 lt_prog_compiler_wl='-Wl,'
7670 # PIC (with -KPIC) is the default.
7671 lt_prog_compiler_static='-non_shared'
7672 ;;
7673
7674 newsos6)
7675 lt_prog_compiler_pic='-KPIC'
7676 lt_prog_compiler_static='-Bstatic'
7677 ;;
7678
7679 linux* | k*bsd*-gnu)
7680 case $cc_basename in
7681 icc* | ecc*)
7682 lt_prog_compiler_wl='-Wl,'
7683 lt_prog_compiler_pic='-KPIC'
7684 lt_prog_compiler_static='-static'
7685 ;;
7686 pgcc* | pgf77* | pgf90* | pgf95*)
7687 # Portland Group compilers (*not* the Pentium gcc compiler,
7688 # which looks to be a dead project)
7689 lt_prog_compiler_wl='-Wl,'
7690 lt_prog_compiler_pic='-fpic'
7691 lt_prog_compiler_static='-Bstatic'
7692 ;;
7693 ccc*)
7694 lt_prog_compiler_wl='-Wl,'
7695 # All Alpha code is PIC.
7696 lt_prog_compiler_static='-non_shared'
7697 ;;
7698 *)
7699 case `$CC -V 2>&1 | sed 5q` in
7700 *Sun\ C*)
7701 # Sun C 5.9
7702 lt_prog_compiler_pic='-KPIC'
7703 lt_prog_compiler_static='-Bstatic'
7704 lt_prog_compiler_wl='-Wl,'
7705 ;;
7706 *Sun\ F*)
7707 # Sun Fortran 8.3 passes all unrecognized flags to the linker
7708 lt_prog_compiler_pic='-KPIC'
7709 lt_prog_compiler_static='-Bstatic'
7710 lt_prog_compiler_wl=''
7711 ;;
7712 esac
7713 ;;
7714 esac
7715 ;;
7716
7717 osf3* | osf4* | osf5*)
7718 lt_prog_compiler_wl='-Wl,'
7719 # All OSF/1 code is PIC.
7720 lt_prog_compiler_static='-non_shared'
7721 ;;
7722
7723 rdos*)
7724 lt_prog_compiler_static='-non_shared'
7725 ;;
7726
7727 solaris*)
7728 lt_prog_compiler_pic='-KPIC'
7729 lt_prog_compiler_static='-Bstatic'
7730 case $cc_basename in
7731 f77* | f90* | f95*)
7732 lt_prog_compiler_wl='-Qoption ld ';;
7733 *)
7734 lt_prog_compiler_wl='-Wl,';;
7735 esac
7736 ;;
7737
7738 sunos4*)
7739 lt_prog_compiler_wl='-Qoption ld '
7740 lt_prog_compiler_pic='-PIC'
7741 lt_prog_compiler_static='-Bstatic'
7742 ;;
7743
7744 sysv4 | sysv4.2uw2* | sysv4.3*)
7745 lt_prog_compiler_wl='-Wl,'
7746 lt_prog_compiler_pic='-KPIC'
7747 lt_prog_compiler_static='-Bstatic'
7748 ;;
7749
7750 sysv4*MP*)
7751 if test -d /usr/nec ;then
7752 lt_prog_compiler_pic='-Kconform_pic'
7753 lt_prog_compiler_static='-Bstatic'
7754 fi
7755 ;;
7756
7757 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
7758 lt_prog_compiler_wl='-Wl,'
7759 lt_prog_compiler_pic='-KPIC'
7760 lt_prog_compiler_static='-Bstatic'
7761 ;;
7762
7763 unicos*)
7764 lt_prog_compiler_wl='-Wl,'
7765 lt_prog_compiler_can_build_shared=no
7766 ;;
7767
7768 uts4*)
7769 lt_prog_compiler_pic='-pic'
7770 lt_prog_compiler_static='-Bstatic'
7771 ;;
7772
7773 *)
7774 lt_prog_compiler_can_build_shared=no
7775 ;;
7776 esac
7777 fi
7778
7779 { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
7780 echo "${ECHO_T}$lt_prog_compiler_pic" >&6; }
7781
7782 #
7783 # Check to make sure the PIC flag actually works.
7784 #
7785 if test -n "$lt_prog_compiler_pic"; then
7786
7787 { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
7788 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; }
7789 if test "${lt_cv_prog_compiler_pic_works+set}" = set; then
7790 echo $ECHO_N "(cached) $ECHO_C" >&6
7791 else
7792 lt_cv_prog_compiler_pic_works=no
7793 ac_outfile=conftest.$ac_objext
7794 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7795 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
7796 # Insert the option either (1) after the last *FLAGS variable, or
7797 # (2) before a word containing "conftest.", or (3) at the end.
7798 # Note that $ac_compile itself does not contain backslashes and begins
7799 # with a dollar sign (not a hyphen), so the echo should work correctly.
7800 # The option is referenced via a variable to avoid confusing sed.
7801 lt_compile=`echo "$ac_compile" | $SED \
7802 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7803 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7804 -e 's:$: $lt_compiler_flag:'`
7805 (eval echo "\"\$as_me:7806: $lt_compile\"" >&5)
7806 (eval "$lt_compile" 2>conftest.err)
7807 ac_status=$?
7808 cat conftest.err >&5
7809 echo "$as_me:7810: \$? = $ac_status" >&5
7810 if (exit $ac_status) && test -s "$ac_outfile"; then
7811 # The compiler can only warn and ignore the option if not recognized
7812 # So say no if there are warnings other than the usual output.
7813 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
7814 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
7815 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
7816 lt_cv_prog_compiler_pic_works=yes
7817 fi
7818 fi
7819 $rm conftest*
7820
7821 fi
7822 { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5
7823 echo "${ECHO_T}$lt_cv_prog_compiler_pic_works" >&6; }
7824
7825 if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
7826 case $lt_prog_compiler_pic in
7827 "" | " "*) ;;
7828 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
7829 esac
7830 else
7831 lt_prog_compiler_pic=
7832 lt_prog_compiler_can_build_shared=no
7833 fi
7834
7835 fi
7836 case $host_os in
7837 # For platforms which do not support PIC, -DPIC is meaningless:
7838 *djgpp*)
7839 lt_prog_compiler_pic=
7840 ;;
7841 *)
7842 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
7843 ;;
7844 esac
7845
7846 #
7847 # Check to make sure the static flag actually works.
7848 #
7849 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
7850 { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
7851 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
7852 if test "${lt_cv_prog_compiler_static_works+set}" = set; then
7853 echo $ECHO_N "(cached) $ECHO_C" >&6
7854 else
7855 lt_cv_prog_compiler_static_works=no
7856 save_LDFLAGS="$LDFLAGS"
7857 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
7858 echo "$lt_simple_link_test_code" > conftest.$ac_ext
7859 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
7860 # The linker can only warn and ignore the option if not recognized
7861 # So say no if there are warnings
7862 if test -s conftest.err; then
7863 # Append any errors to the config.log.
7864 cat conftest.err 1>&5
7865 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
7866 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
7867 if diff conftest.exp conftest.er2 >/dev/null; then
7868 lt_cv_prog_compiler_static_works=yes
7869 fi
7870 else
7871 lt_cv_prog_compiler_static_works=yes
7872 fi
7873 fi
7874 $rm -r conftest*
7875 LDFLAGS="$save_LDFLAGS"
7876
7877 fi
7878 { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5
7879 echo "${ECHO_T}$lt_cv_prog_compiler_static_works" >&6; }
7880
7881 if test x"$lt_cv_prog_compiler_static_works" = xyes; then
7882 :
7883 else
7884 lt_prog_compiler_static=
7885 fi
7886
7887
7888 { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
7889 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
7890 if test "${lt_cv_prog_compiler_c_o+set}" = set; then
7891 echo $ECHO_N "(cached) $ECHO_C" >&6
7892 else
7893 lt_cv_prog_compiler_c_o=no
7894 $rm -r conftest 2>/dev/null
7895 mkdir conftest
7896 cd conftest
7897 mkdir out
7898 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7899
7900 lt_compiler_flag="-o out/conftest2.$ac_objext"
7901 # Insert the option either (1) after the last *FLAGS variable, or
7902 # (2) before a word containing "conftest.", or (3) at the end.
7903 # Note that $ac_compile itself does not contain backslashes and begins
7904 # with a dollar sign (not a hyphen), so the echo should work correctly.
7905 lt_compile=`echo "$ac_compile" | $SED \
7906 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7907 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7908 -e 's:$: $lt_compiler_flag:'`
7909 (eval echo "\"\$as_me:7910: $lt_compile\"" >&5)
7910 (eval "$lt_compile" 2>out/conftest.err)
7911 ac_status=$?
7912 cat out/conftest.err >&5
7913 echo "$as_me:7914: \$? = $ac_status" >&5
7914 if (exit $ac_status) && test -s out/conftest2.$ac_objext
7915 then
7916 # The compiler can only warn and ignore the option if not recognized
7917 # So say no if there are warnings
7918 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
7919 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
7920 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
7921 lt_cv_prog_compiler_c_o=yes
7922 fi
7923 fi
7924 chmod u+w . 2>&5
7925 $rm conftest*
7926 # SGI C++ compiler will create directory out/ii_files/ for
7927 # template instantiation
7928 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
7929 $rm out/* && rmdir out
7930 cd ..
7931 rmdir conftest
7932 $rm conftest*
7933
7934 fi
7935 { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
7936 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; }
7937
7938
7939 hard_links="nottested"
7940 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
7941 # do not overwrite the value of need_locks provided by the user
7942 { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
7943 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
7944 hard_links=yes
7945 $rm conftest*
7946 ln conftest.a conftest.b 2>/dev/null && hard_links=no
7947 touch conftest.a
7948 ln conftest.a conftest.b 2>&5 || hard_links=no
7949 ln conftest.a conftest.b 2>/dev/null && hard_links=no
7950 { echo "$as_me:$LINENO: result: $hard_links" >&5
7951 echo "${ECHO_T}$hard_links" >&6; }
7952 if test "$hard_links" = no; then
7953 { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
7954 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
7955 need_locks=warn
7956 fi
7957 else
7958 need_locks=no
7959 fi
7960
7961 { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
7962 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
7963
7964 runpath_var=
7965 allow_undefined_flag=
7966 enable_shared_with_static_runtimes=no
7967 archive_cmds=
7968 archive_expsym_cmds=
7969 old_archive_From_new_cmds=
7970 old_archive_from_expsyms_cmds=
7971 export_dynamic_flag_spec=
7972 whole_archive_flag_spec=
7973 thread_safe_flag_spec=
7974 hardcode_libdir_flag_spec=
7975 hardcode_libdir_flag_spec_ld=
7976 hardcode_libdir_separator=
7977 hardcode_direct=no
7978 hardcode_minus_L=no
7979 hardcode_shlibpath_var=unsupported
7980 link_all_deplibs=unknown
7981 hardcode_automatic=no
7982 module_cmds=
7983 module_expsym_cmds=
7984 always_export_symbols=no
7985 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7986 # include_expsyms should be a list of space-separated symbols to be *always*
7987 # included in the symbol list
7988 include_expsyms=
7989 # exclude_expsyms can be an extended regexp of symbols to exclude
7990 # it will be wrapped by ` (' and `)$', so one must not match beginning or
7991 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
7992 # as well as any symbol that contains `d'.
7993 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
7994 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
7995 # platforms (ab)use it in PIC code, but their linkers get confused if
7996 # the symbol is explicitly referenced. Since portable code cannot
7997 # rely on this symbol name, it's probably fine to never include it in
7998 # preloaded symbol tables.
7999 # Exclude shared library initialization/finalization symbols.
8000 extract_expsyms_cmds=
8001 # Just being paranoid about ensuring that cc_basename is set.
8002 for cc_temp in $compiler""; do
8003 case $cc_temp in
8004 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8005 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8006 \-*) ;;
8007 *) break;;
8008 esac
8009 done
8010 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
8011
8012 case $host_os in
8013 cygwin* | mingw* | pw32*)
8014 # FIXME: the MSVC++ port hasn't been tested in a loooong time
8015 # When not using gcc, we currently assume that we are using
8016 # Microsoft Visual C++.
8017 if test "$GCC" != yes; then
8018 with_gnu_ld=no
8019 fi
8020 ;;
8021 interix*)
8022 # we just hope/assume this is gcc and not c89 (= MSVC++)
8023 with_gnu_ld=yes
8024 ;;
8025 openbsd*)
8026 with_gnu_ld=no
8027 ;;
8028 esac
8029
8030 ld_shlibs=yes
8031 if test "$with_gnu_ld" = yes; then
8032 # If archive_cmds runs LD, not CC, wlarc should be empty
8033 wlarc='${wl}'
8034
8035 # Set some defaults for GNU ld with shared library support. These
8036 # are reset later if shared libraries are not supported. Putting them
8037 # here allows them to be overridden if necessary.
8038 runpath_var=LD_RUN_PATH
8039 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
8040 export_dynamic_flag_spec='${wl}--export-dynamic'
8041 # ancient GNU ld didn't support --whole-archive et. al.
8042 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
8043 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8044 else
8045 whole_archive_flag_spec=
8046 fi
8047 supports_anon_versioning=no
8048 case `$LD -v 2>/dev/null` in
8049 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
8050 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
8051 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
8052 *\ 2.11.*) ;; # other 2.11 versions
8053 *) supports_anon_versioning=yes ;;
8054 esac
8055
8056 # See if GNU ld supports shared libraries.
8057 case $host_os in
8058 aix[3-9]*)
8059 # On AIX/PPC, the GNU linker is very broken
8060 if test "$host_cpu" != ia64; then
8061 ld_shlibs=no
8062 cat <<EOF 1>&2
8063
8064 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
8065 *** to be unable to reliably create shared libraries on AIX.
8066 *** Therefore, libtool is disabling shared libraries support. If you
8067 *** really care for shared libraries, you may want to modify your PATH
8068 *** so that a non-GNU linker is found, and then restart.
8069
8070 EOF
8071 fi
8072 ;;
8073
8074 amigaos*)
8075 archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
8076 hardcode_libdir_flag_spec='-L$libdir'
8077 hardcode_minus_L=yes
8078
8079 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
8080 # that the semantics of dynamic libraries on AmigaOS, at least up
8081 # to version 4, is to share data among multiple programs linked
8082 # with the same dynamic library. Since this doesn't match the
8083 # behavior of shared libraries on other platforms, we can't use
8084 # them.
8085 ld_shlibs=no
8086 ;;
8087
8088 beos*)
8089 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8090 allow_undefined_flag=unsupported
8091 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8092 # support --undefined. This deserves some investigation. FIXME
8093 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8094 else
8095 ld_shlibs=no
8096 fi
8097 ;;
8098
8099 cygwin* | mingw* | pw32*)
8100 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
8101 # as there is no search path for DLLs.
8102 hardcode_libdir_flag_spec='-L$libdir'
8103 allow_undefined_flag=unsupported
8104 always_export_symbols=no
8105 enable_shared_with_static_runtimes=yes
8106 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
8107
8108 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
8109 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8110 # If the export-symbols file already is a .def file (1st line
8111 # is EXPORTS), use it as is; otherwise, prepend...
8112 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8113 cp $export_symbols $output_objdir/$soname.def;
8114 else
8115 echo EXPORTS > $output_objdir/$soname.def;
8116 cat $export_symbols >> $output_objdir/$soname.def;
8117 fi~
8118 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8119 else
8120 ld_shlibs=no
8121 fi
8122 ;;
8123
8124 interix[3-9]*)
8125 hardcode_direct=no
8126 hardcode_shlibpath_var=no
8127 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8128 export_dynamic_flag_spec='${wl}-E'
8129 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8130 # Instead, shared libraries are loaded at an image base (0x10000000 by
8131 # default) and relocated if they conflict, which is a slow very memory
8132 # consuming and fragmenting process. To avoid this, we pick a random,
8133 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8134 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
8135 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
8136 archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
8137 ;;
8138
8139 gnu* | linux* | k*bsd*-gnu)
8140 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8141 tmp_addflag=
8142 case $cc_basename,$host_cpu in
8143 pgcc*) # Portland Group C compiler
8144 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'
8145 tmp_addflag=' $pic_flag'
8146 ;;
8147 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
8148 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'
8149 tmp_addflag=' $pic_flag -Mnomain' ;;
8150 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
8151 tmp_addflag=' -i_dynamic' ;;
8152 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
8153 tmp_addflag=' -i_dynamic -nofor_main' ;;
8154 ifc* | ifort*) # Intel Fortran compiler
8155 tmp_addflag=' -nofor_main' ;;
8156 esac
8157 case `$CC -V 2>&1 | sed 5q` in
8158 *Sun\ C*) # Sun C 5.9
8159 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'
8160 tmp_sharedflag='-G' ;;
8161 *Sun\ F*) # Sun Fortran 8.3
8162 tmp_sharedflag='-G' ;;
8163 *)
8164 tmp_sharedflag='-shared' ;;
8165 esac
8166 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8167
8168 if test $supports_anon_versioning = yes; then
8169 archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
8170 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8171 $echo "local: *; };" >> $output_objdir/$libname.ver~
8172 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8173 fi
8174 link_all_deplibs=no
8175 else
8176 ld_shlibs=no
8177 fi
8178 ;;
8179
8180 netbsd* | netbsdelf*-gnu)
8181 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8182 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
8183 wlarc=
8184 else
8185 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8186 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8187 fi
8188 ;;
8189
8190 solaris*)
8191 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
8192 ld_shlibs=no
8193 cat <<EOF 1>&2
8194
8195 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
8196 *** create shared libraries on Solaris systems. Therefore, libtool
8197 *** is disabling shared libraries support. We urge you to upgrade GNU
8198 *** binutils to release 2.9.1 or newer. Another option is to modify
8199 *** your PATH or compiler configuration so that the native linker is
8200 *** used, and then restart.
8201
8202 EOF
8203 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8204 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8205 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8206 else
8207 ld_shlibs=no
8208 fi
8209 ;;
8210
8211 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
8212 case `$LD -v 2>&1` in
8213 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
8214 ld_shlibs=no
8215 cat <<_LT_EOF 1>&2
8216
8217 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
8218 *** reliably create shared libraries on SCO systems. Therefore, libtool
8219 *** is disabling shared libraries support. We urge you to upgrade GNU
8220 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
8221 *** your PATH or compiler configuration so that the native linker is
8222 *** used, and then restart.
8223
8224 _LT_EOF
8225 ;;
8226 *)
8227 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8228 hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
8229 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
8230 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
8231 else
8232 ld_shlibs=no
8233 fi
8234 ;;
8235 esac
8236 ;;
8237
8238 sunos4*)
8239 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8240 wlarc=
8241 hardcode_direct=yes
8242 hardcode_shlibpath_var=no
8243 ;;
8244
8245 *)
8246 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
8247 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8248 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8249 else
8250 ld_shlibs=no
8251 fi
8252 ;;
8253 esac
8254
8255 if test "$ld_shlibs" = no; then
8256 runpath_var=
8257 hardcode_libdir_flag_spec=
8258 export_dynamic_flag_spec=
8259 whole_archive_flag_spec=
8260 fi
8261 else
8262 # PORTME fill in a description of your system's linker (not GNU ld)
8263 case $host_os in
8264 aix3*)
8265 allow_undefined_flag=unsupported
8266 always_export_symbols=yes
8267 archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
8268 # Note: this linker hardcodes the directories in LIBPATH if there
8269 # are no directories specified by -L.
8270 hardcode_minus_L=yes
8271 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
8272 # Neither direct hardcoding nor static linking is supported with a
8273 # broken collect2.
8274 hardcode_direct=unsupported
8275 fi
8276 ;;
8277
8278 aix[4-9]*)
8279 if test "$host_cpu" = ia64; then
8280 # On IA64, the linker does run time linking by default, so we don't
8281 # have to do anything special.
8282 aix_use_runtimelinking=no
8283 exp_sym_flag='-Bexport'
8284 no_entry_flag=""
8285 else
8286 # If we're using GNU nm, then we don't want the "-C" option.
8287 # -C means demangle to AIX nm, but means don't demangle with GNU nm
8288 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
8289 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'
8290 else
8291 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'
8292 fi
8293 aix_use_runtimelinking=no
8294
8295 # Test if we are trying to use run time linking or normal
8296 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8297 # need to do runtime linking.
8298 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
8299 for ld_flag in $LDFLAGS; do
8300 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
8301 aix_use_runtimelinking=yes
8302 break
8303 fi
8304 done
8305 ;;
8306 esac
8307
8308 exp_sym_flag='-bexport'
8309 no_entry_flag='-bnoentry'
8310 fi
8311
8312 # When large executables or shared objects are built, AIX ld can
8313 # have problems creating the table of contents. If linking a library
8314 # or program results in "error TOC overflow" add -mminimal-toc to
8315 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
8316 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8317
8318 archive_cmds=''
8319 hardcode_direct=yes
8320 hardcode_libdir_separator=':'
8321 link_all_deplibs=yes
8322
8323 if test "$GCC" = yes; then
8324 case $host_os in aix4.[012]|aix4.[012].*)
8325 # We only want to do this on AIX 4.2 and lower, the check
8326 # below for broken collect2 doesn't work under 4.3+
8327 collect2name=`${CC} -print-prog-name=collect2`
8328 if test -f "$collect2name" && \
8329 strings "$collect2name" | grep resolve_lib_name >/dev/null
8330 then
8331 # We have reworked collect2
8332 :
8333 else
8334 # We have old collect2
8335 hardcode_direct=unsupported
8336 # It fails to find uninstalled libraries when the uninstalled
8337 # path is not listed in the libpath. Setting hardcode_minus_L
8338 # to unsupported forces relinking
8339 hardcode_minus_L=yes
8340 hardcode_libdir_flag_spec='-L$libdir'
8341 hardcode_libdir_separator=
8342 fi
8343 ;;
8344 esac
8345 shared_flag='-shared'
8346 if test "$aix_use_runtimelinking" = yes; then
8347 shared_flag="$shared_flag "'${wl}-G'
8348 fi
8349 else
8350 # not using gcc
8351 if test "$host_cpu" = ia64; then
8352 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8353 # chokes on -Wl,-G. The following line is correct:
8354 shared_flag='-G'
8355 else
8356 if test "$aix_use_runtimelinking" = yes; then
8357 shared_flag='${wl}-G'
8358 else
8359 shared_flag='${wl}-bM:SRE'
8360 fi
8361 fi
8362 fi
8363
8364 # It seems that -bexpall does not export symbols beginning with
8365 # underscore (_), so it is better to generate a list of symbols to export.
8366 always_export_symbols=yes
8367 if test "$aix_use_runtimelinking" = yes; then
8368 # Warning - without using the other runtime loading flags (-brtl),
8369 # -berok will link without error, but may produce a broken library.
8370 allow_undefined_flag='-berok'
8371 # Determine the default libpath from the value encoded in an empty executable.
8372 cat >conftest.$ac_ext <<_ACEOF
8373 /* confdefs.h. */
8374 _ACEOF
8375 cat confdefs.h >>conftest.$ac_ext
8376 cat >>conftest.$ac_ext <<_ACEOF
8377 /* end confdefs.h. */
8378
8379 int
8380 main ()
8381 {
8382
8383 ;
8384 return 0;
8385 }
8386 _ACEOF
8387 rm -f conftest.$ac_objext conftest$ac_exeext
8388 if { (ac_try="$ac_link"
8389 case "(($ac_try" in
8390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8391 *) ac_try_echo=$ac_try;;
8392 esac
8393 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8394 (eval "$ac_link") 2>conftest.er1
8395 ac_status=$?
8396 grep -v '^ *+' conftest.er1 >conftest.err
8397 rm -f conftest.er1
8398 cat conftest.err >&5
8399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8400 (exit $ac_status); } && {
8401 test -z "$ac_c_werror_flag" ||
8402 test ! -s conftest.err
8403 } && test -s conftest$ac_exeext &&
8404 $as_test_x conftest$ac_exeext; then
8405
8406 lt_aix_libpath_sed='
8407 /Import File Strings/,/^$/ {
8408 /^0/ {
8409 s/^0 *\(.*\)$/\1/
8410 p
8411 }
8412 }'
8413 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8414 # Check for a 64-bit object if we didn't find anything.
8415 if test -z "$aix_libpath"; then
8416 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8417 fi
8418 else
8419 echo "$as_me: failed program was:" >&5
8420 sed 's/^/| /' conftest.$ac_ext >&5
8421
8422
8423 fi
8424
8425 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8426 conftest$ac_exeext conftest.$ac_ext
8427 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8428
8429 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8430 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 "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8431 else
8432 if test "$host_cpu" = ia64; then
8433 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
8434 allow_undefined_flag="-z nodefs"
8435 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
8436 else
8437 # Determine the default libpath from the value encoded in an empty executable.
8438 cat >conftest.$ac_ext <<_ACEOF
8439 /* confdefs.h. */
8440 _ACEOF
8441 cat confdefs.h >>conftest.$ac_ext
8442 cat >>conftest.$ac_ext <<_ACEOF
8443 /* end confdefs.h. */
8444
8445 int
8446 main ()
8447 {
8448
8449 ;
8450 return 0;
8451 }
8452 _ACEOF
8453 rm -f conftest.$ac_objext conftest$ac_exeext
8454 if { (ac_try="$ac_link"
8455 case "(($ac_try" in
8456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8457 *) ac_try_echo=$ac_try;;
8458 esac
8459 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8460 (eval "$ac_link") 2>conftest.er1
8461 ac_status=$?
8462 grep -v '^ *+' conftest.er1 >conftest.err
8463 rm -f conftest.er1
8464 cat conftest.err >&5
8465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8466 (exit $ac_status); } && {
8467 test -z "$ac_c_werror_flag" ||
8468 test ! -s conftest.err
8469 } && test -s conftest$ac_exeext &&
8470 $as_test_x conftest$ac_exeext; then
8471
8472 lt_aix_libpath_sed='
8473 /Import File Strings/,/^$/ {
8474 /^0/ {
8475 s/^0 *\(.*\)$/\1/
8476 p
8477 }
8478 }'
8479 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8480 # Check for a 64-bit object if we didn't find anything.
8481 if test -z "$aix_libpath"; then
8482 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8483 fi
8484 else
8485 echo "$as_me: failed program was:" >&5
8486 sed 's/^/| /' conftest.$ac_ext >&5
8487
8488
8489 fi
8490
8491 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8492 conftest$ac_exeext conftest.$ac_ext
8493 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8494
8495 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8496 # Warning - without using the other run time loading flags,
8497 # -berok will link without error, but may produce a broken library.
8498 no_undefined_flag=' ${wl}-bernotok'
8499 allow_undefined_flag=' ${wl}-berok'
8500 # Exported symbols can be pulled into shared objects from archives
8501 whole_archive_flag_spec='$convenience'
8502 archive_cmds_need_lc=yes
8503 # This is similar to how AIX traditionally builds its shared libraries.
8504 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'
8505 fi
8506 fi
8507 ;;
8508
8509 amigaos*)
8510 archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
8511 hardcode_libdir_flag_spec='-L$libdir'
8512 hardcode_minus_L=yes
8513 # see comment about different semantics on the GNU ld section
8514 ld_shlibs=no
8515 ;;
8516
8517 bsdi[45]*)
8518 export_dynamic_flag_spec=-rdynamic
8519 ;;
8520
8521 cygwin* | mingw* | pw32*)
8522 # When not using gcc, we currently assume that we are using
8523 # Microsoft Visual C++.
8524 # hardcode_libdir_flag_spec is actually meaningless, as there is
8525 # no search path for DLLs.
8526 hardcode_libdir_flag_spec=' '
8527 allow_undefined_flag=unsupported
8528 # Tell ltmain to make .lib files, not .a files.
8529 libext=lib
8530 # Tell ltmain to make .dll files, not .so files.
8531 shrext_cmds=".dll"
8532 # FIXME: Setting linknames here is a bad hack.
8533 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
8534 # The linker will automatically build a .lib file if we build a DLL.
8535 old_archive_From_new_cmds='true'
8536 # FIXME: Should let the user specify the lib program.
8537 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
8538 fix_srcfile_path='`cygpath -w "$srcfile"`'
8539 enable_shared_with_static_runtimes=yes
8540 ;;
8541
8542 darwin* | rhapsody*)
8543 case $host_os in
8544 rhapsody* | darwin1.[012])
8545 allow_undefined_flag='${wl}-undefined ${wl}suppress'
8546 ;;
8547 *) # Darwin 1.3 on
8548 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8549 allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8550 else
8551 case ${MACOSX_DEPLOYMENT_TARGET} in
8552 10.[012])
8553 allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8554 ;;
8555 10.*)
8556 allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
8557 ;;
8558 esac
8559 fi
8560 ;;
8561 esac
8562 archive_cmds_need_lc=no
8563 hardcode_direct=no
8564 hardcode_automatic=yes
8565 hardcode_shlibpath_var=unsupported
8566 whole_archive_flag_spec=''
8567 link_all_deplibs=yes
8568 if test "$GCC" = yes ; then
8569 output_verbose_link_cmd='echo'
8570 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
8571 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
8572 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}"
8573 module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
8574 else
8575 case $cc_basename in
8576 xlc*)
8577 output_verbose_link_cmd='echo'
8578 archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
8579 module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8580 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
8581 archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8582 module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8583 ;;
8584 *)
8585 ld_shlibs=no
8586 ;;
8587 esac
8588 fi
8589 ;;
8590
8591 dgux*)
8592 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8593 hardcode_libdir_flag_spec='-L$libdir'
8594 hardcode_shlibpath_var=no
8595 ;;
8596
8597 freebsd1*)
8598 ld_shlibs=no
8599 ;;
8600
8601 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
8602 # support. Future versions do this automatically, but an explicit c++rt0.o
8603 # does not break anything, and helps significantly (at the cost of a little
8604 # extra space).
8605 freebsd2.2*)
8606 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
8607 hardcode_libdir_flag_spec='-R$libdir'
8608 hardcode_direct=yes
8609 hardcode_shlibpath_var=no
8610 ;;
8611
8612 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
8613 freebsd2*)
8614 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8615 hardcode_direct=yes
8616 hardcode_minus_L=yes
8617 hardcode_shlibpath_var=no
8618 ;;
8619
8620 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
8621 freebsd* | dragonfly*)
8622 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
8623 hardcode_libdir_flag_spec='-R$libdir'
8624 hardcode_direct=yes
8625 hardcode_shlibpath_var=no
8626 ;;
8627
8628 hpux9*)
8629 if test "$GCC" = yes; then
8630 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'
8631 else
8632 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'
8633 fi
8634 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8635 hardcode_libdir_separator=:
8636 hardcode_direct=yes
8637
8638 # hardcode_minus_L: Not really in the search PATH,
8639 # but as the default location of the library.
8640 hardcode_minus_L=yes
8641 export_dynamic_flag_spec='${wl}-E'
8642 ;;
8643
8644 hpux10*)
8645 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8646 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8647 else
8648 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
8649 fi
8650 if test "$with_gnu_ld" = no; then
8651 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8652 hardcode_libdir_separator=:
8653
8654 hardcode_direct=yes
8655 export_dynamic_flag_spec='${wl}-E'
8656
8657 # hardcode_minus_L: Not really in the search PATH,
8658 # but as the default location of the library.
8659 hardcode_minus_L=yes
8660 fi
8661 ;;
8662
8663 hpux11*)
8664 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8665 case $host_cpu in
8666 hppa*64*)
8667 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8668 ;;
8669 ia64*)
8670 archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
8671 ;;
8672 *)
8673 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8674 ;;
8675 esac
8676 else
8677 case $host_cpu in
8678 hppa*64*)
8679 archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8680 ;;
8681 ia64*)
8682 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
8683 ;;
8684 *)
8685 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8686 ;;
8687 esac
8688 fi
8689 if test "$with_gnu_ld" = no; then
8690 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8691 hardcode_libdir_separator=:
8692
8693 case $host_cpu in
8694 hppa*64*|ia64*)
8695 hardcode_libdir_flag_spec_ld='+b $libdir'
8696 hardcode_direct=no
8697 hardcode_shlibpath_var=no
8698 ;;
8699 *)
8700 hardcode_direct=yes
8701 export_dynamic_flag_spec='${wl}-E'
8702
8703 # hardcode_minus_L: Not really in the search PATH,
8704 # but as the default location of the library.
8705 hardcode_minus_L=yes
8706 ;;
8707 esac
8708 fi
8709 ;;
8710
8711 irix5* | irix6* | nonstopux*)
8712 if test "$GCC" = yes; then
8713 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8714 else
8715 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
8716 hardcode_libdir_flag_spec_ld='-rpath $libdir'
8717 fi
8718 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8719 hardcode_libdir_separator=:
8720 link_all_deplibs=yes
8721 ;;
8722
8723 netbsd* | netbsdelf*-gnu)
8724 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8725 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
8726 else
8727 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
8728 fi
8729 hardcode_libdir_flag_spec='-R$libdir'
8730 hardcode_direct=yes
8731 hardcode_shlibpath_var=no
8732 ;;
8733
8734 newsos6)
8735 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8736 hardcode_direct=yes
8737 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8738 hardcode_libdir_separator=:
8739 hardcode_shlibpath_var=no
8740 ;;
8741
8742 openbsd*)
8743 if test -f /usr/libexec/ld.so; then
8744 hardcode_direct=yes
8745 hardcode_shlibpath_var=no
8746 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8747 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8748 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
8749 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8750 export_dynamic_flag_spec='${wl}-E'
8751 else
8752 case $host_os in
8753 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
8754 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8755 hardcode_libdir_flag_spec='-R$libdir'
8756 ;;
8757 *)
8758 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8759 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8760 ;;
8761 esac
8762 fi
8763 else
8764 ld_shlibs=no
8765 fi
8766 ;;
8767
8768 os2*)
8769 hardcode_libdir_flag_spec='-L$libdir'
8770 hardcode_minus_L=yes
8771 allow_undefined_flag=unsupported
8772 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'
8773 old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
8774 ;;
8775
8776 osf3*)
8777 if test "$GCC" = yes; then
8778 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8779 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8780 else
8781 allow_undefined_flag=' -expect_unresolved \*'
8782 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
8783 fi
8784 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8785 hardcode_libdir_separator=:
8786 ;;
8787
8788 osf4* | osf5*) # as osf3* with the addition of -msym flag
8789 if test "$GCC" = yes; then
8790 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8791 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8792 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8793 else
8794 allow_undefined_flag=' -expect_unresolved \*'
8795 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
8796 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
8797 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
8798
8799 # Both c and cxx compiler support -rpath directly
8800 hardcode_libdir_flag_spec='-rpath $libdir'
8801 fi
8802 hardcode_libdir_separator=:
8803 ;;
8804
8805 solaris*)
8806 no_undefined_flag=' -z text'
8807 if test "$GCC" = yes; then
8808 wlarc='${wl}'
8809 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8810 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8811 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
8812 else
8813 wlarc=''
8814 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8815 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8816 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8817 fi
8818 hardcode_libdir_flag_spec='-R$libdir'
8819 hardcode_shlibpath_var=no
8820 case $host_os in
8821 solaris2.[0-5] | solaris2.[0-5].*) ;;
8822 *)
8823 # The compiler driver will combine and reorder linker options,
8824 # but understands `-z linker_flag'. GCC discards it without `$wl',
8825 # but is careful enough not to reorder.
8826 # Supported since Solaris 2.6 (maybe 2.5.1?)
8827 if test "$GCC" = yes; then
8828 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8829 else
8830 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
8831 fi
8832 ;;
8833 esac
8834 link_all_deplibs=yes
8835 ;;
8836
8837 sunos4*)
8838 if test "x$host_vendor" = xsequent; then
8839 # Use $CC to link under sequent, because it throws in some extra .o
8840 # files that make .init and .fini sections work.
8841 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
8842 else
8843 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
8844 fi
8845 hardcode_libdir_flag_spec='-L$libdir'
8846 hardcode_direct=yes
8847 hardcode_minus_L=yes
8848 hardcode_shlibpath_var=no
8849 ;;
8850
8851 sysv4)
8852 case $host_vendor in
8853 sni)
8854 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8855 hardcode_direct=yes # is this really true???
8856 ;;
8857 siemens)
8858 ## LD is ld it makes a PLAMLIB
8859 ## CC just makes a GrossModule.
8860 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8861 reload_cmds='$CC -r -o $output$reload_objs'
8862 hardcode_direct=no
8863 ;;
8864 motorola)
8865 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8866 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
8867 ;;
8868 esac
8869 runpath_var='LD_RUN_PATH'
8870 hardcode_shlibpath_var=no
8871 ;;
8872
8873 sysv4.3*)
8874 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8875 hardcode_shlibpath_var=no
8876 export_dynamic_flag_spec='-Bexport'
8877 ;;
8878
8879 sysv4*MP*)
8880 if test -d /usr/nec; then
8881 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8882 hardcode_shlibpath_var=no
8883 runpath_var=LD_RUN_PATH
8884 hardcode_runpath_var=yes
8885 ld_shlibs=yes
8886 fi
8887 ;;
8888
8889 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
8890 no_undefined_flag='${wl}-z,text'
8891 archive_cmds_need_lc=no
8892 hardcode_shlibpath_var=no
8893 runpath_var='LD_RUN_PATH'
8894
8895 if test "$GCC" = yes; then
8896 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8897 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8898 else
8899 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8900 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8901 fi
8902 ;;
8903
8904 sysv5* | sco3.2v5* | sco5v6*)
8905 # Note: We can NOT use -z defs as we might desire, because we do not
8906 # link with -lc, and that would cause any symbols used from libc to
8907 # always be unresolved, which means just about no library would
8908 # ever link correctly. If we're not using GNU ld we use -z text
8909 # though, which does catch some bad symbols but isn't as heavy-handed
8910 # as -z defs.
8911 no_undefined_flag='${wl}-z,text'
8912 allow_undefined_flag='${wl}-z,nodefs'
8913 archive_cmds_need_lc=no
8914 hardcode_shlibpath_var=no
8915 hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
8916 hardcode_libdir_separator=':'
8917 link_all_deplibs=yes
8918 export_dynamic_flag_spec='${wl}-Bexport'
8919 runpath_var='LD_RUN_PATH'
8920
8921 if test "$GCC" = yes; then
8922 archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8923 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8924 else
8925 archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8926 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8927 fi
8928 ;;
8929
8930 uts4*)
8931 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8932 hardcode_libdir_flag_spec='-L$libdir'
8933 hardcode_shlibpath_var=no
8934 ;;
8935
8936 *)
8937 ld_shlibs=no
8938 ;;
8939 esac
8940 fi
8941
8942 { echo "$as_me:$LINENO: result: $ld_shlibs" >&5
8943 echo "${ECHO_T}$ld_shlibs" >&6; }
8944 test "$ld_shlibs" = no && can_build_shared=no
8945
8946 #
8947 # Do we need to explicitly link libc?
8948 #
8949 case "x$archive_cmds_need_lc" in
8950 x|xyes)
8951 # Assume -lc should be added
8952 archive_cmds_need_lc=yes
8953
8954 if test "$enable_shared" = yes && test "$GCC" = yes; then
8955 case $archive_cmds in
8956 *'~'*)
8957 # FIXME: we may have to deal with multi-command sequences.
8958 ;;
8959 '$CC '*)
8960 # Test whether the compiler implicitly links with -lc since on some
8961 # systems, -lgcc has to come before -lc. If gcc already passes -lc
8962 # to ld, don't add -lc before -lgcc.
8963 { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
8964 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
8965 $rm conftest*
8966 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8967
8968 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8969 (eval $ac_compile) 2>&5
8970 ac_status=$?
8971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8972 (exit $ac_status); } 2>conftest.err; then
8973 soname=conftest
8974 lib=conftest
8975 libobjs=conftest.$ac_objext
8976 deplibs=
8977 wl=$lt_prog_compiler_wl
8978 pic_flag=$lt_prog_compiler_pic
8979 compiler_flags=-v
8980 linker_flags=-v
8981 verstring=
8982 output_objdir=.
8983 libname=conftest
8984 lt_save_allow_undefined_flag=$allow_undefined_flag
8985 allow_undefined_flag=
8986 if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
8987 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
8988 ac_status=$?
8989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8990 (exit $ac_status); }
8991 then
8992 archive_cmds_need_lc=no
8993 else
8994 archive_cmds_need_lc=yes
8995 fi
8996 allow_undefined_flag=$lt_save_allow_undefined_flag
8997 else
8998 cat conftest.err 1>&5
8999 fi
9000 $rm conftest*
9001 { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
9002 echo "${ECHO_T}$archive_cmds_need_lc" >&6; }
9003 ;;
9004 esac
9005 fi
9006 ;;
9007 esac
9008
9009 { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
9010 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
9011 library_names_spec=
9012 libname_spec='lib$name'
9013 soname_spec=
9014 shrext_cmds=".so"
9015 postinstall_cmds=
9016 postuninstall_cmds=
9017 finish_cmds=
9018 finish_eval=
9019 shlibpath_var=
9020 shlibpath_overrides_runpath=unknown
9021 version_type=none
9022 dynamic_linker="$host_os ld.so"
9023 sys_lib_dlsearch_path_spec="/lib /usr/lib"
9024
9025 if test "$GCC" = yes; then
9026 case $host_os in
9027 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
9028 *) lt_awk_arg="/^libraries:/" ;;
9029 esac
9030 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9031 if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
9032 # if the path contains ";" then we assume it to be the separator
9033 # otherwise default to the standard path separator (i.e. ":") - it is
9034 # assumed that no part of a normal pathname contains ";" but that should
9035 # okay in the real world where ";" in dirpaths is itself problematic.
9036 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
9037 else
9038 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
9039 fi
9040 # Ok, now we have the path, separated by spaces, we can step through it
9041 # and add multilib dir if necessary.
9042 lt_tmp_lt_search_path_spec=
9043 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
9044 for lt_sys_path in $lt_search_path_spec; do
9045 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
9046 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
9047 else
9048 test -d "$lt_sys_path" && \
9049 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
9050 fi
9051 done
9052 lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
9053 BEGIN {RS=" "; FS="/|\n";} {
9054 lt_foo="";
9055 lt_count=0;
9056 for (lt_i = NF; lt_i > 0; lt_i--) {
9057 if ($lt_i != "" && $lt_i != ".") {
9058 if ($lt_i == "..") {
9059 lt_count++;
9060 } else {
9061 if (lt_count == 0) {
9062 lt_foo="/" $lt_i lt_foo;
9063 } else {
9064 lt_count--;
9065 }
9066 }
9067 }
9068 }
9069 if (lt_foo != "") { lt_freq[lt_foo]++; }
9070 if (lt_freq[lt_foo] == 1) { print lt_foo; }
9071 }'`
9072 sys_lib_search_path_spec=`echo $lt_search_path_spec`
9073 else
9074 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
9075 fi
9076 need_lib_prefix=unknown
9077 hardcode_into_libs=no
9078
9079 # when you set need_version to no, make sure it does not cause -set_version
9080 # flags to be left without arguments
9081 need_version=unknown
9082
9083 case $host_os in
9084 aix3*)
9085 version_type=linux
9086 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
9087 shlibpath_var=LIBPATH
9088
9089 # AIX 3 has no versioning support, so we append a major version to the name.
9090 soname_spec='${libname}${release}${shared_ext}$major'
9091 ;;
9092
9093 aix[4-9]*)
9094 version_type=linux
9095 need_lib_prefix=no
9096 need_version=no
9097 hardcode_into_libs=yes
9098 if test "$host_cpu" = ia64; then
9099 # AIX 5 supports IA64
9100 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
9101 shlibpath_var=LD_LIBRARY_PATH
9102 else
9103 # With GCC up to 2.95.x, collect2 would create an import file
9104 # for dependence libraries. The import file would start with
9105 # the line `#! .'. This would cause the generated library to
9106 # depend on `.', always an invalid library. This was fixed in
9107 # development snapshots of GCC prior to 3.0.
9108 case $host_os in
9109 aix4 | aix4.[01] | aix4.[01].*)
9110 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
9111 echo ' yes '
9112 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
9113 :
9114 else
9115 can_build_shared=no
9116 fi
9117 ;;
9118 esac
9119 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
9120 # soname into executable. Probably we can add versioning support to
9121 # collect2, so additional links can be useful in future.
9122 if test "$aix_use_runtimelinking" = yes; then
9123 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
9124 # instead of lib<name>.a to let people know that these are not
9125 # typical AIX shared libraries.
9126 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9127 else
9128 # We preserve .a as extension for shared libraries through AIX4.2
9129 # and later when we are not doing run time linking.
9130 library_names_spec='${libname}${release}.a $libname.a'
9131 soname_spec='${libname}${release}${shared_ext}$major'
9132 fi
9133 shlibpath_var=LIBPATH
9134 fi
9135 ;;
9136
9137 amigaos*)
9138 library_names_spec='$libname.ixlibrary $libname.a'
9139 # Create ${libname}_ixlibrary.a entries in /sys/libs.
9140 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'
9141 ;;
9142
9143 beos*)
9144 library_names_spec='${libname}${shared_ext}'
9145 dynamic_linker="$host_os ld.so"
9146 shlibpath_var=LIBRARY_PATH
9147 ;;
9148
9149 bsdi[45]*)
9150 version_type=linux
9151 need_version=no
9152 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9153 soname_spec='${libname}${release}${shared_ext}$major'
9154 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
9155 shlibpath_var=LD_LIBRARY_PATH
9156 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
9157 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
9158 # the default ld.so.conf also contains /usr/contrib/lib and
9159 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
9160 # libtool to hard-code these into programs
9161 ;;
9162
9163 cygwin* | mingw* | pw32*)
9164 version_type=windows
9165 shrext_cmds=".dll"
9166 need_version=no
9167 need_lib_prefix=no
9168
9169 case $GCC,$host_os in
9170 yes,cygwin* | yes,mingw* | yes,pw32*)
9171 library_names_spec='$libname.dll.a'
9172 # DLL is installed to $(libdir)/../bin by postinstall_cmds
9173 postinstall_cmds='base_file=`basename \${file}`~
9174 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
9175 dldir=$destdir/`dirname \$dlpath`~
9176 test -d \$dldir || mkdir -p \$dldir~
9177 $install_prog $dir/$dlname \$dldir/$dlname~
9178 chmod a+x \$dldir/$dlname'
9179 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
9180 dlpath=$dir/\$dldll~
9181 $rm \$dlpath'
9182 shlibpath_overrides_runpath=yes
9183
9184 case $host_os in
9185 cygwin*)
9186 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
9187 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9188 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
9189 ;;
9190 mingw*)
9191 # MinGW DLLs use traditional 'lib' prefix
9192 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9193 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9194 if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
9195 # It is most probably a Windows format PATH printed by
9196 # mingw gcc, but we are running on Cygwin. Gcc prints its search
9197 # path with ; separators, and with drive letters. We can handle the
9198 # drive letters (cygwin fileutils understands them), so leave them,
9199 # especially as we might pass files found there to a mingw objdump,
9200 # which wouldn't understand a cygwinified path. Ahh.
9201 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9202 else
9203 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
9204 fi
9205 ;;
9206 pw32*)
9207 # pw32 DLLs use 'pw' prefix rather than 'lib'
9208 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9209 ;;
9210 esac
9211 ;;
9212
9213 *)
9214 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
9215 ;;
9216 esac
9217 dynamic_linker='Win32 ld.exe'
9218 # FIXME: first we should search . and the directory the executable is in
9219 shlibpath_var=PATH
9220 ;;
9221
9222 darwin* | rhapsody*)
9223 dynamic_linker="$host_os dyld"
9224 version_type=darwin
9225 need_lib_prefix=no
9226 need_version=no
9227 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
9228 soname_spec='${libname}${release}${major}$shared_ext'
9229 shlibpath_overrides_runpath=yes
9230 shlibpath_var=DYLD_LIBRARY_PATH
9231 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
9232
9233 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
9234 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
9235 ;;
9236
9237 dgux*)
9238 version_type=linux
9239 need_lib_prefix=no
9240 need_version=no
9241 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
9242 soname_spec='${libname}${release}${shared_ext}$major'
9243 shlibpath_var=LD_LIBRARY_PATH
9244 ;;
9245
9246 freebsd1*)
9247 dynamic_linker=no
9248 ;;
9249
9250 freebsd* | dragonfly*)
9251 # DragonFly does not have aout. When/if they implement a new
9252 # versioning mechanism, adjust this.
9253 if test -x /usr/bin/objformat; then
9254 objformat=`/usr/bin/objformat`
9255 else
9256 case $host_os in
9257 freebsd[123]*) objformat=aout ;;
9258 *) objformat=elf ;;
9259 esac
9260 fi
9261 version_type=freebsd-$objformat
9262 case $version_type in
9263 freebsd-elf*)
9264 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
9265 need_version=no
9266 need_lib_prefix=no
9267 ;;
9268 freebsd-*)
9269 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
9270 need_version=yes
9271 ;;
9272 esac
9273 shlibpath_var=LD_LIBRARY_PATH
9274 case $host_os in
9275 freebsd2*)
9276 shlibpath_overrides_runpath=yes
9277 ;;
9278 freebsd3.[01]* | freebsdelf3.[01]*)
9279 shlibpath_overrides_runpath=yes
9280 hardcode_into_libs=yes
9281 ;;
9282 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
9283 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
9284 shlibpath_overrides_runpath=no
9285 hardcode_into_libs=yes
9286 ;;
9287 *) # from 4.6 on, and DragonFly
9288 shlibpath_overrides_runpath=yes
9289 hardcode_into_libs=yes
9290 ;;
9291 esac
9292 ;;
9293
9294 gnu*)
9295 version_type=linux
9296 need_lib_prefix=no
9297 need_version=no
9298 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
9299 soname_spec='${libname}${release}${shared_ext}$major'
9300 shlibpath_var=LD_LIBRARY_PATH
9301 hardcode_into_libs=yes
9302 ;;
9303
9304 hpux9* | hpux10* | hpux11*)
9305 # Give a soname corresponding to the major version so that dld.sl refuses to
9306 # link against other versions.
9307 version_type=sunos
9308 need_lib_prefix=no
9309 need_version=no
9310 case $host_cpu in
9311 ia64*)
9312 shrext_cmds='.so'
9313 hardcode_into_libs=yes
9314 dynamic_linker="$host_os dld.so"
9315 shlibpath_var=LD_LIBRARY_PATH
9316 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9317 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9318 soname_spec='${libname}${release}${shared_ext}$major'
9319 if test "X$HPUX_IA64_MODE" = X32; then
9320 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
9321 else
9322 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
9323 fi
9324 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9325 ;;
9326 hppa*64*)
9327 shrext_cmds='.sl'
9328 hardcode_into_libs=yes
9329 dynamic_linker="$host_os dld.sl"
9330 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
9331 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9332 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9333 soname_spec='${libname}${release}${shared_ext}$major'
9334 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
9335 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9336 ;;
9337 *)
9338 shrext_cmds='.sl'
9339 dynamic_linker="$host_os dld.sl"
9340 shlibpath_var=SHLIB_PATH
9341 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
9342 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9343 soname_spec='${libname}${release}${shared_ext}$major'
9344 ;;
9345 esac
9346 # HP-UX runs *really* slowly unless shared libraries are mode 555.
9347 postinstall_cmds='chmod 555 $lib'
9348 ;;
9349
9350 interix[3-9]*)
9351 version_type=linux
9352 need_lib_prefix=no
9353 need_version=no
9354 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9355 soname_spec='${libname}${release}${shared_ext}$major'
9356 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
9357 shlibpath_var=LD_LIBRARY_PATH
9358 shlibpath_overrides_runpath=no
9359 hardcode_into_libs=yes
9360 ;;
9361
9362 irix5* | irix6* | nonstopux*)
9363 case $host_os in
9364 nonstopux*) version_type=nonstopux ;;
9365 *)
9366 if test "$lt_cv_prog_gnu_ld" = yes; then
9367 version_type=linux
9368 else
9369 version_type=irix
9370 fi ;;
9371 esac
9372 need_lib_prefix=no
9373 need_version=no
9374 soname_spec='${libname}${release}${shared_ext}$major'
9375 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
9376 case $host_os in
9377 irix5* | nonstopux*)
9378 libsuff= shlibsuff=
9379 ;;
9380 *)
9381 case $LD in # libtool.m4 will add one of these switches to LD
9382 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
9383 libsuff= shlibsuff= libmagic=32-bit;;
9384 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
9385 libsuff=32 shlibsuff=N32 libmagic=N32;;
9386 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
9387 libsuff=64 shlibsuff=64 libmagic=64-bit;;
9388 *) libsuff= shlibsuff= libmagic=never-match;;
9389 esac
9390 ;;
9391 esac
9392 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
9393 shlibpath_overrides_runpath=no
9394 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
9395 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
9396 hardcode_into_libs=yes
9397 ;;
9398
9399 # No shared lib support for Linux oldld, aout, or coff.
9400 linux*oldld* | linux*aout* | linux*coff*)
9401 dynamic_linker=no
9402 ;;
9403
9404 # This must be Linux ELF.
9405 linux* | k*bsd*-gnu)
9406 version_type=linux
9407 need_lib_prefix=no
9408 need_version=no
9409 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9410 soname_spec='${libname}${release}${shared_ext}$major'
9411 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
9412 shlibpath_var=LD_LIBRARY_PATH
9413 shlibpath_overrides_runpath=no
9414 # This implies no fast_install, which is unacceptable.
9415 # Some rework will be needed to allow for fast_install
9416 # before this can be enabled.
9417 hardcode_into_libs=yes
9418
9419 # Append ld.so.conf contents to the search path
9420 if test -f /etc/ld.so.conf; then
9421 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' ' '`
9422 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
9423 fi
9424
9425 # We used to test for /lib/ld.so.1 and disable shared libraries on
9426 # powerpc, because MkLinux only supported shared libraries with the
9427 # GNU dynamic linker. Since this was broken with cross compilers,
9428 # most powerpc-linux boxes support dynamic linking these days and
9429 # people can always --disable-shared, the test was removed, and we
9430 # assume the GNU/Linux dynamic linker is in use.
9431 dynamic_linker='GNU/Linux ld.so'
9432 ;;
9433
9434 netbsdelf*-gnu)
9435 version_type=linux
9436 need_lib_prefix=no
9437 need_version=no
9438 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9439 soname_spec='${libname}${release}${shared_ext}$major'
9440 shlibpath_var=LD_LIBRARY_PATH
9441 shlibpath_overrides_runpath=no
9442 hardcode_into_libs=yes
9443 dynamic_linker='NetBSD ld.elf_so'
9444 ;;
9445
9446 netbsd*)
9447 version_type=sunos
9448 need_lib_prefix=no
9449 need_version=no
9450 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9451 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9452 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9453 dynamic_linker='NetBSD (a.out) ld.so'
9454 else
9455 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9456 soname_spec='${libname}${release}${shared_ext}$major'
9457 dynamic_linker='NetBSD ld.elf_so'
9458 fi
9459 shlibpath_var=LD_LIBRARY_PATH
9460 shlibpath_overrides_runpath=yes
9461 hardcode_into_libs=yes
9462 ;;
9463
9464 newsos6)
9465 version_type=linux
9466 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9467 shlibpath_var=LD_LIBRARY_PATH
9468 shlibpath_overrides_runpath=yes
9469 ;;
9470
9471 nto-qnx*)
9472 version_type=linux
9473 need_lib_prefix=no
9474 need_version=no
9475 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9476 soname_spec='${libname}${release}${shared_ext}$major'
9477 shlibpath_var=LD_LIBRARY_PATH
9478 shlibpath_overrides_runpath=yes
9479 ;;
9480
9481 openbsd*)
9482 version_type=sunos
9483 sys_lib_dlsearch_path_spec="/usr/lib"
9484 need_lib_prefix=no
9485 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
9486 case $host_os in
9487 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
9488 *) need_version=no ;;
9489 esac
9490 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9491 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9492 shlibpath_var=LD_LIBRARY_PATH
9493 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9494 case $host_os in
9495 openbsd2.[89] | openbsd2.[89].*)
9496 shlibpath_overrides_runpath=no
9497 ;;
9498 *)
9499 shlibpath_overrides_runpath=yes
9500 ;;
9501 esac
9502 else
9503 shlibpath_overrides_runpath=yes
9504 fi
9505 ;;
9506
9507 os2*)
9508 libname_spec='$name'
9509 shrext_cmds=".dll"
9510 need_lib_prefix=no
9511 library_names_spec='$libname${shared_ext} $libname.a'
9512 dynamic_linker='OS/2 ld.exe'
9513 shlibpath_var=LIBPATH
9514 ;;
9515
9516 osf3* | osf4* | osf5*)
9517 version_type=osf
9518 need_lib_prefix=no
9519 need_version=no
9520 soname_spec='${libname}${release}${shared_ext}$major'
9521 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9522 shlibpath_var=LD_LIBRARY_PATH
9523 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
9524 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
9525 ;;
9526
9527 rdos*)
9528 dynamic_linker=no
9529 ;;
9530
9531 solaris*)
9532 version_type=linux
9533 need_lib_prefix=no
9534 need_version=no
9535 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9536 soname_spec='${libname}${release}${shared_ext}$major'
9537 shlibpath_var=LD_LIBRARY_PATH
9538 shlibpath_overrides_runpath=yes
9539 hardcode_into_libs=yes
9540 # ldd complains unless libraries are executable
9541 postinstall_cmds='chmod +x $lib'
9542 ;;
9543
9544 sunos4*)
9545 version_type=sunos
9546 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9547 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
9548 shlibpath_var=LD_LIBRARY_PATH
9549 shlibpath_overrides_runpath=yes
9550 if test "$with_gnu_ld" = yes; then
9551 need_lib_prefix=no
9552 fi
9553 need_version=yes
9554 ;;
9555
9556 sysv4 | sysv4.3*)
9557 version_type=linux
9558 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9559 soname_spec='${libname}${release}${shared_ext}$major'
9560 shlibpath_var=LD_LIBRARY_PATH
9561 case $host_vendor in
9562 sni)
9563 shlibpath_overrides_runpath=no
9564 need_lib_prefix=no
9565 export_dynamic_flag_spec='${wl}-Blargedynsym'
9566 runpath_var=LD_RUN_PATH
9567 ;;
9568 siemens)
9569 need_lib_prefix=no
9570 ;;
9571 motorola)
9572 need_lib_prefix=no
9573 need_version=no
9574 shlibpath_overrides_runpath=no
9575 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
9576 ;;
9577 esac
9578 ;;
9579
9580 sysv4*MP*)
9581 if test -d /usr/nec ;then
9582 version_type=linux
9583 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
9584 soname_spec='$libname${shared_ext}.$major'
9585 shlibpath_var=LD_LIBRARY_PATH
9586 fi
9587 ;;
9588
9589 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
9590 version_type=freebsd-elf
9591 need_lib_prefix=no
9592 need_version=no
9593 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
9594 soname_spec='${libname}${release}${shared_ext}$major'
9595 shlibpath_var=LD_LIBRARY_PATH
9596 hardcode_into_libs=yes
9597 if test "$with_gnu_ld" = yes; then
9598 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
9599 shlibpath_overrides_runpath=no
9600 else
9601 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
9602 shlibpath_overrides_runpath=yes
9603 case $host_os in
9604 sco3.2v5*)
9605 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
9606 ;;
9607 esac
9608 fi
9609 sys_lib_dlsearch_path_spec='/usr/lib'
9610 ;;
9611
9612 uts4*)
9613 version_type=linux
9614 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9615 soname_spec='${libname}${release}${shared_ext}$major'
9616 shlibpath_var=LD_LIBRARY_PATH
9617 ;;
9618
9619 *)
9620 dynamic_linker=no
9621 ;;
9622 esac
9623 { echo "$as_me:$LINENO: result: $dynamic_linker" >&5
9624 echo "${ECHO_T}$dynamic_linker" >&6; }
9625 test "$dynamic_linker" = no && can_build_shared=no
9626
9627 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
9628 echo $ECHO_N "(cached) $ECHO_C" >&6
9629 else
9630 lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
9631 fi
9632
9633 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
9634 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
9635 echo $ECHO_N "(cached) $ECHO_C" >&6
9636 else
9637 lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
9638 fi
9639
9640 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
9641
9642 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
9643 if test "$GCC" = yes; then
9644 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
9645 fi
9646
9647 { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
9648 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
9649 hardcode_action=
9650 if test -n "$hardcode_libdir_flag_spec" || \
9651 test -n "$runpath_var" || \
9652 test "X$hardcode_automatic" = "Xyes" ; then
9653
9654 # We can hardcode non-existant directories.
9655 if test "$hardcode_direct" != no &&
9656 # If the only mechanism to avoid hardcoding is shlibpath_var, we
9657 # have to relink, otherwise we might link with an installed library
9658 # when we should be linking with a yet-to-be-installed one
9659 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
9660 test "$hardcode_minus_L" != no; then
9661 # Linking always hardcodes the temporary library directory.
9662 hardcode_action=relink
9663 else
9664 # We can link without hardcoding, and we can hardcode nonexisting dirs.
9665 hardcode_action=immediate
9666 fi
9667 else
9668 # We cannot hardcode anything, or else we can only hardcode existing
9669 # directories.
9670 hardcode_action=unsupported
9671 fi
9672 { echo "$as_me:$LINENO: result: $hardcode_action" >&5
9673 echo "${ECHO_T}$hardcode_action" >&6; }
9674
9675 if test "$hardcode_action" = relink; then
9676 # Fast installation is not supported
9677 enable_fast_install=no
9678 elif test "$shlibpath_overrides_runpath" = yes ||
9679 test "$enable_shared" = no; then
9680 # Fast installation is not necessary
9681 enable_fast_install=needless
9682 fi
9683
9684 striplib=
9685 old_striplib=
9686 { echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
9687 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; }
9688 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
9689 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
9690 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
9691 { echo "$as_me:$LINENO: result: yes" >&5
9692 echo "${ECHO_T}yes" >&6; }
9693 else
9694 # FIXME - insert some real tests, host_os isn't really good enough
9695 case $host_os in
9696 darwin*)
9697 if test -n "$STRIP" ; then
9698 striplib="$STRIP -x"
9699 old_striplib="$STRIP -S"
9700 { echo "$as_me:$LINENO: result: yes" >&5
9701 echo "${ECHO_T}yes" >&6; }
9702 else
9703 { echo "$as_me:$LINENO: result: no" >&5
9704 echo "${ECHO_T}no" >&6; }
9705 fi
9706 ;;
9707 *)
9708 { echo "$as_me:$LINENO: result: no" >&5
9709 echo "${ECHO_T}no" >&6; }
9710 ;;
9711 esac
9712 fi
9713
9714 if test "x$enable_dlopen" != xyes; then
9715 enable_dlopen=unknown
9716 enable_dlopen_self=unknown
9717 enable_dlopen_self_static=unknown
9718 else
9719 lt_cv_dlopen=no
9720 lt_cv_dlopen_libs=
9721
9722 case $host_os in
9723 beos*)
9724 lt_cv_dlopen="load_add_on"
9725 lt_cv_dlopen_libs=
9726 lt_cv_dlopen_self=yes
9727 ;;
9728
9729 mingw* | pw32*)
9730 lt_cv_dlopen="LoadLibrary"
9731 lt_cv_dlopen_libs=
9732 ;;
9733
9734 cygwin*)
9735 lt_cv_dlopen="dlopen"
9736 lt_cv_dlopen_libs=
9737 ;;
9738
9739 darwin*)
9740 # if libdl is installed we need to link against it
9741 { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9742 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
9743 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9744 echo $ECHO_N "(cached) $ECHO_C" >&6
9745 else
9746 ac_check_lib_save_LIBS=$LIBS
9747 LIBS="-ldl $LIBS"
9748 cat >conftest.$ac_ext <<_ACEOF
9749 /* confdefs.h. */
9750 _ACEOF
9751 cat confdefs.h >>conftest.$ac_ext
9752 cat >>conftest.$ac_ext <<_ACEOF
9753 /* end confdefs.h. */
9754
9755 /* Override any GCC internal prototype to avoid an error.
9756 Use char because int might match the return type of a GCC
9757 builtin and then its argument prototype would still apply. */
9758 #ifdef __cplusplus
9759 extern "C"
9760 #endif
9761 char dlopen ();
9762 int
9763 main ()
9764 {
9765 return dlopen ();
9766 ;
9767 return 0;
9768 }
9769 _ACEOF
9770 rm -f conftest.$ac_objext conftest$ac_exeext
9771 if { (ac_try="$ac_link"
9772 case "(($ac_try" in
9773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9774 *) ac_try_echo=$ac_try;;
9775 esac
9776 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9777 (eval "$ac_link") 2>conftest.er1
9778 ac_status=$?
9779 grep -v '^ *+' conftest.er1 >conftest.err
9780 rm -f conftest.er1
9781 cat conftest.err >&5
9782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9783 (exit $ac_status); } && {
9784 test -z "$ac_c_werror_flag" ||
9785 test ! -s conftest.err
9786 } && test -s conftest$ac_exeext &&
9787 $as_test_x conftest$ac_exeext; then
9788 ac_cv_lib_dl_dlopen=yes
9789 else
9790 echo "$as_me: failed program was:" >&5
9791 sed 's/^/| /' conftest.$ac_ext >&5
9792
9793 ac_cv_lib_dl_dlopen=no
9794 fi
9795
9796 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9797 conftest$ac_exeext conftest.$ac_ext
9798 LIBS=$ac_check_lib_save_LIBS
9799 fi
9800 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9801 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
9802 if test $ac_cv_lib_dl_dlopen = yes; then
9803 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
9804 else
9805
9806 lt_cv_dlopen="dyld"
9807 lt_cv_dlopen_libs=
9808 lt_cv_dlopen_self=yes
9809
9810 fi
9811
9812 ;;
9813
9814 *)
9815 { echo "$as_me:$LINENO: checking for shl_load" >&5
9816 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; }
9817 if test "${ac_cv_func_shl_load+set}" = set; then
9818 echo $ECHO_N "(cached) $ECHO_C" >&6
9819 else
9820 cat >conftest.$ac_ext <<_ACEOF
9821 /* confdefs.h. */
9822 _ACEOF
9823 cat confdefs.h >>conftest.$ac_ext
9824 cat >>conftest.$ac_ext <<_ACEOF
9825 /* end confdefs.h. */
9826 /* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
9827 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9828 #define shl_load innocuous_shl_load
9829
9830 /* System header to define __stub macros and hopefully few prototypes,
9831 which can conflict with char shl_load (); below.
9832 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9833 <limits.h> exists even on freestanding compilers. */
9834
9835 #ifdef __STDC__
9836 # include <limits.h>
9837 #else
9838 # include <assert.h>
9839 #endif
9840
9841 #undef shl_load
9842
9843 /* Override any GCC internal prototype to avoid an error.
9844 Use char because int might match the return type of a GCC
9845 builtin and then its argument prototype would still apply. */
9846 #ifdef __cplusplus
9847 extern "C"
9848 #endif
9849 char shl_load ();
9850 /* The GNU C library defines this for functions which it implements
9851 to always fail with ENOSYS. Some functions are actually named
9852 something starting with __ and the normal name is an alias. */
9853 #if defined __stub_shl_load || defined __stub___shl_load
9854 choke me
9855 #endif
9856
9857 int
9858 main ()
9859 {
9860 return shl_load ();
9861 ;
9862 return 0;
9863 }
9864 _ACEOF
9865 rm -f conftest.$ac_objext conftest$ac_exeext
9866 if { (ac_try="$ac_link"
9867 case "(($ac_try" in
9868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9869 *) ac_try_echo=$ac_try;;
9870 esac
9871 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9872 (eval "$ac_link") 2>conftest.er1
9873 ac_status=$?
9874 grep -v '^ *+' conftest.er1 >conftest.err
9875 rm -f conftest.er1
9876 cat conftest.err >&5
9877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9878 (exit $ac_status); } && {
9879 test -z "$ac_c_werror_flag" ||
9880 test ! -s conftest.err
9881 } && test -s conftest$ac_exeext &&
9882 $as_test_x conftest$ac_exeext; then
9883 ac_cv_func_shl_load=yes
9884 else
9885 echo "$as_me: failed program was:" >&5
9886 sed 's/^/| /' conftest.$ac_ext >&5
9887
9888 ac_cv_func_shl_load=no
9889 fi
9890
9891 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9892 conftest$ac_exeext conftest.$ac_ext
9893 fi
9894 { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
9895 echo "${ECHO_T}$ac_cv_func_shl_load" >&6; }
9896 if test $ac_cv_func_shl_load = yes; then
9897 lt_cv_dlopen="shl_load"
9898 else
9899 { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9900 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
9901 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9902 echo $ECHO_N "(cached) $ECHO_C" >&6
9903 else
9904 ac_check_lib_save_LIBS=$LIBS
9905 LIBS="-ldld $LIBS"
9906 cat >conftest.$ac_ext <<_ACEOF
9907 /* confdefs.h. */
9908 _ACEOF
9909 cat confdefs.h >>conftest.$ac_ext
9910 cat >>conftest.$ac_ext <<_ACEOF
9911 /* end confdefs.h. */
9912
9913 /* Override any GCC internal prototype to avoid an error.
9914 Use char because int might match the return type of a GCC
9915 builtin and then its argument prototype would still apply. */
9916 #ifdef __cplusplus
9917 extern "C"
9918 #endif
9919 char shl_load ();
9920 int
9921 main ()
9922 {
9923 return shl_load ();
9924 ;
9925 return 0;
9926 }
9927 _ACEOF
9928 rm -f conftest.$ac_objext conftest$ac_exeext
9929 if { (ac_try="$ac_link"
9930 case "(($ac_try" in
9931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9932 *) ac_try_echo=$ac_try;;
9933 esac
9934 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9935 (eval "$ac_link") 2>conftest.er1
9936 ac_status=$?
9937 grep -v '^ *+' conftest.er1 >conftest.err
9938 rm -f conftest.er1
9939 cat conftest.err >&5
9940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9941 (exit $ac_status); } && {
9942 test -z "$ac_c_werror_flag" ||
9943 test ! -s conftest.err
9944 } && test -s conftest$ac_exeext &&
9945 $as_test_x conftest$ac_exeext; then
9946 ac_cv_lib_dld_shl_load=yes
9947 else
9948 echo "$as_me: failed program was:" >&5
9949 sed 's/^/| /' conftest.$ac_ext >&5
9950
9951 ac_cv_lib_dld_shl_load=no
9952 fi
9953
9954 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9955 conftest$ac_exeext conftest.$ac_ext
9956 LIBS=$ac_check_lib_save_LIBS
9957 fi
9958 { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9959 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
9960 if test $ac_cv_lib_dld_shl_load = yes; then
9961 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
9962 else
9963 { echo "$as_me:$LINENO: checking for dlopen" >&5
9964 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; }
9965 if test "${ac_cv_func_dlopen+set}" = set; then
9966 echo $ECHO_N "(cached) $ECHO_C" >&6
9967 else
9968 cat >conftest.$ac_ext <<_ACEOF
9969 /* confdefs.h. */
9970 _ACEOF
9971 cat confdefs.h >>conftest.$ac_ext
9972 cat >>conftest.$ac_ext <<_ACEOF
9973 /* end confdefs.h. */
9974 /* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
9975 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9976 #define dlopen innocuous_dlopen
9977
9978 /* System header to define __stub macros and hopefully few prototypes,
9979 which can conflict with char dlopen (); below.
9980 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9981 <limits.h> exists even on freestanding compilers. */
9982
9983 #ifdef __STDC__
9984 # include <limits.h>
9985 #else
9986 # include <assert.h>
9987 #endif
9988
9989 #undef dlopen
9990
9991 /* Override any GCC internal prototype to avoid an error.
9992 Use char because int might match the return type of a GCC
9993 builtin and then its argument prototype would still apply. */
9994 #ifdef __cplusplus
9995 extern "C"
9996 #endif
9997 char dlopen ();
9998 /* The GNU C library defines this for functions which it implements
9999 to always fail with ENOSYS. Some functions are actually named
10000 something starting with __ and the normal name is an alias. */
10001 #if defined __stub_dlopen || defined __stub___dlopen
10002 choke me
10003 #endif
10004
10005 int
10006 main ()
10007 {
10008 return dlopen ();
10009 ;
10010 return 0;
10011 }
10012 _ACEOF
10013 rm -f conftest.$ac_objext conftest$ac_exeext
10014 if { (ac_try="$ac_link"
10015 case "(($ac_try" in
10016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10017 *) ac_try_echo=$ac_try;;
10018 esac
10019 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10020 (eval "$ac_link") 2>conftest.er1
10021 ac_status=$?
10022 grep -v '^ *+' conftest.er1 >conftest.err
10023 rm -f conftest.er1
10024 cat conftest.err >&5
10025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10026 (exit $ac_status); } && {
10027 test -z "$ac_c_werror_flag" ||
10028 test ! -s conftest.err
10029 } && test -s conftest$ac_exeext &&
10030 $as_test_x conftest$ac_exeext; then
10031 ac_cv_func_dlopen=yes
10032 else
10033 echo "$as_me: failed program was:" >&5
10034 sed 's/^/| /' conftest.$ac_ext >&5
10035
10036 ac_cv_func_dlopen=no
10037 fi
10038
10039 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10040 conftest$ac_exeext conftest.$ac_ext
10041 fi
10042 { echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
10043 echo "${ECHO_T}$ac_cv_func_dlopen" >&6; }
10044 if test $ac_cv_func_dlopen = yes; then
10045 lt_cv_dlopen="dlopen"
10046 else
10047 { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10048 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
10049 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10050 echo $ECHO_N "(cached) $ECHO_C" >&6
10051 else
10052 ac_check_lib_save_LIBS=$LIBS
10053 LIBS="-ldl $LIBS"
10054 cat >conftest.$ac_ext <<_ACEOF
10055 /* confdefs.h. */
10056 _ACEOF
10057 cat confdefs.h >>conftest.$ac_ext
10058 cat >>conftest.$ac_ext <<_ACEOF
10059 /* end confdefs.h. */
10060
10061 /* Override any GCC internal prototype to avoid an error.
10062 Use char because int might match the return type of a GCC
10063 builtin and then its argument prototype would still apply. */
10064 #ifdef __cplusplus
10065 extern "C"
10066 #endif
10067 char dlopen ();
10068 int
10069 main ()
10070 {
10071 return dlopen ();
10072 ;
10073 return 0;
10074 }
10075 _ACEOF
10076 rm -f conftest.$ac_objext conftest$ac_exeext
10077 if { (ac_try="$ac_link"
10078 case "(($ac_try" in
10079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10080 *) ac_try_echo=$ac_try;;
10081 esac
10082 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10083 (eval "$ac_link") 2>conftest.er1
10084 ac_status=$?
10085 grep -v '^ *+' conftest.er1 >conftest.err
10086 rm -f conftest.er1
10087 cat conftest.err >&5
10088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10089 (exit $ac_status); } && {
10090 test -z "$ac_c_werror_flag" ||
10091 test ! -s conftest.err
10092 } && test -s conftest$ac_exeext &&
10093 $as_test_x conftest$ac_exeext; then
10094 ac_cv_lib_dl_dlopen=yes
10095 else
10096 echo "$as_me: failed program was:" >&5
10097 sed 's/^/| /' conftest.$ac_ext >&5
10098
10099 ac_cv_lib_dl_dlopen=no
10100 fi
10101
10102 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10103 conftest$ac_exeext conftest.$ac_ext
10104 LIBS=$ac_check_lib_save_LIBS
10105 fi
10106 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10107 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
10108 if test $ac_cv_lib_dl_dlopen = yes; then
10109 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10110 else
10111 { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
10112 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; }
10113 if test "${ac_cv_lib_svld_dlopen+set}" = set; then
10114 echo $ECHO_N "(cached) $ECHO_C" >&6
10115 else
10116 ac_check_lib_save_LIBS=$LIBS
10117 LIBS="-lsvld $LIBS"
10118 cat >conftest.$ac_ext <<_ACEOF
10119 /* confdefs.h. */
10120 _ACEOF
10121 cat confdefs.h >>conftest.$ac_ext
10122 cat >>conftest.$ac_ext <<_ACEOF
10123 /* end confdefs.h. */
10124
10125 /* Override any GCC internal prototype to avoid an error.
10126 Use char because int might match the return type of a GCC
10127 builtin and then its argument prototype would still apply. */
10128 #ifdef __cplusplus
10129 extern "C"
10130 #endif
10131 char dlopen ();
10132 int
10133 main ()
10134 {
10135 return dlopen ();
10136 ;
10137 return 0;
10138 }
10139 _ACEOF
10140 rm -f conftest.$ac_objext conftest$ac_exeext
10141 if { (ac_try="$ac_link"
10142 case "(($ac_try" in
10143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10144 *) ac_try_echo=$ac_try;;
10145 esac
10146 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10147 (eval "$ac_link") 2>conftest.er1
10148 ac_status=$?
10149 grep -v '^ *+' conftest.er1 >conftest.err
10150 rm -f conftest.er1
10151 cat conftest.err >&5
10152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10153 (exit $ac_status); } && {
10154 test -z "$ac_c_werror_flag" ||
10155 test ! -s conftest.err
10156 } && test -s conftest$ac_exeext &&
10157 $as_test_x conftest$ac_exeext; then
10158 ac_cv_lib_svld_dlopen=yes
10159 else
10160 echo "$as_me: failed program was:" >&5
10161 sed 's/^/| /' conftest.$ac_ext >&5
10162
10163 ac_cv_lib_svld_dlopen=no
10164 fi
10165
10166 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10167 conftest$ac_exeext conftest.$ac_ext
10168 LIBS=$ac_check_lib_save_LIBS
10169 fi
10170 { echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
10171 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; }
10172 if test $ac_cv_lib_svld_dlopen = yes; then
10173 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
10174 else
10175 { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
10176 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; }
10177 if test "${ac_cv_lib_dld_dld_link+set}" = set; then
10178 echo $ECHO_N "(cached) $ECHO_C" >&6
10179 else
10180 ac_check_lib_save_LIBS=$LIBS
10181 LIBS="-ldld $LIBS"
10182 cat >conftest.$ac_ext <<_ACEOF
10183 /* confdefs.h. */
10184 _ACEOF
10185 cat confdefs.h >>conftest.$ac_ext
10186 cat >>conftest.$ac_ext <<_ACEOF
10187 /* end confdefs.h. */
10188
10189 /* Override any GCC internal prototype to avoid an error.
10190 Use char because int might match the return type of a GCC
10191 builtin and then its argument prototype would still apply. */
10192 #ifdef __cplusplus
10193 extern "C"
10194 #endif
10195 char dld_link ();
10196 int
10197 main ()
10198 {
10199 return dld_link ();
10200 ;
10201 return 0;
10202 }
10203 _ACEOF
10204 rm -f conftest.$ac_objext conftest$ac_exeext
10205 if { (ac_try="$ac_link"
10206 case "(($ac_try" in
10207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10208 *) ac_try_echo=$ac_try;;
10209 esac
10210 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10211 (eval "$ac_link") 2>conftest.er1
10212 ac_status=$?
10213 grep -v '^ *+' conftest.er1 >conftest.err
10214 rm -f conftest.er1
10215 cat conftest.err >&5
10216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10217 (exit $ac_status); } && {
10218 test -z "$ac_c_werror_flag" ||
10219 test ! -s conftest.err
10220 } && test -s conftest$ac_exeext &&
10221 $as_test_x conftest$ac_exeext; then
10222 ac_cv_lib_dld_dld_link=yes
10223 else
10224 echo "$as_me: failed program was:" >&5
10225 sed 's/^/| /' conftest.$ac_ext >&5
10226
10227 ac_cv_lib_dld_dld_link=no
10228 fi
10229
10230 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10231 conftest$ac_exeext conftest.$ac_ext
10232 LIBS=$ac_check_lib_save_LIBS
10233 fi
10234 { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
10235 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; }
10236 if test $ac_cv_lib_dld_dld_link = yes; then
10237 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
10238 fi
10239
10240
10241 fi
10242
10243
10244 fi
10245
10246
10247 fi
10248
10249
10250 fi
10251
10252
10253 fi
10254
10255 ;;
10256 esac
10257
10258 if test "x$lt_cv_dlopen" != xno; then
10259 enable_dlopen=yes
10260 else
10261 enable_dlopen=no
10262 fi
10263
10264 case $lt_cv_dlopen in
10265 dlopen)
10266 save_CPPFLAGS="$CPPFLAGS"
10267 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
10268
10269 save_LDFLAGS="$LDFLAGS"
10270 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
10271
10272 save_LIBS="$LIBS"
10273 LIBS="$lt_cv_dlopen_libs $LIBS"
10274
10275 { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
10276 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; }
10277 if test "${lt_cv_dlopen_self+set}" = set; then
10278 echo $ECHO_N "(cached) $ECHO_C" >&6
10279 else
10280 if test "$cross_compiling" = yes; then :
10281 lt_cv_dlopen_self=cross
10282 else
10283 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10284 lt_status=$lt_dlunknown
10285 cat > conftest.$ac_ext <<EOF
10286 #line 10287 "configure"
10287 #include "confdefs.h"
10288
10289 #if HAVE_DLFCN_H
10290 #include <dlfcn.h>
10291 #endif
10292
10293 #include <stdio.h>
10294
10295 #ifdef RTLD_GLOBAL
10296 # define LT_DLGLOBAL RTLD_GLOBAL
10297 #else
10298 # ifdef DL_GLOBAL
10299 # define LT_DLGLOBAL DL_GLOBAL
10300 # else
10301 # define LT_DLGLOBAL 0
10302 # endif
10303 #endif
10304
10305 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10306 find out it does not work in some platform. */
10307 #ifndef LT_DLLAZY_OR_NOW
10308 # ifdef RTLD_LAZY
10309 # define LT_DLLAZY_OR_NOW RTLD_LAZY
10310 # else
10311 # ifdef DL_LAZY
10312 # define LT_DLLAZY_OR_NOW DL_LAZY
10313 # else
10314 # ifdef RTLD_NOW
10315 # define LT_DLLAZY_OR_NOW RTLD_NOW
10316 # else
10317 # ifdef DL_NOW
10318 # define LT_DLLAZY_OR_NOW DL_NOW
10319 # else
10320 # define LT_DLLAZY_OR_NOW 0
10321 # endif
10322 # endif
10323 # endif
10324 # endif
10325 #endif
10326
10327 #ifdef __cplusplus
10328 extern "C" void exit (int);
10329 #endif
10330
10331 void fnord() { int i=42;}
10332 int main ()
10333 {
10334 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10335 int status = $lt_dlunknown;
10336
10337 if (self)
10338 {
10339 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
10340 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10341 /* dlclose (self); */
10342 }
10343 else
10344 puts (dlerror ());
10345
10346 exit (status);
10347 }
10348 EOF
10349 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10350 (eval $ac_link) 2>&5
10351 ac_status=$?
10352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10353 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
10354 (./conftest; exit; ) >&5 2>/dev/null
10355 lt_status=$?
10356 case x$lt_status in
10357 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
10358 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
10359 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
10360 esac
10361 else :
10362 # compilation failed
10363 lt_cv_dlopen_self=no
10364 fi
10365 fi
10366 rm -fr conftest*
10367
10368
10369 fi
10370 { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
10371 echo "${ECHO_T}$lt_cv_dlopen_self" >&6; }
10372
10373 if test "x$lt_cv_dlopen_self" = xyes; then
10374 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
10375 { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
10376 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; }
10377 if test "${lt_cv_dlopen_self_static+set}" = set; then
10378 echo $ECHO_N "(cached) $ECHO_C" >&6
10379 else
10380 if test "$cross_compiling" = yes; then :
10381 lt_cv_dlopen_self_static=cross
10382 else
10383 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10384 lt_status=$lt_dlunknown
10385 cat > conftest.$ac_ext <<EOF
10386 #line 10387 "configure"
10387 #include "confdefs.h"
10388
10389 #if HAVE_DLFCN_H
10390 #include <dlfcn.h>
10391 #endif
10392
10393 #include <stdio.h>
10394
10395 #ifdef RTLD_GLOBAL
10396 # define LT_DLGLOBAL RTLD_GLOBAL
10397 #else
10398 # ifdef DL_GLOBAL
10399 # define LT_DLGLOBAL DL_GLOBAL
10400 # else
10401 # define LT_DLGLOBAL 0
10402 # endif
10403 #endif
10404
10405 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10406 find out it does not work in some platform. */
10407 #ifndef LT_DLLAZY_OR_NOW
10408 # ifdef RTLD_LAZY
10409 # define LT_DLLAZY_OR_NOW RTLD_LAZY
10410 # else
10411 # ifdef DL_LAZY
10412 # define LT_DLLAZY_OR_NOW DL_LAZY
10413 # else
10414 # ifdef RTLD_NOW
10415 # define LT_DLLAZY_OR_NOW RTLD_NOW
10416 # else
10417 # ifdef DL_NOW
10418 # define LT_DLLAZY_OR_NOW DL_NOW
10419 # else
10420 # define LT_DLLAZY_OR_NOW 0
10421 # endif
10422 # endif
10423 # endif
10424 # endif
10425 #endif
10426
10427 #ifdef __cplusplus
10428 extern "C" void exit (int);
10429 #endif
10430
10431 void fnord() { int i=42;}
10432 int main ()
10433 {
10434 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10435 int status = $lt_dlunknown;
10436
10437 if (self)
10438 {
10439 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
10440 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10441 /* dlclose (self); */
10442 }
10443 else
10444 puts (dlerror ());
10445
10446 exit (status);
10447 }
10448 EOF
10449 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10450 (eval $ac_link) 2>&5
10451 ac_status=$?
10452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10453 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
10454 (./conftest; exit; ) >&5 2>/dev/null
10455 lt_status=$?
10456 case x$lt_status in
10457 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
10458 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
10459 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
10460 esac
10461 else :
10462 # compilation failed
10463 lt_cv_dlopen_self_static=no
10464 fi
10465 fi
10466 rm -fr conftest*
10467
10468
10469 fi
10470 { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
10471 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; }
10472 fi
10473
10474 CPPFLAGS="$save_CPPFLAGS"
10475 LDFLAGS="$save_LDFLAGS"
10476 LIBS="$save_LIBS"
10477 ;;
10478 esac
10479
10480 case $lt_cv_dlopen_self in
10481 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
10482 *) enable_dlopen_self=unknown ;;
10483 esac
10484
10485 case $lt_cv_dlopen_self_static in
10486 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
10487 *) enable_dlopen_self_static=unknown ;;
10488 esac
10489 fi
10490
10491
10492 # Report which library types will actually be built
10493 { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
10494 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; }
10495 { echo "$as_me:$LINENO: result: $can_build_shared" >&5
10496 echo "${ECHO_T}$can_build_shared" >&6; }
10497
10498 { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
10499 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; }
10500 test "$can_build_shared" = "no" && enable_shared=no
10501
10502 # On AIX, shared libraries and static libraries use the same namespace, and
10503 # are all built from PIC.
10504 case $host_os in
10505 aix3*)
10506 test "$enable_shared" = yes && enable_static=no
10507 if test -n "$RANLIB"; then
10508 archive_cmds="$archive_cmds~\$RANLIB \$lib"
10509 postinstall_cmds='$RANLIB $lib'
10510 fi
10511 ;;
10512
10513 aix[4-9]*)
10514 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
10515 test "$enable_shared" = yes && enable_static=no
10516 fi
10517 ;;
10518 esac
10519 { echo "$as_me:$LINENO: result: $enable_shared" >&5
10520 echo "${ECHO_T}$enable_shared" >&6; }
10521
10522 { echo "$as_me:$LINENO: checking whether to build static libraries" >&5
10523 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; }
10524 # Make sure either enable_shared or enable_static is yes.
10525 test "$enable_shared" = yes || enable_static=yes
10526 { echo "$as_me:$LINENO: result: $enable_static" >&5
10527 echo "${ECHO_T}$enable_static" >&6; }
10528
10529 # The else clause should only fire when bootstrapping the
10530 # libtool distribution, otherwise you forgot to ship ltmain.sh
10531 # with your package, and you will get complaints that there are
10532 # no rules to generate ltmain.sh.
10533 if test -f "$ltmain"; then
10534 # See if we are running on zsh, and set the options which allow our commands through
10535 # without removal of \ escapes.
10536 if test -n "${ZSH_VERSION+set}" ; then
10537 setopt NO_GLOB_SUBST
10538 fi
10539 # Now quote all the things that may contain metacharacters while being
10540 # careful not to overquote the AC_SUBSTed values. We take copies of the
10541 # variables and quote the copies for generation of the libtool script.
10542 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
10543 SED SHELL STRIP \
10544 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
10545 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
10546 deplibs_check_method reload_flag reload_cmds need_locks \
10547 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
10548 lt_cv_sys_global_symbol_to_c_name_address \
10549 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
10550 old_postinstall_cmds old_postuninstall_cmds \
10551 compiler \
10552 CC \
10553 LD \
10554 lt_prog_compiler_wl \
10555 lt_prog_compiler_pic \
10556 lt_prog_compiler_static \
10557 lt_prog_compiler_no_builtin_flag \
10558 export_dynamic_flag_spec \
10559 thread_safe_flag_spec \
10560 whole_archive_flag_spec \
10561 enable_shared_with_static_runtimes \
10562 old_archive_cmds \
10563 old_archive_from_new_cmds \
10564 predep_objects \
10565 postdep_objects \
10566 predeps \
10567 postdeps \
10568 compiler_lib_search_path \
10569 compiler_lib_search_dirs \
10570 archive_cmds \
10571 archive_expsym_cmds \
10572 postinstall_cmds \
10573 postuninstall_cmds \
10574 old_archive_from_expsyms_cmds \
10575 allow_undefined_flag \
10576 no_undefined_flag \
10577 export_symbols_cmds \
10578 hardcode_libdir_flag_spec \
10579 hardcode_libdir_flag_spec_ld \
10580 hardcode_libdir_separator \
10581 hardcode_automatic \
10582 module_cmds \
10583 module_expsym_cmds \
10584 lt_cv_prog_compiler_c_o \
10585 fix_srcfile_path \
10586 exclude_expsyms \
10587 include_expsyms; do
10588
10589 case $var in
10590 old_archive_cmds | \
10591 old_archive_from_new_cmds | \
10592 archive_cmds | \
10593 archive_expsym_cmds | \
10594 module_cmds | \
10595 module_expsym_cmds | \
10596 old_archive_from_expsyms_cmds | \
10597 export_symbols_cmds | \
10598 extract_expsyms_cmds | reload_cmds | finish_cmds | \
10599 postinstall_cmds | postuninstall_cmds | \
10600 old_postinstall_cmds | old_postuninstall_cmds | \
10601 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
10602 # Double-quote double-evaled strings.
10603 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
10604 ;;
10605 *)
10606 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
10607 ;;
10608 esac
10609 done
10610
10611 case $lt_echo in
10612 *'\$0 --fallback-echo"')
10613 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
10614 ;;
10615 esac
10616
10617 cfgfile="${ofile}T"
10618 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
10619 $rm -f "$cfgfile"
10620 { echo "$as_me:$LINENO: creating $ofile" >&5
10621 echo "$as_me: creating $ofile" >&6;}
10622
10623 cat <<__EOF__ >> "$cfgfile"
10624 #! $SHELL
10625
10626 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
10627 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
10628 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
10629 #
10630 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
10631 # Free Software Foundation, Inc.
10632 #
10633 # This file is part of GNU Libtool:
10634 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
10635 #
10636 # This program is free software; you can redistribute it and/or modify
10637 # it under the terms of the GNU General Public License as published by
10638 # the Free Software Foundation; either version 2 of the License, or
10639 # (at your option) any later version.
10640 #
10641 # This program is distributed in the hope that it will be useful, but
10642 # WITHOUT ANY WARRANTY; without even the implied warranty of
10643 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10644 # General Public License for more details.
10645 #
10646 # You should have received a copy of the GNU General Public License
10647 # along with this program; if not, write to the Free Software
10648 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
10649 #
10650 # As a special exception to the GNU General Public License, if you
10651 # distribute this file as part of a program that contains a
10652 # configuration script generated by Autoconf, you may include it under
10653 # the same distribution terms that you use for the rest of that program.
10654
10655 # A sed program that does not truncate output.
10656 SED=$lt_SED
10657
10658 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
10659 Xsed="$SED -e 1s/^X//"
10660
10661 # The HP-UX ksh and POSIX shell print the target directory to stdout
10662 # if CDPATH is set.
10663 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
10664
10665 # The names of the tagged configurations supported by this script.
10666 available_tags=
10667
10668 # ### BEGIN LIBTOOL CONFIG
10669
10670 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10671
10672 # Shell to use when invoking shell scripts.
10673 SHELL=$lt_SHELL
10674
10675 # Whether or not to build shared libraries.
10676 build_libtool_libs=$enable_shared
10677
10678 # Whether or not to build static libraries.
10679 build_old_libs=$enable_static
10680
10681 # Whether or not to add -lc for building shared libraries.
10682 build_libtool_need_lc=$archive_cmds_need_lc
10683
10684 # Whether or not to disallow shared libs when runtime libs are static
10685 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
10686
10687 # Whether or not to optimize for fast installation.
10688 fast_install=$enable_fast_install
10689
10690 # The host system.
10691 host_alias=$host_alias
10692 host=$host
10693 host_os=$host_os
10694
10695 # The build system.
10696 build_alias=$build_alias
10697 build=$build
10698 build_os=$build_os
10699
10700 # An echo program that does not interpret backslashes.
10701 echo=$lt_echo
10702
10703 # The archiver.
10704 AR=$lt_AR
10705 AR_FLAGS=$lt_AR_FLAGS
10706
10707 # A C compiler.
10708 LTCC=$lt_LTCC
10709
10710 # LTCC compiler flags.
10711 LTCFLAGS=$lt_LTCFLAGS
10712
10713 # A language-specific compiler.
10714 CC=$lt_compiler
10715
10716 # Is the compiler the GNU C compiler?
10717 with_gcc=$GCC
10718
10719 # An ERE matcher.
10720 EGREP=$lt_EGREP
10721
10722 # The linker used to build libraries.
10723 LD=$lt_LD
10724
10725 # Whether we need hard or soft links.
10726 LN_S=$lt_LN_S
10727
10728 # A BSD-compatible nm program.
10729 NM=$lt_NM
10730
10731 # A symbol stripping program
10732 STRIP=$lt_STRIP
10733
10734 # Used to examine libraries when file_magic_cmd begins "file"
10735 MAGIC_CMD=$MAGIC_CMD
10736
10737 # Used on cygwin: DLL creation program.
10738 DLLTOOL="$DLLTOOL"
10739
10740 # Used on cygwin: object dumper.
10741 OBJDUMP="$OBJDUMP"
10742
10743 # Used on cygwin: assembler.
10744 AS="$AS"
10745
10746 # The name of the directory that contains temporary libtool files.
10747 objdir=$objdir
10748
10749 # How to create reloadable object files.
10750 reload_flag=$lt_reload_flag
10751 reload_cmds=$lt_reload_cmds
10752
10753 # How to pass a linker flag through the compiler.
10754 wl=$lt_lt_prog_compiler_wl
10755
10756 # Object file suffix (normally "o").
10757 objext="$ac_objext"
10758
10759 # Old archive suffix (normally "a").
10760 libext="$libext"
10761
10762 # Shared library suffix (normally ".so").
10763 shrext_cmds='$shrext_cmds'
10764
10765 # Executable file suffix (normally "").
10766 exeext="$exeext"
10767
10768 # Additional compiler flags for building library objects.
10769 pic_flag=$lt_lt_prog_compiler_pic
10770 pic_mode=$pic_mode
10771
10772 # What is the maximum length of a command?
10773 max_cmd_len=$lt_cv_sys_max_cmd_len
10774
10775 # Does compiler simultaneously support -c and -o options?
10776 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
10777
10778 # Must we lock files when doing compilation?
10779 need_locks=$lt_need_locks
10780
10781 # Do we need the lib prefix for modules?
10782 need_lib_prefix=$need_lib_prefix
10783
10784 # Do we need a version for libraries?
10785 need_version=$need_version
10786
10787 # Whether dlopen is supported.
10788 dlopen_support=$enable_dlopen
10789
10790 # Whether dlopen of programs is supported.
10791 dlopen_self=$enable_dlopen_self
10792
10793 # Whether dlopen of statically linked programs is supported.
10794 dlopen_self_static=$enable_dlopen_self_static
10795
10796 # Compiler flag to prevent dynamic linking.
10797 link_static_flag=$lt_lt_prog_compiler_static
10798
10799 # Compiler flag to turn off builtin functions.
10800 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
10801
10802 # Compiler flag to allow reflexive dlopens.
10803 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
10804
10805 # Compiler flag to generate shared objects directly from archives.
10806 whole_archive_flag_spec=$lt_whole_archive_flag_spec
10807
10808 # Compiler flag to generate thread-safe objects.
10809 thread_safe_flag_spec=$lt_thread_safe_flag_spec
10810
10811 # Library versioning type.
10812 version_type=$version_type
10813
10814 # Format of library name prefix.
10815 libname_spec=$lt_libname_spec
10816
10817 # List of archive names. First name is the real one, the rest are links.
10818 # The last name is the one that the linker finds with -lNAME.
10819 library_names_spec=$lt_library_names_spec
10820
10821 # The coded name of the library, if different from the real name.
10822 soname_spec=$lt_soname_spec
10823
10824 # Commands used to build and install an old-style archive.
10825 RANLIB=$lt_RANLIB
10826 old_archive_cmds=$lt_old_archive_cmds
10827 old_postinstall_cmds=$lt_old_postinstall_cmds
10828 old_postuninstall_cmds=$lt_old_postuninstall_cmds
10829
10830 # Create an old-style archive from a shared archive.
10831 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
10832
10833 # Create a temporary old-style archive to link instead of a shared archive.
10834 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
10835
10836 # Commands used to build and install a shared archive.
10837 archive_cmds=$lt_archive_cmds
10838 archive_expsym_cmds=$lt_archive_expsym_cmds
10839 postinstall_cmds=$lt_postinstall_cmds
10840 postuninstall_cmds=$lt_postuninstall_cmds
10841
10842 # Commands used to build a loadable module (assumed same as above if empty)
10843 module_cmds=$lt_module_cmds
10844 module_expsym_cmds=$lt_module_expsym_cmds
10845
10846 # Commands to strip libraries.
10847 old_striplib=$lt_old_striplib
10848 striplib=$lt_striplib
10849
10850 # Dependencies to place before the objects being linked to create a
10851 # shared library.
10852 predep_objects=$lt_predep_objects
10853
10854 # Dependencies to place after the objects being linked to create a
10855 # shared library.
10856 postdep_objects=$lt_postdep_objects
10857
10858 # Dependencies to place before the objects being linked to create a
10859 # shared library.
10860 predeps=$lt_predeps
10861
10862 # Dependencies to place after the objects being linked to create a
10863 # shared library.
10864 postdeps=$lt_postdeps
10865
10866 # The directories searched by this compiler when creating a shared
10867 # library
10868 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
10869
10870 # The library search path used internally by the compiler when linking
10871 # a shared library.
10872 compiler_lib_search_path=$lt_compiler_lib_search_path
10873
10874 # Method to check whether dependent libraries are shared objects.
10875 deplibs_check_method=$lt_deplibs_check_method
10876
10877 # Command to use when deplibs_check_method == file_magic.
10878 file_magic_cmd=$lt_file_magic_cmd
10879
10880 # Flag that allows shared libraries with undefined symbols to be built.
10881 allow_undefined_flag=$lt_allow_undefined_flag
10882
10883 # Flag that forces no undefined symbols.
10884 no_undefined_flag=$lt_no_undefined_flag
10885
10886 # Commands used to finish a libtool library installation in a directory.
10887 finish_cmds=$lt_finish_cmds
10888
10889 # Same as above, but a single script fragment to be evaled but not shown.
10890 finish_eval=$lt_finish_eval
10891
10892 # Take the output of nm and produce a listing of raw symbols and C names.
10893 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
10894
10895 # Transform the output of nm in a proper C declaration
10896 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
10897
10898 # Transform the output of nm in a C name address pair
10899 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
10900
10901 # This is the shared library runtime path variable.
10902 runpath_var=$runpath_var
10903
10904 # This is the shared library path variable.
10905 shlibpath_var=$shlibpath_var
10906
10907 # Is shlibpath searched before the hard-coded library search path?
10908 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
10909
10910 # How to hardcode a shared library path into an executable.
10911 hardcode_action=$hardcode_action
10912
10913 # Whether we should hardcode library paths into libraries.
10914 hardcode_into_libs=$hardcode_into_libs
10915
10916 # Flag to hardcode \$libdir into a binary during linking.
10917 # This must work even if \$libdir does not exist.
10918 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
10919
10920 # If ld is used when linking, flag to hardcode \$libdir into
10921 # a binary during linking. This must work even if \$libdir does
10922 # not exist.
10923 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
10924
10925 # Whether we need a single -rpath flag with a separated argument.
10926 hardcode_libdir_separator=$lt_hardcode_libdir_separator
10927
10928 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
10929 # resulting binary.
10930 hardcode_direct=$hardcode_direct
10931
10932 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
10933 # resulting binary.
10934 hardcode_minus_L=$hardcode_minus_L
10935
10936 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
10937 # the resulting binary.
10938 hardcode_shlibpath_var=$hardcode_shlibpath_var
10939
10940 # Set to yes if building a shared library automatically hardcodes DIR into the library
10941 # and all subsequent libraries and executables linked against it.
10942 hardcode_automatic=$hardcode_automatic
10943
10944 # Variables whose values should be saved in libtool wrapper scripts and
10945 # restored at relink time.
10946 variables_saved_for_relink="$variables_saved_for_relink"
10947
10948 # Whether libtool must link a program against all its dependency libraries.
10949 link_all_deplibs=$link_all_deplibs
10950
10951 # Compile-time system search path for libraries
10952 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
10953
10954 # Run-time system search path for libraries
10955 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
10956
10957 # Fix the shell variable \$srcfile for the compiler.
10958 fix_srcfile_path=$lt_fix_srcfile_path
10959
10960 # Set to yes if exported symbols are required.
10961 always_export_symbols=$always_export_symbols
10962
10963 # The commands to list exported symbols.
10964 export_symbols_cmds=$lt_export_symbols_cmds
10965
10966 # The commands to extract the exported symbol list from a shared archive.
10967 extract_expsyms_cmds=$lt_extract_expsyms_cmds
10968
10969 # Symbols that should not be listed in the preloaded symbols.
10970 exclude_expsyms=$lt_exclude_expsyms
10971
10972 # Symbols that must always be exported.
10973 include_expsyms=$lt_include_expsyms
10974
10975 # ### END LIBTOOL CONFIG
10976
10977 __EOF__
10978
10979
10980 case $host_os in
10981 aix3*)
10982 cat <<\EOF >> "$cfgfile"
10983
10984 # AIX sometimes has problems with the GCC collect2 program. For some
10985 # reason, if we set the COLLECT_NAMES environment variable, the problems
10986 # vanish in a puff of smoke.
10987 if test "X${COLLECT_NAMES+set}" != Xset; then
10988 COLLECT_NAMES=
10989 export COLLECT_NAMES
10990 fi
10991 EOF
10992 ;;
10993 esac
10994
10995 # We use sed instead of cat because bash on DJGPP gets confused if
10996 # if finds mixed CR/LF and LF-only lines. Since sed operates in
10997 # text mode, it properly converts lines to CR/LF. This bash problem
10998 # is reportedly fixed, but why not run on old versions too?
10999 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
11000
11001 mv -f "$cfgfile" "$ofile" || \
11002 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
11003 chmod +x "$ofile"
11004
11005 else
11006 # If there is no Makefile yet, we rely on a make rule to execute
11007 # `config.status --recheck' to rerun these tests and create the
11008 # libtool script then.
11009 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
11010 if test -f "$ltmain_in"; then
11011 test -f Makefile && make "$ltmain"
11012 fi
11013 fi
11014
11015
11016 ac_ext=c
11017 ac_cpp='$CPP $CPPFLAGS'
11018 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11019 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11020 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11021
11022 CC="$lt_save_CC"
11023
11024
11025 # Check whether --with-tags was given.
11026 if test "${with_tags+set}" = set; then
11027 withval=$with_tags; tagnames="$withval"
11028 fi
11029
11030
11031 if test -f "$ltmain" && test -n "$tagnames"; then
11032 if test ! -f "${ofile}"; then
11033 { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
11034 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
11035 fi
11036
11037 if test -z "$LTCC"; then
11038 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
11039 if test -z "$LTCC"; then
11040 { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
11041 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
11042 else
11043 { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
11044 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
11045 fi
11046 fi
11047 if test -z "$LTCFLAGS"; then
11048 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
11049 fi
11050
11051 # Extract list of available tagged configurations in $ofile.
11052 # Note that this assumes the entire list is on one line.
11053 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
11054
11055 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
11056 for tagname in $tagnames; do
11057 IFS="$lt_save_ifs"
11058 # Check whether tagname contains only valid characters
11059 case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
11060 "") ;;
11061 *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
11062 echo "$as_me: error: invalid tag name: $tagname" >&2;}
11063 { (exit 1); exit 1; }; }
11064 ;;
11065 esac
11066
11067 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
11068 then
11069 { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
11070 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
11071 { (exit 1); exit 1; }; }
11072 fi
11073
11074 # Update the list of available tags.
11075 if test -n "$tagname"; then
11076 echo appending configuration tag \"$tagname\" to $ofile
11077
11078 case $tagname in
11079 CXX)
11080 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
11081 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
11082 (test "X$CXX" != "Xg++"))) ; then
11083 ac_ext=cpp
11084 ac_cpp='$CXXCPP $CPPFLAGS'
11085 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11086 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11087 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11088
11089
11090
11091
11092 archive_cmds_need_lc_CXX=no
11093 allow_undefined_flag_CXX=
11094 always_export_symbols_CXX=no
11095 archive_expsym_cmds_CXX=
11096 export_dynamic_flag_spec_CXX=
11097 hardcode_direct_CXX=no
11098 hardcode_libdir_flag_spec_CXX=
11099 hardcode_libdir_flag_spec_ld_CXX=
11100 hardcode_libdir_separator_CXX=
11101 hardcode_minus_L_CXX=no
11102 hardcode_shlibpath_var_CXX=unsupported
11103 hardcode_automatic_CXX=no
11104 module_cmds_CXX=
11105 module_expsym_cmds_CXX=
11106 link_all_deplibs_CXX=unknown
11107 old_archive_cmds_CXX=$old_archive_cmds
11108 no_undefined_flag_CXX=
11109 whole_archive_flag_spec_CXX=
11110 enable_shared_with_static_runtimes_CXX=no
11111
11112 # Dependencies to place before and after the object being linked:
11113 predep_objects_CXX=
11114 postdep_objects_CXX=
11115 predeps_CXX=
11116 postdeps_CXX=
11117 compiler_lib_search_path_CXX=
11118 compiler_lib_search_dirs_CXX=
11119
11120 # Source file extension for C++ test sources.
11121 ac_ext=cpp
11122
11123 # Object file extension for compiled C++ test sources.
11124 objext=o
11125 objext_CXX=$objext
11126
11127 # Code to be used in simple compile tests
11128 lt_simple_compile_test_code="int some_variable = 0;"
11129
11130 # Code to be used in simple link tests
11131 lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
11132
11133 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
11134
11135 # If no C compiler was specified, use CC.
11136 LTCC=${LTCC-"$CC"}
11137
11138 # If no C compiler flags were specified, use CFLAGS.
11139 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
11140
11141 # Allow CC to be a program name with arguments.
11142 compiler=$CC
11143
11144
11145 # save warnings/boilerplate of simple test code
11146 ac_outfile=conftest.$ac_objext
11147 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
11148 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
11149 _lt_compiler_boilerplate=`cat conftest.err`
11150 $rm conftest*
11151
11152 ac_outfile=conftest.$ac_objext
11153 echo "$lt_simple_link_test_code" >conftest.$ac_ext
11154 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
11155 _lt_linker_boilerplate=`cat conftest.err`
11156 $rm -r conftest*
11157
11158
11159 # Allow CC to be a program name with arguments.
11160 lt_save_CC=$CC
11161 lt_save_LD=$LD
11162 lt_save_GCC=$GCC
11163 GCC=$GXX
11164 lt_save_with_gnu_ld=$with_gnu_ld
11165 lt_save_path_LD=$lt_cv_path_LD
11166 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
11167 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
11168 else
11169 $as_unset lt_cv_prog_gnu_ld
11170 fi
11171 if test -n "${lt_cv_path_LDCXX+set}"; then
11172 lt_cv_path_LD=$lt_cv_path_LDCXX
11173 else
11174 $as_unset lt_cv_path_LD
11175 fi
11176 test -z "${LDCXX+set}" || LD=$LDCXX
11177 CC=${CXX-"c++"}
11178 compiler=$CC
11179 compiler_CXX=$CC
11180 for cc_temp in $compiler""; do
11181 case $cc_temp in
11182 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
11183 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
11184 \-*) ;;
11185 *) break;;
11186 esac
11187 done
11188 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
11189
11190
11191 # We don't want -fno-exception wen compiling C++ code, so set the
11192 # no_builtin_flag separately
11193 if test "$GXX" = yes; then
11194 lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
11195 else
11196 lt_prog_compiler_no_builtin_flag_CXX=
11197 fi
11198
11199 if test "$GXX" = yes; then
11200 # Set up default GNU C++ configuration
11201
11202
11203 # Check whether --with-gnu-ld was given.
11204 if test "${with_gnu_ld+set}" = set; then
11205 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
11206 else
11207 with_gnu_ld=no
11208 fi
11209
11210 ac_prog=ld
11211 if test "$GCC" = yes; then
11212 # Check if gcc -print-prog-name=ld gives a path.
11213 { echo "$as_me:$LINENO: checking for ld used by $CC" >&5
11214 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
11215 case $host in
11216 *-*-mingw*)
11217 # gcc leaves a trailing carriage return which upsets mingw
11218 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
11219 *)
11220 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
11221 esac
11222 case $ac_prog in
11223 # Accept absolute paths.
11224 [\\/]* | ?:[\\/]*)
11225 re_direlt='/[^/][^/]*/\.\./'
11226 # Canonicalize the pathname of ld
11227 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
11228 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
11229 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
11230 done
11231 test -z "$LD" && LD="$ac_prog"
11232 ;;
11233 "")
11234 # If it fails, then pretend we aren't using GCC.
11235 ac_prog=ld
11236 ;;
11237 *)
11238 # If it is relative, then search for the first ld in PATH.
11239 with_gnu_ld=unknown
11240 ;;
11241 esac
11242 elif test "$with_gnu_ld" = yes; then
11243 { echo "$as_me:$LINENO: checking for GNU ld" >&5
11244 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
11245 else
11246 { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
11247 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
11248 fi
11249 if test "${lt_cv_path_LD+set}" = set; then
11250 echo $ECHO_N "(cached) $ECHO_C" >&6
11251 else
11252 if test -z "$LD"; then
11253 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
11254 for ac_dir in $PATH; do
11255 IFS="$lt_save_ifs"
11256 test -z "$ac_dir" && ac_dir=.
11257 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
11258 lt_cv_path_LD="$ac_dir/$ac_prog"
11259 # Check to see if the program is GNU ld. I'd rather use --version,
11260 # but apparently some variants of GNU ld only accept -v.
11261 # Break only if it was the GNU/non-GNU ld that we prefer.
11262 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
11263 *GNU* | *'with BFD'*)
11264 test "$with_gnu_ld" != no && break
11265 ;;
11266 *)
11267 test "$with_gnu_ld" != yes && break
11268 ;;
11269 esac
11270 fi
11271 done
11272 IFS="$lt_save_ifs"
11273 else
11274 lt_cv_path_LD="$LD" # Let the user override the test with a path.
11275 fi
11276 fi
11277
11278 LD="$lt_cv_path_LD"
11279 if test -n "$LD"; then
11280 { echo "$as_me:$LINENO: result: $LD" >&5
11281 echo "${ECHO_T}$LD" >&6; }
11282 else
11283 { echo "$as_me:$LINENO: result: no" >&5
11284 echo "${ECHO_T}no" >&6; }
11285 fi
11286 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
11287 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
11288 { (exit 1); exit 1; }; }
11289 { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
11290 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
11291 if test "${lt_cv_prog_gnu_ld+set}" = set; then
11292 echo $ECHO_N "(cached) $ECHO_C" >&6
11293 else
11294 # I'd rather use --version here, but apparently some GNU lds only accept -v.
11295 case `$LD -v 2>&1 </dev/null` in
11296 *GNU* | *'with BFD'*)
11297 lt_cv_prog_gnu_ld=yes
11298 ;;
11299 *)
11300 lt_cv_prog_gnu_ld=no
11301 ;;
11302 esac
11303 fi
11304 { echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
11305 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; }
11306 with_gnu_ld=$lt_cv_prog_gnu_ld
11307
11308
11309
11310 # Check if GNU C++ uses GNU ld as the underlying linker, since the
11311 # archiving commands below assume that GNU ld is being used.
11312 if test "$with_gnu_ld" = yes; then
11313 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
11314 archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11315
11316 hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
11317 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
11318
11319 # If archive_cmds runs LD, not CC, wlarc should be empty
11320 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
11321 # investigate it a little bit more. (MM)
11322 wlarc='${wl}'
11323
11324 # ancient GNU ld didn't support --whole-archive et. al.
11325 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
11326 grep 'no-whole-archive' > /dev/null; then
11327 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
11328 else
11329 whole_archive_flag_spec_CXX=
11330 fi
11331 else
11332 with_gnu_ld=no
11333 wlarc=
11334
11335 # A generic and very simple default shared library creation
11336 # command for GNU C++ for the case where it uses the native
11337 # linker, instead of GNU ld. If possible, this setting should
11338 # overridden to take advantage of the native linker features on
11339 # the platform it is being used on.
11340 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
11341 fi
11342
11343 # Commands to make compiler produce verbose output that lists
11344 # what "hidden" libraries, object files and flags are used when
11345 # linking a shared library.
11346 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
11347
11348 else
11349 GXX=no
11350 with_gnu_ld=no
11351 wlarc=
11352 fi
11353
11354 # PORTME: fill in a description of your system's C++ link characteristics
11355 { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
11356 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
11357 ld_shlibs_CXX=yes
11358 case $host_os in
11359 aix3*)
11360 # FIXME: insert proper C++ library support
11361 ld_shlibs_CXX=no
11362 ;;
11363 aix[4-9]*)
11364 if test "$host_cpu" = ia64; then
11365 # On IA64, the linker does run time linking by default, so we don't
11366 # have to do anything special.
11367 aix_use_runtimelinking=no
11368 exp_sym_flag='-Bexport'
11369 no_entry_flag=""
11370 else
11371 aix_use_runtimelinking=no
11372
11373 # Test if we are trying to use run time linking or normal
11374 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
11375 # need to do runtime linking.
11376 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
11377 for ld_flag in $LDFLAGS; do
11378 case $ld_flag in
11379 *-brtl*)
11380 aix_use_runtimelinking=yes
11381 break
11382 ;;
11383 esac
11384 done
11385 ;;
11386 esac
11387
11388 exp_sym_flag='-bexport'
11389 no_entry_flag='-bnoentry'
11390 fi
11391
11392 # When large executables or shared objects are built, AIX ld can
11393 # have problems creating the table of contents. If linking a library
11394 # or program results in "error TOC overflow" add -mminimal-toc to
11395 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
11396 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11397
11398 archive_cmds_CXX=''
11399 hardcode_direct_CXX=yes
11400 hardcode_libdir_separator_CXX=':'
11401 link_all_deplibs_CXX=yes
11402
11403 if test "$GXX" = yes; then
11404 case $host_os in aix4.[012]|aix4.[012].*)
11405 # We only want to do this on AIX 4.2 and lower, the check
11406 # below for broken collect2 doesn't work under 4.3+
11407 collect2name=`${CC} -print-prog-name=collect2`
11408 if test -f "$collect2name" && \
11409 strings "$collect2name" | grep resolve_lib_name >/dev/null
11410 then
11411 # We have reworked collect2
11412 :
11413 else
11414 # We have old collect2
11415 hardcode_direct_CXX=unsupported
11416 # It fails to find uninstalled libraries when the uninstalled
11417 # path is not listed in the libpath. Setting hardcode_minus_L
11418 # to unsupported forces relinking
11419 hardcode_minus_L_CXX=yes
11420 hardcode_libdir_flag_spec_CXX='-L$libdir'
11421 hardcode_libdir_separator_CXX=
11422 fi
11423 ;;
11424 esac
11425 shared_flag='-shared'
11426 if test "$aix_use_runtimelinking" = yes; then
11427 shared_flag="$shared_flag "'${wl}-G'
11428 fi
11429 else
11430 # not using gcc
11431 if test "$host_cpu" = ia64; then
11432 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
11433 # chokes on -Wl,-G. The following line is correct:
11434 shared_flag='-G'
11435 else
11436 if test "$aix_use_runtimelinking" = yes; then
11437 shared_flag='${wl}-G'
11438 else
11439 shared_flag='${wl}-bM:SRE'
11440 fi
11441 fi
11442 fi
11443
11444 # It seems that -bexpall does not export symbols beginning with
11445 # underscore (_), so it is better to generate a list of symbols to export.
11446 always_export_symbols_CXX=yes
11447 if test "$aix_use_runtimelinking" = yes; then
11448 # Warning - without using the other runtime loading flags (-brtl),
11449 # -berok will link without error, but may produce a broken library.
11450 allow_undefined_flag_CXX='-berok'
11451 # Determine the default libpath from the value encoded in an empty executable.
11452 cat >conftest.$ac_ext <<_ACEOF
11453 /* confdefs.h. */
11454 _ACEOF
11455 cat confdefs.h >>conftest.$ac_ext
11456 cat >>conftest.$ac_ext <<_ACEOF
11457 /* end confdefs.h. */
11458
11459 int
11460 main ()
11461 {
11462
11463 ;
11464 return 0;
11465 }
11466 _ACEOF
11467 rm -f conftest.$ac_objext conftest$ac_exeext
11468 if { (ac_try="$ac_link"
11469 case "(($ac_try" in
11470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11471 *) ac_try_echo=$ac_try;;
11472 esac
11473 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11474 (eval "$ac_link") 2>conftest.er1
11475 ac_status=$?
11476 grep -v '^ *+' conftest.er1 >conftest.err
11477 rm -f conftest.er1
11478 cat conftest.err >&5
11479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11480 (exit $ac_status); } && {
11481 test -z "$ac_cxx_werror_flag" ||
11482 test ! -s conftest.err
11483 } && test -s conftest$ac_exeext &&
11484 $as_test_x conftest$ac_exeext; then
11485
11486 lt_aix_libpath_sed='
11487 /Import File Strings/,/^$/ {
11488 /^0/ {
11489 s/^0 *\(.*\)$/\1/
11490 p
11491 }
11492 }'
11493 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11494 # Check for a 64-bit object if we didn't find anything.
11495 if test -z "$aix_libpath"; then
11496 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11497 fi
11498 else
11499 echo "$as_me: failed program was:" >&5
11500 sed 's/^/| /' conftest.$ac_ext >&5
11501
11502
11503 fi
11504
11505 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11506 conftest$ac_exeext conftest.$ac_ext
11507 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
11508
11509 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
11510
11511 archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
11512 else
11513 if test "$host_cpu" = ia64; then
11514 hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
11515 allow_undefined_flag_CXX="-z nodefs"
11516 archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
11517 else
11518 # Determine the default libpath from the value encoded in an empty executable.
11519 cat >conftest.$ac_ext <<_ACEOF
11520 /* confdefs.h. */
11521 _ACEOF
11522 cat confdefs.h >>conftest.$ac_ext
11523 cat >>conftest.$ac_ext <<_ACEOF
11524 /* end confdefs.h. */
11525
11526 int
11527 main ()
11528 {
11529
11530 ;
11531 return 0;
11532 }
11533 _ACEOF
11534 rm -f conftest.$ac_objext conftest$ac_exeext
11535 if { (ac_try="$ac_link"
11536 case "(($ac_try" in
11537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11538 *) ac_try_echo=$ac_try;;
11539 esac
11540 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11541 (eval "$ac_link") 2>conftest.er1
11542 ac_status=$?
11543 grep -v '^ *+' conftest.er1 >conftest.err
11544 rm -f conftest.er1
11545 cat conftest.err >&5
11546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11547 (exit $ac_status); } && {
11548 test -z "$ac_cxx_werror_flag" ||
11549 test ! -s conftest.err
11550 } && test -s conftest$ac_exeext &&
11551 $as_test_x conftest$ac_exeext; then
11552
11553 lt_aix_libpath_sed='
11554 /Import File Strings/,/^$/ {
11555 /^0/ {
11556 s/^0 *\(.*\)$/\1/
11557 p
11558 }
11559 }'
11560 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11561 # Check for a 64-bit object if we didn't find anything.
11562 if test -z "$aix_libpath"; then
11563 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11564 fi
11565 else
11566 echo "$as_me: failed program was:" >&5
11567 sed 's/^/| /' conftest.$ac_ext >&5
11568
11569
11570 fi
11571
11572 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11573 conftest$ac_exeext conftest.$ac_ext
11574 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
11575
11576 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
11577 # Warning - without using the other run time loading flags,
11578 # -berok will link without error, but may produce a broken library.
11579 no_undefined_flag_CXX=' ${wl}-bernotok'
11580 allow_undefined_flag_CXX=' ${wl}-berok'
11581 # Exported symbols can be pulled into shared objects from archives
11582 whole_archive_flag_spec_CXX='$convenience'
11583 archive_cmds_need_lc_CXX=yes
11584 # This is similar to how AIX traditionally builds its shared libraries.
11585 archive_expsym_cmds_CXX="\$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'
11586 fi
11587 fi
11588 ;;
11589
11590 beos*)
11591 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
11592 allow_undefined_flag_CXX=unsupported
11593 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11594 # support --undefined. This deserves some investigation. FIXME
11595 archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11596 else
11597 ld_shlibs_CXX=no
11598 fi
11599 ;;
11600
11601 chorus*)
11602 case $cc_basename in
11603 *)
11604 # FIXME: insert proper C++ library support
11605 ld_shlibs_CXX=no
11606 ;;
11607 esac
11608 ;;
11609
11610 cygwin* | mingw* | pw32*)
11611 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
11612 # as there is no search path for DLLs.
11613 hardcode_libdir_flag_spec_CXX='-L$libdir'
11614 allow_undefined_flag_CXX=unsupported
11615 always_export_symbols_CXX=no
11616 enable_shared_with_static_runtimes_CXX=yes
11617
11618 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
11619 archive_cmds_CXX='$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'
11620 # If the export-symbols file already is a .def file (1st line
11621 # is EXPORTS), use it as is; otherwise, prepend...
11622 archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
11623 cp $export_symbols $output_objdir/$soname.def;
11624 else
11625 echo EXPORTS > $output_objdir/$soname.def;
11626 cat $export_symbols >> $output_objdir/$soname.def;
11627 fi~
11628 $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'
11629 else
11630 ld_shlibs_CXX=no
11631 fi
11632 ;;
11633 darwin* | rhapsody*)
11634 archive_cmds_need_lc_CXX=no
11635 hardcode_direct_CXX=no
11636 hardcode_automatic_CXX=yes
11637 hardcode_shlibpath_var_CXX=unsupported
11638 whole_archive_flag_spec_CXX=''
11639 link_all_deplibs_CXX=yes
11640 allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
11641 if test "$GXX" = yes ; then
11642 output_verbose_link_cmd='echo'
11643 archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
11644 module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
11645 archive_expsym_cmds_CXX="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}"
11646 module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
11647 if test "$lt_cv_apple_cc_single_mod" != "yes"; then
11648 archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
11649 archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
11650 fi
11651 else
11652 case $cc_basename in
11653 xlc*)
11654 output_verbose_link_cmd='echo'
11655 archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
11656 module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
11657 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
11658 archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11659 module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11660 ;;
11661 *)
11662 ld_shlibs_CXX=no
11663 ;;
11664 esac
11665 fi
11666 ;;
11667
11668 dgux*)
11669 case $cc_basename in
11670 ec++*)
11671 # FIXME: insert proper C++ library support
11672 ld_shlibs_CXX=no
11673 ;;
11674 ghcx*)
11675 # Green Hills C++ Compiler
11676 # FIXME: insert proper C++ library support
11677 ld_shlibs_CXX=no
11678 ;;
11679 *)
11680 # FIXME: insert proper C++ library support
11681 ld_shlibs_CXX=no
11682 ;;
11683 esac
11684 ;;
11685 freebsd[12]*)
11686 # C++ shared libraries reported to be fairly broken before switch to ELF
11687 ld_shlibs_CXX=no
11688 ;;
11689 freebsd-elf*)
11690 archive_cmds_need_lc_CXX=no
11691 ;;
11692 freebsd* | dragonfly*)
11693 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
11694 # conventions
11695 ld_shlibs_CXX=yes
11696 ;;
11697 gnu*)
11698 ;;
11699 hpux9*)
11700 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
11701 hardcode_libdir_separator_CXX=:
11702 export_dynamic_flag_spec_CXX='${wl}-E'
11703 hardcode_direct_CXX=yes
11704 hardcode_minus_L_CXX=yes # Not in the search PATH,
11705 # but as the default
11706 # location of the library.
11707
11708 case $cc_basename in
11709 CC*)
11710 # FIXME: insert proper C++ library support
11711 ld_shlibs_CXX=no
11712 ;;
11713 aCC*)
11714 archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
11715 # Commands to make compiler produce verbose output that lists
11716 # what "hidden" libraries, object files and flags are used when
11717 # linking a shared library.
11718 #
11719 # There doesn't appear to be a way to prevent this compiler from
11720 # explicitly linking system object files so we need to strip them
11721 # from the output so that they don't get included in the library
11722 # dependencies.
11723 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
11724 ;;
11725 *)
11726 if test "$GXX" = yes; then
11727 archive_cmds_CXX='$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'
11728 else
11729 # FIXME: insert proper C++ library support
11730 ld_shlibs_CXX=no
11731 fi
11732 ;;
11733 esac
11734 ;;
11735 hpux10*|hpux11*)
11736 if test $with_gnu_ld = no; then
11737 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
11738 hardcode_libdir_separator_CXX=:
11739
11740 case $host_cpu in
11741 hppa*64*|ia64*) ;;
11742 *)
11743 export_dynamic_flag_spec_CXX='${wl}-E'
11744 ;;
11745 esac
11746 fi
11747 case $host_cpu in
11748 hppa*64*|ia64*)
11749 hardcode_direct_CXX=no
11750 hardcode_shlibpath_var_CXX=no
11751 ;;
11752 *)
11753 hardcode_direct_CXX=yes
11754 hardcode_minus_L_CXX=yes # Not in the search PATH,
11755 # but as the default
11756 # location of the library.
11757 ;;
11758 esac
11759
11760 case $cc_basename in
11761 CC*)
11762 # FIXME: insert proper C++ library support
11763 ld_shlibs_CXX=no
11764 ;;
11765 aCC*)
11766 case $host_cpu in
11767 hppa*64*)
11768 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11769 ;;
11770 ia64*)
11771 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11772 ;;
11773 *)
11774 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11775 ;;
11776 esac
11777 # Commands to make compiler produce verbose output that lists
11778 # what "hidden" libraries, object files and flags are used when
11779 # linking a shared library.
11780 #
11781 # There doesn't appear to be a way to prevent this compiler from
11782 # explicitly linking system object files so we need to strip them
11783 # from the output so that they don't get included in the library
11784 # dependencies.
11785 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
11786 ;;
11787 *)
11788 if test "$GXX" = yes; then
11789 if test $with_gnu_ld = no; then
11790 case $host_cpu in
11791 hppa*64*)
11792 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11793 ;;
11794 ia64*)
11795 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11796 ;;
11797 *)
11798 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11799 ;;
11800 esac
11801 fi
11802 else
11803 # FIXME: insert proper C++ library support
11804 ld_shlibs_CXX=no
11805 fi
11806 ;;
11807 esac
11808 ;;
11809 interix[3-9]*)
11810 hardcode_direct_CXX=no
11811 hardcode_shlibpath_var_CXX=no
11812 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
11813 export_dynamic_flag_spec_CXX='${wl}-E'
11814 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11815 # Instead, shared libraries are loaded at an image base (0x10000000 by
11816 # default) and relocated if they conflict, which is a slow very memory
11817 # consuming and fragmenting process. To avoid this, we pick a random,
11818 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11819 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
11820 archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11821 archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11822 ;;
11823 irix5* | irix6*)
11824 case $cc_basename in
11825 CC*)
11826 # SGI C++
11827 archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
11828
11829 # Archives containing C++ object files must be created using
11830 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
11831 # necessary to make sure instantiated templates are included
11832 # in the archive.
11833 old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
11834 ;;
11835 *)
11836 if test "$GXX" = yes; then
11837 if test "$with_gnu_ld" = no; then
11838 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
11839 else
11840 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
11841 fi
11842 fi
11843 link_all_deplibs_CXX=yes
11844 ;;
11845 esac
11846 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
11847 hardcode_libdir_separator_CXX=:
11848 ;;
11849 linux* | k*bsd*-gnu)
11850 case $cc_basename in
11851 KCC*)
11852 # Kuck and Associates, Inc. (KAI) C++ Compiler
11853
11854 # KCC will only create a shared library if the output file
11855 # ends with ".so" (or ".sl" for HP-UX), so rename the library
11856 # to its proper name (with version) after linking.
11857 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
11858 archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
11859 # Commands to make compiler produce verbose output that lists
11860 # what "hidden" libraries, object files and flags are used when
11861 # linking a shared library.
11862 #
11863 # There doesn't appear to be a way to prevent this compiler from
11864 # explicitly linking system object files so we need to strip them
11865 # from the output so that they don't get included in the library
11866 # dependencies.
11867 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
11868
11869 hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'
11870 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
11871
11872 # Archives containing C++ object files must be created using
11873 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
11874 old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
11875 ;;
11876 icpc*)
11877 # Intel C++
11878 with_gnu_ld=yes
11879 # version 8.0 and above of icpc choke on multiply defined symbols
11880 # if we add $predep_objects and $postdep_objects, however 7.1 and
11881 # earlier do not add the objects themselves.
11882 case `$CC -V 2>&1` in
11883 *"Version 7."*)
11884 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
11885 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11886 ;;
11887 *) # Version 8.0 or newer
11888 tmp_idyn=
11889 case $host_cpu in
11890 ia64*) tmp_idyn=' -i_dynamic';;
11891 esac
11892 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11893 archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11894 ;;
11895 esac
11896 archive_cmds_need_lc_CXX=no
11897 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
11898 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
11899 whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
11900 ;;
11901 pgCC* | pgcpp*)
11902 # Portland Group C++ compiler
11903 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
11904 archive_expsym_cmds_CXX='$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'
11905
11906 hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
11907 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
11908 whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
11909 ;;
11910 cxx*)
11911 # Compaq C++
11912 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
11913 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
11914
11915 runpath_var=LD_RUN_PATH
11916 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
11917 hardcode_libdir_separator_CXX=:
11918
11919 # Commands to make compiler produce verbose output that lists
11920 # what "hidden" libraries, object files and flags are used when
11921 # linking a shared library.
11922 #
11923 # There doesn't appear to be a way to prevent this compiler from
11924 # explicitly linking system object files so we need to strip them
11925 # from the output so that they don't get included in the library
11926 # dependencies.
11927 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
11928 ;;
11929 *)
11930 case `$CC -V 2>&1 | sed 5q` in
11931 *Sun\ C*)
11932 # Sun C++ 5.9
11933 no_undefined_flag_CXX=' -zdefs'
11934 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11935 archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
11936 hardcode_libdir_flag_spec_CXX='-R$libdir'
11937 whole_archive_flag_spec_CXX='${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'
11938
11939 # Not sure whether something based on
11940 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
11941 # would be better.
11942 output_verbose_link_cmd='echo'
11943
11944 # Archives containing C++ object files must be created using
11945 # "CC -xar", where "CC" is the Sun C++ compiler. This is
11946 # necessary to make sure instantiated templates are included
11947 # in the archive.
11948 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
11949 ;;
11950 esac
11951 ;;
11952 esac
11953 ;;
11954 lynxos*)
11955 # FIXME: insert proper C++ library support
11956 ld_shlibs_CXX=no
11957 ;;
11958 m88k*)
11959 # FIXME: insert proper C++ library support
11960 ld_shlibs_CXX=no
11961 ;;
11962 mvs*)
11963 case $cc_basename in
11964 cxx*)
11965 # FIXME: insert proper C++ library support
11966 ld_shlibs_CXX=no
11967 ;;
11968 *)
11969 # FIXME: insert proper C++ library support
11970 ld_shlibs_CXX=no
11971 ;;
11972 esac
11973 ;;
11974 netbsd* | netbsdelf*-gnu)
11975 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
11976 archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
11977 wlarc=
11978 hardcode_libdir_flag_spec_CXX='-R$libdir'
11979 hardcode_direct_CXX=yes
11980 hardcode_shlibpath_var_CXX=no
11981 fi
11982 # Workaround some broken pre-1.5 toolchains
11983 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
11984 ;;
11985 openbsd2*)
11986 # C++ shared libraries are fairly broken
11987 ld_shlibs_CXX=no
11988 ;;
11989 openbsd*)
11990 if test -f /usr/libexec/ld.so; then
11991 hardcode_direct_CXX=yes
11992 hardcode_shlibpath_var_CXX=no
11993 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
11994 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
11995 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
11996 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
11997 export_dynamic_flag_spec_CXX='${wl}-E'
11998 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
11999 fi
12000 output_verbose_link_cmd='echo'
12001 else
12002 ld_shlibs_CXX=no
12003 fi
12004 ;;
12005 osf3*)
12006 case $cc_basename in
12007 KCC*)
12008 # Kuck and Associates, Inc. (KAI) C++ Compiler
12009
12010 # KCC will only create a shared library if the output file
12011 # ends with ".so" (or ".sl" for HP-UX), so rename the library
12012 # to its proper name (with version) after linking.
12013 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
12014
12015 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
12016 hardcode_libdir_separator_CXX=:
12017
12018 # Archives containing C++ object files must be created using
12019 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
12020 old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
12021
12022 ;;
12023 RCC*)
12024 # Rational C++ 2.4.1
12025 # FIXME: insert proper C++ library support
12026 ld_shlibs_CXX=no
12027 ;;
12028 cxx*)
12029 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
12030 archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
12031
12032 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
12033 hardcode_libdir_separator_CXX=:
12034
12035 # Commands to make compiler produce verbose output that lists
12036 # what "hidden" libraries, object files and flags are used when
12037 # linking a shared library.
12038 #
12039 # There doesn't appear to be a way to prevent this compiler from
12040 # explicitly linking system object files so we need to strip them
12041 # from the output so that they don't get included in the library
12042 # dependencies.
12043 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
12044 ;;
12045 *)
12046 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
12047 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
12048 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
12049
12050 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
12051 hardcode_libdir_separator_CXX=:
12052
12053 # Commands to make compiler produce verbose output that lists
12054 # what "hidden" libraries, object files and flags are used when
12055 # linking a shared library.
12056 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
12057
12058 else
12059 # FIXME: insert proper C++ library support
12060 ld_shlibs_CXX=no
12061 fi
12062 ;;
12063 esac
12064 ;;
12065 osf4* | osf5*)
12066 case $cc_basename in
12067 KCC*)
12068 # Kuck and Associates, Inc. (KAI) C++ Compiler
12069
12070 # KCC will only create a shared library if the output file
12071 # ends with ".so" (or ".sl" for HP-UX), so rename the library
12072 # to its proper name (with version) after linking.
12073 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
12074
12075 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
12076 hardcode_libdir_separator_CXX=:
12077
12078 # Archives containing C++ object files must be created using
12079 # the KAI C++ compiler.
12080 old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
12081 ;;
12082 RCC*)
12083 # Rational C++ 2.4.1
12084 # FIXME: insert proper C++ library support
12085 ld_shlibs_CXX=no
12086 ;;
12087 cxx*)
12088 allow_undefined_flag_CXX=' -expect_unresolved \*'
12089 archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
12090 archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
12091 echo "-hidden">> $lib.exp~
12092 $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~
12093 $rm $lib.exp'
12094
12095 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
12096 hardcode_libdir_separator_CXX=:
12097
12098 # Commands to make compiler produce verbose output that lists
12099 # what "hidden" libraries, object files and flags are used when
12100 # linking a shared library.
12101 #
12102 # There doesn't appear to be a way to prevent this compiler from
12103 # explicitly linking system object files so we need to strip them
12104 # from the output so that they don't get included in the library
12105 # dependencies.
12106 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
12107 ;;
12108 *)
12109 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
12110 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
12111 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
12112
12113 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
12114 hardcode_libdir_separator_CXX=:
12115
12116 # Commands to make compiler produce verbose output that lists
12117 # what "hidden" libraries, object files and flags are used when
12118 # linking a shared library.
12119 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
12120
12121 else
12122 # FIXME: insert proper C++ library support
12123 ld_shlibs_CXX=no
12124 fi
12125 ;;
12126 esac
12127 ;;
12128 psos*)
12129 # FIXME: insert proper C++ library support
12130 ld_shlibs_CXX=no
12131 ;;
12132 sunos4*)
12133 case $cc_basename in
12134 CC*)
12135 # Sun C++ 4.x
12136 # FIXME: insert proper C++ library support
12137 ld_shlibs_CXX=no
12138 ;;
12139 lcc*)
12140 # Lucid
12141 # FIXME: insert proper C++ library support
12142 ld_shlibs_CXX=no
12143 ;;
12144 *)
12145 # FIXME: insert proper C++ library support
12146 ld_shlibs_CXX=no
12147 ;;
12148 esac
12149 ;;
12150 solaris*)
12151 case $cc_basename in
12152 CC*)
12153 # Sun C++ 4.2, 5.x and Centerline C++
12154 archive_cmds_need_lc_CXX=yes
12155 no_undefined_flag_CXX=' -zdefs'
12156 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
12157 archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
12158 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
12159
12160 hardcode_libdir_flag_spec_CXX='-R$libdir'
12161 hardcode_shlibpath_var_CXX=no
12162 case $host_os in
12163 solaris2.[0-5] | solaris2.[0-5].*) ;;
12164 *)
12165 # The compiler driver will combine and reorder linker options,
12166 # but understands `-z linker_flag'.
12167 # Supported since Solaris 2.6 (maybe 2.5.1?)
12168 whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
12169 ;;
12170 esac
12171 link_all_deplibs_CXX=yes
12172
12173 output_verbose_link_cmd='echo'
12174
12175 # Archives containing C++ object files must be created using
12176 # "CC -xar", where "CC" is the Sun C++ compiler. This is
12177 # necessary to make sure instantiated templates are included
12178 # in the archive.
12179 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
12180 ;;
12181 gcx*)
12182 # Green Hills C++ Compiler
12183 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
12184
12185 # The C++ compiler must be used to create the archive.
12186 old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
12187 ;;
12188 *)
12189 # GNU C++ compiler with Solaris linker
12190 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
12191 no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
12192 if $CC --version | grep -v '^2\.7' > /dev/null; then
12193 archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
12194 archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
12195 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
12196
12197 # Commands to make compiler produce verbose output that lists
12198 # what "hidden" libraries, object files and flags are used when
12199 # linking a shared library.
12200 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
12201 else
12202 # g++ 2.7 appears to require `-G' NOT `-shared' on this
12203 # platform.
12204 archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
12205 archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
12206 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
12207
12208 # Commands to make compiler produce verbose output that lists
12209 # what "hidden" libraries, object files and flags are used when
12210 # linking a shared library.
12211 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
12212 fi
12213
12214 hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
12215 case $host_os in
12216 solaris2.[0-5] | solaris2.[0-5].*) ;;
12217 *)
12218 whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
12219 ;;
12220 esac
12221 fi
12222 ;;
12223 esac
12224 ;;
12225 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
12226 no_undefined_flag_CXX='${wl}-z,text'
12227 archive_cmds_need_lc_CXX=no
12228 hardcode_shlibpath_var_CXX=no
12229 runpath_var='LD_RUN_PATH'
12230
12231 case $cc_basename in
12232 CC*)
12233 archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12234 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12235 ;;
12236 *)
12237 archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12238 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12239 ;;
12240 esac
12241 ;;
12242 sysv5* | sco3.2v5* | sco5v6*)
12243 # Note: We can NOT use -z defs as we might desire, because we do not
12244 # link with -lc, and that would cause any symbols used from libc to
12245 # always be unresolved, which means just about no library would
12246 # ever link correctly. If we're not using GNU ld we use -z text
12247 # though, which does catch some bad symbols but isn't as heavy-handed
12248 # as -z defs.
12249 # For security reasons, it is highly recommended that you always
12250 # use absolute paths for naming shared libraries, and exclude the
12251 # DT_RUNPATH tag from executables and libraries. But doing so
12252 # requires that you compile everything twice, which is a pain.
12253 # So that behaviour is only enabled if SCOABSPATH is set to a
12254 # non-empty value in the environment. Most likely only useful for
12255 # creating official distributions of packages.
12256 # This is a hack until libtool officially supports absolute path
12257 # names for shared libraries.
12258 no_undefined_flag_CXX='${wl}-z,text'
12259 allow_undefined_flag_CXX='${wl}-z,nodefs'
12260 archive_cmds_need_lc_CXX=no
12261 hardcode_shlibpath_var_CXX=no
12262 hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
12263 hardcode_libdir_separator_CXX=':'
12264 link_all_deplibs_CXX=yes
12265 export_dynamic_flag_spec_CXX='${wl}-Bexport'
12266 runpath_var='LD_RUN_PATH'
12267
12268 case $cc_basename in
12269 CC*)
12270 archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
12271 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
12272 ;;
12273 *)
12274 archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
12275 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
12276 ;;
12277 esac
12278 ;;
12279 tandem*)
12280 case $cc_basename in
12281 NCC*)
12282 # NonStop-UX NCC 3.20
12283 # FIXME: insert proper C++ library support
12284 ld_shlibs_CXX=no
12285 ;;
12286 *)
12287 # FIXME: insert proper C++ library support
12288 ld_shlibs_CXX=no
12289 ;;
12290 esac
12291 ;;
12292 vxworks*)
12293 # FIXME: insert proper C++ library support
12294 ld_shlibs_CXX=no
12295 ;;
12296 *)
12297 # FIXME: insert proper C++ library support
12298 ld_shlibs_CXX=no
12299 ;;
12300 esac
12301 { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
12302 echo "${ECHO_T}$ld_shlibs_CXX" >&6; }
12303 test "$ld_shlibs_CXX" = no && can_build_shared=no
12304
12305 GCC_CXX="$GXX"
12306 LD_CXX="$LD"
12307
12308 cat > conftest.$ac_ext <<EOF
12309 class Foo
12310 {
12311 public:
12312 Foo (void) { a = 0; }
12313 private:
12314 int a;
12315 };
12316 EOF
12317
12318 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12319 (eval $ac_compile) 2>&5
12320 ac_status=$?
12321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12322 (exit $ac_status); }; then
12323 # Parse the compiler output and extract the necessary
12324 # objects, libraries and library flags.
12325
12326 # Sentinel used to keep track of whether or not we are before
12327 # the conftest object file.
12328 pre_test_object_deps_done=no
12329
12330 # The `*' in the case matches for architectures that use `case' in
12331 # $output_verbose_cmd can trigger glob expansion during the loop
12332 # eval without this substitution.
12333 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
12334
12335 for p in `eval $output_verbose_link_cmd`; do
12336 case $p in
12337
12338 -L* | -R* | -l*)
12339 # Some compilers place space between "-{L,R}" and the path.
12340 # Remove the space.
12341 if test $p = "-L" \
12342 || test $p = "-R"; then
12343 prev=$p
12344 continue
12345 else
12346 prev=
12347 fi
12348
12349 if test "$pre_test_object_deps_done" = no; then
12350 case $p in
12351 -L* | -R*)
12352 # Internal compiler library paths should come after those
12353 # provided the user. The postdeps already come after the
12354 # user supplied libs so there is no need to process them.
12355 if test -z "$compiler_lib_search_path_CXX"; then
12356 compiler_lib_search_path_CXX="${prev}${p}"
12357 else
12358 compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
12359 fi
12360 ;;
12361 # The "-l" case would never come before the object being
12362 # linked, so don't bother handling this case.
12363 esac
12364 else
12365 if test -z "$postdeps_CXX"; then
12366 postdeps_CXX="${prev}${p}"
12367 else
12368 postdeps_CXX="${postdeps_CXX} ${prev}${p}"
12369 fi
12370 fi
12371 ;;
12372
12373 *.$objext)
12374 # This assumes that the test object file only shows up
12375 # once in the compiler output.
12376 if test "$p" = "conftest.$objext"; then
12377 pre_test_object_deps_done=yes
12378 continue
12379 fi
12380
12381 if test "$pre_test_object_deps_done" = no; then
12382 if test -z "$predep_objects_CXX"; then
12383 predep_objects_CXX="$p"
12384 else
12385 predep_objects_CXX="$predep_objects_CXX $p"
12386 fi
12387 else
12388 if test -z "$postdep_objects_CXX"; then
12389 postdep_objects_CXX="$p"
12390 else
12391 postdep_objects_CXX="$postdep_objects_CXX $p"
12392 fi
12393 fi
12394 ;;
12395
12396 *) ;; # Ignore the rest.
12397
12398 esac
12399 done
12400
12401 # Clean up.
12402 rm -f a.out a.exe
12403 else
12404 echo "libtool.m4: error: problem compiling CXX test program"
12405 fi
12406
12407 $rm -f confest.$objext
12408
12409 compiler_lib_search_dirs_CXX=
12410 if test -n "$compiler_lib_search_path_CXX"; then
12411 compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
12412 fi
12413
12414 # PORTME: override above test on systems where it is broken
12415 case $host_os in
12416 interix[3-9]*)
12417 # Interix 3.5 installs completely hosed .la files for C++, so rather than
12418 # hack all around it, let's just trust "g++" to DTRT.
12419 predep_objects_CXX=
12420 postdep_objects_CXX=
12421 postdeps_CXX=
12422 ;;
12423
12424 linux*)
12425 case `$CC -V 2>&1 | sed 5q` in
12426 *Sun\ C*)
12427 # Sun C++ 5.9
12428 #
12429 # The more standards-conforming stlport4 library is
12430 # incompatible with the Cstd library. Avoid specifying
12431 # it if it's in CXXFLAGS. Ignore libCrun as
12432 # -library=stlport4 depends on it.
12433 case " $CXX $CXXFLAGS " in
12434 *" -library=stlport4 "*)
12435 solaris_use_stlport4=yes
12436 ;;
12437 esac
12438 if test "$solaris_use_stlport4" != yes; then
12439 postdeps_CXX='-library=Cstd -library=Crun'
12440 fi
12441 ;;
12442 esac
12443 ;;
12444
12445 solaris*)
12446 case $cc_basename in
12447 CC*)
12448 # The more standards-conforming stlport4 library is
12449 # incompatible with the Cstd library. Avoid specifying
12450 # it if it's in CXXFLAGS. Ignore libCrun as
12451 # -library=stlport4 depends on it.
12452 case " $CXX $CXXFLAGS " in
12453 *" -library=stlport4 "*)
12454 solaris_use_stlport4=yes
12455 ;;
12456 esac
12457
12458 # Adding this requires a known-good setup of shared libraries for
12459 # Sun compiler versions before 5.6, else PIC objects from an old
12460 # archive will be linked into the output, leading to subtle bugs.
12461 if test "$solaris_use_stlport4" != yes; then
12462 postdeps_CXX='-library=Cstd -library=Crun'
12463 fi
12464 ;;
12465 esac
12466 ;;
12467 esac
12468
12469 case " $postdeps_CXX " in
12470 *" -lc "*) archive_cmds_need_lc_CXX=no ;;
12471 esac
12472
12473 lt_prog_compiler_wl_CXX=
12474 lt_prog_compiler_pic_CXX=
12475 lt_prog_compiler_static_CXX=
12476
12477 { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
12478 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
12479
12480 # C++ specific cases for pic, static, wl, etc.
12481 if test "$GXX" = yes; then
12482 lt_prog_compiler_wl_CXX='-Wl,'
12483 lt_prog_compiler_static_CXX='-static'
12484
12485 case $host_os in
12486 aix*)
12487 # All AIX code is PIC.
12488 if test "$host_cpu" = ia64; then
12489 # AIX 5 now supports IA64 processor
12490 lt_prog_compiler_static_CXX='-Bstatic'
12491 fi
12492 ;;
12493 amigaos*)
12494 # FIXME: we need at least 68020 code to build shared libraries, but
12495 # adding the `-m68020' flag to GCC prevents building anything better,
12496 # like `-m68040'.
12497 lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
12498 ;;
12499 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
12500 # PIC is the default for these OSes.
12501 ;;
12502 mingw* | cygwin* | os2* | pw32*)
12503 # This hack is so that the source file can tell whether it is being
12504 # built for inclusion in a dll (and should export symbols for example).
12505 # Although the cygwin gcc ignores -fPIC, still need this for old-style
12506 # (--disable-auto-import) libraries
12507 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
12508 ;;
12509 darwin* | rhapsody*)
12510 # PIC is the default on this platform
12511 # Common symbols not allowed in MH_DYLIB files
12512 lt_prog_compiler_pic_CXX='-fno-common'
12513 ;;
12514 *djgpp*)
12515 # DJGPP does not support shared libraries at all
12516 lt_prog_compiler_pic_CXX=
12517 ;;
12518 interix[3-9]*)
12519 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
12520 # Instead, we relocate shared libraries at runtime.
12521 ;;
12522 sysv4*MP*)
12523 if test -d /usr/nec; then
12524 lt_prog_compiler_pic_CXX=-Kconform_pic
12525 fi
12526 ;;
12527 hpux*)
12528 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
12529 # not for PA HP-UX.
12530 case $host_cpu in
12531 hppa*64*|ia64*)
12532 ;;
12533 *)
12534 lt_prog_compiler_pic_CXX='-fPIC'
12535 ;;
12536 esac
12537 ;;
12538 *)
12539 lt_prog_compiler_pic_CXX='-fPIC'
12540 ;;
12541 esac
12542 else
12543 case $host_os in
12544 aix[4-9]*)
12545 # All AIX code is PIC.
12546 if test "$host_cpu" = ia64; then
12547 # AIX 5 now supports IA64 processor
12548 lt_prog_compiler_static_CXX='-Bstatic'
12549 else
12550 lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
12551 fi
12552 ;;
12553 chorus*)
12554 case $cc_basename in
12555 cxch68*)
12556 # Green Hills C++ Compiler
12557 # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--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"
12558 ;;
12559 esac
12560 ;;
12561 darwin*)
12562 # PIC is the default on this platform
12563 # Common symbols not allowed in MH_DYLIB files
12564 case $cc_basename in
12565 xlc*)
12566 lt_prog_compiler_pic_CXX='-qnocommon'
12567 lt_prog_compiler_wl_CXX='-Wl,'
12568 ;;
12569 esac
12570 ;;
12571 dgux*)
12572 case $cc_basename in
12573 ec++*)
12574 lt_prog_compiler_pic_CXX='-KPIC'
12575 ;;
12576 ghcx*)
12577 # Green Hills C++ Compiler
12578 lt_prog_compiler_pic_CXX='-pic'
12579 ;;
12580 *)
12581 ;;
12582 esac
12583 ;;
12584 freebsd* | dragonfly*)
12585 # FreeBSD uses GNU C++
12586 ;;
12587 hpux9* | hpux10* | hpux11*)
12588 case $cc_basename in
12589 CC*)
12590 lt_prog_compiler_wl_CXX='-Wl,'
12591 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
12592 if test "$host_cpu" != ia64; then
12593 lt_prog_compiler_pic_CXX='+Z'
12594 fi
12595 ;;
12596 aCC*)
12597 lt_prog_compiler_wl_CXX='-Wl,'
12598 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
12599 case $host_cpu in
12600 hppa*64*|ia64*)
12601 # +Z the default
12602 ;;
12603 *)
12604 lt_prog_compiler_pic_CXX='+Z'
12605 ;;
12606 esac
12607 ;;
12608 *)
12609 ;;
12610 esac
12611 ;;
12612 interix*)
12613 # This is c89, which is MS Visual C++ (no shared libs)
12614 # Anyone wants to do a port?
12615 ;;
12616 irix5* | irix6* | nonstopux*)
12617 case $cc_basename in
12618 CC*)
12619 lt_prog_compiler_wl_CXX='-Wl,'
12620 lt_prog_compiler_static_CXX='-non_shared'
12621 # CC pic flag -KPIC is the default.
12622 ;;
12623 *)
12624 ;;
12625 esac
12626 ;;
12627 linux* | k*bsd*-gnu)
12628 case $cc_basename in
12629 KCC*)
12630 # KAI C++ Compiler
12631 lt_prog_compiler_wl_CXX='--backend -Wl,'
12632 lt_prog_compiler_pic_CXX='-fPIC'
12633 ;;
12634 icpc* | ecpc*)
12635 # Intel C++
12636 lt_prog_compiler_wl_CXX='-Wl,'
12637 lt_prog_compiler_pic_CXX='-KPIC'
12638 lt_prog_compiler_static_CXX='-static'
12639 ;;
12640 pgCC* | pgcpp*)
12641 # Portland Group C++ compiler.
12642 lt_prog_compiler_wl_CXX='-Wl,'
12643 lt_prog_compiler_pic_CXX='-fpic'
12644 lt_prog_compiler_static_CXX='-Bstatic'
12645 ;;
12646 cxx*)
12647 # Compaq C++
12648 # Make sure the PIC flag is empty. It appears that all Alpha
12649 # Linux and Compaq Tru64 Unix objects are PIC.
12650 lt_prog_compiler_pic_CXX=
12651 lt_prog_compiler_static_CXX='-non_shared'
12652 ;;
12653 *)
12654 case `$CC -V 2>&1 | sed 5q` in
12655 *Sun\ C*)
12656 # Sun C++ 5.9
12657 lt_prog_compiler_pic_CXX='-KPIC'
12658 lt_prog_compiler_static_CXX='-Bstatic'
12659 lt_prog_compiler_wl_CXX='-Qoption ld '
12660 ;;
12661 esac
12662 ;;
12663 esac
12664 ;;
12665 lynxos*)
12666 ;;
12667 m88k*)
12668 ;;
12669 mvs*)
12670 case $cc_basename in
12671 cxx*)
12672 lt_prog_compiler_pic_CXX='-W c,exportall'
12673 ;;
12674 *)
12675 ;;
12676 esac
12677 ;;
12678 netbsd* | netbsdelf*-gnu)
12679 ;;
12680 osf3* | osf4* | osf5*)
12681 case $cc_basename in
12682 KCC*)
12683 lt_prog_compiler_wl_CXX='--backend -Wl,'
12684 ;;
12685 RCC*)
12686 # Rational C++ 2.4.1
12687 lt_prog_compiler_pic_CXX='-pic'
12688 ;;
12689 cxx*)
12690 # Digital/Compaq C++
12691 lt_prog_compiler_wl_CXX='-Wl,'
12692 # Make sure the PIC flag is empty. It appears that all Alpha
12693 # Linux and Compaq Tru64 Unix objects are PIC.
12694 lt_prog_compiler_pic_CXX=
12695 lt_prog_compiler_static_CXX='-non_shared'
12696 ;;
12697 *)
12698 ;;
12699 esac
12700 ;;
12701 psos*)
12702 ;;
12703 solaris*)
12704 case $cc_basename in
12705 CC*)
12706 # Sun C++ 4.2, 5.x and Centerline C++
12707 lt_prog_compiler_pic_CXX='-KPIC'
12708 lt_prog_compiler_static_CXX='-Bstatic'
12709 lt_prog_compiler_wl_CXX='-Qoption ld '
12710 ;;
12711 gcx*)
12712 # Green Hills C++ Compiler
12713 lt_prog_compiler_pic_CXX='-PIC'
12714 ;;
12715 *)
12716 ;;
12717 esac
12718 ;;
12719 sunos4*)
12720 case $cc_basename in
12721 CC*)
12722 # Sun C++ 4.x
12723 lt_prog_compiler_pic_CXX='-pic'
12724 lt_prog_compiler_static_CXX='-Bstatic'
12725 ;;
12726 lcc*)
12727 # Lucid
12728 lt_prog_compiler_pic_CXX='-pic'
12729 ;;
12730 *)
12731 ;;
12732 esac
12733 ;;
12734 tandem*)
12735 case $cc_basename in
12736 NCC*)
12737 # NonStop-UX NCC 3.20
12738 lt_prog_compiler_pic_CXX='-KPIC'
12739 ;;
12740 *)
12741 ;;
12742 esac
12743 ;;
12744 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
12745 case $cc_basename in
12746 CC*)
12747 lt_prog_compiler_wl_CXX='-Wl,'
12748 lt_prog_compiler_pic_CXX='-KPIC'
12749 lt_prog_compiler_static_CXX='-Bstatic'
12750 ;;
12751 esac
12752 ;;
12753 vxworks*)
12754 ;;
12755 *)
12756 lt_prog_compiler_can_build_shared_CXX=no
12757 ;;
12758 esac
12759 fi
12760
12761 { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
12762 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; }
12763
12764 #
12765 # Check to make sure the PIC flag actually works.
12766 #
12767 if test -n "$lt_prog_compiler_pic_CXX"; then
12768
12769 { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
12770 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; }
12771 if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then
12772 echo $ECHO_N "(cached) $ECHO_C" >&6
12773 else
12774 lt_cv_prog_compiler_pic_works_CXX=no
12775 ac_outfile=conftest.$ac_objext
12776 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12777 lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
12778 # Insert the option either (1) after the last *FLAGS variable, or
12779 # (2) before a word containing "conftest.", or (3) at the end.
12780 # Note that $ac_compile itself does not contain backslashes and begins
12781 # with a dollar sign (not a hyphen), so the echo should work correctly.
12782 # The option is referenced via a variable to avoid confusing sed.
12783 lt_compile=`echo "$ac_compile" | $SED \
12784 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12785 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12786 -e 's:$: $lt_compiler_flag:'`
12787 (eval echo "\"\$as_me:12788: $lt_compile\"" >&5)
12788 (eval "$lt_compile" 2>conftest.err)
12789 ac_status=$?
12790 cat conftest.err >&5
12791 echo "$as_me:12792: \$? = $ac_status" >&5
12792 if (exit $ac_status) && test -s "$ac_outfile"; then
12793 # The compiler can only warn and ignore the option if not recognized
12794 # So say no if there are warnings other than the usual output.
12795 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
12796 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12797 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
12798 lt_cv_prog_compiler_pic_works_CXX=yes
12799 fi
12800 fi
12801 $rm conftest*
12802
12803 fi
12804 { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
12805 echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_CXX" >&6; }
12806
12807 if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
12808 case $lt_prog_compiler_pic_CXX in
12809 "" | " "*) ;;
12810 *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
12811 esac
12812 else
12813 lt_prog_compiler_pic_CXX=
12814 lt_prog_compiler_can_build_shared_CXX=no
12815 fi
12816
12817 fi
12818 case $host_os in
12819 # For platforms which do not support PIC, -DPIC is meaningless:
12820 *djgpp*)
12821 lt_prog_compiler_pic_CXX=
12822 ;;
12823 *)
12824 lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
12825 ;;
12826 esac
12827
12828 #
12829 # Check to make sure the static flag actually works.
12830 #
12831 wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
12832 { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
12833 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
12834 if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then
12835 echo $ECHO_N "(cached) $ECHO_C" >&6
12836 else
12837 lt_cv_prog_compiler_static_works_CXX=no
12838 save_LDFLAGS="$LDFLAGS"
12839 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
12840 echo "$lt_simple_link_test_code" > conftest.$ac_ext
12841 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12842 # The linker can only warn and ignore the option if not recognized
12843 # So say no if there are warnings
12844 if test -s conftest.err; then
12845 # Append any errors to the config.log.
12846 cat conftest.err 1>&5
12847 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
12848 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12849 if diff conftest.exp conftest.er2 >/dev/null; then
12850 lt_cv_prog_compiler_static_works_CXX=yes
12851 fi
12852 else
12853 lt_cv_prog_compiler_static_works_CXX=yes
12854 fi
12855 fi
12856 $rm -r conftest*
12857 LDFLAGS="$save_LDFLAGS"
12858
12859 fi
12860 { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5
12861 echo "${ECHO_T}$lt_cv_prog_compiler_static_works_CXX" >&6; }
12862
12863 if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
12864 :
12865 else
12866 lt_prog_compiler_static_CXX=
12867 fi
12868
12869
12870 { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
12871 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
12872 if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
12873 echo $ECHO_N "(cached) $ECHO_C" >&6
12874 else
12875 lt_cv_prog_compiler_c_o_CXX=no
12876 $rm -r conftest 2>/dev/null
12877 mkdir conftest
12878 cd conftest
12879 mkdir out
12880 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12881
12882 lt_compiler_flag="-o out/conftest2.$ac_objext"
12883 # Insert the option either (1) after the last *FLAGS variable, or
12884 # (2) before a word containing "conftest.", or (3) at the end.
12885 # Note that $ac_compile itself does not contain backslashes and begins
12886 # with a dollar sign (not a hyphen), so the echo should work correctly.
12887 lt_compile=`echo "$ac_compile" | $SED \
12888 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12889 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12890 -e 's:$: $lt_compiler_flag:'`
12891 (eval echo "\"\$as_me:12892: $lt_compile\"" >&5)
12892 (eval "$lt_compile" 2>out/conftest.err)
12893 ac_status=$?
12894 cat out/conftest.err >&5
12895 echo "$as_me:12896: \$? = $ac_status" >&5
12896 if (exit $ac_status) && test -s out/conftest2.$ac_objext
12897 then
12898 # The compiler can only warn and ignore the option if not recognized
12899 # So say no if there are warnings
12900 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
12901 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
12902 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
12903 lt_cv_prog_compiler_c_o_CXX=yes
12904 fi
12905 fi
12906 chmod u+w . 2>&5
12907 $rm conftest*
12908 # SGI C++ compiler will create directory out/ii_files/ for
12909 # template instantiation
12910 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
12911 $rm out/* && rmdir out
12912 cd ..
12913 rmdir conftest
12914 $rm conftest*
12915
12916 fi
12917 { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
12918 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; }
12919
12920
12921 hard_links="nottested"
12922 if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
12923 # do not overwrite the value of need_locks provided by the user
12924 { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
12925 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
12926 hard_links=yes
12927 $rm conftest*
12928 ln conftest.a conftest.b 2>/dev/null && hard_links=no
12929 touch conftest.a
12930 ln conftest.a conftest.b 2>&5 || hard_links=no
12931 ln conftest.a conftest.b 2>/dev/null && hard_links=no
12932 { echo "$as_me:$LINENO: result: $hard_links" >&5
12933 echo "${ECHO_T}$hard_links" >&6; }
12934 if test "$hard_links" = no; then
12935 { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
12936 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
12937 need_locks=warn
12938 fi
12939 else
12940 need_locks=no
12941 fi
12942
12943 { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
12944 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
12945
12946 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
12947 case $host_os in
12948 aix[4-9]*)
12949 # If we're using GNU nm, then we don't want the "-C" option.
12950 # -C means demangle to AIX nm, but means don't demangle with GNU nm
12951 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
12952 export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
12953 else
12954 export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
12955 fi
12956 ;;
12957 pw32*)
12958 export_symbols_cmds_CXX="$ltdll_cmds"
12959 ;;
12960 cygwin* | mingw*)
12961 export_symbols_cmds_CXX='$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'
12962 ;;
12963 linux* | k*bsd*-gnu)
12964 link_all_deplibs_CXX=no
12965 ;;
12966 *)
12967 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
12968 ;;
12969 esac
12970 exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
12971
12972 { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
12973 echo "${ECHO_T}$ld_shlibs_CXX" >&6; }
12974 test "$ld_shlibs_CXX" = no && can_build_shared=no
12975
12976 #
12977 # Do we need to explicitly link libc?
12978 #
12979 case "x$archive_cmds_need_lc_CXX" in
12980 x|xyes)
12981 # Assume -lc should be added
12982 archive_cmds_need_lc_CXX=yes
12983
12984 if test "$enable_shared" = yes && test "$GCC" = yes; then
12985 case $archive_cmds_CXX in
12986 *'~'*)
12987 # FIXME: we may have to deal with multi-command sequences.
12988 ;;
12989 '$CC '*)
12990 # Test whether the compiler implicitly links with -lc since on some
12991 # systems, -lgcc has to come before -lc. If gcc already passes -lc
12992 # to ld, don't add -lc before -lgcc.
12993 { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
12994 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
12995 $rm conftest*
12996 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12997
12998 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12999 (eval $ac_compile) 2>&5
13000 ac_status=$?
13001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13002 (exit $ac_status); } 2>conftest.err; then
13003 soname=conftest
13004 lib=conftest
13005 libobjs=conftest.$ac_objext
13006 deplibs=
13007 wl=$lt_prog_compiler_wl_CXX
13008 pic_flag=$lt_prog_compiler_pic_CXX
13009 compiler_flags=-v
13010 linker_flags=-v
13011 verstring=
13012 output_objdir=.
13013 libname=conftest
13014 lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
13015 allow_undefined_flag_CXX=
13016 if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
13017 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
13018 ac_status=$?
13019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13020 (exit $ac_status); }
13021 then
13022 archive_cmds_need_lc_CXX=no
13023 else
13024 archive_cmds_need_lc_CXX=yes
13025 fi
13026 allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
13027 else
13028 cat conftest.err 1>&5
13029 fi
13030 $rm conftest*
13031 { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
13032 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; }
13033 ;;
13034 esac
13035 fi
13036 ;;
13037 esac
13038
13039 { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
13040 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
13041 library_names_spec=
13042 libname_spec='lib$name'
13043 soname_spec=
13044 shrext_cmds=".so"
13045 postinstall_cmds=
13046 postuninstall_cmds=
13047 finish_cmds=
13048 finish_eval=
13049 shlibpath_var=
13050 shlibpath_overrides_runpath=unknown
13051 version_type=none
13052 dynamic_linker="$host_os ld.so"
13053 sys_lib_dlsearch_path_spec="/lib /usr/lib"
13054
13055 need_lib_prefix=unknown
13056 hardcode_into_libs=no
13057
13058 # when you set need_version to no, make sure it does not cause -set_version
13059 # flags to be left without arguments
13060 need_version=unknown
13061
13062 case $host_os in
13063 aix3*)
13064 version_type=linux
13065 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
13066 shlibpath_var=LIBPATH
13067
13068 # AIX 3 has no versioning support, so we append a major version to the name.
13069 soname_spec='${libname}${release}${shared_ext}$major'
13070 ;;
13071
13072 aix[4-9]*)
13073 version_type=linux
13074 need_lib_prefix=no
13075 need_version=no
13076 hardcode_into_libs=yes
13077 if test "$host_cpu" = ia64; then
13078 # AIX 5 supports IA64
13079 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
13080 shlibpath_var=LD_LIBRARY_PATH
13081 else
13082 # With GCC up to 2.95.x, collect2 would create an import file
13083 # for dependence libraries. The import file would start with
13084 # the line `#! .'. This would cause the generated library to
13085 # depend on `.', always an invalid library. This was fixed in
13086 # development snapshots of GCC prior to 3.0.
13087 case $host_os in
13088 aix4 | aix4.[01] | aix4.[01].*)
13089 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
13090 echo ' yes '
13091 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
13092 :
13093 else
13094 can_build_shared=no
13095 fi
13096 ;;
13097 esac
13098 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
13099 # soname into executable. Probably we can add versioning support to
13100 # collect2, so additional links can be useful in future.
13101 if test "$aix_use_runtimelinking" = yes; then
13102 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
13103 # instead of lib<name>.a to let people know that these are not
13104 # typical AIX shared libraries.
13105 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13106 else
13107 # We preserve .a as extension for shared libraries through AIX4.2
13108 # and later when we are not doing run time linking.
13109 library_names_spec='${libname}${release}.a $libname.a'
13110 soname_spec='${libname}${release}${shared_ext}$major'
13111 fi
13112 shlibpath_var=LIBPATH
13113 fi
13114 ;;
13115
13116 amigaos*)
13117 library_names_spec='$libname.ixlibrary $libname.a'
13118 # Create ${libname}_ixlibrary.a entries in /sys/libs.
13119 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'
13120 ;;
13121
13122 beos*)
13123 library_names_spec='${libname}${shared_ext}'
13124 dynamic_linker="$host_os ld.so"
13125 shlibpath_var=LIBRARY_PATH
13126 ;;
13127
13128 bsdi[45]*)
13129 version_type=linux
13130 need_version=no
13131 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13132 soname_spec='${libname}${release}${shared_ext}$major'
13133 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
13134 shlibpath_var=LD_LIBRARY_PATH
13135 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
13136 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
13137 # the default ld.so.conf also contains /usr/contrib/lib and
13138 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
13139 # libtool to hard-code these into programs
13140 ;;
13141
13142 cygwin* | mingw* | pw32*)
13143 version_type=windows
13144 shrext_cmds=".dll"
13145 need_version=no
13146 need_lib_prefix=no
13147
13148 case $GCC,$host_os in
13149 yes,cygwin* | yes,mingw* | yes,pw32*)
13150 library_names_spec='$libname.dll.a'
13151 # DLL is installed to $(libdir)/../bin by postinstall_cmds
13152 postinstall_cmds='base_file=`basename \${file}`~
13153 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
13154 dldir=$destdir/`dirname \$dlpath`~
13155 test -d \$dldir || mkdir -p \$dldir~
13156 $install_prog $dir/$dlname \$dldir/$dlname~
13157 chmod a+x \$dldir/$dlname'
13158 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13159 dlpath=$dir/\$dldll~
13160 $rm \$dlpath'
13161 shlibpath_overrides_runpath=yes
13162
13163 case $host_os in
13164 cygwin*)
13165 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
13166 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
13167 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
13168 ;;
13169 mingw*)
13170 # MinGW DLLs use traditional 'lib' prefix
13171 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
13172 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
13173 if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
13174 # It is most probably a Windows format PATH printed by
13175 # mingw gcc, but we are running on Cygwin. Gcc prints its search
13176 # path with ; separators, and with drive letters. We can handle the
13177 # drive letters (cygwin fileutils understands them), so leave them,
13178 # especially as we might pass files found there to a mingw objdump,
13179 # which wouldn't understand a cygwinified path. Ahh.
13180 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
13181 else
13182 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13183 fi
13184 ;;
13185 pw32*)
13186 # pw32 DLLs use 'pw' prefix rather than 'lib'
13187 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
13188 ;;
13189 esac
13190 ;;
13191
13192 *)
13193 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
13194 ;;
13195 esac
13196 dynamic_linker='Win32 ld.exe'
13197 # FIXME: first we should search . and the directory the executable is in
13198 shlibpath_var=PATH
13199 ;;
13200
13201 darwin* | rhapsody*)
13202 dynamic_linker="$host_os dyld"
13203 version_type=darwin
13204 need_lib_prefix=no
13205 need_version=no
13206 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
13207 soname_spec='${libname}${release}${major}$shared_ext'
13208 shlibpath_overrides_runpath=yes
13209 shlibpath_var=DYLD_LIBRARY_PATH
13210 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
13211
13212 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
13213 ;;
13214
13215 dgux*)
13216 version_type=linux
13217 need_lib_prefix=no
13218 need_version=no
13219 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
13220 soname_spec='${libname}${release}${shared_ext}$major'
13221 shlibpath_var=LD_LIBRARY_PATH
13222 ;;
13223
13224 freebsd1*)
13225 dynamic_linker=no
13226 ;;
13227
13228 freebsd* | dragonfly*)
13229 # DragonFly does not have aout. When/if they implement a new
13230 # versioning mechanism, adjust this.
13231 if test -x /usr/bin/objformat; then
13232 objformat=`/usr/bin/objformat`
13233 else
13234 case $host_os in
13235 freebsd[123]*) objformat=aout ;;
13236 *) objformat=elf ;;
13237 esac
13238 fi
13239 version_type=freebsd-$objformat
13240 case $version_type in
13241 freebsd-elf*)
13242 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
13243 need_version=no
13244 need_lib_prefix=no
13245 ;;
13246 freebsd-*)
13247 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
13248 need_version=yes
13249 ;;
13250 esac
13251 shlibpath_var=LD_LIBRARY_PATH
13252 case $host_os in
13253 freebsd2*)
13254 shlibpath_overrides_runpath=yes
13255 ;;
13256 freebsd3.[01]* | freebsdelf3.[01]*)
13257 shlibpath_overrides_runpath=yes
13258 hardcode_into_libs=yes
13259 ;;
13260 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
13261 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
13262 shlibpath_overrides_runpath=no
13263 hardcode_into_libs=yes
13264 ;;
13265 *) # from 4.6 on, and DragonFly
13266 shlibpath_overrides_runpath=yes
13267 hardcode_into_libs=yes
13268 ;;
13269 esac
13270 ;;
13271
13272 gnu*)
13273 version_type=linux
13274 need_lib_prefix=no
13275 need_version=no
13276 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
13277 soname_spec='${libname}${release}${shared_ext}$major'
13278 shlibpath_var=LD_LIBRARY_PATH
13279 hardcode_into_libs=yes
13280 ;;
13281
13282 hpux9* | hpux10* | hpux11*)
13283 # Give a soname corresponding to the major version so that dld.sl refuses to
13284 # link against other versions.
13285 version_type=sunos
13286 need_lib_prefix=no
13287 need_version=no
13288 case $host_cpu in
13289 ia64*)
13290 shrext_cmds='.so'
13291 hardcode_into_libs=yes
13292 dynamic_linker="$host_os dld.so"
13293 shlibpath_var=LD_LIBRARY_PATH
13294 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13295 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13296 soname_spec='${libname}${release}${shared_ext}$major'
13297 if test "X$HPUX_IA64_MODE" = X32; then
13298 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
13299 else
13300 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
13301 fi
13302 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13303 ;;
13304 hppa*64*)
13305 shrext_cmds='.sl'
13306 hardcode_into_libs=yes
13307 dynamic_linker="$host_os dld.sl"
13308 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
13309 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13310 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13311 soname_spec='${libname}${release}${shared_ext}$major'
13312 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
13313 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13314 ;;
13315 *)
13316 shrext_cmds='.sl'
13317 dynamic_linker="$host_os dld.sl"
13318 shlibpath_var=SHLIB_PATH
13319 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
13320 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13321 soname_spec='${libname}${release}${shared_ext}$major'
13322 ;;
13323 esac
13324 # HP-UX runs *really* slowly unless shared libraries are mode 555.
13325 postinstall_cmds='chmod 555 $lib'
13326 ;;
13327
13328 interix[3-9]*)
13329 version_type=linux
13330 need_lib_prefix=no
13331 need_version=no
13332 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
13333 soname_spec='${libname}${release}${shared_ext}$major'
13334 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
13335 shlibpath_var=LD_LIBRARY_PATH
13336 shlibpath_overrides_runpath=no
13337 hardcode_into_libs=yes
13338 ;;
13339
13340 irix5* | irix6* | nonstopux*)
13341 case $host_os in
13342 nonstopux*) version_type=nonstopux ;;
13343 *)
13344 if test "$lt_cv_prog_gnu_ld" = yes; then
13345 version_type=linux
13346 else
13347 version_type=irix
13348 fi ;;
13349 esac
13350 need_lib_prefix=no
13351 need_version=no
13352 soname_spec='${libname}${release}${shared_ext}$major'
13353 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
13354 case $host_os in
13355 irix5* | nonstopux*)
13356 libsuff= shlibsuff=
13357 ;;
13358 *)
13359 case $LD in # libtool.m4 will add one of these switches to LD
13360 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
13361 libsuff= shlibsuff= libmagic=32-bit;;
13362 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
13363 libsuff=32 shlibsuff=N32 libmagic=N32;;
13364 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
13365 libsuff=64 shlibsuff=64 libmagic=64-bit;;
13366 *) libsuff= shlibsuff= libmagic=never-match;;
13367 esac
13368 ;;
13369 esac
13370 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
13371 shlibpath_overrides_runpath=no
13372 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
13373 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
13374 hardcode_into_libs=yes
13375 ;;
13376
13377 # No shared lib support for Linux oldld, aout, or coff.
13378 linux*oldld* | linux*aout* | linux*coff*)
13379 dynamic_linker=no
13380 ;;
13381
13382 # This must be Linux ELF.
13383 linux* | k*bsd*-gnu)
13384 version_type=linux
13385 need_lib_prefix=no
13386 need_version=no
13387 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13388 soname_spec='${libname}${release}${shared_ext}$major'
13389 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
13390 shlibpath_var=LD_LIBRARY_PATH
13391 shlibpath_overrides_runpath=no
13392 # This implies no fast_install, which is unacceptable.
13393 # Some rework will be needed to allow for fast_install
13394 # before this can be enabled.
13395 hardcode_into_libs=yes
13396
13397 # Append ld.so.conf contents to the search path
13398 if test -f /etc/ld.so.conf; then
13399 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' ' '`
13400 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
13401 fi
13402
13403 # We used to test for /lib/ld.so.1 and disable shared libraries on
13404 # powerpc, because MkLinux only supported shared libraries with the
13405 # GNU dynamic linker. Since this was broken with cross compilers,
13406 # most powerpc-linux boxes support dynamic linking these days and
13407 # people can always --disable-shared, the test was removed, and we
13408 # assume the GNU/Linux dynamic linker is in use.
13409 dynamic_linker='GNU/Linux ld.so'
13410 ;;
13411
13412 netbsdelf*-gnu)
13413 version_type=linux
13414 need_lib_prefix=no
13415 need_version=no
13416 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
13417 soname_spec='${libname}${release}${shared_ext}$major'
13418 shlibpath_var=LD_LIBRARY_PATH
13419 shlibpath_overrides_runpath=no
13420 hardcode_into_libs=yes
13421 dynamic_linker='NetBSD ld.elf_so'
13422 ;;
13423
13424 netbsd*)
13425 version_type=sunos
13426 need_lib_prefix=no
13427 need_version=no
13428 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
13429 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
13430 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13431 dynamic_linker='NetBSD (a.out) ld.so'
13432 else
13433 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
13434 soname_spec='${libname}${release}${shared_ext}$major'
13435 dynamic_linker='NetBSD ld.elf_so'
13436 fi
13437 shlibpath_var=LD_LIBRARY_PATH
13438 shlibpath_overrides_runpath=yes
13439 hardcode_into_libs=yes
13440 ;;
13441
13442 newsos6)
13443 version_type=linux
13444 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13445 shlibpath_var=LD_LIBRARY_PATH
13446 shlibpath_overrides_runpath=yes
13447 ;;
13448
13449 nto-qnx*)
13450 version_type=linux
13451 need_lib_prefix=no
13452 need_version=no
13453 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13454 soname_spec='${libname}${release}${shared_ext}$major'
13455 shlibpath_var=LD_LIBRARY_PATH
13456 shlibpath_overrides_runpath=yes
13457 ;;
13458
13459 openbsd*)
13460 version_type=sunos
13461 sys_lib_dlsearch_path_spec="/usr/lib"
13462 need_lib_prefix=no
13463 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
13464 case $host_os in
13465 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
13466 *) need_version=no ;;
13467 esac
13468 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
13469 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13470 shlibpath_var=LD_LIBRARY_PATH
13471 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
13472 case $host_os in
13473 openbsd2.[89] | openbsd2.[89].*)
13474 shlibpath_overrides_runpath=no
13475 ;;
13476 *)
13477 shlibpath_overrides_runpath=yes
13478 ;;
13479 esac
13480 else
13481 shlibpath_overrides_runpath=yes
13482 fi
13483 ;;
13484
13485 os2*)
13486 libname_spec='$name'
13487 shrext_cmds=".dll"
13488 need_lib_prefix=no
13489 library_names_spec='$libname${shared_ext} $libname.a'
13490 dynamic_linker='OS/2 ld.exe'
13491 shlibpath_var=LIBPATH
13492 ;;
13493
13494 osf3* | osf4* | osf5*)
13495 version_type=osf
13496 need_lib_prefix=no
13497 need_version=no
13498 soname_spec='${libname}${release}${shared_ext}$major'
13499 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13500 shlibpath_var=LD_LIBRARY_PATH
13501 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
13502 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
13503 ;;
13504
13505 rdos*)
13506 dynamic_linker=no
13507 ;;
13508
13509 solaris*)
13510 version_type=linux
13511 need_lib_prefix=no
13512 need_version=no
13513 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13514 soname_spec='${libname}${release}${shared_ext}$major'
13515 shlibpath_var=LD_LIBRARY_PATH
13516 shlibpath_overrides_runpath=yes
13517 hardcode_into_libs=yes
13518 # ldd complains unless libraries are executable
13519 postinstall_cmds='chmod +x $lib'
13520 ;;
13521
13522 sunos4*)
13523 version_type=sunos
13524 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
13525 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
13526 shlibpath_var=LD_LIBRARY_PATH
13527 shlibpath_overrides_runpath=yes
13528 if test "$with_gnu_ld" = yes; then
13529 need_lib_prefix=no
13530 fi
13531 need_version=yes
13532 ;;
13533
13534 sysv4 | sysv4.3*)
13535 version_type=linux
13536 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13537 soname_spec='${libname}${release}${shared_ext}$major'
13538 shlibpath_var=LD_LIBRARY_PATH
13539 case $host_vendor in
13540 sni)
13541 shlibpath_overrides_runpath=no
13542 need_lib_prefix=no
13543 export_dynamic_flag_spec='${wl}-Blargedynsym'
13544 runpath_var=LD_RUN_PATH
13545 ;;
13546 siemens)
13547 need_lib_prefix=no
13548 ;;
13549 motorola)
13550 need_lib_prefix=no
13551 need_version=no
13552 shlibpath_overrides_runpath=no
13553 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
13554 ;;
13555 esac
13556 ;;
13557
13558 sysv4*MP*)
13559 if test -d /usr/nec ;then
13560 version_type=linux
13561 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
13562 soname_spec='$libname${shared_ext}.$major'
13563 shlibpath_var=LD_LIBRARY_PATH
13564 fi
13565 ;;
13566
13567 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
13568 version_type=freebsd-elf
13569 need_lib_prefix=no
13570 need_version=no
13571 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
13572 soname_spec='${libname}${release}${shared_ext}$major'
13573 shlibpath_var=LD_LIBRARY_PATH
13574 hardcode_into_libs=yes
13575 if test "$with_gnu_ld" = yes; then
13576 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
13577 shlibpath_overrides_runpath=no
13578 else
13579 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
13580 shlibpath_overrides_runpath=yes
13581 case $host_os in
13582 sco3.2v5*)
13583 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
13584 ;;
13585 esac
13586 fi
13587 sys_lib_dlsearch_path_spec='/usr/lib'
13588 ;;
13589
13590 uts4*)
13591 version_type=linux
13592 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13593 soname_spec='${libname}${release}${shared_ext}$major'
13594 shlibpath_var=LD_LIBRARY_PATH
13595 ;;
13596
13597 *)
13598 dynamic_linker=no
13599 ;;
13600 esac
13601 { echo "$as_me:$LINENO: result: $dynamic_linker" >&5
13602 echo "${ECHO_T}$dynamic_linker" >&6; }
13603 test "$dynamic_linker" = no && can_build_shared=no
13604
13605 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
13606 echo $ECHO_N "(cached) $ECHO_C" >&6
13607 else
13608 lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
13609 fi
13610
13611 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
13612 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
13613 echo $ECHO_N "(cached) $ECHO_C" >&6
13614 else
13615 lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
13616 fi
13617
13618 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
13619
13620 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13621 if test "$GCC" = yes; then
13622 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13623 fi
13624
13625 { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
13626 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
13627 hardcode_action_CXX=
13628 if test -n "$hardcode_libdir_flag_spec_CXX" || \
13629 test -n "$runpath_var_CXX" || \
13630 test "X$hardcode_automatic_CXX" = "Xyes" ; then
13631
13632 # We can hardcode non-existant directories.
13633 if test "$hardcode_direct_CXX" != no &&
13634 # If the only mechanism to avoid hardcoding is shlibpath_var, we
13635 # have to relink, otherwise we might link with an installed library
13636 # when we should be linking with a yet-to-be-installed one
13637 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
13638 test "$hardcode_minus_L_CXX" != no; then
13639 # Linking always hardcodes the temporary library directory.
13640 hardcode_action_CXX=relink
13641 else
13642 # We can link without hardcoding, and we can hardcode nonexisting dirs.
13643 hardcode_action_CXX=immediate
13644 fi
13645 else
13646 # We cannot hardcode anything, or else we can only hardcode existing
13647 # directories.
13648 hardcode_action_CXX=unsupported
13649 fi
13650 { echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
13651 echo "${ECHO_T}$hardcode_action_CXX" >&6; }
13652
13653 if test "$hardcode_action_CXX" = relink; then
13654 # Fast installation is not supported
13655 enable_fast_install=no
13656 elif test "$shlibpath_overrides_runpath" = yes ||
13657 test "$enable_shared" = no; then
13658 # Fast installation is not necessary
13659 enable_fast_install=needless
13660 fi
13661
13662
13663 # The else clause should only fire when bootstrapping the
13664 # libtool distribution, otherwise you forgot to ship ltmain.sh
13665 # with your package, and you will get complaints that there are
13666 # no rules to generate ltmain.sh.
13667 if test -f "$ltmain"; then
13668 # See if we are running on zsh, and set the options which allow our commands through
13669 # without removal of \ escapes.
13670 if test -n "${ZSH_VERSION+set}" ; then
13671 setopt NO_GLOB_SUBST
13672 fi
13673 # Now quote all the things that may contain metacharacters while being
13674 # careful not to overquote the AC_SUBSTed values. We take copies of the
13675 # variables and quote the copies for generation of the libtool script.
13676 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
13677 SED SHELL STRIP \
13678 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
13679 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
13680 deplibs_check_method reload_flag reload_cmds need_locks \
13681 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
13682 lt_cv_sys_global_symbol_to_c_name_address \
13683 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
13684 old_postinstall_cmds old_postuninstall_cmds \
13685 compiler_CXX \
13686 CC_CXX \
13687 LD_CXX \
13688 lt_prog_compiler_wl_CXX \
13689 lt_prog_compiler_pic_CXX \
13690 lt_prog_compiler_static_CXX \
13691 lt_prog_compiler_no_builtin_flag_CXX \
13692 export_dynamic_flag_spec_CXX \
13693 thread_safe_flag_spec_CXX \
13694 whole_archive_flag_spec_CXX \
13695 enable_shared_with_static_runtimes_CXX \
13696 old_archive_cmds_CXX \
13697 old_archive_from_new_cmds_CXX \
13698 predep_objects_CXX \
13699 postdep_objects_CXX \
13700 predeps_CXX \
13701 postdeps_CXX \
13702 compiler_lib_search_path_CXX \
13703 compiler_lib_search_dirs_CXX \
13704 archive_cmds_CXX \
13705 archive_expsym_cmds_CXX \
13706 postinstall_cmds_CXX \
13707 postuninstall_cmds_CXX \
13708 old_archive_from_expsyms_cmds_CXX \
13709 allow_undefined_flag_CXX \
13710 no_undefined_flag_CXX \
13711 export_symbols_cmds_CXX \
13712 hardcode_libdir_flag_spec_CXX \
13713 hardcode_libdir_flag_spec_ld_CXX \
13714 hardcode_libdir_separator_CXX \
13715 hardcode_automatic_CXX \
13716 module_cmds_CXX \
13717 module_expsym_cmds_CXX \
13718 lt_cv_prog_compiler_c_o_CXX \
13719 fix_srcfile_path_CXX \
13720 exclude_expsyms_CXX \
13721 include_expsyms_CXX; do
13722
13723 case $var in
13724 old_archive_cmds_CXX | \
13725 old_archive_from_new_cmds_CXX | \
13726 archive_cmds_CXX | \
13727 archive_expsym_cmds_CXX | \
13728 module_cmds_CXX | \
13729 module_expsym_cmds_CXX | \
13730 old_archive_from_expsyms_cmds_CXX | \
13731 export_symbols_cmds_CXX | \
13732 extract_expsyms_cmds | reload_cmds | finish_cmds | \
13733 postinstall_cmds | postuninstall_cmds | \
13734 old_postinstall_cmds | old_postuninstall_cmds | \
13735 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
13736 # Double-quote double-evaled strings.
13737 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
13738 ;;
13739 *)
13740 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
13741 ;;
13742 esac
13743 done
13744
13745 case $lt_echo in
13746 *'\$0 --fallback-echo"')
13747 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
13748 ;;
13749 esac
13750
13751 cfgfile="$ofile"
13752
13753 cat <<__EOF__ >> "$cfgfile"
13754 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
13755
13756 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13757
13758 # Shell to use when invoking shell scripts.
13759 SHELL=$lt_SHELL
13760
13761 # Whether or not to build shared libraries.
13762 build_libtool_libs=$enable_shared
13763
13764 # Whether or not to build static libraries.
13765 build_old_libs=$enable_static
13766
13767 # Whether or not to add -lc for building shared libraries.
13768 build_libtool_need_lc=$archive_cmds_need_lc_CXX
13769
13770 # Whether or not to disallow shared libs when runtime libs are static
13771 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
13772
13773 # Whether or not to optimize for fast installation.
13774 fast_install=$enable_fast_install
13775
13776 # The host system.
13777 host_alias=$host_alias
13778 host=$host
13779 host_os=$host_os
13780
13781 # The build system.
13782 build_alias=$build_alias
13783 build=$build
13784 build_os=$build_os
13785
13786 # An echo program that does not interpret backslashes.
13787 echo=$lt_echo
13788
13789 # The archiver.
13790 AR=$lt_AR
13791 AR_FLAGS=$lt_AR_FLAGS
13792
13793 # A C compiler.
13794 LTCC=$lt_LTCC
13795
13796 # LTCC compiler flags.
13797 LTCFLAGS=$lt_LTCFLAGS
13798
13799 # A language-specific compiler.
13800 CC=$lt_compiler_CXX
13801
13802 # Is the compiler the GNU C compiler?
13803 with_gcc=$GCC_CXX
13804
13805 # An ERE matcher.
13806 EGREP=$lt_EGREP
13807
13808 # The linker used to build libraries.
13809 LD=$lt_LD_CXX
13810
13811 # Whether we need hard or soft links.
13812 LN_S=$lt_LN_S
13813
13814 # A BSD-compatible nm program.
13815 NM=$lt_NM
13816
13817 # A symbol stripping program
13818 STRIP=$lt_STRIP
13819
13820 # Used to examine libraries when file_magic_cmd begins "file"
13821 MAGIC_CMD=$MAGIC_CMD
13822
13823 # Used on cygwin: DLL creation program.
13824 DLLTOOL="$DLLTOOL"
13825
13826 # Used on cygwin: object dumper.
13827 OBJDUMP="$OBJDUMP"
13828
13829 # Used on cygwin: assembler.
13830 AS="$AS"
13831
13832 # The name of the directory that contains temporary libtool files.
13833 objdir=$objdir
13834
13835 # How to create reloadable object files.
13836 reload_flag=$lt_reload_flag
13837 reload_cmds=$lt_reload_cmds
13838
13839 # How to pass a linker flag through the compiler.
13840 wl=$lt_lt_prog_compiler_wl_CXX
13841
13842 # Object file suffix (normally "o").
13843 objext="$ac_objext"
13844
13845 # Old archive suffix (normally "a").
13846 libext="$libext"
13847
13848 # Shared library suffix (normally ".so").
13849 shrext_cmds='$shrext_cmds'
13850
13851 # Executable file suffix (normally "").
13852 exeext="$exeext"
13853
13854 # Additional compiler flags for building library objects.
13855 pic_flag=$lt_lt_prog_compiler_pic_CXX
13856 pic_mode=$pic_mode
13857
13858 # What is the maximum length of a command?
13859 max_cmd_len=$lt_cv_sys_max_cmd_len
13860
13861 # Does compiler simultaneously support -c and -o options?
13862 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
13863
13864 # Must we lock files when doing compilation?
13865 need_locks=$lt_need_locks
13866
13867 # Do we need the lib prefix for modules?
13868 need_lib_prefix=$need_lib_prefix
13869
13870 # Do we need a version for libraries?
13871 need_version=$need_version
13872
13873 # Whether dlopen is supported.
13874 dlopen_support=$enable_dlopen
13875
13876 # Whether dlopen of programs is supported.
13877 dlopen_self=$enable_dlopen_self
13878
13879 # Whether dlopen of statically linked programs is supported.
13880 dlopen_self_static=$enable_dlopen_self_static
13881
13882 # Compiler flag to prevent dynamic linking.
13883 link_static_flag=$lt_lt_prog_compiler_static_CXX
13884
13885 # Compiler flag to turn off builtin functions.
13886 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
13887
13888 # Compiler flag to allow reflexive dlopens.
13889 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
13890
13891 # Compiler flag to generate shared objects directly from archives.
13892 whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
13893
13894 # Compiler flag to generate thread-safe objects.
13895 thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX
13896
13897 # Library versioning type.
13898 version_type=$version_type
13899
13900 # Format of library name prefix.
13901 libname_spec=$lt_libname_spec
13902
13903 # List of archive names. First name is the real one, the rest are links.
13904 # The last name is the one that the linker finds with -lNAME.
13905 library_names_spec=$lt_library_names_spec
13906
13907 # The coded name of the library, if different from the real name.
13908 soname_spec=$lt_soname_spec
13909
13910 # Commands used to build and install an old-style archive.
13911 RANLIB=$lt_RANLIB
13912 old_archive_cmds=$lt_old_archive_cmds_CXX
13913 old_postinstall_cmds=$lt_old_postinstall_cmds
13914 old_postuninstall_cmds=$lt_old_postuninstall_cmds
13915
13916 # Create an old-style archive from a shared archive.
13917 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
13918
13919 # Create a temporary old-style archive to link instead of a shared archive.
13920 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
13921
13922 # Commands used to build and install a shared archive.
13923 archive_cmds=$lt_archive_cmds_CXX
13924 archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
13925 postinstall_cmds=$lt_postinstall_cmds
13926 postuninstall_cmds=$lt_postuninstall_cmds
13927
13928 # Commands used to build a loadable module (assumed same as above if empty)
13929 module_cmds=$lt_module_cmds_CXX
13930 module_expsym_cmds=$lt_module_expsym_cmds_CXX
13931
13932 # Commands to strip libraries.
13933 old_striplib=$lt_old_striplib
13934 striplib=$lt_striplib
13935
13936 # Dependencies to place before the objects being linked to create a
13937 # shared library.
13938 predep_objects=$lt_predep_objects_CXX
13939
13940 # Dependencies to place after the objects being linked to create a
13941 # shared library.
13942 postdep_objects=$lt_postdep_objects_CXX
13943
13944 # Dependencies to place before the objects being linked to create a
13945 # shared library.
13946 predeps=$lt_predeps_CXX
13947
13948 # Dependencies to place after the objects being linked to create a
13949 # shared library.
13950 postdeps=$lt_postdeps_CXX
13951
13952 # The directories searched by this compiler when creating a shared
13953 # library
13954 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
13955
13956 # The library search path used internally by the compiler when linking
13957 # a shared library.
13958 compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
13959
13960 # Method to check whether dependent libraries are shared objects.
13961 deplibs_check_method=$lt_deplibs_check_method
13962
13963 # Command to use when deplibs_check_method == file_magic.
13964 file_magic_cmd=$lt_file_magic_cmd
13965
13966 # Flag that allows shared libraries with undefined symbols to be built.
13967 allow_undefined_flag=$lt_allow_undefined_flag_CXX
13968
13969 # Flag that forces no undefined symbols.
13970 no_undefined_flag=$lt_no_undefined_flag_CXX
13971
13972 # Commands used to finish a libtool library installation in a directory.
13973 finish_cmds=$lt_finish_cmds
13974
13975 # Same as above, but a single script fragment to be evaled but not shown.
13976 finish_eval=$lt_finish_eval
13977
13978 # Take the output of nm and produce a listing of raw symbols and C names.
13979 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
13980
13981 # Transform the output of nm in a proper C declaration
13982 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
13983
13984 # Transform the output of nm in a C name address pair
13985 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
13986
13987 # This is the shared library runtime path variable.
13988 runpath_var=$runpath_var
13989
13990 # This is the shared library path variable.
13991 shlibpath_var=$shlibpath_var
13992
13993 # Is shlibpath searched before the hard-coded library search path?
13994 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
13995
13996 # How to hardcode a shared library path into an executable.
13997 hardcode_action=$hardcode_action_CXX
13998
13999 # Whether we should hardcode library paths into libraries.
14000 hardcode_into_libs=$hardcode_into_libs
14001
14002 # Flag to hardcode \$libdir into a binary during linking.
14003 # This must work even if \$libdir does not exist.
14004 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
14005
14006 # If ld is used when linking, flag to hardcode \$libdir into
14007 # a binary during linking. This must work even if \$libdir does
14008 # not exist.
14009 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
14010
14011 # Whether we need a single -rpath flag with a separated argument.
14012 hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
14013
14014 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
14015 # resulting binary.
14016 hardcode_direct=$hardcode_direct_CXX
14017
14018 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
14019 # resulting binary.
14020 hardcode_minus_L=$hardcode_minus_L_CXX
14021
14022 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
14023 # the resulting binary.
14024 hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
14025
14026 # Set to yes if building a shared library automatically hardcodes DIR into the library
14027 # and all subsequent libraries and executables linked against it.
14028 hardcode_automatic=$hardcode_automatic_CXX
14029
14030 # Variables whose values should be saved in libtool wrapper scripts and
14031 # restored at relink time.
14032 variables_saved_for_relink="$variables_saved_for_relink"
14033
14034 # Whether libtool must link a program against all its dependency libraries.
14035 link_all_deplibs=$link_all_deplibs_CXX
14036
14037 # Compile-time system search path for libraries
14038 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
14039
14040 # Run-time system search path for libraries
14041 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
14042
14043 # Fix the shell variable \$srcfile for the compiler.
14044 fix_srcfile_path=$lt_fix_srcfile_path
14045
14046 # Set to yes if exported symbols are required.
14047 always_export_symbols=$always_export_symbols_CXX
14048
14049 # The commands to list exported symbols.
14050 export_symbols_cmds=$lt_export_symbols_cmds_CXX
14051
14052 # The commands to extract the exported symbol list from a shared archive.
14053 extract_expsyms_cmds=$lt_extract_expsyms_cmds
14054
14055 # Symbols that should not be listed in the preloaded symbols.
14056 exclude_expsyms=$lt_exclude_expsyms_CXX
14057
14058 # Symbols that must always be exported.
14059 include_expsyms=$lt_include_expsyms_CXX
14060
14061 # ### END LIBTOOL TAG CONFIG: $tagname
14062
14063 __EOF__
14064
14065
14066 else
14067 # If there is no Makefile yet, we rely on a make rule to execute
14068 # `config.status --recheck' to rerun these tests and create the
14069 # libtool script then.
14070 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
14071 if test -f "$ltmain_in"; then
14072 test -f Makefile && make "$ltmain"
14073 fi
14074 fi
14075
14076
14077 ac_ext=c
14078 ac_cpp='$CPP $CPPFLAGS'
14079 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14080 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14081 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14082
14083 CC=$lt_save_CC
14084 LDCXX=$LD
14085 LD=$lt_save_LD
14086 GCC=$lt_save_GCC
14087 with_gnu_ldcxx=$with_gnu_ld
14088 with_gnu_ld=$lt_save_with_gnu_ld
14089 lt_cv_path_LDCXX=$lt_cv_path_LD
14090 lt_cv_path_LD=$lt_save_path_LD
14091 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
14092 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
14093
14094 else
14095 tagname=""
14096 fi
14097 ;;
14098
14099 F77)
14100 if test -n "$F77" && test "X$F77" != "Xno"; then
14101
14102 ac_ext=f
14103 ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
14104 ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14105 ac_compiler_gnu=$ac_cv_f77_compiler_gnu
14106
14107
14108 archive_cmds_need_lc_F77=no
14109 allow_undefined_flag_F77=
14110 always_export_symbols_F77=no
14111 archive_expsym_cmds_F77=
14112 export_dynamic_flag_spec_F77=
14113 hardcode_direct_F77=no
14114 hardcode_libdir_flag_spec_F77=
14115 hardcode_libdir_flag_spec_ld_F77=
14116 hardcode_libdir_separator_F77=
14117 hardcode_minus_L_F77=no
14118 hardcode_automatic_F77=no
14119 module_cmds_F77=
14120 module_expsym_cmds_F77=
14121 link_all_deplibs_F77=unknown
14122 old_archive_cmds_F77=$old_archive_cmds
14123 no_undefined_flag_F77=
14124 whole_archive_flag_spec_F77=
14125 enable_shared_with_static_runtimes_F77=no
14126
14127 # Source file extension for f77 test sources.
14128 ac_ext=f
14129
14130 # Object file extension for compiled f77 test sources.
14131 objext=o
14132 objext_F77=$objext
14133
14134 # Code to be used in simple compile tests
14135 lt_simple_compile_test_code="\
14136 subroutine t
14137 return
14138 end
14139 "
14140
14141 # Code to be used in simple link tests
14142 lt_simple_link_test_code="\
14143 program t
14144 end
14145 "
14146
14147 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
14148
14149 # If no C compiler was specified, use CC.
14150 LTCC=${LTCC-"$CC"}
14151
14152 # If no C compiler flags were specified, use CFLAGS.
14153 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
14154
14155 # Allow CC to be a program name with arguments.
14156 compiler=$CC
14157
14158
14159 # save warnings/boilerplate of simple test code
14160 ac_outfile=conftest.$ac_objext
14161 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
14162 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
14163 _lt_compiler_boilerplate=`cat conftest.err`
14164 $rm conftest*
14165
14166 ac_outfile=conftest.$ac_objext
14167 echo "$lt_simple_link_test_code" >conftest.$ac_ext
14168 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
14169 _lt_linker_boilerplate=`cat conftest.err`
14170 $rm -r conftest*
14171
14172
14173 # Allow CC to be a program name with arguments.
14174 lt_save_CC="$CC"
14175 CC=${F77-"f77"}
14176 compiler=$CC
14177 compiler_F77=$CC
14178 for cc_temp in $compiler""; do
14179 case $cc_temp in
14180 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
14181 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
14182 \-*) ;;
14183 *) break;;
14184 esac
14185 done
14186 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
14187
14188
14189 { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
14190 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; }
14191 { echo "$as_me:$LINENO: result: $can_build_shared" >&5
14192 echo "${ECHO_T}$can_build_shared" >&6; }
14193
14194 { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
14195 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; }
14196 test "$can_build_shared" = "no" && enable_shared=no
14197
14198 # On AIX, shared libraries and static libraries use the same namespace, and
14199 # are all built from PIC.
14200 case $host_os in
14201 aix3*)
14202 test "$enable_shared" = yes && enable_static=no
14203 if test -n "$RANLIB"; then
14204 archive_cmds="$archive_cmds~\$RANLIB \$lib"
14205 postinstall_cmds='$RANLIB $lib'
14206 fi
14207 ;;
14208 aix[4-9]*)
14209 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
14210 test "$enable_shared" = yes && enable_static=no
14211 fi
14212 ;;
14213 esac
14214 { echo "$as_me:$LINENO: result: $enable_shared" >&5
14215 echo "${ECHO_T}$enable_shared" >&6; }
14216
14217 { echo "$as_me:$LINENO: checking whether to build static libraries" >&5
14218 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; }
14219 # Make sure either enable_shared or enable_static is yes.
14220 test "$enable_shared" = yes || enable_static=yes
14221 { echo "$as_me:$LINENO: result: $enable_static" >&5
14222 echo "${ECHO_T}$enable_static" >&6; }
14223
14224 GCC_F77="$G77"
14225 LD_F77="$LD"
14226
14227 lt_prog_compiler_wl_F77=
14228 lt_prog_compiler_pic_F77=
14229 lt_prog_compiler_static_F77=
14230
14231 { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
14232 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
14233
14234 if test "$GCC" = yes; then
14235 lt_prog_compiler_wl_F77='-Wl,'
14236 lt_prog_compiler_static_F77='-static'
14237
14238 case $host_os in
14239 aix*)
14240 # All AIX code is PIC.
14241 if test "$host_cpu" = ia64; then
14242 # AIX 5 now supports IA64 processor
14243 lt_prog_compiler_static_F77='-Bstatic'
14244 fi
14245 ;;
14246
14247 amigaos*)
14248 # FIXME: we need at least 68020 code to build shared libraries, but
14249 # adding the `-m68020' flag to GCC prevents building anything better,
14250 # like `-m68040'.
14251 lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
14252 ;;
14253
14254 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
14255 # PIC is the default for these OSes.
14256 ;;
14257
14258 mingw* | cygwin* | pw32* | os2*)
14259 # This hack is so that the source file can tell whether it is being
14260 # built for inclusion in a dll (and should export symbols for example).
14261 # Although the cygwin gcc ignores -fPIC, still need this for old-style
14262 # (--disable-auto-import) libraries
14263 lt_prog_compiler_pic_F77='-DDLL_EXPORT'
14264 ;;
14265
14266 darwin* | rhapsody*)
14267 # PIC is the default on this platform
14268 # Common symbols not allowed in MH_DYLIB files
14269 lt_prog_compiler_pic_F77='-fno-common'
14270 ;;
14271
14272 interix[3-9]*)
14273 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
14274 # Instead, we relocate shared libraries at runtime.
14275 ;;
14276
14277 msdosdjgpp*)
14278 # Just because we use GCC doesn't mean we suddenly get shared libraries
14279 # on systems that don't support them.
14280 lt_prog_compiler_can_build_shared_F77=no
14281 enable_shared=no
14282 ;;
14283
14284 sysv4*MP*)
14285 if test -d /usr/nec; then
14286 lt_prog_compiler_pic_F77=-Kconform_pic
14287 fi
14288 ;;
14289
14290 hpux*)
14291 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
14292 # not for PA HP-UX.
14293 case $host_cpu in
14294 hppa*64*|ia64*)
14295 # +Z the default
14296 ;;
14297 *)
14298 lt_prog_compiler_pic_F77='-fPIC'
14299 ;;
14300 esac
14301 ;;
14302
14303 *)
14304 lt_prog_compiler_pic_F77='-fPIC'
14305 ;;
14306 esac
14307 else
14308 # PORTME Check for flag to pass linker flags through the system compiler.
14309 case $host_os in
14310 aix*)
14311 lt_prog_compiler_wl_F77='-Wl,'
14312 if test "$host_cpu" = ia64; then
14313 # AIX 5 now supports IA64 processor
14314 lt_prog_compiler_static_F77='-Bstatic'
14315 else
14316 lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
14317 fi
14318 ;;
14319 darwin*)
14320 # PIC is the default on this platform
14321 # Common symbols not allowed in MH_DYLIB files
14322 case $cc_basename in
14323 xlc*)
14324 lt_prog_compiler_pic_F77='-qnocommon'
14325 lt_prog_compiler_wl_F77='-Wl,'
14326 ;;
14327 esac
14328 ;;
14329
14330 mingw* | cygwin* | pw32* | os2*)
14331 # This hack is so that the source file can tell whether it is being
14332 # built for inclusion in a dll (and should export symbols for example).
14333 lt_prog_compiler_pic_F77='-DDLL_EXPORT'
14334 ;;
14335
14336 hpux9* | hpux10* | hpux11*)
14337 lt_prog_compiler_wl_F77='-Wl,'
14338 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
14339 # not for PA HP-UX.
14340 case $host_cpu in
14341 hppa*64*|ia64*)
14342 # +Z the default
14343 ;;
14344 *)
14345 lt_prog_compiler_pic_F77='+Z'
14346 ;;
14347 esac
14348 # Is there a better lt_prog_compiler_static that works with the bundled CC?
14349 lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
14350 ;;
14351
14352 irix5* | irix6* | nonstopux*)
14353 lt_prog_compiler_wl_F77='-Wl,'
14354 # PIC (with -KPIC) is the default.
14355 lt_prog_compiler_static_F77='-non_shared'
14356 ;;
14357
14358 newsos6)
14359 lt_prog_compiler_pic_F77='-KPIC'
14360 lt_prog_compiler_static_F77='-Bstatic'
14361 ;;
14362
14363 linux* | k*bsd*-gnu)
14364 case $cc_basename in
14365 icc* | ecc*)
14366 lt_prog_compiler_wl_F77='-Wl,'
14367 lt_prog_compiler_pic_F77='-KPIC'
14368 lt_prog_compiler_static_F77='-static'
14369 ;;
14370 pgcc* | pgf77* | pgf90* | pgf95*)
14371 # Portland Group compilers (*not* the Pentium gcc compiler,
14372 # which looks to be a dead project)
14373 lt_prog_compiler_wl_F77='-Wl,'
14374 lt_prog_compiler_pic_F77='-fpic'
14375 lt_prog_compiler_static_F77='-Bstatic'
14376 ;;
14377 ccc*)
14378 lt_prog_compiler_wl_F77='-Wl,'
14379 # All Alpha code is PIC.
14380 lt_prog_compiler_static_F77='-non_shared'
14381 ;;
14382 *)
14383 case `$CC -V 2>&1 | sed 5q` in
14384 *Sun\ C*)
14385 # Sun C 5.9
14386 lt_prog_compiler_pic_F77='-KPIC'
14387 lt_prog_compiler_static_F77='-Bstatic'
14388 lt_prog_compiler_wl_F77='-Wl,'
14389 ;;
14390 *Sun\ F*)
14391 # Sun Fortran 8.3 passes all unrecognized flags to the linker
14392 lt_prog_compiler_pic_F77='-KPIC'
14393 lt_prog_compiler_static_F77='-Bstatic'
14394 lt_prog_compiler_wl_F77=''
14395 ;;
14396 esac
14397 ;;
14398 esac
14399 ;;
14400
14401 osf3* | osf4* | osf5*)
14402 lt_prog_compiler_wl_F77='-Wl,'
14403 # All OSF/1 code is PIC.
14404 lt_prog_compiler_static_F77='-non_shared'
14405 ;;
14406
14407 rdos*)
14408 lt_prog_compiler_static_F77='-non_shared'
14409 ;;
14410
14411 solaris*)
14412 lt_prog_compiler_pic_F77='-KPIC'
14413 lt_prog_compiler_static_F77='-Bstatic'
14414 case $cc_basename in
14415 f77* | f90* | f95*)
14416 lt_prog_compiler_wl_F77='-Qoption ld ';;
14417 *)
14418 lt_prog_compiler_wl_F77='-Wl,';;
14419 esac
14420 ;;
14421
14422 sunos4*)
14423 lt_prog_compiler_wl_F77='-Qoption ld '
14424 lt_prog_compiler_pic_F77='-PIC'
14425 lt_prog_compiler_static_F77='-Bstatic'
14426 ;;
14427
14428 sysv4 | sysv4.2uw2* | sysv4.3*)
14429 lt_prog_compiler_wl_F77='-Wl,'
14430 lt_prog_compiler_pic_F77='-KPIC'
14431 lt_prog_compiler_static_F77='-Bstatic'
14432 ;;
14433
14434 sysv4*MP*)
14435 if test -d /usr/nec ;then
14436 lt_prog_compiler_pic_F77='-Kconform_pic'
14437 lt_prog_compiler_static_F77='-Bstatic'
14438 fi
14439 ;;
14440
14441 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
14442 lt_prog_compiler_wl_F77='-Wl,'
14443 lt_prog_compiler_pic_F77='-KPIC'
14444 lt_prog_compiler_static_F77='-Bstatic'
14445 ;;
14446
14447 unicos*)
14448 lt_prog_compiler_wl_F77='-Wl,'
14449 lt_prog_compiler_can_build_shared_F77=no
14450 ;;
14451
14452 uts4*)
14453 lt_prog_compiler_pic_F77='-pic'
14454 lt_prog_compiler_static_F77='-Bstatic'
14455 ;;
14456
14457 *)
14458 lt_prog_compiler_can_build_shared_F77=no
14459 ;;
14460 esac
14461 fi
14462
14463 { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
14464 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; }
14465
14466 #
14467 # Check to make sure the PIC flag actually works.
14468 #
14469 if test -n "$lt_prog_compiler_pic_F77"; then
14470
14471 { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
14472 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; }
14473 if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then
14474 echo $ECHO_N "(cached) $ECHO_C" >&6
14475 else
14476 lt_cv_prog_compiler_pic_works_F77=no
14477 ac_outfile=conftest.$ac_objext
14478 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14479 lt_compiler_flag="$lt_prog_compiler_pic_F77"
14480 # Insert the option either (1) after the last *FLAGS variable, or
14481 # (2) before a word containing "conftest.", or (3) at the end.
14482 # Note that $ac_compile itself does not contain backslashes and begins
14483 # with a dollar sign (not a hyphen), so the echo should work correctly.
14484 # The option is referenced via a variable to avoid confusing sed.
14485 lt_compile=`echo "$ac_compile" | $SED \
14486 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14487 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14488 -e 's:$: $lt_compiler_flag:'`
14489 (eval echo "\"\$as_me:14490: $lt_compile\"" >&5)
14490 (eval "$lt_compile" 2>conftest.err)
14491 ac_status=$?
14492 cat conftest.err >&5
14493 echo "$as_me:14494: \$? = $ac_status" >&5
14494 if (exit $ac_status) && test -s "$ac_outfile"; then
14495 # The compiler can only warn and ignore the option if not recognized
14496 # So say no if there are warnings other than the usual output.
14497 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
14498 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14499 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
14500 lt_cv_prog_compiler_pic_works_F77=yes
14501 fi
14502 fi
14503 $rm conftest*
14504
14505 fi
14506 { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_F77" >&5
14507 echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_F77" >&6; }
14508
14509 if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then
14510 case $lt_prog_compiler_pic_F77 in
14511 "" | " "*) ;;
14512 *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
14513 esac
14514 else
14515 lt_prog_compiler_pic_F77=
14516 lt_prog_compiler_can_build_shared_F77=no
14517 fi
14518
14519 fi
14520 case $host_os in
14521 # For platforms which do not support PIC, -DPIC is meaningless:
14522 *djgpp*)
14523 lt_prog_compiler_pic_F77=
14524 ;;
14525 *)
14526 lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
14527 ;;
14528 esac
14529
14530 #
14531 # Check to make sure the static flag actually works.
14532 #
14533 wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\"
14534 { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
14535 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
14536 if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then
14537 echo $ECHO_N "(cached) $ECHO_C" >&6
14538 else
14539 lt_cv_prog_compiler_static_works_F77=no
14540 save_LDFLAGS="$LDFLAGS"
14541 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
14542 echo "$lt_simple_link_test_code" > conftest.$ac_ext
14543 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
14544 # The linker can only warn and ignore the option if not recognized
14545 # So say no if there are warnings
14546 if test -s conftest.err; then
14547 # Append any errors to the config.log.
14548 cat conftest.err 1>&5
14549 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
14550 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14551 if diff conftest.exp conftest.er2 >/dev/null; then
14552 lt_cv_prog_compiler_static_works_F77=yes
14553 fi
14554 else
14555 lt_cv_prog_compiler_static_works_F77=yes
14556 fi
14557 fi
14558 $rm -r conftest*
14559 LDFLAGS="$save_LDFLAGS"
14560
14561 fi
14562 { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_F77" >&5
14563 echo "${ECHO_T}$lt_cv_prog_compiler_static_works_F77" >&6; }
14564
14565 if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then
14566 :
14567 else
14568 lt_prog_compiler_static_F77=
14569 fi
14570
14571
14572 { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
14573 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
14574 if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
14575 echo $ECHO_N "(cached) $ECHO_C" >&6
14576 else
14577 lt_cv_prog_compiler_c_o_F77=no
14578 $rm -r conftest 2>/dev/null
14579 mkdir conftest
14580 cd conftest
14581 mkdir out
14582 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14583
14584 lt_compiler_flag="-o out/conftest2.$ac_objext"
14585 # Insert the option either (1) after the last *FLAGS variable, or
14586 # (2) before a word containing "conftest.", or (3) at the end.
14587 # Note that $ac_compile itself does not contain backslashes and begins
14588 # with a dollar sign (not a hyphen), so the echo should work correctly.
14589 lt_compile=`echo "$ac_compile" | $SED \
14590 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14591 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14592 -e 's:$: $lt_compiler_flag:'`
14593 (eval echo "\"\$as_me:14594: $lt_compile\"" >&5)
14594 (eval "$lt_compile" 2>out/conftest.err)
14595 ac_status=$?
14596 cat out/conftest.err >&5
14597 echo "$as_me:14598: \$? = $ac_status" >&5
14598 if (exit $ac_status) && test -s out/conftest2.$ac_objext
14599 then
14600 # The compiler can only warn and ignore the option if not recognized
14601 # So say no if there are warnings
14602 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
14603 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
14604 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
14605 lt_cv_prog_compiler_c_o_F77=yes
14606 fi
14607 fi
14608 chmod u+w . 2>&5
14609 $rm conftest*
14610 # SGI C++ compiler will create directory out/ii_files/ for
14611 # template instantiation
14612 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
14613 $rm out/* && rmdir out
14614 cd ..
14615 rmdir conftest
14616 $rm conftest*
14617
14618 fi
14619 { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
14620 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; }
14621
14622
14623 hard_links="nottested"
14624 if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
14625 # do not overwrite the value of need_locks provided by the user
14626 { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
14627 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
14628 hard_links=yes
14629 $rm conftest*
14630 ln conftest.a conftest.b 2>/dev/null && hard_links=no
14631 touch conftest.a
14632 ln conftest.a conftest.b 2>&5 || hard_links=no
14633 ln conftest.a conftest.b 2>/dev/null && hard_links=no
14634 { echo "$as_me:$LINENO: result: $hard_links" >&5
14635 echo "${ECHO_T}$hard_links" >&6; }
14636 if test "$hard_links" = no; then
14637 { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
14638 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
14639 need_locks=warn
14640 fi
14641 else
14642 need_locks=no
14643 fi
14644
14645 { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
14646 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
14647
14648 runpath_var=
14649 allow_undefined_flag_F77=
14650 enable_shared_with_static_runtimes_F77=no
14651 archive_cmds_F77=
14652 archive_expsym_cmds_F77=
14653 old_archive_From_new_cmds_F77=
14654 old_archive_from_expsyms_cmds_F77=
14655 export_dynamic_flag_spec_F77=
14656 whole_archive_flag_spec_F77=
14657 thread_safe_flag_spec_F77=
14658 hardcode_libdir_flag_spec_F77=
14659 hardcode_libdir_flag_spec_ld_F77=
14660 hardcode_libdir_separator_F77=
14661 hardcode_direct_F77=no
14662 hardcode_minus_L_F77=no
14663 hardcode_shlibpath_var_F77=unsupported
14664 link_all_deplibs_F77=unknown
14665 hardcode_automatic_F77=no
14666 module_cmds_F77=
14667 module_expsym_cmds_F77=
14668 always_export_symbols_F77=no
14669 export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
14670 # include_expsyms should be a list of space-separated symbols to be *always*
14671 # included in the symbol list
14672 include_expsyms_F77=
14673 # exclude_expsyms can be an extended regexp of symbols to exclude
14674 # it will be wrapped by ` (' and `)$', so one must not match beginning or
14675 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
14676 # as well as any symbol that contains `d'.
14677 exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
14678 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
14679 # platforms (ab)use it in PIC code, but their linkers get confused if
14680 # the symbol is explicitly referenced. Since portable code cannot
14681 # rely on this symbol name, it's probably fine to never include it in
14682 # preloaded symbol tables.
14683 # Exclude shared library initialization/finalization symbols.
14684 extract_expsyms_cmds=
14685 # Just being paranoid about ensuring that cc_basename is set.
14686 for cc_temp in $compiler""; do
14687 case $cc_temp in
14688 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
14689 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
14690 \-*) ;;
14691 *) break;;
14692 esac
14693 done
14694 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
14695
14696 case $host_os in
14697 cygwin* | mingw* | pw32*)
14698 # FIXME: the MSVC++ port hasn't been tested in a loooong time
14699 # When not using gcc, we currently assume that we are using
14700 # Microsoft Visual C++.
14701 if test "$GCC" != yes; then
14702 with_gnu_ld=no
14703 fi
14704 ;;
14705 interix*)
14706 # we just hope/assume this is gcc and not c89 (= MSVC++)
14707 with_gnu_ld=yes
14708 ;;
14709 openbsd*)
14710 with_gnu_ld=no
14711 ;;
14712 esac
14713
14714 ld_shlibs_F77=yes
14715 if test "$with_gnu_ld" = yes; then
14716 # If archive_cmds runs LD, not CC, wlarc should be empty
14717 wlarc='${wl}'
14718
14719 # Set some defaults for GNU ld with shared library support. These
14720 # are reset later if shared libraries are not supported. Putting them
14721 # here allows them to be overridden if necessary.
14722 runpath_var=LD_RUN_PATH
14723 hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'
14724 export_dynamic_flag_spec_F77='${wl}--export-dynamic'
14725 # ancient GNU ld didn't support --whole-archive et. al.
14726 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
14727 whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
14728 else
14729 whole_archive_flag_spec_F77=
14730 fi
14731 supports_anon_versioning=no
14732 case `$LD -v 2>/dev/null` in
14733 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
14734 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
14735 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
14736 *\ 2.11.*) ;; # other 2.11 versions
14737 *) supports_anon_versioning=yes ;;
14738 esac
14739
14740 # See if GNU ld supports shared libraries.
14741 case $host_os in
14742 aix[3-9]*)
14743 # On AIX/PPC, the GNU linker is very broken
14744 if test "$host_cpu" != ia64; then
14745 ld_shlibs_F77=no
14746 cat <<EOF 1>&2
14747
14748 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
14749 *** to be unable to reliably create shared libraries on AIX.
14750 *** Therefore, libtool is disabling shared libraries support. If you
14751 *** really care for shared libraries, you may want to modify your PATH
14752 *** so that a non-GNU linker is found, and then restart.
14753
14754 EOF
14755 fi
14756 ;;
14757
14758 amigaos*)
14759 archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
14760 hardcode_libdir_flag_spec_F77='-L$libdir'
14761 hardcode_minus_L_F77=yes
14762
14763 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
14764 # that the semantics of dynamic libraries on AmigaOS, at least up
14765 # to version 4, is to share data among multiple programs linked
14766 # with the same dynamic library. Since this doesn't match the
14767 # behavior of shared libraries on other platforms, we can't use
14768 # them.
14769 ld_shlibs_F77=no
14770 ;;
14771
14772 beos*)
14773 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
14774 allow_undefined_flag_F77=unsupported
14775 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
14776 # support --undefined. This deserves some investigation. FIXME
14777 archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14778 else
14779 ld_shlibs_F77=no
14780 fi
14781 ;;
14782
14783 cygwin* | mingw* | pw32*)
14784 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
14785 # as there is no search path for DLLs.
14786 hardcode_libdir_flag_spec_F77='-L$libdir'
14787 allow_undefined_flag_F77=unsupported
14788 always_export_symbols_F77=no
14789 enable_shared_with_static_runtimes_F77=yes
14790 export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
14791
14792 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
14793 archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
14794 # If the export-symbols file already is a .def file (1st line
14795 # is EXPORTS), use it as is; otherwise, prepend...
14796 archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
14797 cp $export_symbols $output_objdir/$soname.def;
14798 else
14799 echo EXPORTS > $output_objdir/$soname.def;
14800 cat $export_symbols >> $output_objdir/$soname.def;
14801 fi~
14802 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
14803 else
14804 ld_shlibs_F77=no
14805 fi
14806 ;;
14807
14808 interix[3-9]*)
14809 hardcode_direct_F77=no
14810 hardcode_shlibpath_var_F77=no
14811 hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
14812 export_dynamic_flag_spec_F77='${wl}-E'
14813 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
14814 # Instead, shared libraries are loaded at an image base (0x10000000 by
14815 # default) and relocated if they conflict, which is a slow very memory
14816 # consuming and fragmenting process. To avoid this, we pick a random,
14817 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
14818 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
14819 archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
14820 archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
14821 ;;
14822
14823 gnu* | linux* | k*bsd*-gnu)
14824 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
14825 tmp_addflag=
14826 case $cc_basename,$host_cpu in
14827 pgcc*) # Portland Group C compiler
14828 whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
14829 tmp_addflag=' $pic_flag'
14830 ;;
14831 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
14832 whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
14833 tmp_addflag=' $pic_flag -Mnomain' ;;
14834 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
14835 tmp_addflag=' -i_dynamic' ;;
14836 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
14837 tmp_addflag=' -i_dynamic -nofor_main' ;;
14838 ifc* | ifort*) # Intel Fortran compiler
14839 tmp_addflag=' -nofor_main' ;;
14840 esac
14841 case `$CC -V 2>&1 | sed 5q` in
14842 *Sun\ C*) # Sun C 5.9
14843 whole_archive_flag_spec_F77='${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'
14844 tmp_sharedflag='-G' ;;
14845 *Sun\ F*) # Sun Fortran 8.3
14846 tmp_sharedflag='-G' ;;
14847 *)
14848 tmp_sharedflag='-shared' ;;
14849 esac
14850 archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14851
14852 if test $supports_anon_versioning = yes; then
14853 archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
14854 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
14855 $echo "local: *; };" >> $output_objdir/$libname.ver~
14856 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
14857 fi
14858 link_all_deplibs_F77=no
14859 else
14860 ld_shlibs_F77=no
14861 fi
14862 ;;
14863
14864 netbsd* | netbsdelf*-gnu)
14865 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
14866 archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
14867 wlarc=
14868 else
14869 archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14870 archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
14871 fi
14872 ;;
14873
14874 solaris*)
14875 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
14876 ld_shlibs_F77=no
14877 cat <<EOF 1>&2
14878
14879 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
14880 *** create shared libraries on Solaris systems. Therefore, libtool
14881 *** is disabling shared libraries support. We urge you to upgrade GNU
14882 *** binutils to release 2.9.1 or newer. Another option is to modify
14883 *** your PATH or compiler configuration so that the native linker is
14884 *** used, and then restart.
14885
14886 EOF
14887 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
14888 archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14889 archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
14890 else
14891 ld_shlibs_F77=no
14892 fi
14893 ;;
14894
14895 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
14896 case `$LD -v 2>&1` in
14897 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
14898 ld_shlibs_F77=no
14899 cat <<_LT_EOF 1>&2
14900
14901 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
14902 *** reliably create shared libraries on SCO systems. Therefore, libtool
14903 *** is disabling shared libraries support. We urge you to upgrade GNU
14904 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
14905 *** your PATH or compiler configuration so that the native linker is
14906 *** used, and then restart.
14907
14908 _LT_EOF
14909 ;;
14910 *)
14911 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
14912 hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
14913 archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
14914 archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
14915 else
14916 ld_shlibs_F77=no
14917 fi
14918 ;;
14919 esac
14920 ;;
14921
14922 sunos4*)
14923 archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
14924 wlarc=
14925 hardcode_direct_F77=yes
14926 hardcode_shlibpath_var_F77=no
14927 ;;
14928
14929 *)
14930 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
14931 archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14932 archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
14933 else
14934 ld_shlibs_F77=no
14935 fi
14936 ;;
14937 esac
14938
14939 if test "$ld_shlibs_F77" = no; then
14940 runpath_var=
14941 hardcode_libdir_flag_spec_F77=
14942 export_dynamic_flag_spec_F77=
14943 whole_archive_flag_spec_F77=
14944 fi
14945 else
14946 # PORTME fill in a description of your system's linker (not GNU ld)
14947 case $host_os in
14948 aix3*)
14949 allow_undefined_flag_F77=unsupported
14950 always_export_symbols_F77=yes
14951 archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
14952 # Note: this linker hardcodes the directories in LIBPATH if there
14953 # are no directories specified by -L.
14954 hardcode_minus_L_F77=yes
14955 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
14956 # Neither direct hardcoding nor static linking is supported with a
14957 # broken collect2.
14958 hardcode_direct_F77=unsupported
14959 fi
14960 ;;
14961
14962 aix[4-9]*)
14963 if test "$host_cpu" = ia64; then
14964 # On IA64, the linker does run time linking by default, so we don't
14965 # have to do anything special.
14966 aix_use_runtimelinking=no
14967 exp_sym_flag='-Bexport'
14968 no_entry_flag=""
14969 else
14970 # If we're using GNU nm, then we don't want the "-C" option.
14971 # -C means demangle to AIX nm, but means don't demangle with GNU nm
14972 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
14973 export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
14974 else
14975 export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
14976 fi
14977 aix_use_runtimelinking=no
14978
14979 # Test if we are trying to use run time linking or normal
14980 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
14981 # need to do runtime linking.
14982 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
14983 for ld_flag in $LDFLAGS; do
14984 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
14985 aix_use_runtimelinking=yes
14986 break
14987 fi
14988 done
14989 ;;
14990 esac
14991
14992 exp_sym_flag='-bexport'
14993 no_entry_flag='-bnoentry'
14994 fi
14995
14996 # When large executables or shared objects are built, AIX ld can
14997 # have problems creating the table of contents. If linking a library
14998 # or program results in "error TOC overflow" add -mminimal-toc to
14999 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
15000 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
15001
15002 archive_cmds_F77=''
15003 hardcode_direct_F77=yes
15004 hardcode_libdir_separator_F77=':'
15005 link_all_deplibs_F77=yes
15006
15007 if test "$GCC" = yes; then
15008 case $host_os in aix4.[012]|aix4.[012].*)
15009 # We only want to do this on AIX 4.2 and lower, the check
15010 # below for broken collect2 doesn't work under 4.3+
15011 collect2name=`${CC} -print-prog-name=collect2`
15012 if test -f "$collect2name" && \
15013 strings "$collect2name" | grep resolve_lib_name >/dev/null
15014 then
15015 # We have reworked collect2
15016 :
15017 else
15018 # We have old collect2
15019 hardcode_direct_F77=unsupported
15020 # It fails to find uninstalled libraries when the uninstalled
15021 # path is not listed in the libpath. Setting hardcode_minus_L
15022 # to unsupported forces relinking
15023 hardcode_minus_L_F77=yes
15024 hardcode_libdir_flag_spec_F77='-L$libdir'
15025 hardcode_libdir_separator_F77=
15026 fi
15027 ;;
15028 esac
15029 shared_flag='-shared'
15030 if test "$aix_use_runtimelinking" = yes; then
15031 shared_flag="$shared_flag "'${wl}-G'
15032 fi
15033 else
15034 # not using gcc
15035 if test "$host_cpu" = ia64; then
15036 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
15037 # chokes on -Wl,-G. The following line is correct:
15038 shared_flag='-G'
15039 else
15040 if test "$aix_use_runtimelinking" = yes; then
15041 shared_flag='${wl}-G'
15042 else
15043 shared_flag='${wl}-bM:SRE'
15044 fi
15045 fi
15046 fi
15047
15048 # It seems that -bexpall does not export symbols beginning with
15049 # underscore (_), so it is better to generate a list of symbols to export.
15050 always_export_symbols_F77=yes
15051 if test "$aix_use_runtimelinking" = yes; then
15052 # Warning - without using the other runtime loading flags (-brtl),
15053 # -berok will link without error, but may produce a broken library.
15054 allow_undefined_flag_F77='-berok'
15055 # Determine the default libpath from the value encoded in an empty executable.
15056 cat >conftest.$ac_ext <<_ACEOF
15057 program main
15058
15059 end
15060 _ACEOF
15061 rm -f conftest.$ac_objext conftest$ac_exeext
15062 if { (ac_try="$ac_link"
15063 case "(($ac_try" in
15064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15065 *) ac_try_echo=$ac_try;;
15066 esac
15067 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15068 (eval "$ac_link") 2>conftest.er1
15069 ac_status=$?
15070 grep -v '^ *+' conftest.er1 >conftest.err
15071 rm -f conftest.er1
15072 cat conftest.err >&5
15073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15074 (exit $ac_status); } && {
15075 test -z "$ac_f77_werror_flag" ||
15076 test ! -s conftest.err
15077 } && test -s conftest$ac_exeext &&
15078 $as_test_x conftest$ac_exeext; then
15079
15080 lt_aix_libpath_sed='
15081 /Import File Strings/,/^$/ {
15082 /^0/ {
15083 s/^0 *\(.*\)$/\1/
15084 p
15085 }
15086 }'
15087 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15088 # Check for a 64-bit object if we didn't find anything.
15089 if test -z "$aix_libpath"; then
15090 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15091 fi
15092 else
15093 echo "$as_me: failed program was:" >&5
15094 sed 's/^/| /' conftest.$ac_ext >&5
15095
15096
15097 fi
15098
15099 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15100 conftest$ac_exeext conftest.$ac_ext
15101 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
15102
15103 hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
15104 archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
15105 else
15106 if test "$host_cpu" = ia64; then
15107 hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
15108 allow_undefined_flag_F77="-z nodefs"
15109 archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
15110 else
15111 # Determine the default libpath from the value encoded in an empty executable.
15112 cat >conftest.$ac_ext <<_ACEOF
15113 program main
15114
15115 end
15116 _ACEOF
15117 rm -f conftest.$ac_objext conftest$ac_exeext
15118 if { (ac_try="$ac_link"
15119 case "(($ac_try" in
15120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15121 *) ac_try_echo=$ac_try;;
15122 esac
15123 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15124 (eval "$ac_link") 2>conftest.er1
15125 ac_status=$?
15126 grep -v '^ *+' conftest.er1 >conftest.err
15127 rm -f conftest.er1
15128 cat conftest.err >&5
15129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15130 (exit $ac_status); } && {
15131 test -z "$ac_f77_werror_flag" ||
15132 test ! -s conftest.err
15133 } && test -s conftest$ac_exeext &&
15134 $as_test_x conftest$ac_exeext; then
15135
15136 lt_aix_libpath_sed='
15137 /Import File Strings/,/^$/ {
15138 /^0/ {
15139 s/^0 *\(.*\)$/\1/
15140 p
15141 }
15142 }'
15143 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15144 # Check for a 64-bit object if we didn't find anything.
15145 if test -z "$aix_libpath"; then
15146 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
15147 fi
15148 else
15149 echo "$as_me: failed program was:" >&5
15150 sed 's/^/| /' conftest.$ac_ext >&5
15151
15152
15153 fi
15154
15155 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15156 conftest$ac_exeext conftest.$ac_ext
15157 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
15158
15159 hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
15160 # Warning - without using the other run time loading flags,
15161 # -berok will link without error, but may produce a broken library.
15162 no_undefined_flag_F77=' ${wl}-bernotok'
15163 allow_undefined_flag_F77=' ${wl}-berok'
15164 # Exported symbols can be pulled into shared objects from archives
15165 whole_archive_flag_spec_F77='$convenience'
15166 archive_cmds_need_lc_F77=yes
15167 # This is similar to how AIX traditionally builds its shared libraries.
15168 archive_expsym_cmds_F77="\$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'
15169 fi
15170 fi
15171 ;;
15172
15173 amigaos*)
15174 archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
15175 hardcode_libdir_flag_spec_F77='-L$libdir'
15176 hardcode_minus_L_F77=yes
15177 # see comment about different semantics on the GNU ld section
15178 ld_shlibs_F77=no
15179 ;;
15180
15181 bsdi[45]*)
15182 export_dynamic_flag_spec_F77=-rdynamic
15183 ;;
15184
15185 cygwin* | mingw* | pw32*)
15186 # When not using gcc, we currently assume that we are using
15187 # Microsoft Visual C++.
15188 # hardcode_libdir_flag_spec is actually meaningless, as there is
15189 # no search path for DLLs.
15190 hardcode_libdir_flag_spec_F77=' '
15191 allow_undefined_flag_F77=unsupported
15192 # Tell ltmain to make .lib files, not .a files.
15193 libext=lib
15194 # Tell ltmain to make .dll files, not .so files.
15195 shrext_cmds=".dll"
15196 # FIXME: Setting linknames here is a bad hack.
15197 archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
15198 # The linker will automatically build a .lib file if we build a DLL.
15199 old_archive_From_new_cmds_F77='true'
15200 # FIXME: Should let the user specify the lib program.
15201 old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs'
15202 fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
15203 enable_shared_with_static_runtimes_F77=yes
15204 ;;
15205
15206 darwin* | rhapsody*)
15207 case $host_os in
15208 rhapsody* | darwin1.[012])
15209 allow_undefined_flag_F77='${wl}-undefined ${wl}suppress'
15210 ;;
15211 *) # Darwin 1.3 on
15212 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
15213 allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
15214 else
15215 case ${MACOSX_DEPLOYMENT_TARGET} in
15216 10.[012])
15217 allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
15218 ;;
15219 10.*)
15220 allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup'
15221 ;;
15222 esac
15223 fi
15224 ;;
15225 esac
15226 archive_cmds_need_lc_F77=no
15227 hardcode_direct_F77=no
15228 hardcode_automatic_F77=yes
15229 hardcode_shlibpath_var_F77=unsupported
15230 whole_archive_flag_spec_F77=''
15231 link_all_deplibs_F77=yes
15232 if test "$GCC" = yes ; then
15233 output_verbose_link_cmd='echo'
15234 archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
15235 module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
15236 archive_expsym_cmds_F77="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}"
15237 module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
15238 else
15239 case $cc_basename in
15240 xlc*)
15241 output_verbose_link_cmd='echo'
15242 archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
15243 module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
15244 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
15245 archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
15246 module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
15247 ;;
15248 *)
15249 ld_shlibs_F77=no
15250 ;;
15251 esac
15252 fi
15253 ;;
15254
15255 dgux*)
15256 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15257 hardcode_libdir_flag_spec_F77='-L$libdir'
15258 hardcode_shlibpath_var_F77=no
15259 ;;
15260
15261 freebsd1*)
15262 ld_shlibs_F77=no
15263 ;;
15264
15265 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
15266 # support. Future versions do this automatically, but an explicit c++rt0.o
15267 # does not break anything, and helps significantly (at the cost of a little
15268 # extra space).
15269 freebsd2.2*)
15270 archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
15271 hardcode_libdir_flag_spec_F77='-R$libdir'
15272 hardcode_direct_F77=yes
15273 hardcode_shlibpath_var_F77=no
15274 ;;
15275
15276 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
15277 freebsd2*)
15278 archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
15279 hardcode_direct_F77=yes
15280 hardcode_minus_L_F77=yes
15281 hardcode_shlibpath_var_F77=no
15282 ;;
15283
15284 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
15285 freebsd* | dragonfly*)
15286 archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
15287 hardcode_libdir_flag_spec_F77='-R$libdir'
15288 hardcode_direct_F77=yes
15289 hardcode_shlibpath_var_F77=no
15290 ;;
15291
15292 hpux9*)
15293 if test "$GCC" = yes; then
15294 archive_cmds_F77='$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'
15295 else
15296 archive_cmds_F77='$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'
15297 fi
15298 hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
15299 hardcode_libdir_separator_F77=:
15300 hardcode_direct_F77=yes
15301
15302 # hardcode_minus_L: Not really in the search PATH,
15303 # but as the default location of the library.
15304 hardcode_minus_L_F77=yes
15305 export_dynamic_flag_spec_F77='${wl}-E'
15306 ;;
15307
15308 hpux10*)
15309 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
15310 archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15311 else
15312 archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
15313 fi
15314 if test "$with_gnu_ld" = no; then
15315 hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
15316 hardcode_libdir_separator_F77=:
15317
15318 hardcode_direct_F77=yes
15319 export_dynamic_flag_spec_F77='${wl}-E'
15320
15321 # hardcode_minus_L: Not really in the search PATH,
15322 # but as the default location of the library.
15323 hardcode_minus_L_F77=yes
15324 fi
15325 ;;
15326
15327 hpux11*)
15328 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
15329 case $host_cpu in
15330 hppa*64*)
15331 archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
15332 ;;
15333 ia64*)
15334 archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
15335 ;;
15336 *)
15337 archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15338 ;;
15339 esac
15340 else
15341 case $host_cpu in
15342 hppa*64*)
15343 archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
15344 ;;
15345 ia64*)
15346 archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
15347 ;;
15348 *)
15349 archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15350 ;;
15351 esac
15352 fi
15353 if test "$with_gnu_ld" = no; then
15354 hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
15355 hardcode_libdir_separator_F77=:
15356
15357 case $host_cpu in
15358 hppa*64*|ia64*)
15359 hardcode_libdir_flag_spec_ld_F77='+b $libdir'
15360 hardcode_direct_F77=no
15361 hardcode_shlibpath_var_F77=no
15362 ;;
15363 *)
15364 hardcode_direct_F77=yes
15365 export_dynamic_flag_spec_F77='${wl}-E'
15366
15367 # hardcode_minus_L: Not really in the search PATH,
15368 # but as the default location of the library.
15369 hardcode_minus_L_F77=yes
15370 ;;
15371 esac
15372 fi
15373 ;;
15374
15375 irix5* | irix6* | nonstopux*)
15376 if test "$GCC" = yes; then
15377 archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
15378 else
15379 archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
15380 hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
15381 fi
15382 hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
15383 hardcode_libdir_separator_F77=:
15384 link_all_deplibs_F77=yes
15385 ;;
15386
15387 netbsd* | netbsdelf*-gnu)
15388 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
15389 archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
15390 else
15391 archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
15392 fi
15393 hardcode_libdir_flag_spec_F77='-R$libdir'
15394 hardcode_direct_F77=yes
15395 hardcode_shlibpath_var_F77=no
15396 ;;
15397
15398 newsos6)
15399 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15400 hardcode_direct_F77=yes
15401 hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
15402 hardcode_libdir_separator_F77=:
15403 hardcode_shlibpath_var_F77=no
15404 ;;
15405
15406 openbsd*)
15407 if test -f /usr/libexec/ld.so; then
15408 hardcode_direct_F77=yes
15409 hardcode_shlibpath_var_F77=no
15410 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
15411 archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
15412 archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
15413 hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
15414 export_dynamic_flag_spec_F77='${wl}-E'
15415 else
15416 case $host_os in
15417 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
15418 archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
15419 hardcode_libdir_flag_spec_F77='-R$libdir'
15420 ;;
15421 *)
15422 archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
15423 hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
15424 ;;
15425 esac
15426 fi
15427 else
15428 ld_shlibs_F77=no
15429 fi
15430 ;;
15431
15432 os2*)
15433 hardcode_libdir_flag_spec_F77='-L$libdir'
15434 hardcode_minus_L_F77=yes
15435 allow_undefined_flag_F77=unsupported
15436 archive_cmds_F77='$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'
15437 old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
15438 ;;
15439
15440 osf3*)
15441 if test "$GCC" = yes; then
15442 allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
15443 archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
15444 else
15445 allow_undefined_flag_F77=' -expect_unresolved \*'
15446 archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
15447 fi
15448 hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
15449 hardcode_libdir_separator_F77=:
15450 ;;
15451
15452 osf4* | osf5*) # as osf3* with the addition of -msym flag
15453 if test "$GCC" = yes; then
15454 allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
15455 archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
15456 hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
15457 else
15458 allow_undefined_flag_F77=' -expect_unresolved \*'
15459 archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
15460 archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
15461 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
15462
15463 # Both c and cxx compiler support -rpath directly
15464 hardcode_libdir_flag_spec_F77='-rpath $libdir'
15465 fi
15466 hardcode_libdir_separator_F77=:
15467 ;;
15468
15469 solaris*)
15470 no_undefined_flag_F77=' -z text'
15471 if test "$GCC" = yes; then
15472 wlarc='${wl}'
15473 archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
15474 archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
15475 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
15476 else
15477 wlarc=''
15478 archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
15479 archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
15480 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
15481 fi
15482 hardcode_libdir_flag_spec_F77='-R$libdir'
15483 hardcode_shlibpath_var_F77=no
15484 case $host_os in
15485 solaris2.[0-5] | solaris2.[0-5].*) ;;
15486 *)
15487 # The compiler driver will combine and reorder linker options,
15488 # but understands `-z linker_flag'. GCC discards it without `$wl',
15489 # but is careful enough not to reorder.
15490 # Supported since Solaris 2.6 (maybe 2.5.1?)
15491 if test "$GCC" = yes; then
15492 whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
15493 else
15494 whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract'
15495 fi
15496 ;;
15497 esac
15498 link_all_deplibs_F77=yes
15499 ;;
15500
15501 sunos4*)
15502 if test "x$host_vendor" = xsequent; then
15503 # Use $CC to link under sequent, because it throws in some extra .o
15504 # files that make .init and .fini sections work.
15505 archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
15506 else
15507 archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
15508 fi
15509 hardcode_libdir_flag_spec_F77='-L$libdir'
15510 hardcode_direct_F77=yes
15511 hardcode_minus_L_F77=yes
15512 hardcode_shlibpath_var_F77=no
15513 ;;
15514
15515 sysv4)
15516 case $host_vendor in
15517 sni)
15518 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15519 hardcode_direct_F77=yes # is this really true???
15520 ;;
15521 siemens)
15522 ## LD is ld it makes a PLAMLIB
15523 ## CC just makes a GrossModule.
15524 archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
15525 reload_cmds_F77='$CC -r -o $output$reload_objs'
15526 hardcode_direct_F77=no
15527 ;;
15528 motorola)
15529 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15530 hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
15531 ;;
15532 esac
15533 runpath_var='LD_RUN_PATH'
15534 hardcode_shlibpath_var_F77=no
15535 ;;
15536
15537 sysv4.3*)
15538 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15539 hardcode_shlibpath_var_F77=no
15540 export_dynamic_flag_spec_F77='-Bexport'
15541 ;;
15542
15543 sysv4*MP*)
15544 if test -d /usr/nec; then
15545 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15546 hardcode_shlibpath_var_F77=no
15547 runpath_var=LD_RUN_PATH
15548 hardcode_runpath_var=yes
15549 ld_shlibs_F77=yes
15550 fi
15551 ;;
15552
15553 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
15554 no_undefined_flag_F77='${wl}-z,text'
15555 archive_cmds_need_lc_F77=no
15556 hardcode_shlibpath_var_F77=no
15557 runpath_var='LD_RUN_PATH'
15558
15559 if test "$GCC" = yes; then
15560 archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15561 archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15562 else
15563 archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15564 archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15565 fi
15566 ;;
15567
15568 sysv5* | sco3.2v5* | sco5v6*)
15569 # Note: We can NOT use -z defs as we might desire, because we do not
15570 # link with -lc, and that would cause any symbols used from libc to
15571 # always be unresolved, which means just about no library would
15572 # ever link correctly. If we're not using GNU ld we use -z text
15573 # though, which does catch some bad symbols but isn't as heavy-handed
15574 # as -z defs.
15575 no_undefined_flag_F77='${wl}-z,text'
15576 allow_undefined_flag_F77='${wl}-z,nodefs'
15577 archive_cmds_need_lc_F77=no
15578 hardcode_shlibpath_var_F77=no
15579 hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
15580 hardcode_libdir_separator_F77=':'
15581 link_all_deplibs_F77=yes
15582 export_dynamic_flag_spec_F77='${wl}-Bexport'
15583 runpath_var='LD_RUN_PATH'
15584
15585 if test "$GCC" = yes; then
15586 archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
15587 archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
15588 else
15589 archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
15590 archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
15591 fi
15592 ;;
15593
15594 uts4*)
15595 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15596 hardcode_libdir_flag_spec_F77='-L$libdir'
15597 hardcode_shlibpath_var_F77=no
15598 ;;
15599
15600 *)
15601 ld_shlibs_F77=no
15602 ;;
15603 esac
15604 fi
15605
15606 { echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
15607 echo "${ECHO_T}$ld_shlibs_F77" >&6; }
15608 test "$ld_shlibs_F77" = no && can_build_shared=no
15609
15610 #
15611 # Do we need to explicitly link libc?
15612 #
15613 case "x$archive_cmds_need_lc_F77" in
15614 x|xyes)
15615 # Assume -lc should be added
15616 archive_cmds_need_lc_F77=yes
15617
15618 if test "$enable_shared" = yes && test "$GCC" = yes; then
15619 case $archive_cmds_F77 in
15620 *'~'*)
15621 # FIXME: we may have to deal with multi-command sequences.
15622 ;;
15623 '$CC '*)
15624 # Test whether the compiler implicitly links with -lc since on some
15625 # systems, -lgcc has to come before -lc. If gcc already passes -lc
15626 # to ld, don't add -lc before -lgcc.
15627 { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
15628 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
15629 $rm conftest*
15630 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
15631
15632 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15633 (eval $ac_compile) 2>&5
15634 ac_status=$?
15635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15636 (exit $ac_status); } 2>conftest.err; then
15637 soname=conftest
15638 lib=conftest
15639 libobjs=conftest.$ac_objext
15640 deplibs=
15641 wl=$lt_prog_compiler_wl_F77
15642 pic_flag=$lt_prog_compiler_pic_F77
15643 compiler_flags=-v
15644 linker_flags=-v
15645 verstring=
15646 output_objdir=.
15647 libname=conftest
15648 lt_save_allow_undefined_flag=$allow_undefined_flag_F77
15649 allow_undefined_flag_F77=
15650 if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
15651 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
15652 ac_status=$?
15653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15654 (exit $ac_status); }
15655 then
15656 archive_cmds_need_lc_F77=no
15657 else
15658 archive_cmds_need_lc_F77=yes
15659 fi
15660 allow_undefined_flag_F77=$lt_save_allow_undefined_flag
15661 else
15662 cat conftest.err 1>&5
15663 fi
15664 $rm conftest*
15665 { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
15666 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; }
15667 ;;
15668 esac
15669 fi
15670 ;;
15671 esac
15672
15673 { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
15674 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
15675 library_names_spec=
15676 libname_spec='lib$name'
15677 soname_spec=
15678 shrext_cmds=".so"
15679 postinstall_cmds=
15680 postuninstall_cmds=
15681 finish_cmds=
15682 finish_eval=
15683 shlibpath_var=
15684 shlibpath_overrides_runpath=unknown
15685 version_type=none
15686 dynamic_linker="$host_os ld.so"
15687 sys_lib_dlsearch_path_spec="/lib /usr/lib"
15688
15689 need_lib_prefix=unknown
15690 hardcode_into_libs=no
15691
15692 # when you set need_version to no, make sure it does not cause -set_version
15693 # flags to be left without arguments
15694 need_version=unknown
15695
15696 case $host_os in
15697 aix3*)
15698 version_type=linux
15699 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
15700 shlibpath_var=LIBPATH
15701
15702 # AIX 3 has no versioning support, so we append a major version to the name.
15703 soname_spec='${libname}${release}${shared_ext}$major'
15704 ;;
15705
15706 aix[4-9]*)
15707 version_type=linux
15708 need_lib_prefix=no
15709 need_version=no
15710 hardcode_into_libs=yes
15711 if test "$host_cpu" = ia64; then
15712 # AIX 5 supports IA64
15713 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
15714 shlibpath_var=LD_LIBRARY_PATH
15715 else
15716 # With GCC up to 2.95.x, collect2 would create an import file
15717 # for dependence libraries. The import file would start with
15718 # the line `#! .'. This would cause the generated library to
15719 # depend on `.', always an invalid library. This was fixed in
15720 # development snapshots of GCC prior to 3.0.
15721 case $host_os in
15722 aix4 | aix4.[01] | aix4.[01].*)
15723 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
15724 echo ' yes '
15725 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
15726 :
15727 else
15728 can_build_shared=no
15729 fi
15730 ;;
15731 esac
15732 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
15733 # soname into executable. Probably we can add versioning support to
15734 # collect2, so additional links can be useful in future.
15735 if test "$aix_use_runtimelinking" = yes; then
15736 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
15737 # instead of lib<name>.a to let people know that these are not
15738 # typical AIX shared libraries.
15739 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15740 else
15741 # We preserve .a as extension for shared libraries through AIX4.2
15742 # and later when we are not doing run time linking.
15743 library_names_spec='${libname}${release}.a $libname.a'
15744 soname_spec='${libname}${release}${shared_ext}$major'
15745 fi
15746 shlibpath_var=LIBPATH
15747 fi
15748 ;;
15749
15750 amigaos*)
15751 library_names_spec='$libname.ixlibrary $libname.a'
15752 # Create ${libname}_ixlibrary.a entries in /sys/libs.
15753 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'
15754 ;;
15755
15756 beos*)
15757 library_names_spec='${libname}${shared_ext}'
15758 dynamic_linker="$host_os ld.so"
15759 shlibpath_var=LIBRARY_PATH
15760 ;;
15761
15762 bsdi[45]*)
15763 version_type=linux
15764 need_version=no
15765 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15766 soname_spec='${libname}${release}${shared_ext}$major'
15767 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
15768 shlibpath_var=LD_LIBRARY_PATH
15769 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
15770 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
15771 # the default ld.so.conf also contains /usr/contrib/lib and
15772 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
15773 # libtool to hard-code these into programs
15774 ;;
15775
15776 cygwin* | mingw* | pw32*)
15777 version_type=windows
15778 shrext_cmds=".dll"
15779 need_version=no
15780 need_lib_prefix=no
15781
15782 case $GCC,$host_os in
15783 yes,cygwin* | yes,mingw* | yes,pw32*)
15784 library_names_spec='$libname.dll.a'
15785 # DLL is installed to $(libdir)/../bin by postinstall_cmds
15786 postinstall_cmds='base_file=`basename \${file}`~
15787 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
15788 dldir=$destdir/`dirname \$dlpath`~
15789 test -d \$dldir || mkdir -p \$dldir~
15790 $install_prog $dir/$dlname \$dldir/$dlname~
15791 chmod a+x \$dldir/$dlname'
15792 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
15793 dlpath=$dir/\$dldll~
15794 $rm \$dlpath'
15795 shlibpath_overrides_runpath=yes
15796
15797 case $host_os in
15798 cygwin*)
15799 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
15800 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
15801 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
15802 ;;
15803 mingw*)
15804 # MinGW DLLs use traditional 'lib' prefix
15805 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
15806 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
15807 if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
15808 # It is most probably a Windows format PATH printed by
15809 # mingw gcc, but we are running on Cygwin. Gcc prints its search
15810 # path with ; separators, and with drive letters. We can handle the
15811 # drive letters (cygwin fileutils understands them), so leave them,
15812 # especially as we might pass files found there to a mingw objdump,
15813 # which wouldn't understand a cygwinified path. Ahh.
15814 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
15815 else
15816 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
15817 fi
15818 ;;
15819 pw32*)
15820 # pw32 DLLs use 'pw' prefix rather than 'lib'
15821 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
15822 ;;
15823 esac
15824 ;;
15825
15826 *)
15827 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
15828 ;;
15829 esac
15830 dynamic_linker='Win32 ld.exe'
15831 # FIXME: first we should search . and the directory the executable is in
15832 shlibpath_var=PATH
15833 ;;
15834
15835 darwin* | rhapsody*)
15836 dynamic_linker="$host_os dyld"
15837 version_type=darwin
15838 need_lib_prefix=no
15839 need_version=no
15840 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
15841 soname_spec='${libname}${release}${major}$shared_ext'
15842 shlibpath_overrides_runpath=yes
15843 shlibpath_var=DYLD_LIBRARY_PATH
15844 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
15845
15846 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
15847 ;;
15848
15849 dgux*)
15850 version_type=linux
15851 need_lib_prefix=no
15852 need_version=no
15853 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
15854 soname_spec='${libname}${release}${shared_ext}$major'
15855 shlibpath_var=LD_LIBRARY_PATH
15856 ;;
15857
15858 freebsd1*)
15859 dynamic_linker=no
15860 ;;
15861
15862 freebsd* | dragonfly*)
15863 # DragonFly does not have aout. When/if they implement a new
15864 # versioning mechanism, adjust this.
15865 if test -x /usr/bin/objformat; then
15866 objformat=`/usr/bin/objformat`
15867 else
15868 case $host_os in
15869 freebsd[123]*) objformat=aout ;;
15870 *) objformat=elf ;;
15871 esac
15872 fi
15873 version_type=freebsd-$objformat
15874 case $version_type in
15875 freebsd-elf*)
15876 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
15877 need_version=no
15878 need_lib_prefix=no
15879 ;;
15880 freebsd-*)
15881 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
15882 need_version=yes
15883 ;;
15884 esac
15885 shlibpath_var=LD_LIBRARY_PATH
15886 case $host_os in
15887 freebsd2*)
15888 shlibpath_overrides_runpath=yes
15889 ;;
15890 freebsd3.[01]* | freebsdelf3.[01]*)
15891 shlibpath_overrides_runpath=yes
15892 hardcode_into_libs=yes
15893 ;;
15894 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
15895 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
15896 shlibpath_overrides_runpath=no
15897 hardcode_into_libs=yes
15898 ;;
15899 *) # from 4.6 on, and DragonFly
15900 shlibpath_overrides_runpath=yes
15901 hardcode_into_libs=yes
15902 ;;
15903 esac
15904 ;;
15905
15906 gnu*)
15907 version_type=linux
15908 need_lib_prefix=no
15909 need_version=no
15910 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
15911 soname_spec='${libname}${release}${shared_ext}$major'
15912 shlibpath_var=LD_LIBRARY_PATH
15913 hardcode_into_libs=yes
15914 ;;
15915
15916 hpux9* | hpux10* | hpux11*)
15917 # Give a soname corresponding to the major version so that dld.sl refuses to
15918 # link against other versions.
15919 version_type=sunos
15920 need_lib_prefix=no
15921 need_version=no
15922 case $host_cpu in
15923 ia64*)
15924 shrext_cmds='.so'
15925 hardcode_into_libs=yes
15926 dynamic_linker="$host_os dld.so"
15927 shlibpath_var=LD_LIBRARY_PATH
15928 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
15929 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15930 soname_spec='${libname}${release}${shared_ext}$major'
15931 if test "X$HPUX_IA64_MODE" = X32; then
15932 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
15933 else
15934 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
15935 fi
15936 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15937 ;;
15938 hppa*64*)
15939 shrext_cmds='.sl'
15940 hardcode_into_libs=yes
15941 dynamic_linker="$host_os dld.sl"
15942 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
15943 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
15944 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15945 soname_spec='${libname}${release}${shared_ext}$major'
15946 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
15947 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15948 ;;
15949 *)
15950 shrext_cmds='.sl'
15951 dynamic_linker="$host_os dld.sl"
15952 shlibpath_var=SHLIB_PATH
15953 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
15954 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15955 soname_spec='${libname}${release}${shared_ext}$major'
15956 ;;
15957 esac
15958 # HP-UX runs *really* slowly unless shared libraries are mode 555.
15959 postinstall_cmds='chmod 555 $lib'
15960 ;;
15961
15962 interix[3-9]*)
15963 version_type=linux
15964 need_lib_prefix=no
15965 need_version=no
15966 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15967 soname_spec='${libname}${release}${shared_ext}$major'
15968 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
15969 shlibpath_var=LD_LIBRARY_PATH
15970 shlibpath_overrides_runpath=no
15971 hardcode_into_libs=yes
15972 ;;
15973
15974 irix5* | irix6* | nonstopux*)
15975 case $host_os in
15976 nonstopux*) version_type=nonstopux ;;
15977 *)
15978 if test "$lt_cv_prog_gnu_ld" = yes; then
15979 version_type=linux
15980 else
15981 version_type=irix
15982 fi ;;
15983 esac
15984 need_lib_prefix=no
15985 need_version=no
15986 soname_spec='${libname}${release}${shared_ext}$major'
15987 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
15988 case $host_os in
15989 irix5* | nonstopux*)
15990 libsuff= shlibsuff=
15991 ;;
15992 *)
15993 case $LD in # libtool.m4 will add one of these switches to LD
15994 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
15995 libsuff= shlibsuff= libmagic=32-bit;;
15996 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
15997 libsuff=32 shlibsuff=N32 libmagic=N32;;
15998 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
15999 libsuff=64 shlibsuff=64 libmagic=64-bit;;
16000 *) libsuff= shlibsuff= libmagic=never-match;;
16001 esac
16002 ;;
16003 esac
16004 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
16005 shlibpath_overrides_runpath=no
16006 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
16007 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
16008 hardcode_into_libs=yes
16009 ;;
16010
16011 # No shared lib support for Linux oldld, aout, or coff.
16012 linux*oldld* | linux*aout* | linux*coff*)
16013 dynamic_linker=no
16014 ;;
16015
16016 # This must be Linux ELF.
16017 linux* | k*bsd*-gnu)
16018 version_type=linux
16019 need_lib_prefix=no
16020 need_version=no
16021 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16022 soname_spec='${libname}${release}${shared_ext}$major'
16023 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
16024 shlibpath_var=LD_LIBRARY_PATH
16025 shlibpath_overrides_runpath=no
16026 # This implies no fast_install, which is unacceptable.
16027 # Some rework will be needed to allow for fast_install
16028 # before this can be enabled.
16029 hardcode_into_libs=yes
16030
16031 # Append ld.so.conf contents to the search path
16032 if test -f /etc/ld.so.conf; then
16033 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' ' '`
16034 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
16035 fi
16036
16037 # We used to test for /lib/ld.so.1 and disable shared libraries on
16038 # powerpc, because MkLinux only supported shared libraries with the
16039 # GNU dynamic linker. Since this was broken with cross compilers,
16040 # most powerpc-linux boxes support dynamic linking these days and
16041 # people can always --disable-shared, the test was removed, and we
16042 # assume the GNU/Linux dynamic linker is in use.
16043 dynamic_linker='GNU/Linux ld.so'
16044 ;;
16045
16046 netbsdelf*-gnu)
16047 version_type=linux
16048 need_lib_prefix=no
16049 need_version=no
16050 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
16051 soname_spec='${libname}${release}${shared_ext}$major'
16052 shlibpath_var=LD_LIBRARY_PATH
16053 shlibpath_overrides_runpath=no
16054 hardcode_into_libs=yes
16055 dynamic_linker='NetBSD ld.elf_so'
16056 ;;
16057
16058 netbsd*)
16059 version_type=sunos
16060 need_lib_prefix=no
16061 need_version=no
16062 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
16063 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
16064 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
16065 dynamic_linker='NetBSD (a.out) ld.so'
16066 else
16067 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
16068 soname_spec='${libname}${release}${shared_ext}$major'
16069 dynamic_linker='NetBSD ld.elf_so'
16070 fi
16071 shlibpath_var=LD_LIBRARY_PATH
16072 shlibpath_overrides_runpath=yes
16073 hardcode_into_libs=yes
16074 ;;
16075
16076 newsos6)
16077 version_type=linux
16078 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16079 shlibpath_var=LD_LIBRARY_PATH
16080 shlibpath_overrides_runpath=yes
16081 ;;
16082
16083 nto-qnx*)
16084 version_type=linux
16085 need_lib_prefix=no
16086 need_version=no
16087 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16088 soname_spec='${libname}${release}${shared_ext}$major'
16089 shlibpath_var=LD_LIBRARY_PATH
16090 shlibpath_overrides_runpath=yes
16091 ;;
16092
16093 openbsd*)
16094 version_type=sunos
16095 sys_lib_dlsearch_path_spec="/usr/lib"
16096 need_lib_prefix=no
16097 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
16098 case $host_os in
16099 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
16100 *) need_version=no ;;
16101 esac
16102 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
16103 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
16104 shlibpath_var=LD_LIBRARY_PATH
16105 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
16106 case $host_os in
16107 openbsd2.[89] | openbsd2.[89].*)
16108 shlibpath_overrides_runpath=no
16109 ;;
16110 *)
16111 shlibpath_overrides_runpath=yes
16112 ;;
16113 esac
16114 else
16115 shlibpath_overrides_runpath=yes
16116 fi
16117 ;;
16118
16119 os2*)
16120 libname_spec='$name'
16121 shrext_cmds=".dll"
16122 need_lib_prefix=no
16123 library_names_spec='$libname${shared_ext} $libname.a'
16124 dynamic_linker='OS/2 ld.exe'
16125 shlibpath_var=LIBPATH
16126 ;;
16127
16128 osf3* | osf4* | osf5*)
16129 version_type=osf
16130 need_lib_prefix=no
16131 need_version=no
16132 soname_spec='${libname}${release}${shared_ext}$major'
16133 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16134 shlibpath_var=LD_LIBRARY_PATH
16135 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
16136 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
16137 ;;
16138
16139 rdos*)
16140 dynamic_linker=no
16141 ;;
16142
16143 solaris*)
16144 version_type=linux
16145 need_lib_prefix=no
16146 need_version=no
16147 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16148 soname_spec='${libname}${release}${shared_ext}$major'
16149 shlibpath_var=LD_LIBRARY_PATH
16150 shlibpath_overrides_runpath=yes
16151 hardcode_into_libs=yes
16152 # ldd complains unless libraries are executable
16153 postinstall_cmds='chmod +x $lib'
16154 ;;
16155
16156 sunos4*)
16157 version_type=sunos
16158 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
16159 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
16160 shlibpath_var=LD_LIBRARY_PATH
16161 shlibpath_overrides_runpath=yes
16162 if test "$with_gnu_ld" = yes; then
16163 need_lib_prefix=no
16164 fi
16165 need_version=yes
16166 ;;
16167
16168 sysv4 | sysv4.3*)
16169 version_type=linux
16170 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16171 soname_spec='${libname}${release}${shared_ext}$major'
16172 shlibpath_var=LD_LIBRARY_PATH
16173 case $host_vendor in
16174 sni)
16175 shlibpath_overrides_runpath=no
16176 need_lib_prefix=no
16177 export_dynamic_flag_spec='${wl}-Blargedynsym'
16178 runpath_var=LD_RUN_PATH
16179 ;;
16180 siemens)
16181 need_lib_prefix=no
16182 ;;
16183 motorola)
16184 need_lib_prefix=no
16185 need_version=no
16186 shlibpath_overrides_runpath=no
16187 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
16188 ;;
16189 esac
16190 ;;
16191
16192 sysv4*MP*)
16193 if test -d /usr/nec ;then
16194 version_type=linux
16195 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
16196 soname_spec='$libname${shared_ext}.$major'
16197 shlibpath_var=LD_LIBRARY_PATH
16198 fi
16199 ;;
16200
16201 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
16202 version_type=freebsd-elf
16203 need_lib_prefix=no
16204 need_version=no
16205 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
16206 soname_spec='${libname}${release}${shared_ext}$major'
16207 shlibpath_var=LD_LIBRARY_PATH
16208 hardcode_into_libs=yes
16209 if test "$with_gnu_ld" = yes; then
16210 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
16211 shlibpath_overrides_runpath=no
16212 else
16213 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
16214 shlibpath_overrides_runpath=yes
16215 case $host_os in
16216 sco3.2v5*)
16217 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
16218 ;;
16219 esac
16220 fi
16221 sys_lib_dlsearch_path_spec='/usr/lib'
16222 ;;
16223
16224 uts4*)
16225 version_type=linux
16226 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
16227 soname_spec='${libname}${release}${shared_ext}$major'
16228 shlibpath_var=LD_LIBRARY_PATH
16229 ;;
16230
16231 *)
16232 dynamic_linker=no
16233 ;;
16234 esac
16235 { echo "$as_me:$LINENO: result: $dynamic_linker" >&5
16236 echo "${ECHO_T}$dynamic_linker" >&6; }
16237 test "$dynamic_linker" = no && can_build_shared=no
16238
16239 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
16240 echo $ECHO_N "(cached) $ECHO_C" >&6
16241 else
16242 lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
16243 fi
16244
16245 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
16246 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
16247 echo $ECHO_N "(cached) $ECHO_C" >&6
16248 else
16249 lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
16250 fi
16251
16252 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
16253
16254 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
16255 if test "$GCC" = yes; then
16256 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
16257 fi
16258
16259 { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
16260 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
16261 hardcode_action_F77=
16262 if test -n "$hardcode_libdir_flag_spec_F77" || \
16263 test -n "$runpath_var_F77" || \
16264 test "X$hardcode_automatic_F77" = "Xyes" ; then
16265
16266 # We can hardcode non-existant directories.
16267 if test "$hardcode_direct_F77" != no &&
16268 # If the only mechanism to avoid hardcoding is shlibpath_var, we
16269 # have to relink, otherwise we might link with an installed library
16270 # when we should be linking with a yet-to-be-installed one
16271 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
16272 test "$hardcode_minus_L_F77" != no; then
16273 # Linking always hardcodes the temporary library directory.
16274 hardcode_action_F77=relink
16275 else
16276 # We can link without hardcoding, and we can hardcode nonexisting dirs.
16277 hardcode_action_F77=immediate
16278 fi
16279 else
16280 # We cannot hardcode anything, or else we can only hardcode existing
16281 # directories.
16282 hardcode_action_F77=unsupported
16283 fi
16284 { echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
16285 echo "${ECHO_T}$hardcode_action_F77" >&6; }
16286
16287 if test "$hardcode_action_F77" = relink; then
16288 # Fast installation is not supported
16289 enable_fast_install=no
16290 elif test "$shlibpath_overrides_runpath" = yes ||
16291 test "$enable_shared" = no; then
16292 # Fast installation is not necessary
16293 enable_fast_install=needless
16294 fi
16295
16296
16297 # The else clause should only fire when bootstrapping the
16298 # libtool distribution, otherwise you forgot to ship ltmain.sh
16299 # with your package, and you will get complaints that there are
16300 # no rules to generate ltmain.sh.
16301 if test -f "$ltmain"; then
16302 # See if we are running on zsh, and set the options which allow our commands through
16303 # without removal of \ escapes.
16304 if test -n "${ZSH_VERSION+set}" ; then
16305 setopt NO_GLOB_SUBST
16306 fi
16307 # Now quote all the things that may contain metacharacters while being
16308 # careful not to overquote the AC_SUBSTed values. We take copies of the
16309 # variables and quote the copies for generation of the libtool script.
16310 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
16311 SED SHELL STRIP \
16312 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
16313 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
16314 deplibs_check_method reload_flag reload_cmds need_locks \
16315 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
16316 lt_cv_sys_global_symbol_to_c_name_address \
16317 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
16318 old_postinstall_cmds old_postuninstall_cmds \
16319 compiler_F77 \
16320 CC_F77 \
16321 LD_F77 \
16322 lt_prog_compiler_wl_F77 \
16323 lt_prog_compiler_pic_F77 \
16324 lt_prog_compiler_static_F77 \
16325 lt_prog_compiler_no_builtin_flag_F77 \
16326 export_dynamic_flag_spec_F77 \
16327 thread_safe_flag_spec_F77 \
16328 whole_archive_flag_spec_F77 \
16329 enable_shared_with_static_runtimes_F77 \
16330 old_archive_cmds_F77 \
16331 old_archive_from_new_cmds_F77 \
16332 predep_objects_F77 \
16333 postdep_objects_F77 \
16334 predeps_F77 \
16335 postdeps_F77 \
16336 compiler_lib_search_path_F77 \
16337 compiler_lib_search_dirs_F77 \
16338 archive_cmds_F77 \
16339 archive_expsym_cmds_F77 \
16340 postinstall_cmds_F77 \
16341 postuninstall_cmds_F77 \
16342 old_archive_from_expsyms_cmds_F77 \
16343 allow_undefined_flag_F77 \
16344 no_undefined_flag_F77 \
16345 export_symbols_cmds_F77 \
16346 hardcode_libdir_flag_spec_F77 \
16347 hardcode_libdir_flag_spec_ld_F77 \
16348 hardcode_libdir_separator_F77 \
16349 hardcode_automatic_F77 \
16350 module_cmds_F77 \
16351 module_expsym_cmds_F77 \
16352 lt_cv_prog_compiler_c_o_F77 \
16353 fix_srcfile_path_F77 \
16354 exclude_expsyms_F77 \
16355 include_expsyms_F77; do
16356
16357 case $var in
16358 old_archive_cmds_F77 | \
16359 old_archive_from_new_cmds_F77 | \
16360 archive_cmds_F77 | \
16361 archive_expsym_cmds_F77 | \
16362 module_cmds_F77 | \
16363 module_expsym_cmds_F77 | \
16364 old_archive_from_expsyms_cmds_F77 | \
16365 export_symbols_cmds_F77 | \
16366 extract_expsyms_cmds | reload_cmds | finish_cmds | \
16367 postinstall_cmds | postuninstall_cmds | \
16368 old_postinstall_cmds | old_postuninstall_cmds | \
16369 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
16370 # Double-quote double-evaled strings.
16371 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
16372 ;;
16373 *)
16374 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
16375 ;;
16376 esac
16377 done
16378
16379 case $lt_echo in
16380 *'\$0 --fallback-echo"')
16381 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
16382 ;;
16383 esac
16384
16385 cfgfile="$ofile"
16386
16387 cat <<__EOF__ >> "$cfgfile"
16388 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
16389
16390 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16391
16392 # Shell to use when invoking shell scripts.
16393 SHELL=$lt_SHELL
16394
16395 # Whether or not to build shared libraries.
16396 build_libtool_libs=$enable_shared
16397
16398 # Whether or not to build static libraries.
16399 build_old_libs=$enable_static
16400
16401 # Whether or not to add -lc for building shared libraries.
16402 build_libtool_need_lc=$archive_cmds_need_lc_F77
16403
16404 # Whether or not to disallow shared libs when runtime libs are static
16405 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
16406
16407 # Whether or not to optimize for fast installation.
16408 fast_install=$enable_fast_install
16409
16410 # The host system.
16411 host_alias=$host_alias
16412 host=$host
16413 host_os=$host_os
16414
16415 # The build system.
16416 build_alias=$build_alias
16417 build=$build
16418 build_os=$build_os
16419
16420 # An echo program that does not interpret backslashes.
16421 echo=$lt_echo
16422
16423 # The archiver.
16424 AR=$lt_AR
16425 AR_FLAGS=$lt_AR_FLAGS
16426
16427 # A C compiler.
16428 LTCC=$lt_LTCC
16429
16430 # LTCC compiler flags.
16431 LTCFLAGS=$lt_LTCFLAGS
16432
16433 # A language-specific compiler.
16434 CC=$lt_compiler_F77
16435
16436 # Is the compiler the GNU C compiler?
16437 with_gcc=$GCC_F77
16438
16439 # An ERE matcher.
16440 EGREP=$lt_EGREP
16441
16442 # The linker used to build libraries.
16443 LD=$lt_LD_F77
16444
16445 # Whether we need hard or soft links.
16446 LN_S=$lt_LN_S
16447
16448 # A BSD-compatible nm program.
16449 NM=$lt_NM
16450
16451 # A symbol stripping program
16452 STRIP=$lt_STRIP
16453
16454 # Used to examine libraries when file_magic_cmd begins "file"
16455 MAGIC_CMD=$MAGIC_CMD
16456
16457 # Used on cygwin: DLL creation program.
16458 DLLTOOL="$DLLTOOL"
16459
16460 # Used on cygwin: object dumper.
16461 OBJDUMP="$OBJDUMP"
16462
16463 # Used on cygwin: assembler.
16464 AS="$AS"
16465
16466 # The name of the directory that contains temporary libtool files.
16467 objdir=$objdir
16468
16469 # How to create reloadable object files.
16470 reload_flag=$lt_reload_flag
16471 reload_cmds=$lt_reload_cmds
16472
16473 # How to pass a linker flag through the compiler.
16474 wl=$lt_lt_prog_compiler_wl_F77
16475
16476 # Object file suffix (normally "o").
16477 objext="$ac_objext"
16478
16479 # Old archive suffix (normally "a").
16480 libext="$libext"
16481
16482 # Shared library suffix (normally ".so").
16483 shrext_cmds='$shrext_cmds'
16484
16485 # Executable file suffix (normally "").
16486 exeext="$exeext"
16487
16488 # Additional compiler flags for building library objects.
16489 pic_flag=$lt_lt_prog_compiler_pic_F77
16490 pic_mode=$pic_mode
16491
16492 # What is the maximum length of a command?
16493 max_cmd_len=$lt_cv_sys_max_cmd_len
16494
16495 # Does compiler simultaneously support -c and -o options?
16496 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
16497
16498 # Must we lock files when doing compilation?
16499 need_locks=$lt_need_locks
16500
16501 # Do we need the lib prefix for modules?
16502 need_lib_prefix=$need_lib_prefix
16503
16504 # Do we need a version for libraries?
16505 need_version=$need_version
16506
16507 # Whether dlopen is supported.
16508 dlopen_support=$enable_dlopen
16509
16510 # Whether dlopen of programs is supported.
16511 dlopen_self=$enable_dlopen_self
16512
16513 # Whether dlopen of statically linked programs is supported.
16514 dlopen_self_static=$enable_dlopen_self_static
16515
16516 # Compiler flag to prevent dynamic linking.
16517 link_static_flag=$lt_lt_prog_compiler_static_F77
16518
16519 # Compiler flag to turn off builtin functions.
16520 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
16521
16522 # Compiler flag to allow reflexive dlopens.
16523 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
16524
16525 # Compiler flag to generate shared objects directly from archives.
16526 whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
16527
16528 # Compiler flag to generate thread-safe objects.
16529 thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77
16530
16531 # Library versioning type.
16532 version_type=$version_type
16533
16534 # Format of library name prefix.
16535 libname_spec=$lt_libname_spec
16536
16537 # List of archive names. First name is the real one, the rest are links.
16538 # The last name is the one that the linker finds with -lNAME.
16539 library_names_spec=$lt_library_names_spec
16540
16541 # The coded name of the library, if different from the real name.
16542 soname_spec=$lt_soname_spec
16543
16544 # Commands used to build and install an old-style archive.
16545 RANLIB=$lt_RANLIB
16546 old_archive_cmds=$lt_old_archive_cmds_F77
16547 old_postinstall_cmds=$lt_old_postinstall_cmds
16548 old_postuninstall_cmds=$lt_old_postuninstall_cmds
16549
16550 # Create an old-style archive from a shared archive.
16551 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77
16552
16553 # Create a temporary old-style archive to link instead of a shared archive.
16554 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
16555
16556 # Commands used to build and install a shared archive.
16557 archive_cmds=$lt_archive_cmds_F77
16558 archive_expsym_cmds=$lt_archive_expsym_cmds_F77
16559 postinstall_cmds=$lt_postinstall_cmds
16560 postuninstall_cmds=$lt_postuninstall_cmds
16561
16562 # Commands used to build a loadable module (assumed same as above if empty)
16563 module_cmds=$lt_module_cmds_F77
16564 module_expsym_cmds=$lt_module_expsym_cmds_F77
16565
16566 # Commands to strip libraries.
16567 old_striplib=$lt_old_striplib
16568 striplib=$lt_striplib
16569
16570 # Dependencies to place before the objects being linked to create a
16571 # shared library.
16572 predep_objects=$lt_predep_objects_F77
16573
16574 # Dependencies to place after the objects being linked to create a
16575 # shared library.
16576 postdep_objects=$lt_postdep_objects_F77
16577
16578 # Dependencies to place before the objects being linked to create a
16579 # shared library.
16580 predeps=$lt_predeps_F77
16581
16582 # Dependencies to place after the objects being linked to create a
16583 # shared library.
16584 postdeps=$lt_postdeps_F77
16585
16586 # The directories searched by this compiler when creating a shared
16587 # library
16588 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77
16589
16590 # The library search path used internally by the compiler when linking
16591 # a shared library.
16592 compiler_lib_search_path=$lt_compiler_lib_search_path_F77
16593
16594 # Method to check whether dependent libraries are shared objects.
16595 deplibs_check_method=$lt_deplibs_check_method
16596
16597 # Command to use when deplibs_check_method == file_magic.
16598 file_magic_cmd=$lt_file_magic_cmd
16599
16600 # Flag that allows shared libraries with undefined symbols to be built.
16601 allow_undefined_flag=$lt_allow_undefined_flag_F77
16602
16603 # Flag that forces no undefined symbols.
16604 no_undefined_flag=$lt_no_undefined_flag_F77
16605
16606 # Commands used to finish a libtool library installation in a directory.
16607 finish_cmds=$lt_finish_cmds
16608
16609 # Same as above, but a single script fragment to be evaled but not shown.
16610 finish_eval=$lt_finish_eval
16611
16612 # Take the output of nm and produce a listing of raw symbols and C names.
16613 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
16614
16615 # Transform the output of nm in a proper C declaration
16616 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
16617
16618 # Transform the output of nm in a C name address pair
16619 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
16620
16621 # This is the shared library runtime path variable.
16622 runpath_var=$runpath_var
16623
16624 # This is the shared library path variable.
16625 shlibpath_var=$shlibpath_var
16626
16627 # Is shlibpath searched before the hard-coded library search path?
16628 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
16629
16630 # How to hardcode a shared library path into an executable.
16631 hardcode_action=$hardcode_action_F77
16632
16633 # Whether we should hardcode library paths into libraries.
16634 hardcode_into_libs=$hardcode_into_libs
16635
16636 # Flag to hardcode \$libdir into a binary during linking.
16637 # This must work even if \$libdir does not exist.
16638 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
16639
16640 # If ld is used when linking, flag to hardcode \$libdir into
16641 # a binary during linking. This must work even if \$libdir does
16642 # not exist.
16643 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77
16644
16645 # Whether we need a single -rpath flag with a separated argument.
16646 hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
16647
16648 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
16649 # resulting binary.
16650 hardcode_direct=$hardcode_direct_F77
16651
16652 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
16653 # resulting binary.
16654 hardcode_minus_L=$hardcode_minus_L_F77
16655
16656 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
16657 # the resulting binary.
16658 hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
16659
16660 # Set to yes if building a shared library automatically hardcodes DIR into the library
16661 # and all subsequent libraries and executables linked against it.
16662 hardcode_automatic=$hardcode_automatic_F77
16663
16664 # Variables whose values should be saved in libtool wrapper scripts and
16665 # restored at relink time.
16666 variables_saved_for_relink="$variables_saved_for_relink"
16667
16668 # Whether libtool must link a program against all its dependency libraries.
16669 link_all_deplibs=$link_all_deplibs_F77
16670
16671 # Compile-time system search path for libraries
16672 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
16673
16674 # Run-time system search path for libraries
16675 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
16676
16677 # Fix the shell variable \$srcfile for the compiler.
16678 fix_srcfile_path=$lt_fix_srcfile_path
16679
16680 # Set to yes if exported symbols are required.
16681 always_export_symbols=$always_export_symbols_F77
16682
16683 # The commands to list exported symbols.
16684 export_symbols_cmds=$lt_export_symbols_cmds_F77
16685
16686 # The commands to extract the exported symbol list from a shared archive.
16687 extract_expsyms_cmds=$lt_extract_expsyms_cmds
16688
16689 # Symbols that should not be listed in the preloaded symbols.
16690 exclude_expsyms=$lt_exclude_expsyms_F77
16691
16692 # Symbols that must always be exported.
16693 include_expsyms=$lt_include_expsyms_F77
16694
16695 # ### END LIBTOOL TAG CONFIG: $tagname
16696
16697 __EOF__
16698
16699
16700 else
16701 # If there is no Makefile yet, we rely on a make rule to execute
16702 # `config.status --recheck' to rerun these tests and create the
16703 # libtool script then.
16704 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
16705 if test -f "$ltmain_in"; then
16706 test -f Makefile && make "$ltmain"
16707 fi
16708 fi
16709
16710
16711 ac_ext=c
16712 ac_cpp='$CPP $CPPFLAGS'
16713 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16714 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16715 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16716
16717 CC="$lt_save_CC"
16718
16719 else
16720 tagname=""
16721 fi
16722 ;;
16723
16724 GCJ)
16725 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
16726
16727
16728 # Source file extension for Java test sources.
16729 ac_ext=java
16730
16731 # Object file extension for compiled Java test sources.
16732 objext=o
16733 objext_GCJ=$objext
16734
16735 # Code to be used in simple compile tests
16736 lt_simple_compile_test_code="class foo {}"
16737
16738 # Code to be used in simple link tests
16739 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
16740
16741 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
16742
16743 # If no C compiler was specified, use CC.
16744 LTCC=${LTCC-"$CC"}
16745
16746 # If no C compiler flags were specified, use CFLAGS.
16747 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
16748
16749 # Allow CC to be a program name with arguments.
16750 compiler=$CC
16751
16752
16753 # save warnings/boilerplate of simple test code
16754 ac_outfile=conftest.$ac_objext
16755 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
16756 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
16757 _lt_compiler_boilerplate=`cat conftest.err`
16758 $rm conftest*
16759
16760 ac_outfile=conftest.$ac_objext
16761 echo "$lt_simple_link_test_code" >conftest.$ac_ext
16762 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
16763 _lt_linker_boilerplate=`cat conftest.err`
16764 $rm -r conftest*
16765
16766
16767 # Allow CC to be a program name with arguments.
16768 lt_save_CC="$CC"
16769 CC=${GCJ-"gcj"}
16770 compiler=$CC
16771 compiler_GCJ=$CC
16772 for cc_temp in $compiler""; do
16773 case $cc_temp in
16774 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
16775 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
16776 \-*) ;;
16777 *) break;;
16778 esac
16779 done
16780 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
16781
16782
16783 # GCJ did not exist at the time GCC didn't implicitly link libc in.
16784 archive_cmds_need_lc_GCJ=no
16785
16786 old_archive_cmds_GCJ=$old_archive_cmds
16787
16788
16789 lt_prog_compiler_no_builtin_flag_GCJ=
16790
16791 if test "$GCC" = yes; then
16792 lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
16793
16794
16795 { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
16796 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; }
16797 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
16798 echo $ECHO_N "(cached) $ECHO_C" >&6
16799 else
16800 lt_cv_prog_compiler_rtti_exceptions=no
16801 ac_outfile=conftest.$ac_objext
16802 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
16803 lt_compiler_flag="-fno-rtti -fno-exceptions"
16804 # Insert the option either (1) after the last *FLAGS variable, or
16805 # (2) before a word containing "conftest.", or (3) at the end.
16806 # Note that $ac_compile itself does not contain backslashes and begins
16807 # with a dollar sign (not a hyphen), so the echo should work correctly.
16808 # The option is referenced via a variable to avoid confusing sed.
16809 lt_compile=`echo "$ac_compile" | $SED \
16810 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16811 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16812 -e 's:$: $lt_compiler_flag:'`
16813 (eval echo "\"\$as_me:16814: $lt_compile\"" >&5)
16814 (eval "$lt_compile" 2>conftest.err)
16815 ac_status=$?
16816 cat conftest.err >&5
16817 echo "$as_me:16818: \$? = $ac_status" >&5
16818 if (exit $ac_status) && test -s "$ac_outfile"; then
16819 # The compiler can only warn and ignore the option if not recognized
16820 # So say no if there are warnings other than the usual output.
16821 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
16822 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16823 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
16824 lt_cv_prog_compiler_rtti_exceptions=yes
16825 fi
16826 fi
16827 $rm conftest*
16828
16829 fi
16830 { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
16831 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; }
16832
16833 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
16834 lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
16835 else
16836 :
16837 fi
16838
16839 fi
16840
16841 lt_prog_compiler_wl_GCJ=
16842 lt_prog_compiler_pic_GCJ=
16843 lt_prog_compiler_static_GCJ=
16844
16845 { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
16846 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
16847
16848 if test "$GCC" = yes; then
16849 lt_prog_compiler_wl_GCJ='-Wl,'
16850 lt_prog_compiler_static_GCJ='-static'
16851
16852 case $host_os in
16853 aix*)
16854 # All AIX code is PIC.
16855 if test "$host_cpu" = ia64; then
16856 # AIX 5 now supports IA64 processor
16857 lt_prog_compiler_static_GCJ='-Bstatic'
16858 fi
16859 ;;
16860
16861 amigaos*)
16862 # FIXME: we need at least 68020 code to build shared libraries, but
16863 # adding the `-m68020' flag to GCC prevents building anything better,
16864 # like `-m68040'.
16865 lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
16866 ;;
16867
16868 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
16869 # PIC is the default for these OSes.
16870 ;;
16871
16872 mingw* | cygwin* | pw32* | os2*)
16873 # This hack is so that the source file can tell whether it is being
16874 # built for inclusion in a dll (and should export symbols for example).
16875 # Although the cygwin gcc ignores -fPIC, still need this for old-style
16876 # (--disable-auto-import) libraries
16877
16878 ;;
16879
16880 darwin* | rhapsody*)
16881 # PIC is the default on this platform
16882 # Common symbols not allowed in MH_DYLIB files
16883 lt_prog_compiler_pic_GCJ='-fno-common'
16884 ;;
16885
16886 interix[3-9]*)
16887 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
16888 # Instead, we relocate shared libraries at runtime.
16889 ;;
16890
16891 msdosdjgpp*)
16892 # Just because we use GCC doesn't mean we suddenly get shared libraries
16893 # on systems that don't support them.
16894 lt_prog_compiler_can_build_shared_GCJ=no
16895 enable_shared=no
16896 ;;
16897
16898 sysv4*MP*)
16899 if test -d /usr/nec; then
16900 lt_prog_compiler_pic_GCJ=-Kconform_pic
16901 fi
16902 ;;
16903
16904 hpux*)
16905 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
16906 # not for PA HP-UX.
16907 case $host_cpu in
16908 hppa*64*|ia64*)
16909 # +Z the default
16910 ;;
16911 *)
16912 lt_prog_compiler_pic_GCJ='-fPIC'
16913 ;;
16914 esac
16915 ;;
16916
16917 *)
16918 lt_prog_compiler_pic_GCJ='-fPIC'
16919 ;;
16920 esac
16921 else
16922 # PORTME Check for flag to pass linker flags through the system compiler.
16923 case $host_os in
16924 aix*)
16925 lt_prog_compiler_wl_GCJ='-Wl,'
16926 if test "$host_cpu" = ia64; then
16927 # AIX 5 now supports IA64 processor
16928 lt_prog_compiler_static_GCJ='-Bstatic'
16929 else
16930 lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
16931 fi
16932 ;;
16933 darwin*)
16934 # PIC is the default on this platform
16935 # Common symbols not allowed in MH_DYLIB files
16936 case $cc_basename in
16937 xlc*)
16938 lt_prog_compiler_pic_GCJ='-qnocommon'
16939 lt_prog_compiler_wl_GCJ='-Wl,'
16940 ;;
16941 esac
16942 ;;
16943
16944 mingw* | cygwin* | pw32* | os2*)
16945 # This hack is so that the source file can tell whether it is being
16946 # built for inclusion in a dll (and should export symbols for example).
16947
16948 ;;
16949
16950 hpux9* | hpux10* | hpux11*)
16951 lt_prog_compiler_wl_GCJ='-Wl,'
16952 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
16953 # not for PA HP-UX.
16954 case $host_cpu in
16955 hppa*64*|ia64*)
16956 # +Z the default
16957 ;;
16958 *)
16959 lt_prog_compiler_pic_GCJ='+Z'
16960 ;;
16961 esac
16962 # Is there a better lt_prog_compiler_static that works with the bundled CC?
16963 lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'
16964 ;;
16965
16966 irix5* | irix6* | nonstopux*)
16967 lt_prog_compiler_wl_GCJ='-Wl,'
16968 # PIC (with -KPIC) is the default.
16969 lt_prog_compiler_static_GCJ='-non_shared'
16970 ;;
16971
16972 newsos6)
16973 lt_prog_compiler_pic_GCJ='-KPIC'
16974 lt_prog_compiler_static_GCJ='-Bstatic'
16975 ;;
16976
16977 linux* | k*bsd*-gnu)
16978 case $cc_basename in
16979 icc* | ecc*)
16980 lt_prog_compiler_wl_GCJ='-Wl,'
16981 lt_prog_compiler_pic_GCJ='-KPIC'
16982 lt_prog_compiler_static_GCJ='-static'
16983 ;;
16984 pgcc* | pgf77* | pgf90* | pgf95*)
16985 # Portland Group compilers (*not* the Pentium gcc compiler,
16986 # which looks to be a dead project)
16987 lt_prog_compiler_wl_GCJ='-Wl,'
16988 lt_prog_compiler_pic_GCJ='-fpic'
16989 lt_prog_compiler_static_GCJ='-Bstatic'
16990 ;;
16991 ccc*)
16992 lt_prog_compiler_wl_GCJ='-Wl,'
16993 # All Alpha code is PIC.
16994 lt_prog_compiler_static_GCJ='-non_shared'
16995 ;;
16996 *)
16997 case `$CC -V 2>&1 | sed 5q` in
16998 *Sun\ C*)
16999 # Sun C 5.9
17000 lt_prog_compiler_pic_GCJ='-KPIC'
17001 lt_prog_compiler_static_GCJ='-Bstatic'
17002 lt_prog_compiler_wl_GCJ='-Wl,'
17003 ;;
17004 *Sun\ F*)
17005 # Sun Fortran 8.3 passes all unrecognized flags to the linker
17006 lt_prog_compiler_pic_GCJ='-KPIC'
17007 lt_prog_compiler_static_GCJ='-Bstatic'
17008 lt_prog_compiler_wl_GCJ=''
17009 ;;
17010 esac
17011 ;;
17012 esac
17013 ;;
17014
17015 osf3* | osf4* | osf5*)
17016 lt_prog_compiler_wl_GCJ='-Wl,'
17017 # All OSF/1 code is PIC.
17018 lt_prog_compiler_static_GCJ='-non_shared'
17019 ;;
17020
17021 rdos*)
17022 lt_prog_compiler_static_GCJ='-non_shared'
17023 ;;
17024
17025 solaris*)
17026 lt_prog_compiler_pic_GCJ='-KPIC'
17027 lt_prog_compiler_static_GCJ='-Bstatic'
17028 case $cc_basename in
17029 f77* | f90* | f95*)
17030 lt_prog_compiler_wl_GCJ='-Qoption ld ';;
17031 *)
17032 lt_prog_compiler_wl_GCJ='-Wl,';;
17033 esac
17034 ;;
17035
17036 sunos4*)
17037 lt_prog_compiler_wl_GCJ='-Qoption ld '
17038 lt_prog_compiler_pic_GCJ='-PIC'
17039 lt_prog_compiler_static_GCJ='-Bstatic'
17040 ;;
17041
17042 sysv4 | sysv4.2uw2* | sysv4.3*)
17043 lt_prog_compiler_wl_GCJ='-Wl,'
17044 lt_prog_compiler_pic_GCJ='-KPIC'
17045 lt_prog_compiler_static_GCJ='-Bstatic'
17046 ;;
17047
17048 sysv4*MP*)
17049 if test -d /usr/nec ;then
17050 lt_prog_compiler_pic_GCJ='-Kconform_pic'
17051 lt_prog_compiler_static_GCJ='-Bstatic'
17052 fi
17053 ;;
17054
17055 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
17056 lt_prog_compiler_wl_GCJ='-Wl,'
17057 lt_prog_compiler_pic_GCJ='-KPIC'
17058 lt_prog_compiler_static_GCJ='-Bstatic'
17059 ;;
17060
17061 unicos*)
17062 lt_prog_compiler_wl_GCJ='-Wl,'
17063 lt_prog_compiler_can_build_shared_GCJ=no
17064 ;;
17065
17066 uts4*)
17067 lt_prog_compiler_pic_GCJ='-pic'
17068 lt_prog_compiler_static_GCJ='-Bstatic'
17069 ;;
17070
17071 *)
17072 lt_prog_compiler_can_build_shared_GCJ=no
17073 ;;
17074 esac
17075 fi
17076
17077 { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
17078 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; }
17079
17080 #
17081 # Check to make sure the PIC flag actually works.
17082 #
17083 if test -n "$lt_prog_compiler_pic_GCJ"; then
17084
17085 { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
17086 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; }
17087 if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then
17088 echo $ECHO_N "(cached) $ECHO_C" >&6
17089 else
17090 lt_cv_prog_compiler_pic_works_GCJ=no
17091 ac_outfile=conftest.$ac_objext
17092 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
17093 lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
17094 # Insert the option either (1) after the last *FLAGS variable, or
17095 # (2) before a word containing "conftest.", or (3) at the end.
17096 # Note that $ac_compile itself does not contain backslashes and begins
17097 # with a dollar sign (not a hyphen), so the echo should work correctly.
17098 # The option is referenced via a variable to avoid confusing sed.
17099 lt_compile=`echo "$ac_compile" | $SED \
17100 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
17101 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
17102 -e 's:$: $lt_compiler_flag:'`
17103 (eval echo "\"\$as_me:17104: $lt_compile\"" >&5)
17104 (eval "$lt_compile" 2>conftest.err)
17105 ac_status=$?
17106 cat conftest.err >&5
17107 echo "$as_me:17108: \$? = $ac_status" >&5
17108 if (exit $ac_status) && test -s "$ac_outfile"; then
17109 # The compiler can only warn and ignore the option if not recognized
17110 # So say no if there are warnings other than the usual output.
17111 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
17112 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
17113 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
17114 lt_cv_prog_compiler_pic_works_GCJ=yes
17115 fi
17116 fi
17117 $rm conftest*
17118
17119 fi
17120 { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5
17121 echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_GCJ" >&6; }
17122
17123 if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then
17124 case $lt_prog_compiler_pic_GCJ in
17125 "" | " "*) ;;
17126 *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
17127 esac
17128 else
17129 lt_prog_compiler_pic_GCJ=
17130 lt_prog_compiler_can_build_shared_GCJ=no
17131 fi
17132
17133 fi
17134 case $host_os in
17135 # For platforms which do not support PIC, -DPIC is meaningless:
17136 *djgpp*)
17137 lt_prog_compiler_pic_GCJ=
17138 ;;
17139 *)
17140 lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ"
17141 ;;
17142 esac
17143
17144 #
17145 # Check to make sure the static flag actually works.
17146 #
17147 wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\"
17148 { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
17149 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
17150 if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then
17151 echo $ECHO_N "(cached) $ECHO_C" >&6
17152 else
17153 lt_cv_prog_compiler_static_works_GCJ=no
17154 save_LDFLAGS="$LDFLAGS"
17155 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
17156 echo "$lt_simple_link_test_code" > conftest.$ac_ext
17157 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
17158 # The linker can only warn and ignore the option if not recognized
17159 # So say no if there are warnings
17160 if test -s conftest.err; then
17161 # Append any errors to the config.log.
17162 cat conftest.err 1>&5
17163 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
17164 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
17165 if diff conftest.exp conftest.er2 >/dev/null; then
17166 lt_cv_prog_compiler_static_works_GCJ=yes
17167 fi
17168 else
17169 lt_cv_prog_compiler_static_works_GCJ=yes
17170 fi
17171 fi
17172 $rm -r conftest*
17173 LDFLAGS="$save_LDFLAGS"
17174
17175 fi
17176 { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_GCJ" >&5
17177 echo "${ECHO_T}$lt_cv_prog_compiler_static_works_GCJ" >&6; }
17178
17179 if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then
17180 :
17181 else
17182 lt_prog_compiler_static_GCJ=
17183 fi
17184
17185
17186 { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
17187 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
17188 if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
17189 echo $ECHO_N "(cached) $ECHO_C" >&6
17190 else
17191 lt_cv_prog_compiler_c_o_GCJ=no
17192 $rm -r conftest 2>/dev/null
17193 mkdir conftest
17194 cd conftest
17195 mkdir out
17196 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
17197
17198 lt_compiler_flag="-o out/conftest2.$ac_objext"
17199 # Insert the option either (1) after the last *FLAGS variable, or
17200 # (2) before a word containing "conftest.", or (3) at the end.
17201 # Note that $ac_compile itself does not contain backslashes and begins
17202 # with a dollar sign (not a hyphen), so the echo should work correctly.
17203 lt_compile=`echo "$ac_compile" | $SED \
17204 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
17205 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
17206 -e 's:$: $lt_compiler_flag:'`
17207 (eval echo "\"\$as_me:17208: $lt_compile\"" >&5)
17208 (eval "$lt_compile" 2>out/conftest.err)
17209 ac_status=$?
17210 cat out/conftest.err >&5
17211 echo "$as_me:17212: \$? = $ac_status" >&5
17212 if (exit $ac_status) && test -s out/conftest2.$ac_objext
17213 then
17214 # The compiler can only warn and ignore the option if not recognized
17215 # So say no if there are warnings
17216 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
17217 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
17218 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
17219 lt_cv_prog_compiler_c_o_GCJ=yes
17220 fi
17221 fi
17222 chmod u+w . 2>&5
17223 $rm conftest*
17224 # SGI C++ compiler will create directory out/ii_files/ for
17225 # template instantiation
17226 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
17227 $rm out/* && rmdir out
17228 cd ..
17229 rmdir conftest
17230 $rm conftest*
17231
17232 fi
17233 { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
17234 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; }
17235
17236
17237 hard_links="nottested"
17238 if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
17239 # do not overwrite the value of need_locks provided by the user
17240 { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
17241 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
17242 hard_links=yes
17243 $rm conftest*
17244 ln conftest.a conftest.b 2>/dev/null && hard_links=no
17245 touch conftest.a
17246 ln conftest.a conftest.b 2>&5 || hard_links=no
17247 ln conftest.a conftest.b 2>/dev/null && hard_links=no
17248 { echo "$as_me:$LINENO: result: $hard_links" >&5
17249 echo "${ECHO_T}$hard_links" >&6; }
17250 if test "$hard_links" = no; then
17251 { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
17252 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
17253 need_locks=warn
17254 fi
17255 else
17256 need_locks=no
17257 fi
17258
17259 { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
17260 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
17261
17262 runpath_var=
17263 allow_undefined_flag_GCJ=
17264 enable_shared_with_static_runtimes_GCJ=no
17265 archive_cmds_GCJ=
17266 archive_expsym_cmds_GCJ=
17267 old_archive_From_new_cmds_GCJ=
17268 old_archive_from_expsyms_cmds_GCJ=
17269 export_dynamic_flag_spec_GCJ=
17270 whole_archive_flag_spec_GCJ=
17271 thread_safe_flag_spec_GCJ=
17272 hardcode_libdir_flag_spec_GCJ=
17273 hardcode_libdir_flag_spec_ld_GCJ=
17274 hardcode_libdir_separator_GCJ=
17275 hardcode_direct_GCJ=no
17276 hardcode_minus_L_GCJ=no
17277 hardcode_shlibpath_var_GCJ=unsupported
17278 link_all_deplibs_GCJ=unknown
17279 hardcode_automatic_GCJ=no
17280 module_cmds_GCJ=
17281 module_expsym_cmds_GCJ=
17282 always_export_symbols_GCJ=no
17283 export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
17284 # include_expsyms should be a list of space-separated symbols to be *always*
17285 # included in the symbol list
17286 include_expsyms_GCJ=
17287 # exclude_expsyms can be an extended regexp of symbols to exclude
17288 # it will be wrapped by ` (' and `)$', so one must not match beginning or
17289 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
17290 # as well as any symbol that contains `d'.
17291 exclude_expsyms_GCJ='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
17292 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
17293 # platforms (ab)use it in PIC code, but their linkers get confused if
17294 # the symbol is explicitly referenced. Since portable code cannot
17295 # rely on this symbol name, it's probably fine to never include it in
17296 # preloaded symbol tables.
17297 # Exclude shared library initialization/finalization symbols.
17298 extract_expsyms_cmds=
17299 # Just being paranoid about ensuring that cc_basename is set.
17300 for cc_temp in $compiler""; do
17301 case $cc_temp in
17302 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
17303 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
17304 \-*) ;;
17305 *) break;;
17306 esac
17307 done
17308 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
17309
17310 case $host_os in
17311 cygwin* | mingw* | pw32*)
17312 # FIXME: the MSVC++ port hasn't been tested in a loooong time
17313 # When not using gcc, we currently assume that we are using
17314 # Microsoft Visual C++.
17315 if test "$GCC" != yes; then
17316 with_gnu_ld=no
17317 fi
17318 ;;
17319 interix*)
17320 # we just hope/assume this is gcc and not c89 (= MSVC++)
17321 with_gnu_ld=yes
17322 ;;
17323 openbsd*)
17324 with_gnu_ld=no
17325 ;;
17326 esac
17327
17328 ld_shlibs_GCJ=yes
17329 if test "$with_gnu_ld" = yes; then
17330 # If archive_cmds runs LD, not CC, wlarc should be empty
17331 wlarc='${wl}'
17332
17333 # Set some defaults for GNU ld with shared library support. These
17334 # are reset later if shared libraries are not supported. Putting them
17335 # here allows them to be overridden if necessary.
17336 runpath_var=LD_RUN_PATH
17337 hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
17338 export_dynamic_flag_spec_GCJ='${wl}--export-dynamic'
17339 # ancient GNU ld didn't support --whole-archive et. al.
17340 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
17341 whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
17342 else
17343 whole_archive_flag_spec_GCJ=
17344 fi
17345 supports_anon_versioning=no
17346 case `$LD -v 2>/dev/null` in
17347 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
17348 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
17349 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
17350 *\ 2.11.*) ;; # other 2.11 versions
17351 *) supports_anon_versioning=yes ;;
17352 esac
17353
17354 # See if GNU ld supports shared libraries.
17355 case $host_os in
17356 aix[3-9]*)
17357 # On AIX/PPC, the GNU linker is very broken
17358 if test "$host_cpu" != ia64; then
17359 ld_shlibs_GCJ=no
17360 cat <<EOF 1>&2
17361
17362 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
17363 *** to be unable to reliably create shared libraries on AIX.
17364 *** Therefore, libtool is disabling shared libraries support. If you
17365 *** really care for shared libraries, you may want to modify your PATH
17366 *** so that a non-GNU linker is found, and then restart.
17367
17368 EOF
17369 fi
17370 ;;
17371
17372 amigaos*)
17373 archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
17374 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17375 hardcode_minus_L_GCJ=yes
17376
17377 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
17378 # that the semantics of dynamic libraries on AmigaOS, at least up
17379 # to version 4, is to share data among multiple programs linked
17380 # with the same dynamic library. Since this doesn't match the
17381 # behavior of shared libraries on other platforms, we can't use
17382 # them.
17383 ld_shlibs_GCJ=no
17384 ;;
17385
17386 beos*)
17387 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
17388 allow_undefined_flag_GCJ=unsupported
17389 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
17390 # support --undefined. This deserves some investigation. FIXME
17391 archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17392 else
17393 ld_shlibs_GCJ=no
17394 fi
17395 ;;
17396
17397 cygwin* | mingw* | pw32*)
17398 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
17399 # as there is no search path for DLLs.
17400 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17401 allow_undefined_flag_GCJ=unsupported
17402 always_export_symbols_GCJ=no
17403 enable_shared_with_static_runtimes_GCJ=yes
17404 export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
17405
17406 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
17407 archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
17408 # If the export-symbols file already is a .def file (1st line
17409 # is EXPORTS), use it as is; otherwise, prepend...
17410 archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
17411 cp $export_symbols $output_objdir/$soname.def;
17412 else
17413 echo EXPORTS > $output_objdir/$soname.def;
17414 cat $export_symbols >> $output_objdir/$soname.def;
17415 fi~
17416 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
17417 else
17418 ld_shlibs_GCJ=no
17419 fi
17420 ;;
17421
17422 interix[3-9]*)
17423 hardcode_direct_GCJ=no
17424 hardcode_shlibpath_var_GCJ=no
17425 hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
17426 export_dynamic_flag_spec_GCJ='${wl}-E'
17427 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
17428 # Instead, shared libraries are loaded at an image base (0x10000000 by
17429 # default) and relocated if they conflict, which is a slow very memory
17430 # consuming and fragmenting process. To avoid this, we pick a random,
17431 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
17432 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
17433 archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
17434 archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
17435 ;;
17436
17437 gnu* | linux* | k*bsd*-gnu)
17438 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
17439 tmp_addflag=
17440 case $cc_basename,$host_cpu in
17441 pgcc*) # Portland Group C compiler
17442 whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
17443 tmp_addflag=' $pic_flag'
17444 ;;
17445 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
17446 whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
17447 tmp_addflag=' $pic_flag -Mnomain' ;;
17448 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
17449 tmp_addflag=' -i_dynamic' ;;
17450 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
17451 tmp_addflag=' -i_dynamic -nofor_main' ;;
17452 ifc* | ifort*) # Intel Fortran compiler
17453 tmp_addflag=' -nofor_main' ;;
17454 esac
17455 case `$CC -V 2>&1 | sed 5q` in
17456 *Sun\ C*) # Sun C 5.9
17457 whole_archive_flag_spec_GCJ='${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'
17458 tmp_sharedflag='-G' ;;
17459 *Sun\ F*) # Sun Fortran 8.3
17460 tmp_sharedflag='-G' ;;
17461 *)
17462 tmp_sharedflag='-shared' ;;
17463 esac
17464 archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17465
17466 if test $supports_anon_versioning = yes; then
17467 archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
17468 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
17469 $echo "local: *; };" >> $output_objdir/$libname.ver~
17470 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
17471 fi
17472 link_all_deplibs_GCJ=no
17473 else
17474 ld_shlibs_GCJ=no
17475 fi
17476 ;;
17477
17478 netbsd* | netbsdelf*-gnu)
17479 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
17480 archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
17481 wlarc=
17482 else
17483 archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17484 archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17485 fi
17486 ;;
17487
17488 solaris*)
17489 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
17490 ld_shlibs_GCJ=no
17491 cat <<EOF 1>&2
17492
17493 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
17494 *** create shared libraries on Solaris systems. Therefore, libtool
17495 *** is disabling shared libraries support. We urge you to upgrade GNU
17496 *** binutils to release 2.9.1 or newer. Another option is to modify
17497 *** your PATH or compiler configuration so that the native linker is
17498 *** used, and then restart.
17499
17500 EOF
17501 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
17502 archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17503 archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17504 else
17505 ld_shlibs_GCJ=no
17506 fi
17507 ;;
17508
17509 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
17510 case `$LD -v 2>&1` in
17511 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
17512 ld_shlibs_GCJ=no
17513 cat <<_LT_EOF 1>&2
17514
17515 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
17516 *** reliably create shared libraries on SCO systems. Therefore, libtool
17517 *** is disabling shared libraries support. We urge you to upgrade GNU
17518 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
17519 *** your PATH or compiler configuration so that the native linker is
17520 *** used, and then restart.
17521
17522 _LT_EOF
17523 ;;
17524 *)
17525 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
17526 hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
17527 archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
17528 archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
17529 else
17530 ld_shlibs_GCJ=no
17531 fi
17532 ;;
17533 esac
17534 ;;
17535
17536 sunos4*)
17537 archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
17538 wlarc=
17539 hardcode_direct_GCJ=yes
17540 hardcode_shlibpath_var_GCJ=no
17541 ;;
17542
17543 *)
17544 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
17545 archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17546 archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17547 else
17548 ld_shlibs_GCJ=no
17549 fi
17550 ;;
17551 esac
17552
17553 if test "$ld_shlibs_GCJ" = no; then
17554 runpath_var=
17555 hardcode_libdir_flag_spec_GCJ=
17556 export_dynamic_flag_spec_GCJ=
17557 whole_archive_flag_spec_GCJ=
17558 fi
17559 else
17560 # PORTME fill in a description of your system's linker (not GNU ld)
17561 case $host_os in
17562 aix3*)
17563 allow_undefined_flag_GCJ=unsupported
17564 always_export_symbols_GCJ=yes
17565 archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
17566 # Note: this linker hardcodes the directories in LIBPATH if there
17567 # are no directories specified by -L.
17568 hardcode_minus_L_GCJ=yes
17569 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
17570 # Neither direct hardcoding nor static linking is supported with a
17571 # broken collect2.
17572 hardcode_direct_GCJ=unsupported
17573 fi
17574 ;;
17575
17576 aix[4-9]*)
17577 if test "$host_cpu" = ia64; then
17578 # On IA64, the linker does run time linking by default, so we don't
17579 # have to do anything special.
17580 aix_use_runtimelinking=no
17581 exp_sym_flag='-Bexport'
17582 no_entry_flag=""
17583 else
17584 # If we're using GNU nm, then we don't want the "-C" option.
17585 # -C means demangle to AIX nm, but means don't demangle with GNU nm
17586 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
17587 export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
17588 else
17589 export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
17590 fi
17591 aix_use_runtimelinking=no
17592
17593 # Test if we are trying to use run time linking or normal
17594 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
17595 # need to do runtime linking.
17596 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
17597 for ld_flag in $LDFLAGS; do
17598 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
17599 aix_use_runtimelinking=yes
17600 break
17601 fi
17602 done
17603 ;;
17604 esac
17605
17606 exp_sym_flag='-bexport'
17607 no_entry_flag='-bnoentry'
17608 fi
17609
17610 # When large executables or shared objects are built, AIX ld can
17611 # have problems creating the table of contents. If linking a library
17612 # or program results in "error TOC overflow" add -mminimal-toc to
17613 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
17614 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
17615
17616 archive_cmds_GCJ=''
17617 hardcode_direct_GCJ=yes
17618 hardcode_libdir_separator_GCJ=':'
17619 link_all_deplibs_GCJ=yes
17620
17621 if test "$GCC" = yes; then
17622 case $host_os in aix4.[012]|aix4.[012].*)
17623 # We only want to do this on AIX 4.2 and lower, the check
17624 # below for broken collect2 doesn't work under 4.3+
17625 collect2name=`${CC} -print-prog-name=collect2`
17626 if test -f "$collect2name" && \
17627 strings "$collect2name" | grep resolve_lib_name >/dev/null
17628 then
17629 # We have reworked collect2
17630 :
17631 else
17632 # We have old collect2
17633 hardcode_direct_GCJ=unsupported
17634 # It fails to find uninstalled libraries when the uninstalled
17635 # path is not listed in the libpath. Setting hardcode_minus_L
17636 # to unsupported forces relinking
17637 hardcode_minus_L_GCJ=yes
17638 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17639 hardcode_libdir_separator_GCJ=
17640 fi
17641 ;;
17642 esac
17643 shared_flag='-shared'
17644 if test "$aix_use_runtimelinking" = yes; then
17645 shared_flag="$shared_flag "'${wl}-G'
17646 fi
17647 else
17648 # not using gcc
17649 if test "$host_cpu" = ia64; then
17650 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
17651 # chokes on -Wl,-G. The following line is correct:
17652 shared_flag='-G'
17653 else
17654 if test "$aix_use_runtimelinking" = yes; then
17655 shared_flag='${wl}-G'
17656 else
17657 shared_flag='${wl}-bM:SRE'
17658 fi
17659 fi
17660 fi
17661
17662 # It seems that -bexpall does not export symbols beginning with
17663 # underscore (_), so it is better to generate a list of symbols to export.
17664 always_export_symbols_GCJ=yes
17665 if test "$aix_use_runtimelinking" = yes; then
17666 # Warning - without using the other runtime loading flags (-brtl),
17667 # -berok will link without error, but may produce a broken library.
17668 allow_undefined_flag_GCJ='-berok'
17669 # Determine the default libpath from the value encoded in an empty executable.
17670 cat >conftest.$ac_ext <<_ACEOF
17671 /* confdefs.h. */
17672 _ACEOF
17673 cat confdefs.h >>conftest.$ac_ext
17674 cat >>conftest.$ac_ext <<_ACEOF
17675 /* end confdefs.h. */
17676
17677 int
17678 main ()
17679 {
17680
17681 ;
17682 return 0;
17683 }
17684 _ACEOF
17685 rm -f conftest.$ac_objext conftest$ac_exeext
17686 if { (ac_try="$ac_link"
17687 case "(($ac_try" in
17688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17689 *) ac_try_echo=$ac_try;;
17690 esac
17691 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17692 (eval "$ac_link") 2>conftest.er1
17693 ac_status=$?
17694 grep -v '^ *+' conftest.er1 >conftest.err
17695 rm -f conftest.er1
17696 cat conftest.err >&5
17697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17698 (exit $ac_status); } && {
17699 test -z "$ac_c_werror_flag" ||
17700 test ! -s conftest.err
17701 } && test -s conftest$ac_exeext &&
17702 $as_test_x conftest$ac_exeext; then
17703
17704 lt_aix_libpath_sed='
17705 /Import File Strings/,/^$/ {
17706 /^0/ {
17707 s/^0 *\(.*\)$/\1/
17708 p
17709 }
17710 }'
17711 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17712 # Check for a 64-bit object if we didn't find anything.
17713 if test -z "$aix_libpath"; then
17714 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17715 fi
17716 else
17717 echo "$as_me: failed program was:" >&5
17718 sed 's/^/| /' conftest.$ac_ext >&5
17719
17720
17721 fi
17722
17723 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17724 conftest$ac_exeext conftest.$ac_ext
17725 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
17726
17727 hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
17728 archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
17729 else
17730 if test "$host_cpu" = ia64; then
17731 hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'
17732 allow_undefined_flag_GCJ="-z nodefs"
17733 archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
17734 else
17735 # Determine the default libpath from the value encoded in an empty executable.
17736 cat >conftest.$ac_ext <<_ACEOF
17737 /* confdefs.h. */
17738 _ACEOF
17739 cat confdefs.h >>conftest.$ac_ext
17740 cat >>conftest.$ac_ext <<_ACEOF
17741 /* end confdefs.h. */
17742
17743 int
17744 main ()
17745 {
17746
17747 ;
17748 return 0;
17749 }
17750 _ACEOF
17751 rm -f conftest.$ac_objext conftest$ac_exeext
17752 if { (ac_try="$ac_link"
17753 case "(($ac_try" in
17754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17755 *) ac_try_echo=$ac_try;;
17756 esac
17757 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17758 (eval "$ac_link") 2>conftest.er1
17759 ac_status=$?
17760 grep -v '^ *+' conftest.er1 >conftest.err
17761 rm -f conftest.er1
17762 cat conftest.err >&5
17763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17764 (exit $ac_status); } && {
17765 test -z "$ac_c_werror_flag" ||
17766 test ! -s conftest.err
17767 } && test -s conftest$ac_exeext &&
17768 $as_test_x conftest$ac_exeext; then
17769
17770 lt_aix_libpath_sed='
17771 /Import File Strings/,/^$/ {
17772 /^0/ {
17773 s/^0 *\(.*\)$/\1/
17774 p
17775 }
17776 }'
17777 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17778 # Check for a 64-bit object if we didn't find anything.
17779 if test -z "$aix_libpath"; then
17780 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17781 fi
17782 else
17783 echo "$as_me: failed program was:" >&5
17784 sed 's/^/| /' conftest.$ac_ext >&5
17785
17786
17787 fi
17788
17789 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17790 conftest$ac_exeext conftest.$ac_ext
17791 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
17792
17793 hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
17794 # Warning - without using the other run time loading flags,
17795 # -berok will link without error, but may produce a broken library.
17796 no_undefined_flag_GCJ=' ${wl}-bernotok'
17797 allow_undefined_flag_GCJ=' ${wl}-berok'
17798 # Exported symbols can be pulled into shared objects from archives
17799 whole_archive_flag_spec_GCJ='$convenience'
17800 archive_cmds_need_lc_GCJ=yes
17801 # This is similar to how AIX traditionally builds its shared libraries.
17802 archive_expsym_cmds_GCJ="\$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'
17803 fi
17804 fi
17805 ;;
17806
17807 amigaos*)
17808 archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
17809 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17810 hardcode_minus_L_GCJ=yes
17811 # see comment about different semantics on the GNU ld section
17812 ld_shlibs_GCJ=no
17813 ;;
17814
17815 bsdi[45]*)
17816 export_dynamic_flag_spec_GCJ=-rdynamic
17817 ;;
17818
17819 cygwin* | mingw* | pw32*)
17820 # When not using gcc, we currently assume that we are using
17821 # Microsoft Visual C++.
17822 # hardcode_libdir_flag_spec is actually meaningless, as there is
17823 # no search path for DLLs.
17824 hardcode_libdir_flag_spec_GCJ=' '
17825 allow_undefined_flag_GCJ=unsupported
17826 # Tell ltmain to make .lib files, not .a files.
17827 libext=lib
17828 # Tell ltmain to make .dll files, not .so files.
17829 shrext_cmds=".dll"
17830 # FIXME: Setting linknames here is a bad hack.
17831 archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
17832 # The linker will automatically build a .lib file if we build a DLL.
17833 old_archive_From_new_cmds_GCJ='true'
17834 # FIXME: Should let the user specify the lib program.
17835 old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs'
17836 fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
17837 enable_shared_with_static_runtimes_GCJ=yes
17838 ;;
17839
17840 darwin* | rhapsody*)
17841 case $host_os in
17842 rhapsody* | darwin1.[012])
17843 allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress'
17844 ;;
17845 *) # Darwin 1.3 on
17846 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
17847 allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
17848 else
17849 case ${MACOSX_DEPLOYMENT_TARGET} in
17850 10.[012])
17851 allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
17852 ;;
17853 10.*)
17854 allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup'
17855 ;;
17856 esac
17857 fi
17858 ;;
17859 esac
17860 archive_cmds_need_lc_GCJ=no
17861 hardcode_direct_GCJ=no
17862 hardcode_automatic_GCJ=yes
17863 hardcode_shlibpath_var_GCJ=unsupported
17864 whole_archive_flag_spec_GCJ=''
17865 link_all_deplibs_GCJ=yes
17866 if test "$GCC" = yes ; then
17867 output_verbose_link_cmd='echo'
17868 archive_cmds_GCJ="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
17869 module_cmds_GCJ="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
17870 archive_expsym_cmds_GCJ="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}"
17871 module_expsym_cmds_GCJ="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
17872 else
17873 case $cc_basename in
17874 xlc*)
17875 output_verbose_link_cmd='echo'
17876 archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
17877 module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
17878 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
17879 archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
17880 module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
17881 ;;
17882 *)
17883 ld_shlibs_GCJ=no
17884 ;;
17885 esac
17886 fi
17887 ;;
17888
17889 dgux*)
17890 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17891 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17892 hardcode_shlibpath_var_GCJ=no
17893 ;;
17894
17895 freebsd1*)
17896 ld_shlibs_GCJ=no
17897 ;;
17898
17899 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
17900 # support. Future versions do this automatically, but an explicit c++rt0.o
17901 # does not break anything, and helps significantly (at the cost of a little
17902 # extra space).
17903 freebsd2.2*)
17904 archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
17905 hardcode_libdir_flag_spec_GCJ='-R$libdir'
17906 hardcode_direct_GCJ=yes
17907 hardcode_shlibpath_var_GCJ=no
17908 ;;
17909
17910 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
17911 freebsd2*)
17912 archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
17913 hardcode_direct_GCJ=yes
17914 hardcode_minus_L_GCJ=yes
17915 hardcode_shlibpath_var_GCJ=no
17916 ;;
17917
17918 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
17919 freebsd* | dragonfly*)
17920 archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
17921 hardcode_libdir_flag_spec_GCJ='-R$libdir'
17922 hardcode_direct_GCJ=yes
17923 hardcode_shlibpath_var_GCJ=no
17924 ;;
17925
17926 hpux9*)
17927 if test "$GCC" = yes; then
17928 archive_cmds_GCJ='$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'
17929 else
17930 archive_cmds_GCJ='$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'
17931 fi
17932 hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
17933 hardcode_libdir_separator_GCJ=:
17934 hardcode_direct_GCJ=yes
17935
17936 # hardcode_minus_L: Not really in the search PATH,
17937 # but as the default location of the library.
17938 hardcode_minus_L_GCJ=yes
17939 export_dynamic_flag_spec_GCJ='${wl}-E'
17940 ;;
17941
17942 hpux10*)
17943 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
17944 archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17945 else
17946 archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
17947 fi
17948 if test "$with_gnu_ld" = no; then
17949 hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
17950 hardcode_libdir_separator_GCJ=:
17951
17952 hardcode_direct_GCJ=yes
17953 export_dynamic_flag_spec_GCJ='${wl}-E'
17954
17955 # hardcode_minus_L: Not really in the search PATH,
17956 # but as the default location of the library.
17957 hardcode_minus_L_GCJ=yes
17958 fi
17959 ;;
17960
17961 hpux11*)
17962 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
17963 case $host_cpu in
17964 hppa*64*)
17965 archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17966 ;;
17967 ia64*)
17968 archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
17969 ;;
17970 *)
17971 archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17972 ;;
17973 esac
17974 else
17975 case $host_cpu in
17976 hppa*64*)
17977 archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17978 ;;
17979 ia64*)
17980 archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
17981 ;;
17982 *)
17983 archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17984 ;;
17985 esac
17986 fi
17987 if test "$with_gnu_ld" = no; then
17988 hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
17989 hardcode_libdir_separator_GCJ=:
17990
17991 case $host_cpu in
17992 hppa*64*|ia64*)
17993 hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
17994 hardcode_direct_GCJ=no
17995 hardcode_shlibpath_var_GCJ=no
17996 ;;
17997 *)
17998 hardcode_direct_GCJ=yes
17999 export_dynamic_flag_spec_GCJ='${wl}-E'
18000
18001 # hardcode_minus_L: Not really in the search PATH,
18002 # but as the default location of the library.
18003 hardcode_minus_L_GCJ=yes
18004 ;;
18005 esac
18006 fi
18007 ;;
18008
18009 irix5* | irix6* | nonstopux*)
18010 if test "$GCC" = yes; then
18011 archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
18012 else
18013 archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
18014 hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir'
18015 fi
18016 hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
18017 hardcode_libdir_separator_GCJ=:
18018 link_all_deplibs_GCJ=yes
18019 ;;
18020
18021 netbsd* | netbsdelf*-gnu)
18022 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
18023 archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
18024 else
18025 archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
18026 fi
18027 hardcode_libdir_flag_spec_GCJ='-R$libdir'
18028 hardcode_direct_GCJ=yes
18029 hardcode_shlibpath_var_GCJ=no
18030 ;;
18031
18032 newsos6)
18033 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
18034 hardcode_direct_GCJ=yes
18035 hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
18036 hardcode_libdir_separator_GCJ=:
18037 hardcode_shlibpath_var_GCJ=no
18038 ;;
18039
18040 openbsd*)
18041 if test -f /usr/libexec/ld.so; then
18042 hardcode_direct_GCJ=yes
18043 hardcode_shlibpath_var_GCJ=no
18044 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
18045 archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
18046 archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
18047 hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
18048 export_dynamic_flag_spec_GCJ='${wl}-E'
18049 else
18050 case $host_os in
18051 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
18052 archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
18053 hardcode_libdir_flag_spec_GCJ='-R$libdir'
18054 ;;
18055 *)
18056 archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
18057 hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
18058 ;;
18059 esac
18060 fi
18061 else
18062 ld_shlibs_GCJ=no
18063 fi
18064 ;;
18065
18066 os2*)
18067 hardcode_libdir_flag_spec_GCJ='-L$libdir'
18068 hardcode_minus_L_GCJ=yes
18069 allow_undefined_flag_GCJ=unsupported
18070 archive_cmds_GCJ='$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'
18071 old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
18072 ;;
18073
18074 osf3*)
18075 if test "$GCC" = yes; then
18076 allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
18077 archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
18078 else
18079 allow_undefined_flag_GCJ=' -expect_unresolved \*'
18080 archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
18081 fi
18082 hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
18083 hardcode_libdir_separator_GCJ=:
18084 ;;
18085
18086 osf4* | osf5*) # as osf3* with the addition of -msym flag
18087 if test "$GCC" = yes; then
18088 allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
18089 archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
18090 hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
18091 else
18092 allow_undefined_flag_GCJ=' -expect_unresolved \*'
18093 archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
18094 archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
18095 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
18096
18097 # Both c and cxx compiler support -rpath directly
18098 hardcode_libdir_flag_spec_GCJ='-rpath $libdir'
18099 fi
18100 hardcode_libdir_separator_GCJ=:
18101 ;;
18102
18103 solaris*)
18104 no_undefined_flag_GCJ=' -z text'
18105 if test "$GCC" = yes; then
18106 wlarc='${wl}'
18107 archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
18108 archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
18109 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
18110 else
18111 wlarc=''
18112 archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
18113 archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
18114 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
18115 fi
18116 hardcode_libdir_flag_spec_GCJ='-R$libdir'
18117 hardcode_shlibpath_var_GCJ=no
18118 case $host_os in
18119 solaris2.[0-5] | solaris2.[0-5].*) ;;
18120 *)
18121 # The compiler driver will combine and reorder linker options,
18122 # but understands `-z linker_flag'. GCC discards it without `$wl',
18123 # but is careful enough not to reorder.
18124 # Supported since Solaris 2.6 (maybe 2.5.1?)
18125 if test "$GCC" = yes; then
18126 whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
18127 else
18128 whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract'
18129 fi
18130 ;;
18131 esac
18132 link_all_deplibs_GCJ=yes
18133 ;;
18134
18135 sunos4*)
18136 if test "x$host_vendor" = xsequent; then
18137 # Use $CC to link under sequent, because it throws in some extra .o
18138 # files that make .init and .fini sections work.
18139 archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
18140 else
18141 archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
18142 fi
18143 hardcode_libdir_flag_spec_GCJ='-L$libdir'
18144 hardcode_direct_GCJ=yes
18145 hardcode_minus_L_GCJ=yes
18146 hardcode_shlibpath_var_GCJ=no
18147 ;;
18148
18149 sysv4)
18150 case $host_vendor in
18151 sni)
18152 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
18153 hardcode_direct_GCJ=yes # is this really true???
18154 ;;
18155 siemens)
18156 ## LD is ld it makes a PLAMLIB
18157 ## CC just makes a GrossModule.
18158 archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
18159 reload_cmds_GCJ='$CC -r -o $output$reload_objs'
18160 hardcode_direct_GCJ=no
18161 ;;
18162 motorola)
18163 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
18164 hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie
18165 ;;
18166 esac
18167 runpath_var='LD_RUN_PATH'
18168 hardcode_shlibpath_var_GCJ=no
18169 ;;
18170
18171 sysv4.3*)
18172 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
18173 hardcode_shlibpath_var_GCJ=no
18174 export_dynamic_flag_spec_GCJ='-Bexport'
18175 ;;
18176
18177 sysv4*MP*)
18178 if test -d /usr/nec; then
18179 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
18180 hardcode_shlibpath_var_GCJ=no
18181 runpath_var=LD_RUN_PATH
18182 hardcode_runpath_var=yes
18183 ld_shlibs_GCJ=yes
18184 fi
18185 ;;
18186
18187 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
18188 no_undefined_flag_GCJ='${wl}-z,text'
18189 archive_cmds_need_lc_GCJ=no
18190 hardcode_shlibpath_var_GCJ=no
18191 runpath_var='LD_RUN_PATH'
18192
18193 if test "$GCC" = yes; then
18194 archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18195 archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18196 else
18197 archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18198 archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
18199 fi
18200 ;;
18201
18202 sysv5* | sco3.2v5* | sco5v6*)
18203 # Note: We can NOT use -z defs as we might desire, because we do not
18204 # link with -lc, and that would cause any symbols used from libc to
18205 # always be unresolved, which means just about no library would
18206 # ever link correctly. If we're not using GNU ld we use -z text
18207 # though, which does catch some bad symbols but isn't as heavy-handed
18208 # as -z defs.
18209 no_undefined_flag_GCJ='${wl}-z,text'
18210 allow_undefined_flag_GCJ='${wl}-z,nodefs'
18211 archive_cmds_need_lc_GCJ=no
18212 hardcode_shlibpath_var_GCJ=no
18213 hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
18214 hardcode_libdir_separator_GCJ=':'
18215 link_all_deplibs_GCJ=yes
18216 export_dynamic_flag_spec_GCJ='${wl}-Bexport'
18217 runpath_var='LD_RUN_PATH'
18218
18219 if test "$GCC" = yes; then
18220 archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
18221 archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
18222 else
18223 archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
18224 archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
18225 fi
18226 ;;
18227
18228 uts4*)
18229 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
18230 hardcode_libdir_flag_spec_GCJ='-L$libdir'
18231 hardcode_shlibpath_var_GCJ=no
18232 ;;
18233
18234 *)
18235 ld_shlibs_GCJ=no
18236 ;;
18237 esac
18238 fi
18239
18240 { echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
18241 echo "${ECHO_T}$ld_shlibs_GCJ" >&6; }
18242 test "$ld_shlibs_GCJ" = no && can_build_shared=no
18243
18244 #
18245 # Do we need to explicitly link libc?
18246 #
18247 case "x$archive_cmds_need_lc_GCJ" in
18248 x|xyes)
18249 # Assume -lc should be added
18250 archive_cmds_need_lc_GCJ=yes
18251
18252 if test "$enable_shared" = yes && test "$GCC" = yes; then
18253 case $archive_cmds_GCJ in
18254 *'~'*)
18255 # FIXME: we may have to deal with multi-command sequences.
18256 ;;
18257 '$CC '*)
18258 # Test whether the compiler implicitly links with -lc since on some
18259 # systems, -lgcc has to come before -lc. If gcc already passes -lc
18260 # to ld, don't add -lc before -lgcc.
18261 { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
18262 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
18263 $rm conftest*
18264 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
18265
18266 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18267 (eval $ac_compile) 2>&5
18268 ac_status=$?
18269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18270 (exit $ac_status); } 2>conftest.err; then
18271 soname=conftest
18272 lib=conftest
18273 libobjs=conftest.$ac_objext
18274 deplibs=
18275 wl=$lt_prog_compiler_wl_GCJ
18276 pic_flag=$lt_prog_compiler_pic_GCJ
18277 compiler_flags=-v
18278 linker_flags=-v
18279 verstring=
18280 output_objdir=.
18281 libname=conftest
18282 lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ
18283 allow_undefined_flag_GCJ=
18284 if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
18285 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
18286 ac_status=$?
18287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18288 (exit $ac_status); }
18289 then
18290 archive_cmds_need_lc_GCJ=no
18291 else
18292 archive_cmds_need_lc_GCJ=yes
18293 fi
18294 allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag
18295 else
18296 cat conftest.err 1>&5
18297 fi
18298 $rm conftest*
18299 { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
18300 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; }
18301 ;;
18302 esac
18303 fi
18304 ;;
18305 esac
18306
18307 { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
18308 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
18309 library_names_spec=
18310 libname_spec='lib$name'
18311 soname_spec=
18312 shrext_cmds=".so"
18313 postinstall_cmds=
18314 postuninstall_cmds=
18315 finish_cmds=
18316 finish_eval=
18317 shlibpath_var=
18318 shlibpath_overrides_runpath=unknown
18319 version_type=none
18320 dynamic_linker="$host_os ld.so"
18321 sys_lib_dlsearch_path_spec="/lib /usr/lib"
18322
18323 need_lib_prefix=unknown
18324 hardcode_into_libs=no
18325
18326 # when you set need_version to no, make sure it does not cause -set_version
18327 # flags to be left without arguments
18328 need_version=unknown
18329
18330 case $host_os in
18331 aix3*)
18332 version_type=linux
18333 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
18334 shlibpath_var=LIBPATH
18335
18336 # AIX 3 has no versioning support, so we append a major version to the name.
18337 soname_spec='${libname}${release}${shared_ext}$major'
18338 ;;
18339
18340 aix[4-9]*)
18341 version_type=linux
18342 need_lib_prefix=no
18343 need_version=no
18344 hardcode_into_libs=yes
18345 if test "$host_cpu" = ia64; then
18346 # AIX 5 supports IA64
18347 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
18348 shlibpath_var=LD_LIBRARY_PATH
18349 else
18350 # With GCC up to 2.95.x, collect2 would create an import file
18351 # for dependence libraries. The import file would start with
18352 # the line `#! .'. This would cause the generated library to
18353 # depend on `.', always an invalid library. This was fixed in
18354 # development snapshots of GCC prior to 3.0.
18355 case $host_os in
18356 aix4 | aix4.[01] | aix4.[01].*)
18357 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
18358 echo ' yes '
18359 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
18360 :
18361 else
18362 can_build_shared=no
18363 fi
18364 ;;
18365 esac
18366 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
18367 # soname into executable. Probably we can add versioning support to
18368 # collect2, so additional links can be useful in future.
18369 if test "$aix_use_runtimelinking" = yes; then
18370 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
18371 # instead of lib<name>.a to let people know that these are not
18372 # typical AIX shared libraries.
18373 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18374 else
18375 # We preserve .a as extension for shared libraries through AIX4.2
18376 # and later when we are not doing run time linking.
18377 library_names_spec='${libname}${release}.a $libname.a'
18378 soname_spec='${libname}${release}${shared_ext}$major'
18379 fi
18380 shlibpath_var=LIBPATH
18381 fi
18382 ;;
18383
18384 amigaos*)
18385 library_names_spec='$libname.ixlibrary $libname.a'
18386 # Create ${libname}_ixlibrary.a entries in /sys/libs.
18387 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'
18388 ;;
18389
18390 beos*)
18391 library_names_spec='${libname}${shared_ext}'
18392 dynamic_linker="$host_os ld.so"
18393 shlibpath_var=LIBRARY_PATH
18394 ;;
18395
18396 bsdi[45]*)
18397 version_type=linux
18398 need_version=no
18399 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18400 soname_spec='${libname}${release}${shared_ext}$major'
18401 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
18402 shlibpath_var=LD_LIBRARY_PATH
18403 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
18404 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
18405 # the default ld.so.conf also contains /usr/contrib/lib and
18406 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
18407 # libtool to hard-code these into programs
18408 ;;
18409
18410 cygwin* | mingw* | pw32*)
18411 version_type=windows
18412 shrext_cmds=".dll"
18413 need_version=no
18414 need_lib_prefix=no
18415
18416 case $GCC,$host_os in
18417 yes,cygwin* | yes,mingw* | yes,pw32*)
18418 library_names_spec='$libname.dll.a'
18419 # DLL is installed to $(libdir)/../bin by postinstall_cmds
18420 postinstall_cmds='base_file=`basename \${file}`~
18421 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
18422 dldir=$destdir/`dirname \$dlpath`~
18423 test -d \$dldir || mkdir -p \$dldir~
18424 $install_prog $dir/$dlname \$dldir/$dlname~
18425 chmod a+x \$dldir/$dlname'
18426 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
18427 dlpath=$dir/\$dldll~
18428 $rm \$dlpath'
18429 shlibpath_overrides_runpath=yes
18430
18431 case $host_os in
18432 cygwin*)
18433 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
18434 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
18435 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
18436 ;;
18437 mingw*)
18438 # MinGW DLLs use traditional 'lib' prefix
18439 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
18440 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
18441 if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
18442 # It is most probably a Windows format PATH printed by
18443 # mingw gcc, but we are running on Cygwin. Gcc prints its search
18444 # path with ; separators, and with drive letters. We can handle the
18445 # drive letters (cygwin fileutils understands them), so leave them,
18446 # especially as we might pass files found there to a mingw objdump,
18447 # which wouldn't understand a cygwinified path. Ahh.
18448 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
18449 else
18450 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
18451 fi
18452 ;;
18453 pw32*)
18454 # pw32 DLLs use 'pw' prefix rather than 'lib'
18455 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
18456 ;;
18457 esac
18458 ;;
18459
18460 *)
18461 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
18462 ;;
18463 esac
18464 dynamic_linker='Win32 ld.exe'
18465 # FIXME: first we should search . and the directory the executable is in
18466 shlibpath_var=PATH
18467 ;;
18468
18469 darwin* | rhapsody*)
18470 dynamic_linker="$host_os dyld"
18471 version_type=darwin
18472 need_lib_prefix=no
18473 need_version=no
18474 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
18475 soname_spec='${libname}${release}${major}$shared_ext'
18476 shlibpath_overrides_runpath=yes
18477 shlibpath_var=DYLD_LIBRARY_PATH
18478 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
18479
18480 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
18481 ;;
18482
18483 dgux*)
18484 version_type=linux
18485 need_lib_prefix=no
18486 need_version=no
18487 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
18488 soname_spec='${libname}${release}${shared_ext}$major'
18489 shlibpath_var=LD_LIBRARY_PATH
18490 ;;
18491
18492 freebsd1*)
18493 dynamic_linker=no
18494 ;;
18495
18496 freebsd* | dragonfly*)
18497 # DragonFly does not have aout. When/if they implement a new
18498 # versioning mechanism, adjust this.
18499 if test -x /usr/bin/objformat; then
18500 objformat=`/usr/bin/objformat`
18501 else
18502 case $host_os in
18503 freebsd[123]*) objformat=aout ;;
18504 *) objformat=elf ;;
18505 esac
18506 fi
18507 version_type=freebsd-$objformat
18508 case $version_type in
18509 freebsd-elf*)
18510 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
18511 need_version=no
18512 need_lib_prefix=no
18513 ;;
18514 freebsd-*)
18515 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
18516 need_version=yes
18517 ;;
18518 esac
18519 shlibpath_var=LD_LIBRARY_PATH
18520 case $host_os in
18521 freebsd2*)
18522 shlibpath_overrides_runpath=yes
18523 ;;
18524 freebsd3.[01]* | freebsdelf3.[01]*)
18525 shlibpath_overrides_runpath=yes
18526 hardcode_into_libs=yes
18527 ;;
18528 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
18529 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
18530 shlibpath_overrides_runpath=no
18531 hardcode_into_libs=yes
18532 ;;
18533 *) # from 4.6 on, and DragonFly
18534 shlibpath_overrides_runpath=yes
18535 hardcode_into_libs=yes
18536 ;;
18537 esac
18538 ;;
18539
18540 gnu*)
18541 version_type=linux
18542 need_lib_prefix=no
18543 need_version=no
18544 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
18545 soname_spec='${libname}${release}${shared_ext}$major'
18546 shlibpath_var=LD_LIBRARY_PATH
18547 hardcode_into_libs=yes
18548 ;;
18549
18550 hpux9* | hpux10* | hpux11*)
18551 # Give a soname corresponding to the major version so that dld.sl refuses to
18552 # link against other versions.
18553 version_type=sunos
18554 need_lib_prefix=no
18555 need_version=no
18556 case $host_cpu in
18557 ia64*)
18558 shrext_cmds='.so'
18559 hardcode_into_libs=yes
18560 dynamic_linker="$host_os dld.so"
18561 shlibpath_var=LD_LIBRARY_PATH
18562 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
18563 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18564 soname_spec='${libname}${release}${shared_ext}$major'
18565 if test "X$HPUX_IA64_MODE" = X32; then
18566 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
18567 else
18568 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
18569 fi
18570 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
18571 ;;
18572 hppa*64*)
18573 shrext_cmds='.sl'
18574 hardcode_into_libs=yes
18575 dynamic_linker="$host_os dld.sl"
18576 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
18577 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
18578 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18579 soname_spec='${libname}${release}${shared_ext}$major'
18580 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
18581 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
18582 ;;
18583 *)
18584 shrext_cmds='.sl'
18585 dynamic_linker="$host_os dld.sl"
18586 shlibpath_var=SHLIB_PATH
18587 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
18588 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18589 soname_spec='${libname}${release}${shared_ext}$major'
18590 ;;
18591 esac
18592 # HP-UX runs *really* slowly unless shared libraries are mode 555.
18593 postinstall_cmds='chmod 555 $lib'
18594 ;;
18595
18596 interix[3-9]*)
18597 version_type=linux
18598 need_lib_prefix=no
18599 need_version=no
18600 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
18601 soname_spec='${libname}${release}${shared_ext}$major'
18602 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
18603 shlibpath_var=LD_LIBRARY_PATH
18604 shlibpath_overrides_runpath=no
18605 hardcode_into_libs=yes
18606 ;;
18607
18608 irix5* | irix6* | nonstopux*)
18609 case $host_os in
18610 nonstopux*) version_type=nonstopux ;;
18611 *)
18612 if test "$lt_cv_prog_gnu_ld" = yes; then
18613 version_type=linux
18614 else
18615 version_type=irix
18616 fi ;;
18617 esac
18618 need_lib_prefix=no
18619 need_version=no
18620 soname_spec='${libname}${release}${shared_ext}$major'
18621 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
18622 case $host_os in
18623 irix5* | nonstopux*)
18624 libsuff= shlibsuff=
18625 ;;
18626 *)
18627 case $LD in # libtool.m4 will add one of these switches to LD
18628 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
18629 libsuff= shlibsuff= libmagic=32-bit;;
18630 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
18631 libsuff=32 shlibsuff=N32 libmagic=N32;;
18632 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
18633 libsuff=64 shlibsuff=64 libmagic=64-bit;;
18634 *) libsuff= shlibsuff= libmagic=never-match;;
18635 esac
18636 ;;
18637 esac
18638 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
18639 shlibpath_overrides_runpath=no
18640 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
18641 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
18642 hardcode_into_libs=yes
18643 ;;
18644
18645 # No shared lib support for Linux oldld, aout, or coff.
18646 linux*oldld* | linux*aout* | linux*coff*)
18647 dynamic_linker=no
18648 ;;
18649
18650 # This must be Linux ELF.
18651 linux* | k*bsd*-gnu)
18652 version_type=linux
18653 need_lib_prefix=no
18654 need_version=no
18655 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18656 soname_spec='${libname}${release}${shared_ext}$major'
18657 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
18658 shlibpath_var=LD_LIBRARY_PATH
18659 shlibpath_overrides_runpath=no
18660 # This implies no fast_install, which is unacceptable.
18661 # Some rework will be needed to allow for fast_install
18662 # before this can be enabled.
18663 hardcode_into_libs=yes
18664
18665 # Append ld.so.conf contents to the search path
18666 if test -f /etc/ld.so.conf; then
18667 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' ' '`
18668 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
18669 fi
18670
18671 # We used to test for /lib/ld.so.1 and disable shared libraries on
18672 # powerpc, because MkLinux only supported shared libraries with the
18673 # GNU dynamic linker. Since this was broken with cross compilers,
18674 # most powerpc-linux boxes support dynamic linking these days and
18675 # people can always --disable-shared, the test was removed, and we
18676 # assume the GNU/Linux dynamic linker is in use.
18677 dynamic_linker='GNU/Linux ld.so'
18678 ;;
18679
18680 netbsdelf*-gnu)
18681 version_type=linux
18682 need_lib_prefix=no
18683 need_version=no
18684 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
18685 soname_spec='${libname}${release}${shared_ext}$major'
18686 shlibpath_var=LD_LIBRARY_PATH
18687 shlibpath_overrides_runpath=no
18688 hardcode_into_libs=yes
18689 dynamic_linker='NetBSD ld.elf_so'
18690 ;;
18691
18692 netbsd*)
18693 version_type=sunos
18694 need_lib_prefix=no
18695 need_version=no
18696 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
18697 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
18698 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
18699 dynamic_linker='NetBSD (a.out) ld.so'
18700 else
18701 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
18702 soname_spec='${libname}${release}${shared_ext}$major'
18703 dynamic_linker='NetBSD ld.elf_so'
18704 fi
18705 shlibpath_var=LD_LIBRARY_PATH
18706 shlibpath_overrides_runpath=yes
18707 hardcode_into_libs=yes
18708 ;;
18709
18710 newsos6)
18711 version_type=linux
18712 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18713 shlibpath_var=LD_LIBRARY_PATH
18714 shlibpath_overrides_runpath=yes
18715 ;;
18716
18717 nto-qnx*)
18718 version_type=linux
18719 need_lib_prefix=no
18720 need_version=no
18721 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18722 soname_spec='${libname}${release}${shared_ext}$major'
18723 shlibpath_var=LD_LIBRARY_PATH
18724 shlibpath_overrides_runpath=yes
18725 ;;
18726
18727 openbsd*)
18728 version_type=sunos
18729 sys_lib_dlsearch_path_spec="/usr/lib"
18730 need_lib_prefix=no
18731 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
18732 case $host_os in
18733 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
18734 *) need_version=no ;;
18735 esac
18736 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
18737 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
18738 shlibpath_var=LD_LIBRARY_PATH
18739 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
18740 case $host_os in
18741 openbsd2.[89] | openbsd2.[89].*)
18742 shlibpath_overrides_runpath=no
18743 ;;
18744 *)
18745 shlibpath_overrides_runpath=yes
18746 ;;
18747 esac
18748 else
18749 shlibpath_overrides_runpath=yes
18750 fi
18751 ;;
18752
18753 os2*)
18754 libname_spec='$name'
18755 shrext_cmds=".dll"
18756 need_lib_prefix=no
18757 library_names_spec='$libname${shared_ext} $libname.a'
18758 dynamic_linker='OS/2 ld.exe'
18759 shlibpath_var=LIBPATH
18760 ;;
18761
18762 osf3* | osf4* | osf5*)
18763 version_type=osf
18764 need_lib_prefix=no
18765 need_version=no
18766 soname_spec='${libname}${release}${shared_ext}$major'
18767 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18768 shlibpath_var=LD_LIBRARY_PATH
18769 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
18770 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
18771 ;;
18772
18773 rdos*)
18774 dynamic_linker=no
18775 ;;
18776
18777 solaris*)
18778 version_type=linux
18779 need_lib_prefix=no
18780 need_version=no
18781 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18782 soname_spec='${libname}${release}${shared_ext}$major'
18783 shlibpath_var=LD_LIBRARY_PATH
18784 shlibpath_overrides_runpath=yes
18785 hardcode_into_libs=yes
18786 # ldd complains unless libraries are executable
18787 postinstall_cmds='chmod +x $lib'
18788 ;;
18789
18790 sunos4*)
18791 version_type=sunos
18792 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
18793 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
18794 shlibpath_var=LD_LIBRARY_PATH
18795 shlibpath_overrides_runpath=yes
18796 if test "$with_gnu_ld" = yes; then
18797 need_lib_prefix=no
18798 fi
18799 need_version=yes
18800 ;;
18801
18802 sysv4 | sysv4.3*)
18803 version_type=linux
18804 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18805 soname_spec='${libname}${release}${shared_ext}$major'
18806 shlibpath_var=LD_LIBRARY_PATH
18807 case $host_vendor in
18808 sni)
18809 shlibpath_overrides_runpath=no
18810 need_lib_prefix=no
18811 export_dynamic_flag_spec='${wl}-Blargedynsym'
18812 runpath_var=LD_RUN_PATH
18813 ;;
18814 siemens)
18815 need_lib_prefix=no
18816 ;;
18817 motorola)
18818 need_lib_prefix=no
18819 need_version=no
18820 shlibpath_overrides_runpath=no
18821 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
18822 ;;
18823 esac
18824 ;;
18825
18826 sysv4*MP*)
18827 if test -d /usr/nec ;then
18828 version_type=linux
18829 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
18830 soname_spec='$libname${shared_ext}.$major'
18831 shlibpath_var=LD_LIBRARY_PATH
18832 fi
18833 ;;
18834
18835 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
18836 version_type=freebsd-elf
18837 need_lib_prefix=no
18838 need_version=no
18839 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
18840 soname_spec='${libname}${release}${shared_ext}$major'
18841 shlibpath_var=LD_LIBRARY_PATH
18842 hardcode_into_libs=yes
18843 if test "$with_gnu_ld" = yes; then
18844 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
18845 shlibpath_overrides_runpath=no
18846 else
18847 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
18848 shlibpath_overrides_runpath=yes
18849 case $host_os in
18850 sco3.2v5*)
18851 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
18852 ;;
18853 esac
18854 fi
18855 sys_lib_dlsearch_path_spec='/usr/lib'
18856 ;;
18857
18858 uts4*)
18859 version_type=linux
18860 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18861 soname_spec='${libname}${release}${shared_ext}$major'
18862 shlibpath_var=LD_LIBRARY_PATH
18863 ;;
18864
18865 *)
18866 dynamic_linker=no
18867 ;;
18868 esac
18869 { echo "$as_me:$LINENO: result: $dynamic_linker" >&5
18870 echo "${ECHO_T}$dynamic_linker" >&6; }
18871 test "$dynamic_linker" = no && can_build_shared=no
18872
18873 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
18874 echo $ECHO_N "(cached) $ECHO_C" >&6
18875 else
18876 lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"
18877 fi
18878
18879 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
18880 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
18881 echo $ECHO_N "(cached) $ECHO_C" >&6
18882 else
18883 lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"
18884 fi
18885
18886 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
18887
18888 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
18889 if test "$GCC" = yes; then
18890 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
18891 fi
18892
18893 { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
18894 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
18895 hardcode_action_GCJ=
18896 if test -n "$hardcode_libdir_flag_spec_GCJ" || \
18897 test -n "$runpath_var_GCJ" || \
18898 test "X$hardcode_automatic_GCJ" = "Xyes" ; then
18899
18900 # We can hardcode non-existant directories.
18901 if test "$hardcode_direct_GCJ" != no &&
18902 # If the only mechanism to avoid hardcoding is shlibpath_var, we
18903 # have to relink, otherwise we might link with an installed library
18904 # when we should be linking with a yet-to-be-installed one
18905 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no &&
18906 test "$hardcode_minus_L_GCJ" != no; then
18907 # Linking always hardcodes the temporary library directory.
18908 hardcode_action_GCJ=relink
18909 else
18910 # We can link without hardcoding, and we can hardcode nonexisting dirs.
18911 hardcode_action_GCJ=immediate
18912 fi
18913 else
18914 # We cannot hardcode anything, or else we can only hardcode existing
18915 # directories.
18916 hardcode_action_GCJ=unsupported
18917 fi
18918 { echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
18919 echo "${ECHO_T}$hardcode_action_GCJ" >&6; }
18920
18921 if test "$hardcode_action_GCJ" = relink; then
18922 # Fast installation is not supported
18923 enable_fast_install=no
18924 elif test "$shlibpath_overrides_runpath" = yes ||
18925 test "$enable_shared" = no; then
18926 # Fast installation is not necessary
18927 enable_fast_install=needless
18928 fi
18929
18930
18931 # The else clause should only fire when bootstrapping the
18932 # libtool distribution, otherwise you forgot to ship ltmain.sh
18933 # with your package, and you will get complaints that there are
18934 # no rules to generate ltmain.sh.
18935 if test -f "$ltmain"; then
18936 # See if we are running on zsh, and set the options which allow our commands through
18937 # without removal of \ escapes.
18938 if test -n "${ZSH_VERSION+set}" ; then
18939 setopt NO_GLOB_SUBST
18940 fi
18941 # Now quote all the things that may contain metacharacters while being
18942 # careful not to overquote the AC_SUBSTed values. We take copies of the
18943 # variables and quote the copies for generation of the libtool script.
18944 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
18945 SED SHELL STRIP \
18946 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
18947 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
18948 deplibs_check_method reload_flag reload_cmds need_locks \
18949 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
18950 lt_cv_sys_global_symbol_to_c_name_address \
18951 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
18952 old_postinstall_cmds old_postuninstall_cmds \
18953 compiler_GCJ \
18954 CC_GCJ \
18955 LD_GCJ \
18956 lt_prog_compiler_wl_GCJ \
18957 lt_prog_compiler_pic_GCJ \
18958 lt_prog_compiler_static_GCJ \
18959 lt_prog_compiler_no_builtin_flag_GCJ \
18960 export_dynamic_flag_spec_GCJ \
18961 thread_safe_flag_spec_GCJ \
18962 whole_archive_flag_spec_GCJ \
18963 enable_shared_with_static_runtimes_GCJ \
18964 old_archive_cmds_GCJ \
18965 old_archive_from_new_cmds_GCJ \
18966 predep_objects_GCJ \
18967 postdep_objects_GCJ \
18968 predeps_GCJ \
18969 postdeps_GCJ \
18970 compiler_lib_search_path_GCJ \
18971 compiler_lib_search_dirs_GCJ \
18972 archive_cmds_GCJ \
18973 archive_expsym_cmds_GCJ \
18974 postinstall_cmds_GCJ \
18975 postuninstall_cmds_GCJ \
18976 old_archive_from_expsyms_cmds_GCJ \
18977 allow_undefined_flag_GCJ \
18978 no_undefined_flag_GCJ \
18979 export_symbols_cmds_GCJ \
18980 hardcode_libdir_flag_spec_GCJ \
18981 hardcode_libdir_flag_spec_ld_GCJ \
18982 hardcode_libdir_separator_GCJ \
18983 hardcode_automatic_GCJ \
18984 module_cmds_GCJ \
18985 module_expsym_cmds_GCJ \
18986 lt_cv_prog_compiler_c_o_GCJ \
18987 fix_srcfile_path_GCJ \
18988 exclude_expsyms_GCJ \
18989 include_expsyms_GCJ; do
18990
18991 case $var in
18992 old_archive_cmds_GCJ | \
18993 old_archive_from_new_cmds_GCJ | \
18994 archive_cmds_GCJ | \
18995 archive_expsym_cmds_GCJ | \
18996 module_cmds_GCJ | \
18997 module_expsym_cmds_GCJ | \
18998 old_archive_from_expsyms_cmds_GCJ | \
18999 export_symbols_cmds_GCJ | \
19000 extract_expsyms_cmds | reload_cmds | finish_cmds | \
19001 postinstall_cmds | postuninstall_cmds | \
19002 old_postinstall_cmds | old_postuninstall_cmds | \
19003 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
19004 # Double-quote double-evaled strings.
19005 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
19006 ;;
19007 *)
19008 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
19009 ;;
19010 esac
19011 done
19012
19013 case $lt_echo in
19014 *'\$0 --fallback-echo"')
19015 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
19016 ;;
19017 esac
19018
19019 cfgfile="$ofile"
19020
19021 cat <<__EOF__ >> "$cfgfile"
19022 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
19023
19024 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
19025
19026 # Shell to use when invoking shell scripts.
19027 SHELL=$lt_SHELL
19028
19029 # Whether or not to build shared libraries.
19030 build_libtool_libs=$enable_shared
19031
19032 # Whether or not to build static libraries.
19033 build_old_libs=$enable_static
19034
19035 # Whether or not to add -lc for building shared libraries.
19036 build_libtool_need_lc=$archive_cmds_need_lc_GCJ
19037
19038 # Whether or not to disallow shared libs when runtime libs are static
19039 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ
19040
19041 # Whether or not to optimize for fast installation.
19042 fast_install=$enable_fast_install
19043
19044 # The host system.
19045 host_alias=$host_alias
19046 host=$host
19047 host_os=$host_os
19048
19049 # The build system.
19050 build_alias=$build_alias
19051 build=$build
19052 build_os=$build_os
19053
19054 # An echo program that does not interpret backslashes.
19055 echo=$lt_echo
19056
19057 # The archiver.
19058 AR=$lt_AR
19059 AR_FLAGS=$lt_AR_FLAGS
19060
19061 # A C compiler.
19062 LTCC=$lt_LTCC
19063
19064 # LTCC compiler flags.
19065 LTCFLAGS=$lt_LTCFLAGS
19066
19067 # A language-specific compiler.
19068 CC=$lt_compiler_GCJ
19069
19070 # Is the compiler the GNU C compiler?
19071 with_gcc=$GCC_GCJ
19072
19073 # An ERE matcher.
19074 EGREP=$lt_EGREP
19075
19076 # The linker used to build libraries.
19077 LD=$lt_LD_GCJ
19078
19079 # Whether we need hard or soft links.
19080 LN_S=$lt_LN_S
19081
19082 # A BSD-compatible nm program.
19083 NM=$lt_NM
19084
19085 # A symbol stripping program
19086 STRIP=$lt_STRIP
19087
19088 # Used to examine libraries when file_magic_cmd begins "file"
19089 MAGIC_CMD=$MAGIC_CMD
19090
19091 # Used on cygwin: DLL creation program.
19092 DLLTOOL="$DLLTOOL"
19093
19094 # Used on cygwin: object dumper.
19095 OBJDUMP="$OBJDUMP"
19096
19097 # Used on cygwin: assembler.
19098 AS="$AS"
19099
19100 # The name of the directory that contains temporary libtool files.
19101 objdir=$objdir
19102
19103 # How to create reloadable object files.
19104 reload_flag=$lt_reload_flag
19105 reload_cmds=$lt_reload_cmds
19106
19107 # How to pass a linker flag through the compiler.
19108 wl=$lt_lt_prog_compiler_wl_GCJ
19109
19110 # Object file suffix (normally "o").
19111 objext="$ac_objext"
19112
19113 # Old archive suffix (normally "a").
19114 libext="$libext"
19115
19116 # Shared library suffix (normally ".so").
19117 shrext_cmds='$shrext_cmds'
19118
19119 # Executable file suffix (normally "").
19120 exeext="$exeext"
19121
19122 # Additional compiler flags for building library objects.
19123 pic_flag=$lt_lt_prog_compiler_pic_GCJ
19124 pic_mode=$pic_mode
19125
19126 # What is the maximum length of a command?
19127 max_cmd_len=$lt_cv_sys_max_cmd_len
19128
19129 # Does compiler simultaneously support -c and -o options?
19130 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ
19131
19132 # Must we lock files when doing compilation?
19133 need_locks=$lt_need_locks
19134
19135 # Do we need the lib prefix for modules?
19136 need_lib_prefix=$need_lib_prefix
19137
19138 # Do we need a version for libraries?
19139 need_version=$need_version
19140
19141 # Whether dlopen is supported.
19142 dlopen_support=$enable_dlopen
19143
19144 # Whether dlopen of programs is supported.
19145 dlopen_self=$enable_dlopen_self
19146
19147 # Whether dlopen of statically linked programs is supported.
19148 dlopen_self_static=$enable_dlopen_self_static
19149
19150 # Compiler flag to prevent dynamic linking.
19151 link_static_flag=$lt_lt_prog_compiler_static_GCJ
19152
19153 # Compiler flag to turn off builtin functions.
19154 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ
19155
19156 # Compiler flag to allow reflexive dlopens.
19157 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ
19158
19159 # Compiler flag to generate shared objects directly from archives.
19160 whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ
19161
19162 # Compiler flag to generate thread-safe objects.
19163 thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ
19164
19165 # Library versioning type.
19166 version_type=$version_type
19167
19168 # Format of library name prefix.
19169 libname_spec=$lt_libname_spec
19170
19171 # List of archive names. First name is the real one, the rest are links.
19172 # The last name is the one that the linker finds with -lNAME.
19173 library_names_spec=$lt_library_names_spec
19174
19175 # The coded name of the library, if different from the real name.
19176 soname_spec=$lt_soname_spec
19177
19178 # Commands used to build and install an old-style archive.
19179 RANLIB=$lt_RANLIB
19180 old_archive_cmds=$lt_old_archive_cmds_GCJ
19181 old_postinstall_cmds=$lt_old_postinstall_cmds
19182 old_postuninstall_cmds=$lt_old_postuninstall_cmds
19183
19184 # Create an old-style archive from a shared archive.
19185 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ
19186
19187 # Create a temporary old-style archive to link instead of a shared archive.
19188 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ
19189
19190 # Commands used to build and install a shared archive.
19191 archive_cmds=$lt_archive_cmds_GCJ
19192 archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ
19193 postinstall_cmds=$lt_postinstall_cmds
19194 postuninstall_cmds=$lt_postuninstall_cmds
19195
19196 # Commands used to build a loadable module (assumed same as above if empty)
19197 module_cmds=$lt_module_cmds_GCJ
19198 module_expsym_cmds=$lt_module_expsym_cmds_GCJ
19199
19200 # Commands to strip libraries.
19201 old_striplib=$lt_old_striplib
19202 striplib=$lt_striplib
19203
19204 # Dependencies to place before the objects being linked to create a
19205 # shared library.
19206 predep_objects=$lt_predep_objects_GCJ
19207
19208 # Dependencies to place after the objects being linked to create a
19209 # shared library.
19210 postdep_objects=$lt_postdep_objects_GCJ
19211
19212 # Dependencies to place before the objects being linked to create a
19213 # shared library.
19214 predeps=$lt_predeps_GCJ
19215
19216 # Dependencies to place after the objects being linked to create a
19217 # shared library.
19218 postdeps=$lt_postdeps_GCJ
19219
19220 # The directories searched by this compiler when creating a shared
19221 # library
19222 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_GCJ
19223
19224 # The library search path used internally by the compiler when linking
19225 # a shared library.
19226 compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
19227
19228 # Method to check whether dependent libraries are shared objects.
19229 deplibs_check_method=$lt_deplibs_check_method
19230
19231 # Command to use when deplibs_check_method == file_magic.
19232 file_magic_cmd=$lt_file_magic_cmd
19233
19234 # Flag that allows shared libraries with undefined symbols to be built.
19235 allow_undefined_flag=$lt_allow_undefined_flag_GCJ
19236
19237 # Flag that forces no undefined symbols.
19238 no_undefined_flag=$lt_no_undefined_flag_GCJ
19239
19240 # Commands used to finish a libtool library installation in a directory.
19241 finish_cmds=$lt_finish_cmds
19242
19243 # Same as above, but a single script fragment to be evaled but not shown.
19244 finish_eval=$lt_finish_eval
19245
19246 # Take the output of nm and produce a listing of raw symbols and C names.
19247 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
19248
19249 # Transform the output of nm in a proper C declaration
19250 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
19251
19252 # Transform the output of nm in a C name address pair
19253 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
19254
19255 # This is the shared library runtime path variable.
19256 runpath_var=$runpath_var
19257
19258 # This is the shared library path variable.
19259 shlibpath_var=$shlibpath_var
19260
19261 # Is shlibpath searched before the hard-coded library search path?
19262 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
19263
19264 # How to hardcode a shared library path into an executable.
19265 hardcode_action=$hardcode_action_GCJ
19266
19267 # Whether we should hardcode library paths into libraries.
19268 hardcode_into_libs=$hardcode_into_libs
19269
19270 # Flag to hardcode \$libdir into a binary during linking.
19271 # This must work even if \$libdir does not exist.
19272 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ
19273
19274 # If ld is used when linking, flag to hardcode \$libdir into
19275 # a binary during linking. This must work even if \$libdir does
19276 # not exist.
19277 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ
19278
19279 # Whether we need a single -rpath flag with a separated argument.
19280 hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ
19281
19282 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
19283 # resulting binary.
19284 hardcode_direct=$hardcode_direct_GCJ
19285
19286 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
19287 # resulting binary.
19288 hardcode_minus_L=$hardcode_minus_L_GCJ
19289
19290 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
19291 # the resulting binary.
19292 hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
19293
19294 # Set to yes if building a shared library automatically hardcodes DIR into the library
19295 # and all subsequent libraries and executables linked against it.
19296 hardcode_automatic=$hardcode_automatic_GCJ
19297
19298 # Variables whose values should be saved in libtool wrapper scripts and
19299 # restored at relink time.
19300 variables_saved_for_relink="$variables_saved_for_relink"
19301
19302 # Whether libtool must link a program against all its dependency libraries.
19303 link_all_deplibs=$link_all_deplibs_GCJ
19304
19305 # Compile-time system search path for libraries
19306 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
19307
19308 # Run-time system search path for libraries
19309 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
19310
19311 # Fix the shell variable \$srcfile for the compiler.
19312 fix_srcfile_path=$lt_fix_srcfile_path
19313
19314 # Set to yes if exported symbols are required.
19315 always_export_symbols=$always_export_symbols_GCJ
19316
19317 # The commands to list exported symbols.
19318 export_symbols_cmds=$lt_export_symbols_cmds_GCJ
19319
19320 # The commands to extract the exported symbol list from a shared archive.
19321 extract_expsyms_cmds=$lt_extract_expsyms_cmds
19322
19323 # Symbols that should not be listed in the preloaded symbols.
19324 exclude_expsyms=$lt_exclude_expsyms_GCJ
19325
19326 # Symbols that must always be exported.
19327 include_expsyms=$lt_include_expsyms_GCJ
19328
19329 # ### END LIBTOOL TAG CONFIG: $tagname
19330
19331 __EOF__
19332
19333
19334 else
19335 # If there is no Makefile yet, we rely on a make rule to execute
19336 # `config.status --recheck' to rerun these tests and create the
19337 # libtool script then.
19338 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
19339 if test -f "$ltmain_in"; then
19340 test -f Makefile && make "$ltmain"
19341 fi
19342 fi
19343
19344
19345 ac_ext=c
19346 ac_cpp='$CPP $CPPFLAGS'
19347 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19348 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19349 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19350
19351 CC="$lt_save_CC"
19352
19353 else
19354 tagname=""
19355 fi
19356 ;;
19357
19358 RC)
19359
19360
19361 # Source file extension for RC test sources.
19362 ac_ext=rc
19363
19364 # Object file extension for compiled RC test sources.
19365 objext=o
19366 objext_RC=$objext
19367
19368 # Code to be used in simple compile tests
19369 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
19370
19371 # Code to be used in simple link tests
19372 lt_simple_link_test_code="$lt_simple_compile_test_code"
19373
19374 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
19375
19376 # If no C compiler was specified, use CC.
19377 LTCC=${LTCC-"$CC"}
19378
19379 # If no C compiler flags were specified, use CFLAGS.
19380 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
19381
19382 # Allow CC to be a program name with arguments.
19383 compiler=$CC
19384
19385
19386 # save warnings/boilerplate of simple test code
19387 ac_outfile=conftest.$ac_objext
19388 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
19389 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
19390 _lt_compiler_boilerplate=`cat conftest.err`
19391 $rm conftest*
19392
19393 ac_outfile=conftest.$ac_objext
19394 echo "$lt_simple_link_test_code" >conftest.$ac_ext
19395 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
19396 _lt_linker_boilerplate=`cat conftest.err`
19397 $rm -r conftest*
19398
19399
19400 # Allow CC to be a program name with arguments.
19401 lt_save_CC="$CC"
19402 CC=${RC-"windres"}
19403 compiler=$CC
19404 compiler_RC=$CC
19405 for cc_temp in $compiler""; do
19406 case $cc_temp in
19407 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
19408 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
19409 \-*) ;;
19410 *) break;;
19411 esac
19412 done
19413 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
19414
19415 lt_cv_prog_compiler_c_o_RC=yes
19416
19417 # The else clause should only fire when bootstrapping the
19418 # libtool distribution, otherwise you forgot to ship ltmain.sh
19419 # with your package, and you will get complaints that there are
19420 # no rules to generate ltmain.sh.
19421 if test -f "$ltmain"; then
19422 # See if we are running on zsh, and set the options which allow our commands through
19423 # without removal of \ escapes.
19424 if test -n "${ZSH_VERSION+set}" ; then
19425 setopt NO_GLOB_SUBST
19426 fi
19427 # Now quote all the things that may contain metacharacters while being
19428 # careful not to overquote the AC_SUBSTed values. We take copies of the
19429 # variables and quote the copies for generation of the libtool script.
19430 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
19431 SED SHELL STRIP \
19432 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
19433 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
19434 deplibs_check_method reload_flag reload_cmds need_locks \
19435 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
19436 lt_cv_sys_global_symbol_to_c_name_address \
19437 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
19438 old_postinstall_cmds old_postuninstall_cmds \
19439 compiler_RC \
19440 CC_RC \
19441 LD_RC \
19442 lt_prog_compiler_wl_RC \
19443 lt_prog_compiler_pic_RC \
19444 lt_prog_compiler_static_RC \
19445 lt_prog_compiler_no_builtin_flag_RC \
19446 export_dynamic_flag_spec_RC \
19447 thread_safe_flag_spec_RC \
19448 whole_archive_flag_spec_RC \
19449 enable_shared_with_static_runtimes_RC \
19450 old_archive_cmds_RC \
19451 old_archive_from_new_cmds_RC \
19452 predep_objects_RC \
19453 postdep_objects_RC \
19454 predeps_RC \
19455 postdeps_RC \
19456 compiler_lib_search_path_RC \
19457 compiler_lib_search_dirs_RC \
19458 archive_cmds_RC \
19459 archive_expsym_cmds_RC \
19460 postinstall_cmds_RC \
19461 postuninstall_cmds_RC \
19462 old_archive_from_expsyms_cmds_RC \
19463 allow_undefined_flag_RC \
19464 no_undefined_flag_RC \
19465 export_symbols_cmds_RC \
19466 hardcode_libdir_flag_spec_RC \
19467 hardcode_libdir_flag_spec_ld_RC \
19468 hardcode_libdir_separator_RC \
19469 hardcode_automatic_RC \
19470 module_cmds_RC \
19471 module_expsym_cmds_RC \
19472 lt_cv_prog_compiler_c_o_RC \
19473 fix_srcfile_path_RC \
19474 exclude_expsyms_RC \
19475 include_expsyms_RC; do
19476
19477 case $var in
19478 old_archive_cmds_RC | \
19479 old_archive_from_new_cmds_RC | \
19480 archive_cmds_RC | \
19481 archive_expsym_cmds_RC | \
19482 module_cmds_RC | \
19483 module_expsym_cmds_RC | \
19484 old_archive_from_expsyms_cmds_RC | \
19485 export_symbols_cmds_RC | \
19486 extract_expsyms_cmds | reload_cmds | finish_cmds | \
19487 postinstall_cmds | postuninstall_cmds | \
19488 old_postinstall_cmds | old_postuninstall_cmds | \
19489 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
19490 # Double-quote double-evaled strings.
19491 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
19492 ;;
19493 *)
19494 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
19495 ;;
19496 esac
19497 done
19498
19499 case $lt_echo in
19500 *'\$0 --fallback-echo"')
19501 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
19502 ;;
19503 esac
19504
19505 cfgfile="$ofile"
19506
19507 cat <<__EOF__ >> "$cfgfile"
19508 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
19509
19510 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
19511
19512 # Shell to use when invoking shell scripts.
19513 SHELL=$lt_SHELL
19514
19515 # Whether or not to build shared libraries.
19516 build_libtool_libs=$enable_shared
19517
19518 # Whether or not to build static libraries.
19519 build_old_libs=$enable_static
19520
19521 # Whether or not to add -lc for building shared libraries.
19522 build_libtool_need_lc=$archive_cmds_need_lc_RC
19523
19524 # Whether or not to disallow shared libs when runtime libs are static
19525 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
19526
19527 # Whether or not to optimize for fast installation.
19528 fast_install=$enable_fast_install
19529
19530 # The host system.
19531 host_alias=$host_alias
19532 host=$host
19533 host_os=$host_os
19534
19535 # The build system.
19536 build_alias=$build_alias
19537 build=$build
19538 build_os=$build_os
19539
19540 # An echo program that does not interpret backslashes.
19541 echo=$lt_echo
19542
19543 # The archiver.
19544 AR=$lt_AR
19545 AR_FLAGS=$lt_AR_FLAGS
19546
19547 # A C compiler.
19548 LTCC=$lt_LTCC
19549
19550 # LTCC compiler flags.
19551 LTCFLAGS=$lt_LTCFLAGS
19552
19553 # A language-specific compiler.
19554 CC=$lt_compiler_RC
19555
19556 # Is the compiler the GNU C compiler?
19557 with_gcc=$GCC_RC
19558
19559 # An ERE matcher.
19560 EGREP=$lt_EGREP
19561
19562 # The linker used to build libraries.
19563 LD=$lt_LD_RC
19564
19565 # Whether we need hard or soft links.
19566 LN_S=$lt_LN_S
19567
19568 # A BSD-compatible nm program.
19569 NM=$lt_NM
19570
19571 # A symbol stripping program
19572 STRIP=$lt_STRIP
19573
19574 # Used to examine libraries when file_magic_cmd begins "file"
19575 MAGIC_CMD=$MAGIC_CMD
19576
19577 # Used on cygwin: DLL creation program.
19578 DLLTOOL="$DLLTOOL"
19579
19580 # Used on cygwin: object dumper.
19581 OBJDUMP="$OBJDUMP"
19582
19583 # Used on cygwin: assembler.
19584 AS="$AS"
19585
19586 # The name of the directory that contains temporary libtool files.
19587 objdir=$objdir
19588
19589 # How to create reloadable object files.
19590 reload_flag=$lt_reload_flag
19591 reload_cmds=$lt_reload_cmds
19592
19593 # How to pass a linker flag through the compiler.
19594 wl=$lt_lt_prog_compiler_wl_RC
19595
19596 # Object file suffix (normally "o").
19597 objext="$ac_objext"
19598
19599 # Old archive suffix (normally "a").
19600 libext="$libext"
19601
19602 # Shared library suffix (normally ".so").
19603 shrext_cmds='$shrext_cmds'
19604
19605 # Executable file suffix (normally "").
19606 exeext="$exeext"
19607
19608 # Additional compiler flags for building library objects.
19609 pic_flag=$lt_lt_prog_compiler_pic_RC
19610 pic_mode=$pic_mode
19611
19612 # What is the maximum length of a command?
19613 max_cmd_len=$lt_cv_sys_max_cmd_len
19614
19615 # Does compiler simultaneously support -c and -o options?
19616 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
19617
19618 # Must we lock files when doing compilation?
19619 need_locks=$lt_need_locks
19620
19621 # Do we need the lib prefix for modules?
19622 need_lib_prefix=$need_lib_prefix
19623
19624 # Do we need a version for libraries?
19625 need_version=$need_version
19626
19627 # Whether dlopen is supported.
19628 dlopen_support=$enable_dlopen
19629
19630 # Whether dlopen of programs is supported.
19631 dlopen_self=$enable_dlopen_self
19632
19633 # Whether dlopen of statically linked programs is supported.
19634 dlopen_self_static=$enable_dlopen_self_static
19635
19636 # Compiler flag to prevent dynamic linking.
19637 link_static_flag=$lt_lt_prog_compiler_static_RC
19638
19639 # Compiler flag to turn off builtin functions.
19640 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
19641
19642 # Compiler flag to allow reflexive dlopens.
19643 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
19644
19645 # Compiler flag to generate shared objects directly from archives.
19646 whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
19647
19648 # Compiler flag to generate thread-safe objects.
19649 thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
19650
19651 # Library versioning type.
19652 version_type=$version_type
19653
19654 # Format of library name prefix.
19655 libname_spec=$lt_libname_spec
19656
19657 # List of archive names. First name is the real one, the rest are links.
19658 # The last name is the one that the linker finds with -lNAME.
19659 library_names_spec=$lt_library_names_spec
19660
19661 # The coded name of the library, if different from the real name.
19662 soname_spec=$lt_soname_spec
19663
19664 # Commands used to build and install an old-style archive.
19665 RANLIB=$lt_RANLIB
19666 old_archive_cmds=$lt_old_archive_cmds_RC
19667 old_postinstall_cmds=$lt_old_postinstall_cmds
19668 old_postuninstall_cmds=$lt_old_postuninstall_cmds
19669
19670 # Create an old-style archive from a shared archive.
19671 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
19672
19673 # Create a temporary old-style archive to link instead of a shared archive.
19674 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
19675
19676 # Commands used to build and install a shared archive.
19677 archive_cmds=$lt_archive_cmds_RC
19678 archive_expsym_cmds=$lt_archive_expsym_cmds_RC
19679 postinstall_cmds=$lt_postinstall_cmds
19680 postuninstall_cmds=$lt_postuninstall_cmds
19681
19682 # Commands used to build a loadable module (assumed same as above if empty)
19683 module_cmds=$lt_module_cmds_RC
19684 module_expsym_cmds=$lt_module_expsym_cmds_RC
19685
19686 # Commands to strip libraries.
19687 old_striplib=$lt_old_striplib
19688 striplib=$lt_striplib
19689
19690 # Dependencies to place before the objects being linked to create a
19691 # shared library.
19692 predep_objects=$lt_predep_objects_RC
19693
19694 # Dependencies to place after the objects being linked to create a
19695 # shared library.
19696 postdep_objects=$lt_postdep_objects_RC
19697
19698 # Dependencies to place before the objects being linked to create a
19699 # shared library.
19700 predeps=$lt_predeps_RC
19701
19702 # Dependencies to place after the objects being linked to create a
19703 # shared library.
19704 postdeps=$lt_postdeps_RC
19705
19706 # The directories searched by this compiler when creating a shared
19707 # library
19708 compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC
19709
19710 # The library search path used internally by the compiler when linking
19711 # a shared library.
19712 compiler_lib_search_path=$lt_compiler_lib_search_path_RC
19713
19714 # Method to check whether dependent libraries are shared objects.
19715 deplibs_check_method=$lt_deplibs_check_method
19716
19717 # Command to use when deplibs_check_method == file_magic.
19718 file_magic_cmd=$lt_file_magic_cmd
19719
19720 # Flag that allows shared libraries with undefined symbols to be built.
19721 allow_undefined_flag=$lt_allow_undefined_flag_RC
19722
19723 # Flag that forces no undefined symbols.
19724 no_undefined_flag=$lt_no_undefined_flag_RC
19725
19726 # Commands used to finish a libtool library installation in a directory.
19727 finish_cmds=$lt_finish_cmds
19728
19729 # Same as above, but a single script fragment to be evaled but not shown.
19730 finish_eval=$lt_finish_eval
19731
19732 # Take the output of nm and produce a listing of raw symbols and C names.
19733 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
19734
19735 # Transform the output of nm in a proper C declaration
19736 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
19737
19738 # Transform the output of nm in a C name address pair
19739 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
19740
19741 # This is the shared library runtime path variable.
19742 runpath_var=$runpath_var
19743
19744 # This is the shared library path variable.
19745 shlibpath_var=$shlibpath_var
19746
19747 # Is shlibpath searched before the hard-coded library search path?
19748 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
19749
19750 # How to hardcode a shared library path into an executable.
19751 hardcode_action=$hardcode_action_RC
19752
19753 # Whether we should hardcode library paths into libraries.
19754 hardcode_into_libs=$hardcode_into_libs
19755
19756 # Flag to hardcode \$libdir into a binary during linking.
19757 # This must work even if \$libdir does not exist.
19758 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
19759
19760 # If ld is used when linking, flag to hardcode \$libdir into
19761 # a binary during linking. This must work even if \$libdir does
19762 # not exist.
19763 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
19764
19765 # Whether we need a single -rpath flag with a separated argument.
19766 hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
19767
19768 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
19769 # resulting binary.
19770 hardcode_direct=$hardcode_direct_RC
19771
19772 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
19773 # resulting binary.
19774 hardcode_minus_L=$hardcode_minus_L_RC
19775
19776 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
19777 # the resulting binary.
19778 hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
19779
19780 # Set to yes if building a shared library automatically hardcodes DIR into the library
19781 # and all subsequent libraries and executables linked against it.
19782 hardcode_automatic=$hardcode_automatic_RC
19783
19784 # Variables whose values should be saved in libtool wrapper scripts and
19785 # restored at relink time.
19786 variables_saved_for_relink="$variables_saved_for_relink"
19787
19788 # Whether libtool must link a program against all its dependency libraries.
19789 link_all_deplibs=$link_all_deplibs_RC
19790
19791 # Compile-time system search path for libraries
19792 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
19793
19794 # Run-time system search path for libraries
19795 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
19796
19797 # Fix the shell variable \$srcfile for the compiler.
19798 fix_srcfile_path=$lt_fix_srcfile_path
19799
19800 # Set to yes if exported symbols are required.
19801 always_export_symbols=$always_export_symbols_RC
19802
19803 # The commands to list exported symbols.
19804 export_symbols_cmds=$lt_export_symbols_cmds_RC
19805
19806 # The commands to extract the exported symbol list from a shared archive.
19807 extract_expsyms_cmds=$lt_extract_expsyms_cmds
19808
19809 # Symbols that should not be listed in the preloaded symbols.
19810 exclude_expsyms=$lt_exclude_expsyms_RC
19811
19812 # Symbols that must always be exported.
19813 include_expsyms=$lt_include_expsyms_RC
19814
19815 # ### END LIBTOOL TAG CONFIG: $tagname
19816
19817 __EOF__
19818
19819
19820 else
19821 # If there is no Makefile yet, we rely on a make rule to execute
19822 # `config.status --recheck' to rerun these tests and create the
19823 # libtool script then.
19824 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
19825 if test -f "$ltmain_in"; then
19826 test -f Makefile && make "$ltmain"
19827 fi
19828 fi
19829
19830
19831 ac_ext=c
19832 ac_cpp='$CPP $CPPFLAGS'
19833 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19834 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19835 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19836
19837 CC="$lt_save_CC"
19838
19839 ;;
19840
19841 *)
19842 { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
19843 echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
19844 { (exit 1); exit 1; }; }
19845 ;;
19846 esac
19847
19848 # Append the new tag name to the list of available tags.
19849 if test -n "$tagname" ; then
19850 available_tags="$available_tags $tagname"
19851 fi
19852 fi
19853 done
19854 IFS="$lt_save_ifs"
19855
19856 # Now substitute the updated list of available tags.
19857 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
19858 mv "${ofile}T" "$ofile"
19859 chmod +x "$ofile"
19860 else
19861 rm -f "${ofile}T"
19862 { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
19863 echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
19864 { (exit 1); exit 1; }; }
19865 fi
19866 fi
19867
19868
19869
19870 # This can be used to rebuild libtool when needed
19871 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
19872
19873 # Always use our own libtool.
19874 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
19875
19876 # Prevent multiple expansion
19877
19878
19879
19880
19881
19882
19883
19884
19885
19886
19887
19888
19889
19890
19891
19892
19893
19894
19895
19896
19897
19898 # Check whether --enable-largefile was given.
19899 if test "${enable_largefile+set}" = set; then
19900 enableval=$enable_largefile;
19901 fi
19902
19903 if test "$enable_largefile" != no; then
19904
19905 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
19906 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
19907 if test "${ac_cv_sys_largefile_CC+set}" = set; then
19908 echo $ECHO_N "(cached) $ECHO_C" >&6
19909 else
19910 ac_cv_sys_largefile_CC=no
19911 if test "$GCC" != yes; then
19912 ac_save_CC=$CC
19913 while :; do
19914 # IRIX 6.2 and later do not support large files by default,
19915 # so use the C compiler's -n32 option if that helps.
19916 cat >conftest.$ac_ext <<_ACEOF
19917 /* confdefs.h. */
19918 _ACEOF
19919 cat confdefs.h >>conftest.$ac_ext
19920 cat >>conftest.$ac_ext <<_ACEOF
19921 /* end confdefs.h. */
19922 #include <sys/types.h>
19923 /* Check that off_t can represent 2**63 - 1 correctly.
19924 We can't simply define LARGE_OFF_T to be 9223372036854775807,
19925 since some C++ compilers masquerading as C compilers
19926 incorrectly reject 9223372036854775807. */
19927 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
19928 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
19929 && LARGE_OFF_T % 2147483647 == 1)
19930 ? 1 : -1];
19931 int
19932 main ()
19933 {
19934
19935 ;
19936 return 0;
19937 }
19938 _ACEOF
19939 rm -f conftest.$ac_objext
19940 if { (ac_try="$ac_compile"
19941 case "(($ac_try" in
19942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19943 *) ac_try_echo=$ac_try;;
19944 esac
19945 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19946 (eval "$ac_compile") 2>conftest.er1
19947 ac_status=$?
19948 grep -v '^ *+' conftest.er1 >conftest.err
19949 rm -f conftest.er1
19950 cat conftest.err >&5
19951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19952 (exit $ac_status); } && {
19953 test -z "$ac_c_werror_flag" ||
19954 test ! -s conftest.err
19955 } && test -s conftest.$ac_objext; then
19956 break
19957 else
19958 echo "$as_me: failed program was:" >&5
19959 sed 's/^/| /' conftest.$ac_ext >&5
19960
19961
19962 fi
19963
19964 rm -f core conftest.err conftest.$ac_objext
19965 CC="$CC -n32"
19966 rm -f conftest.$ac_objext
19967 if { (ac_try="$ac_compile"
19968 case "(($ac_try" in
19969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19970 *) ac_try_echo=$ac_try;;
19971 esac
19972 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19973 (eval "$ac_compile") 2>conftest.er1
19974 ac_status=$?
19975 grep -v '^ *+' conftest.er1 >conftest.err
19976 rm -f conftest.er1
19977 cat conftest.err >&5
19978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19979 (exit $ac_status); } && {
19980 test -z "$ac_c_werror_flag" ||
19981 test ! -s conftest.err
19982 } && test -s conftest.$ac_objext; then
19983 ac_cv_sys_largefile_CC=' -n32'; break
19984 else
19985 echo "$as_me: failed program was:" >&5
19986 sed 's/^/| /' conftest.$ac_ext >&5
19987
19988
19989 fi
19990
19991 rm -f core conftest.err conftest.$ac_objext
19992 break
19993 done
19994 CC=$ac_save_CC
19995 rm -f conftest.$ac_ext
19996 fi
19997 fi
19998 { echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
19999 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
20000 if test "$ac_cv_sys_largefile_CC" != no; then
20001 CC=$CC$ac_cv_sys_largefile_CC
20002 fi
20003
20004 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
20005 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
20006 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
20007 echo $ECHO_N "(cached) $ECHO_C" >&6
20008 else
20009 while :; do
20010 cat >conftest.$ac_ext <<_ACEOF
20011 /* confdefs.h. */
20012 _ACEOF
20013 cat confdefs.h >>conftest.$ac_ext
20014 cat >>conftest.$ac_ext <<_ACEOF
20015 /* end confdefs.h. */
20016 #include <sys/types.h>
20017 /* Check that off_t can represent 2**63 - 1 correctly.
20018 We can't simply define LARGE_OFF_T to be 9223372036854775807,
20019 since some C++ compilers masquerading as C compilers
20020 incorrectly reject 9223372036854775807. */
20021 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
20022 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
20023 && LARGE_OFF_T % 2147483647 == 1)
20024 ? 1 : -1];
20025 int
20026 main ()
20027 {
20028
20029 ;
20030 return 0;
20031 }
20032 _ACEOF
20033 rm -f conftest.$ac_objext
20034 if { (ac_try="$ac_compile"
20035 case "(($ac_try" in
20036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20037 *) ac_try_echo=$ac_try;;
20038 esac
20039 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20040 (eval "$ac_compile") 2>conftest.er1
20041 ac_status=$?
20042 grep -v '^ *+' conftest.er1 >conftest.err
20043 rm -f conftest.er1
20044 cat conftest.err >&5
20045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20046 (exit $ac_status); } && {
20047 test -z "$ac_c_werror_flag" ||
20048 test ! -s conftest.err
20049 } && test -s conftest.$ac_objext; then
20050 ac_cv_sys_file_offset_bits=no; break
20051 else
20052 echo "$as_me: failed program was:" >&5
20053 sed 's/^/| /' conftest.$ac_ext >&5
20054
20055
20056 fi
20057
20058 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20059 cat >conftest.$ac_ext <<_ACEOF
20060 /* confdefs.h. */
20061 _ACEOF
20062 cat confdefs.h >>conftest.$ac_ext
20063 cat >>conftest.$ac_ext <<_ACEOF
20064 /* end confdefs.h. */
20065 #define _FILE_OFFSET_BITS 64
20066 #include <sys/types.h>
20067 /* Check that off_t can represent 2**63 - 1 correctly.
20068 We can't simply define LARGE_OFF_T to be 9223372036854775807,
20069 since some C++ compilers masquerading as C compilers
20070 incorrectly reject 9223372036854775807. */
20071 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
20072 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
20073 && LARGE_OFF_T % 2147483647 == 1)
20074 ? 1 : -1];
20075 int
20076 main ()
20077 {
20078
20079 ;
20080 return 0;
20081 }
20082 _ACEOF
20083 rm -f conftest.$ac_objext
20084 if { (ac_try="$ac_compile"
20085 case "(($ac_try" in
20086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20087 *) ac_try_echo=$ac_try;;
20088 esac
20089 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20090 (eval "$ac_compile") 2>conftest.er1
20091 ac_status=$?
20092 grep -v '^ *+' conftest.er1 >conftest.err
20093 rm -f conftest.er1
20094 cat conftest.err >&5
20095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20096 (exit $ac_status); } && {
20097 test -z "$ac_c_werror_flag" ||
20098 test ! -s conftest.err
20099 } && test -s conftest.$ac_objext; then
20100 ac_cv_sys_file_offset_bits=64; break
20101 else
20102 echo "$as_me: failed program was:" >&5
20103 sed 's/^/| /' conftest.$ac_ext >&5
20104
20105
20106 fi
20107
20108 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20109 ac_cv_sys_file_offset_bits=unknown
20110 break
20111 done
20112 fi
20113 { echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
20114 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
20115 case $ac_cv_sys_file_offset_bits in #(
20116 no | unknown) ;;
20117 *)
20118 cat >>confdefs.h <<_ACEOF
20119 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
20120 _ACEOF
20121 ;;
20122 esac
20123 rm -f conftest*
20124 if test $ac_cv_sys_file_offset_bits = unknown; then
20125 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
20126 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
20127 if test "${ac_cv_sys_large_files+set}" = set; then
20128 echo $ECHO_N "(cached) $ECHO_C" >&6
20129 else
20130 while :; do
20131 cat >conftest.$ac_ext <<_ACEOF
20132 /* confdefs.h. */
20133 _ACEOF
20134 cat confdefs.h >>conftest.$ac_ext
20135 cat >>conftest.$ac_ext <<_ACEOF
20136 /* end confdefs.h. */
20137 #include <sys/types.h>
20138 /* Check that off_t can represent 2**63 - 1 correctly.
20139 We can't simply define LARGE_OFF_T to be 9223372036854775807,
20140 since some C++ compilers masquerading as C compilers
20141 incorrectly reject 9223372036854775807. */
20142 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
20143 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
20144 && LARGE_OFF_T % 2147483647 == 1)
20145 ? 1 : -1];
20146 int
20147 main ()
20148 {
20149
20150 ;
20151 return 0;
20152 }
20153 _ACEOF
20154 rm -f conftest.$ac_objext
20155 if { (ac_try="$ac_compile"
20156 case "(($ac_try" in
20157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20158 *) ac_try_echo=$ac_try;;
20159 esac
20160 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20161 (eval "$ac_compile") 2>conftest.er1
20162 ac_status=$?
20163 grep -v '^ *+' conftest.er1 >conftest.err
20164 rm -f conftest.er1
20165 cat conftest.err >&5
20166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20167 (exit $ac_status); } && {
20168 test -z "$ac_c_werror_flag" ||
20169 test ! -s conftest.err
20170 } && test -s conftest.$ac_objext; then
20171 ac_cv_sys_large_files=no; break
20172 else
20173 echo "$as_me: failed program was:" >&5
20174 sed 's/^/| /' conftest.$ac_ext >&5
20175
20176
20177 fi
20178
20179 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20180 cat >conftest.$ac_ext <<_ACEOF
20181 /* confdefs.h. */
20182 _ACEOF
20183 cat confdefs.h >>conftest.$ac_ext
20184 cat >>conftest.$ac_ext <<_ACEOF
20185 /* end confdefs.h. */
20186 #define _LARGE_FILES 1
20187 #include <sys/types.h>
20188 /* Check that off_t can represent 2**63 - 1 correctly.
20189 We can't simply define LARGE_OFF_T to be 9223372036854775807,
20190 since some C++ compilers masquerading as C compilers
20191 incorrectly reject 9223372036854775807. */
20192 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
20193 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
20194 && LARGE_OFF_T % 2147483647 == 1)
20195 ? 1 : -1];
20196 int
20197 main ()
20198 {
20199
20200 ;
20201 return 0;
20202 }
20203 _ACEOF
20204 rm -f conftest.$ac_objext
20205 if { (ac_try="$ac_compile"
20206 case "(($ac_try" in
20207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20208 *) ac_try_echo=$ac_try;;
20209 esac
20210 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20211 (eval "$ac_compile") 2>conftest.er1
20212 ac_status=$?
20213 grep -v '^ *+' conftest.er1 >conftest.err
20214 rm -f conftest.er1
20215 cat conftest.err >&5
20216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20217 (exit $ac_status); } && {
20218 test -z "$ac_c_werror_flag" ||
20219 test ! -s conftest.err
20220 } && test -s conftest.$ac_objext; then
20221 ac_cv_sys_large_files=1; break
20222 else
20223 echo "$as_me: failed program was:" >&5
20224 sed 's/^/| /' conftest.$ac_ext >&5
20225
20226
20227 fi
20228
20229 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20230 ac_cv_sys_large_files=unknown
20231 break
20232 done
20233 fi
20234 { echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
20235 echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
20236 case $ac_cv_sys_large_files in #(
20237 no | unknown) ;;
20238 *)
20239 cat >>confdefs.h <<_ACEOF
20240 #define _LARGE_FILES $ac_cv_sys_large_files
20241 _ACEOF
20242 ;;
20243 esac
20244 rm -f conftest*
20245 fi
20246 fi
20247
20248
20249 { echo "$as_me:$LINENO: checking whether to link statically" >&5
20250 echo $ECHO_N "checking whether to link statically... $ECHO_C" >&6; }
20251
20252 # Check whether --with-static-linking was given.
20253 if test "${with_static_linking+set}" = set; then
20254 withval=$with_static_linking; case "$withval" in
20255 no)
20256 { echo "$as_me:$LINENO: result: no" >&5
20257 echo "${ECHO_T}no" >&6; }
20258 ;;
20259 *)
20260 { echo "$as_me:$LINENO: result: yes" >&5
20261 echo "${ECHO_T}yes" >&6; }
20262 LDFLAGS="-static $LDFLAGS"
20263 ;;
20264 esac
20265 else
20266 { echo "$as_me:$LINENO: result: no" >&5
20267 echo "${ECHO_T}no" >&6; }
20268
20269 fi
20270
20271
20272
20273
20274 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
20275 if test -n "$ac_tool_prefix"; then
20276 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
20277 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
20278 { echo "$as_me:$LINENO: checking for $ac_word" >&5
20279 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
20280 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
20281 echo $ECHO_N "(cached) $ECHO_C" >&6
20282 else
20283 case $PKG_CONFIG in
20284 [\\/]* | ?:[\\/]*)
20285 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
20286 ;;
20287 *)
20288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20289 for as_dir in $PATH
20290 do
20291 IFS=$as_save_IFS
20292 test -z "$as_dir" && as_dir=.
20293 for ac_exec_ext in '' $ac_executable_extensions; do
20294 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20295 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
20296 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20297 break 2
20298 fi
20299 done
20300 done
20301 IFS=$as_save_IFS
20302
20303 ;;
20304 esac
20305 fi
20306 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
20307 if test -n "$PKG_CONFIG"; then
20308 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
20309 echo "${ECHO_T}$PKG_CONFIG" >&6; }
20310 else
20311 { echo "$as_me:$LINENO: result: no" >&5
20312 echo "${ECHO_T}no" >&6; }
20313 fi
20314
20315
20316 fi
20317 if test -z "$ac_cv_path_PKG_CONFIG"; then
20318 ac_pt_PKG_CONFIG=$PKG_CONFIG
20319 # Extract the first word of "pkg-config", so it can be a program name with args.
20320 set dummy pkg-config; ac_word=$2
20321 { echo "$as_me:$LINENO: checking for $ac_word" >&5
20322 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
20323 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
20324 echo $ECHO_N "(cached) $ECHO_C" >&6
20325 else
20326 case $ac_pt_PKG_CONFIG in
20327 [\\/]* | ?:[\\/]*)
20328 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
20329 ;;
20330 *)
20331 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20332 for as_dir in $PATH
20333 do
20334 IFS=$as_save_IFS
20335 test -z "$as_dir" && as_dir=.
20336 for ac_exec_ext in '' $ac_executable_extensions; do
20337 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20338 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
20339 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20340 break 2
20341 fi
20342 done
20343 done
20344 IFS=$as_save_IFS
20345
20346 ;;
20347 esac
20348 fi
20349 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
20350 if test -n "$ac_pt_PKG_CONFIG"; then
20351 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
20352 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
20353 else
20354 { echo "$as_me:$LINENO: result: no" >&5
20355 echo "${ECHO_T}no" >&6; }
20356 fi
20357
20358 if test "x$ac_pt_PKG_CONFIG" = x; then
20359 PKG_CONFIG=""
20360 else
20361 case $cross_compiling:$ac_tool_warned in
20362 yes:)
20363 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
20364 whose name does not start with the host triplet. If you think this
20365 configuration is useful to you, please write to autoconf@gnu.org." >&5
20366 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
20367 whose name does not start with the host triplet. If you think this
20368 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
20369 ac_tool_warned=yes ;;
20370 esac
20371 PKG_CONFIG=$ac_pt_PKG_CONFIG
20372 fi
20373 else
20374 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
20375 fi
20376
20377 fi
20378 if test -n "$PKG_CONFIG"; then
20379 _pkg_min_version=0.9.0
20380 { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
20381 echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; }
20382 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
20383 { echo "$as_me:$LINENO: result: yes" >&5
20384 echo "${ECHO_T}yes" >&6; }
20385 else
20386 { echo "$as_me:$LINENO: result: no" >&5
20387 echo "${ECHO_T}no" >&6; }
20388 PKG_CONFIG=""
20389 fi
20390
20391 fi
20392
20393 pkg_failed=no
20394 { echo "$as_me:$LINENO: checking for XIPH" >&5
20395 echo $ECHO_N "checking for XIPH... $ECHO_C" >&6; }
20396
20397 if test -n "$PKG_CONFIG"; then
20398 if test -n "$XIPH_CFLAGS"; then
20399 pkg_cv_XIPH_CFLAGS="$XIPH_CFLAGS"
20400 else
20401 if test -n "$PKG_CONFIG" && \
20402 { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"ogg >= 1.1 vorbis vorbisenc theora >= 1.0beta1\"") >&5
20403 ($PKG_CONFIG --exists --print-errors "ogg >= 1.1 vorbis vorbisenc theora >= 1.0beta1") 2>&5
20404 ac_status=$?
20405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20406 (exit $ac_status); }; then
20407 pkg_cv_XIPH_CFLAGS=`$PKG_CONFIG --cflags "ogg >= 1.1 vorbis vorbisenc theora >= 1.0beta1" 2>/dev/null`
20408 else
20409 pkg_failed=yes
20410 fi
20411 fi
20412 else
20413 pkg_failed=untried
20414 fi
20415 if test -n "$PKG_CONFIG"; then
20416 if test -n "$XIPH_LIBS"; then
20417 pkg_cv_XIPH_LIBS="$XIPH_LIBS"
20418 else
20419 if test -n "$PKG_CONFIG" && \
20420 { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"ogg >= 1.1 vorbis vorbisenc theora >= 1.0beta1\"") >&5
20421 ($PKG_CONFIG --exists --print-errors "ogg >= 1.1 vorbis vorbisenc theora >= 1.0beta1") 2>&5
20422 ac_status=$?
20423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20424 (exit $ac_status); }; then
20425 pkg_cv_XIPH_LIBS=`$PKG_CONFIG --libs "ogg >= 1.1 vorbis vorbisenc theora >= 1.0beta1" 2>/dev/null`
20426 else
20427 pkg_failed=yes
20428 fi
20429 fi
20430 else
20431 pkg_failed=untried
20432 fi
20433
20434
20435
20436 if test $pkg_failed = yes; then
20437
20438 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
20439 _pkg_short_errors_supported=yes
20440 else
20441 _pkg_short_errors_supported=no
20442 fi
20443 if test $_pkg_short_errors_supported = yes; then
20444 XIPH_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "ogg >= 1.1 vorbis vorbisenc theora >= 1.0beta1"`
20445 else
20446 XIPH_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "ogg >= 1.1 vorbis vorbisenc theora >= 1.0beta1"`
20447 fi
20448 # Put the nasty error message in config.log where it belongs
20449 echo "$XIPH_PKG_ERRORS" >&5
20450
20451 { { echo "$as_me:$LINENO: error: Package requirements (ogg >= 1.1 vorbis vorbisenc theora >= 1.0beta1) were not met:
20452
20453 $XIPH_PKG_ERRORS
20454
20455 Consider adjusting the PKG_CONFIG_PATH environment variable if you
20456 installed software in a non-standard prefix.
20457
20458 Alternatively, you may set the environment variables XIPH_CFLAGS
20459 and XIPH_LIBS to avoid the need to call pkg-config.
20460 See the pkg-config man page for more details.
20461 " >&5
20462 echo "$as_me: error: Package requirements (ogg >= 1.1 vorbis vorbisenc theora >= 1.0beta1) were not met:
20463
20464 $XIPH_PKG_ERRORS
20465
20466 Consider adjusting the PKG_CONFIG_PATH environment variable if you
20467 installed software in a non-standard prefix.
20468
20469 Alternatively, you may set the environment variables XIPH_CFLAGS
20470 and XIPH_LIBS to avoid the need to call pkg-config.
20471 See the pkg-config man page for more details.
20472 " >&2;}
20473 { (exit 1); exit 1; }; }
20474 elif test $pkg_failed = untried; then
20475 { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
20476 is in your PATH or set the PKG_CONFIG environment variable to the full
20477 path to pkg-config.
20478
20479 Alternatively, you may set the environment variables XIPH_CFLAGS
20480 and XIPH_LIBS to avoid the need to call pkg-config.
20481 See the pkg-config man page for more details.
20482
20483 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
20484 See \`config.log' for more details." >&5
20485 echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
20486 is in your PATH or set the PKG_CONFIG environment variable to the full
20487 path to pkg-config.
20488
20489 Alternatively, you may set the environment variables XIPH_CFLAGS
20490 and XIPH_LIBS to avoid the need to call pkg-config.
20491 See the pkg-config man page for more details.
20492
20493 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
20494 See \`config.log' for more details." >&2;}
20495 { (exit 1); exit 1; }; }
20496 else
20497 XIPH_CFLAGS=$pkg_cv_XIPH_CFLAGS
20498 XIPH_LIBS=$pkg_cv_XIPH_LIBS
20499 { echo "$as_me:$LINENO: result: yes" >&5
20500 echo "${ECHO_T}yes" >&6; }
20501 :
20502 fi
20503
20504
20505
20506 export PKG_CONFIG_PATH=./libkate/pkg/pkgconfig:$PKG_CONFIG_PATH
20507
20508 pkg_failed=no
20509 { echo "$as_me:$LINENO: checking for KATE" >&5
20510 echo $ECHO_N "checking for KATE... $ECHO_C" >&6; }
20511
20512 if test -n "$PKG_CONFIG"; then
20513 if test -n "$KATE_CFLAGS"; then
20514 pkg_cv_KATE_CFLAGS="$KATE_CFLAGS"
20515 else
20516 if test -n "$PKG_CONFIG" && \
20517 { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"oggkate\"") >&5
20518 ($PKG_CONFIG --exists --print-errors "oggkate") 2>&5
20519 ac_status=$?
20520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20521 (exit $ac_status); }; then
20522 pkg_cv_KATE_CFLAGS=`$PKG_CONFIG --cflags "oggkate" 2>/dev/null`
20523 else
20524 pkg_failed=yes
20525 fi
20526 fi
20527 else
20528 pkg_failed=untried
20529 fi
20530 if test -n "$PKG_CONFIG"; then
20531 if test -n "$KATE_LIBS"; then
20532 pkg_cv_KATE_LIBS="$KATE_LIBS"
20533 else
20534 if test -n "$PKG_CONFIG" && \
20535 { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"oggkate\"") >&5
20536 ($PKG_CONFIG --exists --print-errors "oggkate") 2>&5
20537 ac_status=$?
20538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20539 (exit $ac_status); }; then
20540 pkg_cv_KATE_LIBS=`$PKG_CONFIG --libs "oggkate" 2>/dev/null`
20541 else
20542 pkg_failed=yes
20543 fi
20544 fi
20545 else
20546 pkg_failed=untried
20547 fi
20548
20549
20550
20551 if test $pkg_failed = yes; then
20552
20553 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
20554 _pkg_short_errors_supported=yes
20555 else
20556 _pkg_short_errors_supported=no
20557 fi
20558 if test $_pkg_short_errors_supported = yes; then
20559 KATE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "oggkate"`
20560 else
20561 KATE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "oggkate"`
20562 fi
20563 # Put the nasty error message in config.log where it belongs
20564 echo "$KATE_PKG_ERRORS" >&5
20565
20566 { echo "$as_me:$LINENO: result: no" >&5
20567 echo "${ECHO_T}no" >&6; }
20568 { echo "$as_me:$LINENO: result: . Could not find libkate. Subtitles support will be disabled.
20569 You can also run ./get_libkate.sh (for more information see INSTALL)
20570 or update PKG_CONFIG_PATH to point to libkate's source folder
20571 " >&5
20572 echo "${ECHO_T}. Could not find libkate. Subtitles support will be disabled.
20573 You can also run ./get_libkate.sh (for more information see INSTALL)
20574 or update PKG_CONFIG_PATH to point to libkate's source folder
20575 " >&6; }
20576
20577 elif test $pkg_failed = untried; then
20578 { echo "$as_me:$LINENO: result: . Could not find libkate. Subtitles support will be disabled.
20579 You can also run ./get_libkate.sh (for more information see INSTALL)
20580 or update PKG_CONFIG_PATH to point to libkate's source folder
20581 " >&5
20582 echo "${ECHO_T}. Could not find libkate. Subtitles support will be disabled.
20583 You can also run ./get_libkate.sh (for more information see INSTALL)
20584 or update PKG_CONFIG_PATH to point to libkate's source folder
20585 " >&6; }
20586
20587 else
20588 KATE_CFLAGS=$pkg_cv_KATE_CFLAGS
20589 KATE_LIBS=$pkg_cv_KATE_LIBS
20590 { echo "$as_me:$LINENO: result: yes" >&5
20591 echo "${ECHO_T}yes" >&6; }
20592 KATE_CFLAGS="-DHAVE_KATE -DHAVE_OGGKATE $KATE_CFLAGS"
20593 fi
20594
20595
20596
20597 export PKG_CONFIG_PATH=./ffmpeg:$PKG_CONFIG_PATH
20598
20599 pkg_failed=no
20600 { echo "$as_me:$LINENO: checking for FFMPEG" >&5
20601 echo $ECHO_N "checking for FFMPEG... $ECHO_C" >&6; }
20602
20603 if test -n "$PKG_CONFIG"; then
20604 if test -n "$FFMPEG_CFLAGS"; then
20605 pkg_cv_FFMPEG_CFLAGS="$FFMPEG_CFLAGS"
20606 else
20607 if test -n "$PKG_CONFIG" && \
20608 { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libavformat libavcodec libavdevice libswscale libpostproc\"") >&5
20609 ($PKG_CONFIG --exists --print-errors "libavformat libavcodec libavdevice libswscale libpostproc") 2>&5
20610 ac_status=$?
20611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20612 (exit $ac_status); }; then
20613 pkg_cv_FFMPEG_CFLAGS=`$PKG_CONFIG --cflags "libavformat libavcodec libavdevice libswscale libpostproc" 2>/dev/null`
20614 else
20615 pkg_failed=yes
20616 fi
20617 fi
20618 else
20619 pkg_failed=untried
20620 fi
20621 if test -n "$PKG_CONFIG"; then
20622 if test -n "$FFMPEG_LIBS"; then
20623 pkg_cv_FFMPEG_LIBS="$FFMPEG_LIBS"
20624 else
20625 if test -n "$PKG_CONFIG" && \
20626 { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libavformat libavcodec libavdevice libswscale libpostproc\"") >&5
20627 ($PKG_CONFIG --exists --print-errors "libavformat libavcodec libavdevice libswscale libpostproc") 2>&5
20628 ac_status=$?
20629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20630 (exit $ac_status); }; then
20631 pkg_cv_FFMPEG_LIBS=`$PKG_CONFIG --libs "libavformat libavcodec libavdevice libswscale libpostproc" 2>/dev/null`
20632 else
20633 pkg_failed=yes
20634 fi
20635 fi
20636 else
20637 pkg_failed=untried
20638 fi
20639
20640
20641
20642 if test $pkg_failed = yes; then
20643
20644 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
20645 _pkg_short_errors_supported=yes
20646 else
20647 _pkg_short_errors_supported=no
20648 fi
20649 if test $_pkg_short_errors_supported = yes; then
20650 FFMPEG_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libavformat libavcodec libavdevice libswscale libpostproc"`
20651 else
20652 FFMPEG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libavformat libavcodec libavdevice libswscale libpostproc"`
20653 fi
20654 # Put the nasty error message in config.log where it belongs
20655 echo "$FFMPEG_PKG_ERRORS" >&5
20656
20657 { echo "$as_me:$LINENO: result: no" >&5
20658 echo "${ECHO_T}no" >&6; }
20659 { { echo "$as_me:$LINENO: error:
20660
20661 . Could not find libavformat libavcodec libavdevice libswscale libpostproc.
20662 You can install it via
20663 sudo apt-get install libavformat-dev libavcodec-dev libavdevice-dev libswscale-dev libpostproc-dev
20664 or update PKG_CONFIG_PATH to point to ffmpeg's source folder
20665 or run ./get_ffmpeg_svn.sh (for more information see INSTALL)
20666 " >&5
20667 echo "$as_me: error:
20668
20669 . Could not find libavformat libavcodec libavdevice libswscale libpostproc.
20670 You can install it via
20671 sudo apt-get install libavformat-dev libavcodec-dev libavdevice-dev libswscale-dev libpostproc-dev
20672 or update PKG_CONFIG_PATH to point to ffmpeg's source folder
20673 or run ./get_ffmpeg_svn.sh (for more information see INSTALL)
20674 " >&2;}
20675 { (exit 1); exit 1; }; }
20676
20677 elif test $pkg_failed = untried; then
20678 { { echo "$as_me:$LINENO: error:
20679
20680 . Could not find libavformat libavcodec libavdevice libswscale libpostproc.
20681 You can install it via
20682 sudo apt-get install libavformat-dev libavcodec-dev libavdevice-dev libswscale-dev libpostproc-dev
20683 or update PKG_CONFIG_PATH to point to ffmpeg's source folder
20684 or run ./get_ffmpeg_svn.sh (for more information see INSTALL)
20685 " >&5
20686 echo "$as_me: error:
20687
20688 . Could not find libavformat libavcodec libavdevice libswscale libpostproc.
20689 You can install it via
20690 sudo apt-get install libavformat-dev libavcodec-dev libavdevice-dev libswscale-dev libpostproc-dev
20691 or update PKG_CONFIG_PATH to point to ffmpeg's source folder
20692 or run ./get_ffmpeg_svn.sh (for more information see INSTALL)
20693 " >&2;}
20694 { (exit 1); exit 1; }; }
20695
20696 else
20697 FFMPEG_CFLAGS=$pkg_cv_FFMPEG_CFLAGS
20698 FFMPEG_LIBS=$pkg_cv_FFMPEG_LIBS
20699 { echo "$as_me:$LINENO: result: yes" >&5
20700 echo "${ECHO_T}yes" >&6; }
20701 HAVE_FFMPEG=yes
20702 fi
20703
20704
20705
20706 ac_config_files="$ac_config_files Makefile kino_export/Makefile"
20707
20708 cat >confcache <<\_ACEOF
20709 # This file is a shell script that caches the results of configure
20710 # tests run on this system so they can be shared between configure
20711 # scripts and configure runs, see configure's option --config-cache.
20712 # It is not useful on other systems. If it contains results you don't
20713 # want to keep, you may remove or edit it.
20714 #
20715 # config.status only pays attention to the cache file if you give it
20716 # the --recheck option to rerun configure.
20717 #
20718 # `ac_cv_env_foo' variables (set or unset) will be overridden when
20719 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20720 # following values.
20721
20722 _ACEOF
20723
20724 # The following way of writing the cache mishandles newlines in values,
20725 # but we know of no workaround that is simple, portable, and efficient.
20726 # So, we kill variables containing newlines.
20727 # Ultrix sh set writes to stderr and can't be redirected directly,
20728 # and sets the high bit in the cache file unless we assign to the vars.
20729 (
20730 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20731 eval ac_val=\$$ac_var
20732 case $ac_val in #(
20733 *${as_nl}*)
20734 case $ac_var in #(
20735 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
20736 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
20737 esac
20738 case $ac_var in #(
20739 _ | IFS | as_nl) ;; #(
20740 *) $as_unset $ac_var ;;
20741 esac ;;
20742 esac
20743 done
20744
20745 (set) 2>&1 |
20746 case $as_nl`(ac_space=' '; set) 2>&1` in #(
20747 *${as_nl}ac_space=\ *)
20748 # `set' does not quote correctly, so add quotes (double-quote
20749 # substitution turns \\\\ into \\, and sed turns \\ into \).
20750 sed -n \
20751 "s/'/'\\\\''/g;
20752 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20753 ;; #(
20754 *)
20755 # `set' quotes correctly as required by POSIX, so do not add quotes.
20756 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
20757 ;;
20758 esac |
20759 sort
20760 ) |
20761 sed '
20762 /^ac_cv_env_/b end
20763 t clear
20764 :clear
20765 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20766 t end
20767 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20768 :end' >>confcache
20769 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20770 if test -w "$cache_file"; then
20771 test "x$cache_file" != "x/dev/null" &&
20772 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
20773 echo "$as_me: updating cache $cache_file" >&6;}
20774 cat confcache >$cache_file
20775 else
20776 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
20777 echo "$as_me: not updating unwritable cache $cache_file" >&6;}
20778 fi
20779 fi
20780 rm -f confcache
20781
20782 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20783 # Let make expand exec_prefix.
20784 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20785
20786 # Transform confdefs.h into DEFS.
20787 # Protect against shell expansion while executing Makefile rules.
20788 # Protect against Makefile macro expansion.
20789 #
20790 # If the first sed substitution is executed (which looks for macros that
20791 # take arguments), then branch to the quote section. Otherwise,
20792 # look for a macro that doesn't take arguments.
20793 ac_script='
20794 t clear
20795 :clear
20796 s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
20797 t quote
20798 s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
20799 t quote
20800 b any
20801 :quote
20802 s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
20803 s/\[/\\&/g
20804 s/\]/\\&/g
20805 s/\$/$$/g
20806 H
20807 :any
20808 ${
20809 g
20810 s/^\n//
20811 s/\n/ /g
20812 p
20813 }
20814 '
20815 DEFS=`sed -n "$ac_script" confdefs.h`
20816
20817
20818 ac_libobjs=
20819 ac_ltlibobjs=
20820 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20821 # 1. Remove the extension, and $U if already installed.
20822 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
20823 ac_i=`echo "$ac_i" | sed "$ac_script"`
20824 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
20825 # will be set to the directory where LIBOBJS objects are built.
20826 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20827 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
20828 done
20829 LIBOBJS=$ac_libobjs
20830
20831 LTLIBOBJS=$ac_ltlibobjs
20832
20833
20834 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
20835 { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
20836 Usually this means the macro was only invoked conditionally." >&5
20837 echo "$as_me: error: conditional \"AMDEP\" was never defined.
20838 Usually this means the macro was only invoked conditionally." >&2;}
20839 { (exit 1); exit 1; }; }
20840 fi
20841 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
20842 { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
20843 Usually this means the macro was only invoked conditionally." >&5
20844 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
20845 Usually this means the macro was only invoked conditionally." >&2;}
20846 { (exit 1); exit 1; }; }
20847 fi
20848 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
20849 { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
20850 Usually this means the macro was only invoked conditionally." >&5
20851 echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
20852 Usually this means the macro was only invoked conditionally." >&2;}
20853 { (exit 1); exit 1; }; }
20854 fi
20855
20856 : ${CONFIG_STATUS=./config.status}
20857 ac_clean_files_save=$ac_clean_files
20858 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20859 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
20860 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20861 cat >$CONFIG_STATUS <<_ACEOF
20862 #! $SHELL
20863 # Generated by $as_me.
20864 # Run this file to recreate the current configuration.
20865 # Compiler output produced by configure, useful for debugging
20866 # configure, is in config.log if it exists.
20867
20868 debug=false
20869 ac_cs_recheck=false
20870 ac_cs_silent=false
20871 SHELL=\${CONFIG_SHELL-$SHELL}
20872 _ACEOF
20873
20874 cat >>$CONFIG_STATUS <<\_ACEOF
20875 ## --------------------- ##
20876 ## M4sh Initialization. ##
20877 ## --------------------- ##
20878
20879 # Be more Bourne compatible
20880 DUALCASE=1; export DUALCASE # for MKS sh
20881 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20882 emulate sh
20883 NULLCMD=:
20884 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20885 # is contrary to our usage. Disable this feature.
20886 alias -g '${1+"$@"}'='"$@"'
20887 setopt NO_GLOB_SUBST
20888 else
20889 case `(set -o) 2>/dev/null` in
20890 *posix*) set -o posix ;;
20891 esac
20892
20893 fi
20894
20895
20896
20897
20898 # PATH needs CR
20899 # Avoid depending upon Character Ranges.
20900 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20901 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20902 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20903 as_cr_digits='0123456789'
20904 as_cr_alnum=$as_cr_Letters$as_cr_digits
20905
20906 # The user is always right.
20907 if test "${PATH_SEPARATOR+set}" != set; then
20908 echo "#! /bin/sh" >conf$$.sh
20909 echo "exit 0" >>conf$$.sh
20910 chmod +x conf$$.sh
20911 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
20912 PATH_SEPARATOR=';'
20913 else
20914 PATH_SEPARATOR=:
20915 fi
20916 rm -f conf$$.sh
20917 fi
20918
20919 # Support unset when possible.
20920 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
20921 as_unset=unset
20922 else
20923 as_unset=false
20924 fi
20925
20926
20927 # IFS
20928 # We need space, tab and new line, in precisely that order. Quoting is
20929 # there to prevent editors from complaining about space-tab.
20930 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
20931 # splitting by setting IFS to empty value.)
20932 as_nl='
20933 '
20934 IFS=" "" $as_nl"
20935
20936 # Find who we are. Look in the path if we contain no directory separator.
20937 case $0 in
20938 *[\\/]* ) as_myself=$0 ;;
20939 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20940 for as_dir in $PATH
20941 do
20942 IFS=$as_save_IFS
20943 test -z "$as_dir" && as_dir=.
20944 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20945 done
20946 IFS=$as_save_IFS
20947
20948 ;;
20949 esac
20950 # We did not find ourselves, most probably we were run as `sh COMMAND'
20951 # in which case we are not to be found in the path.
20952 if test "x$as_myself" = x; then
20953 as_myself=$0
20954 fi
20955 if test ! -f "$as_myself"; then
20956 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20957 { (exit 1); exit 1; }
20958 fi
20959
20960 # Work around bugs in pre-3.0 UWIN ksh.
20961 for as_var in ENV MAIL MAILPATH
20962 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
20963 done
20964 PS1='$ '
20965 PS2='> '
20966 PS4='+ '
20967
20968 # NLS nuisances.
20969 for as_var in \
20970 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
20971 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
20972 LC_TELEPHONE LC_TIME
20973 do
20974 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
20975 eval $as_var=C; export $as_var
20976 else
20977 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
20978 fi
20979 done
20980
20981 # Required to use basename.
20982 if expr a : '\(a\)' >/dev/null 2>&1 &&
20983 test "X`expr 00001 : '.*\(...\)'`" = X001; then
20984 as_expr=expr
20985 else
20986 as_expr=false
20987 fi
20988
20989 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20990 as_basename=basename
20991 else
20992 as_basename=false
20993 fi
20994
20995
20996 # Name of the executable.
20997 as_me=`$as_basename -- "$0" ||
20998 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20999 X"$0" : 'X\(//\)$' \| \
21000 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
21001 echo X/"$0" |
21002 sed '/^.*\/\([^/][^/]*\)\/*$/{
21003 s//\1/
21004 q
21005 }
21006 /^X\/\(\/\/\)$/{
21007 s//\1/
21008 q
21009 }
21010 /^X\/\(\/\).*/{
21011 s//\1/
21012 q
21013 }
21014 s/.*/./; q'`
21015
21016 # CDPATH.
21017 $as_unset CDPATH
21018
21019
21020
21021 as_lineno_1=$LINENO
21022 as_lineno_2=$LINENO
21023 test "x$as_lineno_1" != "x$as_lineno_2" &&
21024 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
21025
21026 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
21027 # uniformly replaced by the line number. The first 'sed' inserts a
21028 # line-number line after each line using $LINENO; the second 'sed'
21029 # does the real work. The second script uses 'N' to pair each
21030 # line-number line with the line containing $LINENO, and appends
21031 # trailing '-' during substitution so that $LINENO is not a special
21032 # case at line end.
21033 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
21034 # scripts with optimization help from Paolo Bonzini. Blame Lee
21035 # E. McMahon (1931-1989) for sed's syntax. :-)
21036 sed -n '
21037 p
21038 /[$]LINENO/=
21039 ' <$as_myself |
21040 sed '
21041 s/[$]LINENO.*/&-/
21042 t lineno
21043 b
21044 :lineno
21045 N
21046 :loop
21047 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
21048 t loop
21049 s/-\n.*//
21050 ' >$as_me.lineno &&
21051 chmod +x "$as_me.lineno" ||
21052 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
21053 { (exit 1); exit 1; }; }
21054
21055 # Don't try to exec as it changes $[0], causing all sort of problems
21056 # (the dirname of $[0] is not the place where we might find the
21057 # original and so on. Autoconf is especially sensitive to this).
21058 . "./$as_me.lineno"
21059 # Exit status is that of the last command.
21060 exit
21061 }
21062
21063
21064 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
21065 as_dirname=dirname
21066 else
21067 as_dirname=false
21068 fi
21069
21070 ECHO_C= ECHO_N= ECHO_T=
21071 case `echo -n x` in
21072 -n*)
21073 case `echo 'x\c'` in
21074 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
21075 *) ECHO_C='\c';;
21076 esac;;
21077 *)
21078 ECHO_N='-n';;
21079 esac
21080
21081 if expr a : '\(a\)' >/dev/null 2>&1 &&
21082 test "X`expr 00001 : '.*\(...\)'`" = X001; then
21083 as_expr=expr
21084 else
21085 as_expr=false
21086 fi
21087
21088 rm -f conf$$ conf$$.exe conf$$.file
21089 if test -d conf$$.dir; then
21090 rm -f conf$$.dir/conf$$.file
21091 else
21092 rm -f conf$$.dir
21093 mkdir conf$$.dir
21094 fi
21095 echo >conf$$.file
21096 if ln -s conf$$.file conf$$ 2>/dev/null; then
21097 as_ln_s='ln -s'
21098 # ... but there are two gotchas:
21099 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
21100 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
21101 # In both cases, we have to default to `cp -p'.
21102 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
21103 as_ln_s='cp -p'
21104 elif ln conf$$.file conf$$ 2>/dev/null; then
21105 as_ln_s=ln
21106 else
21107 as_ln_s='cp -p'
21108 fi
21109 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
21110 rmdir conf$$.dir 2>/dev/null
21111
21112 if mkdir -p . 2>/dev/null; then
21113 as_mkdir_p=:
21114 else
21115 test -d ./-p && rmdir ./-p
21116 as_mkdir_p=false
21117 fi
21118
21119 if test -x / >/dev/null 2>&1; then
21120 as_test_x='test -x'
21121 else
21122 if ls -dL / >/dev/null 2>&1; then
21123 as_ls_L_option=L
21124 else
21125 as_ls_L_option=
21126 fi
21127 as_test_x='
21128 eval sh -c '\''
21129 if test -d "$1"; then
21130 test -d "$1/.";
21131 else
21132 case $1 in
21133 -*)set "./$1";;
21134 esac;
21135 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
21136 ???[sx]*):;;*)false;;esac;fi
21137 '\'' sh
21138 '
21139 fi
21140 as_executable_p=$as_test_x
21141
21142 # Sed expression to map a string onto a valid CPP name.
21143 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
21144
21145 # Sed expression to map a string onto a valid variable name.
21146 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
21147
21148
21149 exec 6>&1
21150
21151 # Save the log message, to keep $[0] and so on meaningful, and to
21152 # report actual input values of CONFIG_FILES etc. instead of their
21153 # values after options handling.
21154 ac_log="
21155 This file was extended by ffmpeg2theora $as_me 0.21, which was
21156 generated by GNU Autoconf 2.61. Invocation command line was
21157
21158 CONFIG_FILES = $CONFIG_FILES
21159 CONFIG_HEADERS = $CONFIG_HEADERS
21160 CONFIG_LINKS = $CONFIG_LINKS
21161 CONFIG_COMMANDS = $CONFIG_COMMANDS
21162 $ $0 $@
21163
21164 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21165 "
21166
21167 _ACEOF
21168
21169 cat >>$CONFIG_STATUS <<_ACEOF
21170 # Files that config.status was made for.
21171 config_files="$ac_config_files"
21172 config_commands="$ac_config_commands"
21173
21174 _ACEOF
21175
21176 cat >>$CONFIG_STATUS <<\_ACEOF
21177 ac_cs_usage="\
21178 \`$as_me' instantiates files from templates according to the
21179 current configuration.
21180
21181 Usage: $0 [OPTIONS] [FILE]...
21182
21183 -h, --help print this help, then exit
21184 -V, --version print version number and configuration settings, then exit
21185 -q, --quiet do not print progress messages
21186 -d, --debug don't remove temporary files
21187 --recheck update $as_me by reconfiguring in the same conditions
21188 --file=FILE[:TEMPLATE]
21189 instantiate the configuration file FILE
21190
21191 Configuration files:
21192 $config_files
21193
21194 Configuration commands:
21195 $config_commands
21196
21197 Report bugs to <bug-autoconf@gnu.org>."
21198
21199 _ACEOF
21200 cat >>$CONFIG_STATUS <<_ACEOF
21201 ac_cs_version="\\
21202 ffmpeg2theora config.status 0.21
21203 configured by $0, generated by GNU Autoconf 2.61,
21204 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
21205
21206 Copyright (C) 2006 Free Software Foundation, Inc.
21207 This config.status script is free software; the Free Software Foundation
21208 gives unlimited permission to copy, distribute and modify it."
21209
21210 ac_pwd='$ac_pwd'
21211 srcdir='$srcdir'
21212 INSTALL='$INSTALL'
21213 MKDIR_P='$MKDIR_P'
21214 _ACEOF
21215
21216 cat >>$CONFIG_STATUS <<\_ACEOF
21217 # If no file are specified by the user, then we need to provide default
21218 # value. By we need to know if files were specified by the user.
21219 ac_need_defaults=:
21220 while test $# != 0
21221 do
21222 case $1 in
21223 --*=*)
21224 ac_option=`expr "X$1" : 'X\([^=]*\)='`
21225 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
21226 ac_shift=:
21227 ;;
21228 *)
21229 ac_option=$1
21230 ac_optarg=$2
21231 ac_shift=shift
21232 ;;
21233 esac
21234
21235 case $ac_option in
21236 # Handling of the options.
21237 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21238 ac_cs_recheck=: ;;
21239 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
21240 echo "$ac_cs_version"; exit ;;
21241 --debug | --debu | --deb | --de | --d | -d )
21242 debug=: ;;
21243 --file | --fil | --fi | --f )
21244 $ac_shift
21245 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
21246 ac_need_defaults=false;;
21247 --he | --h | --help | --hel | -h )
21248 echo "$ac_cs_usage"; exit ;;
21249 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21250 | -silent | --silent | --silen | --sile | --sil | --si | --s)
21251 ac_cs_silent=: ;;
21252
21253 # This is an error.
21254 -*) { echo "$as_me: error: unrecognized option: $1
21255 Try \`$0 --help' for more information." >&2
21256 { (exit 1); exit 1; }; } ;;
21257
21258 *) ac_config_targets="$ac_config_targets $1"
21259 ac_need_defaults=false ;;
21260
21261 esac
21262 shift
21263 done
21264
21265 ac_configure_extra_args=
21266
21267 if $ac_cs_silent; then
21268 exec 6>/dev/null
21269 ac_configure_extra_args="$ac_configure_extra_args --silent"
21270 fi
21271
21272 _ACEOF
21273 cat >>$CONFIG_STATUS <<_ACEOF
21274 if \$ac_cs_recheck; then
21275 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
21276 CONFIG_SHELL=$SHELL
21277 export CONFIG_SHELL
21278 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21279 fi
21280
21281 _ACEOF
21282 cat >>$CONFIG_STATUS <<\_ACEOF
21283 exec 5>>config.log
21284 {
21285 echo
21286 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21287 ## Running $as_me. ##
21288 _ASBOX
21289 echo "$ac_log"
21290 } >&5
21291
21292 _ACEOF
21293 cat >>$CONFIG_STATUS <<_ACEOF
21294 #
21295 # INIT-COMMANDS
21296 #
21297 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
21298
21299 _ACEOF
21300
21301 cat >>$CONFIG_STATUS <<\_ACEOF
21302
21303 # Handling of arguments.
21304 for ac_config_target in $ac_config_targets
21305 do
21306 case $ac_config_target in
21307 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
21308 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21309 "kino_export/Makefile") CONFIG_FILES="$CONFIG_FILES kino_export/Makefile" ;;
21310
21311 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
21312 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21313 { (exit 1); exit 1; }; };;
21314 esac
21315 done
21316
21317
21318 # If the user did not use the arguments to specify the items to instantiate,
21319 # then the envvar interface is used. Set only those that are not.
21320 # We use the long form for the default assignment because of an extremely
21321 # bizarre bug on SunOS 4.1.3.
21322 if $ac_need_defaults; then
21323 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21324 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21325 fi
21326
21327 # Have a temporary directory for convenience. Make it in the build tree
21328 # simply because there is no reason against having it here, and in addition,
21329 # creating and moving files from /tmp can sometimes cause problems.
21330 # Hook for its removal unless debugging.
21331 # Note that there is a small window in which the directory will not be cleaned:
21332 # after its creation but before its name has been assigned to `$tmp'.
21333 $debug ||
21334 {
21335 tmp=
21336 trap 'exit_status=$?
21337 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
21338 ' 0
21339 trap '{ (exit 1); exit 1; }' 1 2 13 15
21340 }
21341 # Create a (secure) tmp directory for tmp files.
21342
21343 {
21344 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
21345 test -n "$tmp" && test -d "$tmp"
21346 } ||
21347 {
21348 tmp=./conf$$-$RANDOM
21349 (umask 077 && mkdir "$tmp")
21350 } ||
21351 {
21352 echo "$me: cannot create a temporary directory in ." >&2
21353 { (exit 1); exit 1; }
21354 }
21355
21356 #
21357 # Set up the sed scripts for CONFIG_FILES section.
21358 #
21359
21360 # No need to generate the scripts if there are no CONFIG_FILES.
21361 # This happens for instance when ./config.status config.h
21362 if test -n "$CONFIG_FILES"; then
21363
21364 _ACEOF
21365
21366
21367
21368 ac_delim='%!_!# '
21369 for ac_last_try in false false false false false :; do
21370 cat >conf$$subs.sed <<_ACEOF
21371 SHELL!$SHELL$ac_delim
21372 PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
21373 PACKAGE_NAME!$PACKAGE_NAME$ac_delim
21374 PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
21375 PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
21376 PACKAGE_STRING!$PACKAGE_STRING$ac_delim
21377 PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
21378 exec_prefix!$exec_prefix$ac_delim
21379 prefix!$prefix$ac_delim
21380 program_transform_name!$program_transform_name$ac_delim
21381 bindir!$bindir$ac_delim
21382 sbindir!$sbindir$ac_delim
21383 libexecdir!$libexecdir$ac_delim
21384 datarootdir!$datarootdir$ac_delim
21385 datadir!$datadir$ac_delim
21386 sysconfdir!$sysconfdir$ac_delim
21387 sharedstatedir!$sharedstatedir$ac_delim
21388 localstatedir!$localstatedir$ac_delim
21389 includedir!$includedir$ac_delim
21390 oldincludedir!$oldincludedir$ac_delim
21391 docdir!$docdir$ac_delim
21392 infodir!$infodir$ac_delim
21393 htmldir!$htmldir$ac_delim
21394 dvidir!$dvidir$ac_delim
21395 pdfdir!$pdfdir$ac_delim
21396 psdir!$psdir$ac_delim
21397 libdir!$libdir$ac_delim
21398 localedir!$localedir$ac_delim
21399 mandir!$mandir$ac_delim
21400 DEFS!$DEFS$ac_delim
21401 ECHO_C!$ECHO_C$ac_delim
21402 ECHO_N!$ECHO_N$ac_delim
21403 ECHO_T!$ECHO_T$ac_delim
21404 LIBS!$LIBS$ac_delim
21405 build_alias!$build_alias$ac_delim
21406 host_alias!$host_alias$ac_delim
21407 target_alias!$target_alias$ac_delim
21408 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
21409 INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
21410 INSTALL_DATA!$INSTALL_DATA$ac_delim
21411 am__isrc!$am__isrc$ac_delim
21412 CYGPATH_W!$CYGPATH_W$ac_delim
21413 PACKAGE!$PACKAGE$ac_delim
21414 VERSION!$VERSION$ac_delim
21415 ACLOCAL!$ACLOCAL$ac_delim
21416 AUTOCONF!$AUTOCONF$ac_delim
21417 AUTOMAKE!$AUTOMAKE$ac_delim
21418 AUTOHEADER!$AUTOHEADER$ac_delim
21419 MAKEINFO!$MAKEINFO$ac_delim
21420 install_sh!$install_sh$ac_delim
21421 STRIP!$STRIP$ac_delim
21422 INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
21423 mkdir_p!$mkdir_p$ac_delim
21424 AWK!$AWK$ac_delim
21425 SET_MAKE!$SET_MAKE$ac_delim
21426 am__leading_dot!$am__leading_dot$ac_delim
21427 AMTAR!$AMTAR$ac_delim
21428 am__tar!$am__tar$ac_delim
21429 am__untar!$am__untar$ac_delim
21430 CC!$CC$ac_delim
21431 CFLAGS!$CFLAGS$ac_delim
21432 LDFLAGS!$LDFLAGS$ac_delim
21433 CPPFLAGS!$CPPFLAGS$ac_delim
21434 ac_ct_CC!$ac_ct_CC$ac_delim
21435 EXEEXT!$EXEEXT$ac_delim
21436 OBJEXT!$OBJEXT$ac_delim
21437 DEPDIR!$DEPDIR$ac_delim
21438 am__include!$am__include$ac_delim
21439 am__quote!$am__quote$ac_delim
21440 AMDEP_TRUE!$AMDEP_TRUE$ac_delim
21441 AMDEP_FALSE!$AMDEP_FALSE$ac_delim
21442 AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
21443 CCDEPMODE!$CCDEPMODE$ac_delim
21444 am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
21445 am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
21446 build!$build$ac_delim
21447 build_cpu!$build_cpu$ac_delim
21448 build_vendor!$build_vendor$ac_delim
21449 build_os!$build_os$ac_delim
21450 host!$host$ac_delim
21451 host_cpu!$host_cpu$ac_delim
21452 host_vendor!$host_vendor$ac_delim
21453 host_os!$host_os$ac_delim
21454 SED!$SED$ac_delim
21455 GREP!$GREP$ac_delim
21456 EGREP!$EGREP$ac_delim
21457 LN_S!$LN_S$ac_delim
21458 ECHO!$ECHO$ac_delim
21459 AR!$AR$ac_delim
21460 RANLIB!$RANLIB$ac_delim
21461 DSYMUTIL!$DSYMUTIL$ac_delim
21462 NMEDIT!$NMEDIT$ac_delim
21463 CPP!$CPP$ac_delim
21464 CXX!$CXX$ac_delim
21465 CXXFLAGS!$CXXFLAGS$ac_delim
21466 ac_ct_CXX!$ac_ct_CXX$ac_delim
21467 CXXDEPMODE!$CXXDEPMODE$ac_delim
21468 _ACEOF
21469
21470 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
21471 break
21472 elif $ac_last_try; then
21473 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21474 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21475 { (exit 1); exit 1; }; }
21476 else
21477 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21478 fi
21479 done
21480
21481 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
21482 if test -n "$ac_eof"; then
21483 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
21484 ac_eof=`expr $ac_eof + 1`
21485 fi
21486
21487 cat >>$CONFIG_STATUS <<_ACEOF
21488 cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
21489 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21490 _ACEOF
21491 sed '
21492 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
21493 s/^/s,@/; s/!/@,|#_!!_#|/
21494 :n
21495 t n
21496 s/'"$ac_delim"'$/,g/; t
21497 s/$/\\/; p
21498 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
21499 ' >>$CONFIG_STATUS <conf$$subs.sed
21500 rm -f conf$$subs.sed
21501 cat >>$CONFIG_STATUS <<_ACEOF
21502 CEOF$ac_eof
21503 _ACEOF
21504
21505
21506 ac_delim='%!_!# '
21507 for ac_last_try in false false false false false :; do
21508 cat >conf$$subs.sed <<_ACEOF
21509 am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim
21510 am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim
21511 CXXCPP!$CXXCPP$ac_delim
21512 F77!$F77$ac_delim
21513 FFLAGS!$FFLAGS$ac_delim
21514 ac_ct_F77!$ac_ct_F77$ac_delim
21515 LIBTOOL!$LIBTOOL$ac_delim
21516 PKG_CONFIG!$PKG_CONFIG$ac_delim
21517 XIPH_CFLAGS!$XIPH_CFLAGS$ac_delim
21518 XIPH_LIBS!$XIPH_LIBS$ac_delim
21519 KATE_CFLAGS!$KATE_CFLAGS$ac_delim
21520 KATE_LIBS!$KATE_LIBS$ac_delim
21521 FFMPEG_CFLAGS!$FFMPEG_CFLAGS$ac_delim
21522 FFMPEG_LIBS!$FFMPEG_LIBS$ac_delim
21523 LIBOBJS!$LIBOBJS$ac_delim
21524 LTLIBOBJS!$LTLIBOBJS$ac_delim
21525 _ACEOF
21526
21527 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 16; then
21528 break
21529 elif $ac_last_try; then
21530 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
21531 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
21532 { (exit 1); exit 1; }; }
21533 else
21534 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21535 fi
21536 done
21537
21538 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
21539 if test -n "$ac_eof"; then
21540 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
21541 ac_eof=`expr $ac_eof + 1`
21542 fi
21543
21544 cat >>$CONFIG_STATUS <<_ACEOF
21545 cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
21546 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
21547 _ACEOF
21548 sed '
21549 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
21550 s/^/s,@/; s/!/@,|#_!!_#|/
21551 :n
21552 t n
21553 s/'"$ac_delim"'$/,g/; t
21554 s/$/\\/; p
21555 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
21556 ' >>$CONFIG_STATUS <conf$$subs.sed
21557 rm -f conf$$subs.sed
21558 cat >>$CONFIG_STATUS <<_ACEOF
21559 :end
21560 s/|#_!!_#|//g
21561 CEOF$ac_eof
21562 _ACEOF
21563
21564
21565 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21566 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21567 # trailing colons and then remove the whole line if VPATH becomes empty
21568 # (actually we leave an empty line to preserve line numbers).
21569 if test "x$srcdir" = x.; then
21570 ac_vpsub='/^[ ]*VPATH[ ]*=/{
21571 s/:*\$(srcdir):*/:/
21572 s/:*\${srcdir}:*/:/
21573 s/:*@srcdir@:*/:/
21574 s/^\([^=]*=[ ]*\):*/\1/
21575 s/:*$//
21576 s/^[^=]*=[ ]*$//
21577 }'
21578 fi
21579
21580 cat >>$CONFIG_STATUS <<\_ACEOF
21581 fi # test -n "$CONFIG_FILES"
21582
21583
21584 for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS
21585 do
21586 case $ac_tag in
21587 :[FHLC]) ac_mode=$ac_tag; continue;;
21588 esac
21589 case $ac_mode$ac_tag in
21590 :[FHL]*:*);;
21591 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
21592 echo "$as_me: error: Invalid tag $ac_tag." >&2;}
21593 { (exit 1); exit 1; }; };;
21594 :[FH]-) ac_tag=-:-;;
21595 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21596 esac
21597 ac_save_IFS=$IFS
21598 IFS=:
21599 set x $ac_tag
21600 IFS=$ac_save_IFS
21601 shift
21602 ac_file=$1
21603 shift
21604
21605 case $ac_mode in
21606 :L) ac_source=$1;;
21607 :[FH])
21608 ac_file_inputs=
21609 for ac_f
21610 do
21611 case $ac_f in
21612 -) ac_f="$tmp/stdin";;
21613 *) # Look for the file first in the build tree, then in the source tree
21614 # (if the path is not absolute). The absolute path cannot be DOS-style,
21615 # because $ac_f cannot contain `:'.
21616 test -f "$ac_f" ||
21617 case $ac_f in
21618 [\\/$]*) false;;
21619 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21620 esac ||
21621 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
21622 echo "$as_me: error: cannot find input file: $ac_f" >&2;}
21623 { (exit 1); exit 1; }; };;
21624 esac
21625 ac_file_inputs="$ac_file_inputs $ac_f"
21626 done
21627
21628 # Let's still pretend it is `configure' which instantiates (i.e., don't
21629 # use $as_me), people would be surprised to read:
21630 # /* config.h. Generated by config.status. */
21631 configure_input="Generated from "`IFS=:
21632 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
21633 if test x"$ac_file" != x-; then
21634 configure_input="$ac_file. $configure_input"
21635 { echo "$as_me:$LINENO: creating $ac_file" >&5
21636 echo "$as_me: creating $ac_file" >&6;}
21637 fi
21638
21639 case $ac_tag in
21640 *:-:* | *:-) cat >"$tmp/stdin";;
21641 esac
21642 ;;
21643 esac
21644
21645 ac_dir=`$as_dirname -- "$ac_file" ||
21646 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21647 X"$ac_file" : 'X\(//\)[^/]' \| \
21648 X"$ac_file" : 'X\(//\)$' \| \
21649 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21650 echo X"$ac_file" |
21651 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21652 s//\1/
21653 q
21654 }
21655 /^X\(\/\/\)[^/].*/{
21656 s//\1/
21657 q
21658 }
21659 /^X\(\/\/\)$/{
21660 s//\1/
21661 q
21662 }
21663 /^X\(\/\).*/{
21664 s//\1/
21665 q
21666 }
21667 s/.*/./; q'`
21668 { as_dir="$ac_dir"
21669 case $as_dir in #(
21670 -*) as_dir=./$as_dir;;
21671 esac
21672 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
21673 as_dirs=
21674 while :; do
21675 case $as_dir in #(
21676 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
21677 *) as_qdir=$as_dir;;
21678 esac
21679 as_dirs="'$as_qdir' $as_dirs"
21680 as_dir=`$as_dirname -- "$as_dir" ||
21681 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21682 X"$as_dir" : 'X\(//\)[^/]' \| \
21683 X"$as_dir" : 'X\(//\)$' \| \
21684 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
21685 echo X"$as_dir" |
21686 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21687 s//\1/
21688 q
21689 }
21690 /^X\(\/\/\)[^/].*/{
21691 s//\1/
21692 q
21693 }
21694 /^X\(\/\/\)$/{
21695 s//\1/
21696 q
21697 }
21698 /^X\(\/\).*/{
21699 s//\1/
21700 q
21701 }
21702 s/.*/./; q'`
21703 test -d "$as_dir" && break
21704 done
21705 test -z "$as_dirs" || eval "mkdir $as_dirs"
21706 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
21707 echo "$as_me: error: cannot create directory $as_dir" >&2;}
21708 { (exit 1); exit 1; }; }; }
21709 ac_builddir=.
21710
21711 case "$ac_dir" in
21712 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21713 *)
21714 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
21715 # A ".." for each directory in $ac_dir_suffix.
21716 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
21717 case $ac_top_builddir_sub in
21718 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21719 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21720 esac ;;
21721 esac
21722 ac_abs_top_builddir=$ac_pwd
21723 ac_abs_builddir=$ac_pwd$ac_dir_suffix
21724 # for backward compatibility:
21725 ac_top_builddir=$ac_top_build_prefix
21726
21727 case $srcdir in
21728 .) # We are building in place.
21729 ac_srcdir=.
21730 ac_top_srcdir=$ac_top_builddir_sub
21731 ac_abs_top_srcdir=$ac_pwd ;;
21732 [\\/]* | ?:[\\/]* ) # Absolute name.
21733 ac_srcdir=$srcdir$ac_dir_suffix;
21734 ac_top_srcdir=$srcdir
21735 ac_abs_top_srcdir=$srcdir ;;
21736 *) # Relative name.
21737 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21738 ac_top_srcdir=$ac_top_build_prefix$srcdir
21739 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21740 esac
21741 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21742
21743
21744 case $ac_mode in
21745 :F)
21746 #
21747 # CONFIG_FILE
21748 #
21749
21750 case $INSTALL in
21751 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21752 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
21753 esac
21754 ac_MKDIR_P=$MKDIR_P
21755 case $MKDIR_P in
21756 [\\/$]* | ?:[\\/]* ) ;;
21757 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
21758 esac
21759 _ACEOF
21760
21761 cat >>$CONFIG_STATUS <<\_ACEOF
21762 # If the template does not know about datarootdir, expand it.
21763 # FIXME: This hack should be removed a few years after 2.60.
21764 ac_datarootdir_hack=; ac_datarootdir_seen=
21765
21766 case `sed -n '/datarootdir/ {
21767 p
21768 q
21769 }
21770 /@datadir@/p
21771 /@docdir@/p
21772 /@infodir@/p
21773 /@localedir@/p
21774 /@mandir@/p
21775 ' $ac_file_inputs` in
21776 *datarootdir*) ac_datarootdir_seen=yes;;
21777 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21778 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21779 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21780 _ACEOF
21781 cat >>$CONFIG_STATUS <<_ACEOF
21782 ac_datarootdir_hack='
21783 s&@datadir@&$datadir&g
21784 s&@docdir@&$docdir&g
21785 s&@infodir@&$infodir&g
21786 s&@localedir@&$localedir&g
21787 s&@mandir@&$mandir&g
21788 s&\\\${datarootdir}&$datarootdir&g' ;;
21789 esac
21790 _ACEOF
21791
21792 # Neutralize VPATH when `$srcdir' = `.'.
21793 # Shell code in configure.ac might set extrasub.
21794 # FIXME: do we really want to maintain this feature?
21795 cat >>$CONFIG_STATUS <<_ACEOF
21796 sed "$ac_vpsub
21797 $extrasub
21798 _ACEOF
21799 cat >>$CONFIG_STATUS <<\_ACEOF
21800 :t
21801 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21802 s&@configure_input@&$configure_input&;t t
21803 s&@top_builddir@&$ac_top_builddir_sub&;t t
21804 s&@srcdir@&$ac_srcdir&;t t
21805 s&@abs_srcdir@&$ac_abs_srcdir&;t t
21806 s&@top_srcdir@&$ac_top_srcdir&;t t
21807 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21808 s&@builddir@&$ac_builddir&;t t
21809 s&@abs_builddir@&$ac_abs_builddir&;t t
21810 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21811 s&@INSTALL@&$ac_INSTALL&;t t
21812 s&@MKDIR_P@&$ac_MKDIR_P&;t t
21813 $ac_datarootdir_hack
21814 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
21815
21816 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21817 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
21818 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
21819 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21820 which seems to be undefined. Please make sure it is defined." >&5
21821 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21822 which seems to be undefined. Please make sure it is defined." >&2;}
21823
21824 rm -f "$tmp/stdin"
21825 case $ac_file in
21826 -) cat "$tmp/out"; rm -f "$tmp/out";;
21827 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
21828 esac
21829 ;;
21830
21831
21832 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
21833 echo "$as_me: executing $ac_file commands" >&6;}
21834 ;;
21835 esac
21836
21837
21838 case $ac_file$ac_mode in
21839 "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
21840 # Strip MF so we end up with the name of the file.
21841 mf=`echo "$mf" | sed -e 's/:.*$//'`
21842 # Check whether this is an Automake generated Makefile or not.
21843 # We used to match only the files named `Makefile.in', but
21844 # some people rename them; so instead we look at the file content.
21845 # Grep'ing the first line is not enough: some people post-process
21846 # each Makefile.in and add a new line on top of each file to say so.
21847 # Grep'ing the whole file is not good either: AIX grep has a line
21848 # limit of 2048, but all sed's we know have understand at least 4000.
21849 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
21850 dirpart=`$as_dirname -- "$mf" ||
21851 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21852 X"$mf" : 'X\(//\)[^/]' \| \
21853 X"$mf" : 'X\(//\)$' \| \
21854 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
21855 echo X"$mf" |
21856 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21857 s//\1/
21858 q
21859 }
21860 /^X\(\/\/\)[^/].*/{
21861 s//\1/
21862 q
21863 }
21864 /^X\(\/\/\)$/{
21865 s//\1/
21866 q
21867 }
21868 /^X\(\/\).*/{
21869 s//\1/
21870 q
21871 }
21872 s/.*/./; q'`
21873 else
21874 continue
21875 fi
21876 # Extract the definition of DEPDIR, am__include, and am__quote
21877 # from the Makefile without running `make'.
21878 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
21879 test -z "$DEPDIR" && continue
21880 am__include=`sed -n 's/^am__include = //p' < "$mf"`
21881 test -z "am__include" && continue
21882 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
21883 # When using ansi2knr, U may be empty or an underscore; expand it
21884 U=`sed -n 's/^U = //p' < "$mf"`
21885 # Find all dependency output files, they are included files with
21886 # $(DEPDIR) in their names. We invoke sed twice because it is the
21887 # simplest approach to changing $(DEPDIR) to its actual value in the
21888 # expansion.
21889 for file in `sed -n "
21890 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
21891 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
21892 # Make sure the directory exists.
21893 test -f "$dirpart/$file" && continue
21894 fdir=`$as_dirname -- "$file" ||
21895 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21896 X"$file" : 'X\(//\)[^/]' \| \
21897 X"$file" : 'X\(//\)$' \| \
21898 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
21899 echo X"$file" |
21900 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21901 s//\1/
21902 q
21903 }
21904 /^X\(\/\/\)[^/].*/{
21905 s//\1/
21906 q
21907 }
21908 /^X\(\/\/\)$/{
21909 s//\1/
21910 q
21911 }
21912 /^X\(\/\).*/{
21913 s//\1/
21914 q
21915 }
21916 s/.*/./; q'`
21917 { as_dir=$dirpart/$fdir
21918 case $as_dir in #(
21919 -*) as_dir=./$as_dir;;
21920 esac
21921 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
21922 as_dirs=
21923 while :; do
21924 case $as_dir in #(
21925 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
21926 *) as_qdir=$as_dir;;
21927 esac
21928 as_dirs="'$as_qdir' $as_dirs"
21929 as_dir=`$as_dirname -- "$as_dir" ||
21930 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21931 X"$as_dir" : 'X\(//\)[^/]' \| \
21932 X"$as_dir" : 'X\(//\)$' \| \
21933 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
21934 echo X"$as_dir" |
21935 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21936 s//\1/
21937 q
21938 }
21939 /^X\(\/\/\)[^/].*/{
21940 s//\1/
21941 q
21942 }
21943 /^X\(\/\/\)$/{
21944 s//\1/
21945 q
21946 }
21947 /^X\(\/\).*/{
21948 s//\1/
21949 q
21950 }
21951 s/.*/./; q'`
21952 test -d "$as_dir" && break
21953 done
21954 test -z "$as_dirs" || eval "mkdir $as_dirs"
21955 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
21956 echo "$as_me: error: cannot create directory $as_dir" >&2;}
21957 { (exit 1); exit 1; }; }; }
21958 # echo "creating $dirpart/$file"
21959 echo '# dummy' > "$dirpart/$file"
21960 done
21961 done
21962 ;;
21963
21964 esac
21965 done # for ac_tag
21966
21967
21968 { (exit 0); exit 0; }
21969 _ACEOF
21970 chmod +x $CONFIG_STATUS
21971 ac_clean_files=$ac_clean_files_save
21972
21973
21974 # configure is writing to config.log, and then calls config.status.
21975 # config.status does its own redirection, appending to config.log.
21976 # Unfortunately, on DOS this fails, as config.log is still kept open
21977 # by configure, so config.status won't be able to write to it; its
21978 # output is simply discarded. So we exec the FD to /dev/null,
21979 # effectively closing config.log, so it can be properly (re)opened and
21980 # appended to by config.status. When coming back to configure, we
21981 # need to make the FD available again.
21982 if test "$no_create" != yes; then
21983 ac_cs_success=:
21984 ac_config_status_args=
21985 test "$silent" = yes &&
21986 ac_config_status_args="$ac_config_status_args --quiet"
21987 exec 5>/dev/null
21988 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21989 exec 5>>config.log
21990 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21991 # would make configure fail if this is the last instruction.
21992 $ac_cs_success || { (exit 1); exit 1; }
21993 fi
21994
+0
-62
configure.ac less more
0 dnl Process this file with autoconf to produce a configure script.
1 AC_PREREQ(2.59)
2 AC_INIT(ffmpeg2theora,0.21)
3 AC_CONFIG_SRCDIR([Makefile.am])
4 AM_INIT_AUTOMAKE([dist-bzip2])
5
6 AC_PROG_CC
7 AM_PROG_CC_C_O
8 AM_PROG_LIBTOOL
9
10 AC_SYS_LARGEFILE
11
12 AC_MSG_CHECKING(whether to link statically)
13 AC_ARG_WITH(static-linking,
14 [ --with-static-linking Link binaries statically],
15 [ case "$withval" in
16 no)
17 AC_MSG_RESULT(no)
18 ;;
19 *)
20 AC_MSG_RESULT(yes)
21 LDFLAGS="-static $LDFLAGS"
22 ;;
23 esac],
24 AC_MSG_RESULT(no)
25 )
26
27 PKG_CHECK_MODULES(XIPH,ogg >= 1.1 vorbis vorbisenc theora >= 1.0beta1)
28 AC_SUBST(XIPH_CFLAGS)
29 AC_SUBST(XIPH_LIBS)
30
31 export PKG_CONFIG_PATH=./libkate/pkg/pkgconfig:$PKG_CONFIG_PATH
32 PKG_CHECK_MODULES(KATE,oggkate,
33 KATE_CFLAGS="-DHAVE_KATE -DHAVE_OGGKATE $KATE_CFLAGS",
34 [AC_MSG_RESULT(
35
36 . Could not find libkate. Subtitles support will be disabled.
37 You can also run ./get_libkate.sh (for more information see INSTALL)
38 or update PKG_CONFIG_PATH to point to libkate's source folder
39 )]
40 )
41 AC_SUBST(KATE_LIBS)
42 AC_SUBST(KATE_CFLAGS)
43
44 export PKG_CONFIG_PATH=./ffmpeg:$PKG_CONFIG_PATH
45 PKG_CHECK_MODULES(FFMPEG, libavformat libavcodec libavdevice libswscale libpostproc, HAVE_FFMPEG=yes,
46 AC_MSG_ERROR([
47
48 . Could not find libavformat libavcodec libavdevice libswscale libpostproc.
49 You can install it via
50 sudo apt-get install libavformat-dev libavcodec-dev libavdevice-dev libswscale-dev libpostproc-dev
51 or update PKG_CONFIG_PATH to point to ffmpeg's source folder
52 or run ./get_ffmpeg_svn.sh (for more information see INSTALL)
53 ])
54 )
55 AC_SUBST(FFMPEG_CFLAGS)
56 AC_SUBST(FFMPEG_LIBS)
57
58 AC_OUTPUT([
59 Makefile
60 kino_export/Makefile
61 ])
+0
-589
depcomp less more
0 #! /bin/sh
1 # depcomp - compile a program generating dependencies as side-effects
2
3 scriptversion=2007-03-29.01
4
5 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
6 # Foundation, Inc.
7
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
12
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 # 02110-1301, USA.
22
23 # As a special exception to the GNU General Public License, if you
24 # distribute this file as part of a program that contains a
25 # configuration script generated by Autoconf, you may include it under
26 # the same distribution terms that you use for the rest of that program.
27
28 # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
29
30 case $1 in
31 '')
32 echo "$0: No command. Try \`$0 --help' for more information." 1>&2
33 exit 1;
34 ;;
35 -h | --h*)
36 cat <<\EOF
37 Usage: depcomp [--help] [--version] PROGRAM [ARGS]
38
39 Run PROGRAMS ARGS to compile a file, generating dependencies
40 as side-effects.
41
42 Environment variables:
43 depmode Dependency tracking mode.
44 source Source file read by `PROGRAMS ARGS'.
45 object Object file output by `PROGRAMS ARGS'.
46 DEPDIR directory where to store dependencies.
47 depfile Dependency file to output.
48 tmpdepfile Temporary file to use when outputing dependencies.
49 libtool Whether libtool is used (yes/no).
50
51 Report bugs to <bug-automake@gnu.org>.
52 EOF
53 exit $?
54 ;;
55 -v | --v*)
56 echo "depcomp $scriptversion"
57 exit $?
58 ;;
59 esac
60
61 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
62 echo "depcomp: Variables source, object and depmode must be set" 1>&2
63 exit 1
64 fi
65
66 # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
67 depfile=${depfile-`echo "$object" |
68 sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
69 tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
70
71 rm -f "$tmpdepfile"
72
73 # Some modes work just like other modes, but use different flags. We
74 # parameterize here, but still list the modes in the big case below,
75 # to make depend.m4 easier to write. Note that we *cannot* use a case
76 # here, because this file can only contain one case statement.
77 if test "$depmode" = hp; then
78 # HP compiler uses -M and no extra arg.
79 gccflag=-M
80 depmode=gcc
81 fi
82
83 if test "$depmode" = dashXmstdout; then
84 # This is just like dashmstdout with a different argument.
85 dashmflag=-xM
86 depmode=dashmstdout
87 fi
88
89 case "$depmode" in
90 gcc3)
91 ## gcc 3 implements dependency tracking that does exactly what
92 ## we want. Yay! Note: for some reason libtool 1.4 doesn't like
93 ## it if -MD -MP comes after the -MF stuff. Hmm.
94 ## Unfortunately, FreeBSD c89 acceptance of flags depends upon
95 ## the command line argument order; so add the flags where they
96 ## appear in depend2.am. Note that the slowdown incurred here
97 ## affects only configure: in makefiles, %FASTDEP% shortcuts this.
98 for arg
99 do
100 case $arg in
101 -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
102 *) set fnord "$@" "$arg" ;;
103 esac
104 shift # fnord
105 shift # $arg
106 done
107 "$@"
108 stat=$?
109 if test $stat -eq 0; then :
110 else
111 rm -f "$tmpdepfile"
112 exit $stat
113 fi
114 mv "$tmpdepfile" "$depfile"
115 ;;
116
117 gcc)
118 ## There are various ways to get dependency output from gcc. Here's
119 ## why we pick this rather obscure method:
120 ## - Don't want to use -MD because we'd like the dependencies to end
121 ## up in a subdir. Having to rename by hand is ugly.
122 ## (We might end up doing this anyway to support other compilers.)
123 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
124 ## -MM, not -M (despite what the docs say).
125 ## - Using -M directly means running the compiler twice (even worse
126 ## than renaming).
127 if test -z "$gccflag"; then
128 gccflag=-MD,
129 fi
130 "$@" -Wp,"$gccflag$tmpdepfile"
131 stat=$?
132 if test $stat -eq 0; then :
133 else
134 rm -f "$tmpdepfile"
135 exit $stat
136 fi
137 rm -f "$depfile"
138 echo "$object : \\" > "$depfile"
139 alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
140 ## The second -e expression handles DOS-style file names with drive letters.
141 sed -e 's/^[^:]*: / /' \
142 -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
143 ## This next piece of magic avoids the `deleted header file' problem.
144 ## The problem is that when a header file which appears in a .P file
145 ## is deleted, the dependency causes make to die (because there is
146 ## typically no way to rebuild the header). We avoid this by adding
147 ## dummy dependencies for each header file. Too bad gcc doesn't do
148 ## this for us directly.
149 tr ' ' '
150 ' < "$tmpdepfile" |
151 ## Some versions of gcc put a space before the `:'. On the theory
152 ## that the space means something, we add a space to the output as
153 ## well.
154 ## Some versions of the HPUX 10.20 sed can't process this invocation
155 ## correctly. Breaking it into two sed invocations is a workaround.
156 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
157 rm -f "$tmpdepfile"
158 ;;
159
160 hp)
161 # This case exists only to let depend.m4 do its work. It works by
162 # looking at the text of this script. This case will never be run,
163 # since it is checked for above.
164 exit 1
165 ;;
166
167 sgi)
168 if test "$libtool" = yes; then
169 "$@" "-Wp,-MDupdate,$tmpdepfile"
170 else
171 "$@" -MDupdate "$tmpdepfile"
172 fi
173 stat=$?
174 if test $stat -eq 0; then :
175 else
176 rm -f "$tmpdepfile"
177 exit $stat
178 fi
179 rm -f "$depfile"
180
181 if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
182 echo "$object : \\" > "$depfile"
183
184 # Clip off the initial element (the dependent). Don't try to be
185 # clever and replace this with sed code, as IRIX sed won't handle
186 # lines with more than a fixed number of characters (4096 in
187 # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
188 # the IRIX cc adds comments like `#:fec' to the end of the
189 # dependency line.
190 tr ' ' '
191 ' < "$tmpdepfile" \
192 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
193 tr '
194 ' ' ' >> $depfile
195 echo >> $depfile
196
197 # The second pass generates a dummy entry for each header file.
198 tr ' ' '
199 ' < "$tmpdepfile" \
200 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
201 >> $depfile
202 else
203 # The sourcefile does not contain any dependencies, so just
204 # store a dummy comment line, to avoid errors with the Makefile
205 # "include basename.Plo" scheme.
206 echo "#dummy" > "$depfile"
207 fi
208 rm -f "$tmpdepfile"
209 ;;
210
211 aix)
212 # The C for AIX Compiler uses -M and outputs the dependencies
213 # in a .u file. In older versions, this file always lives in the
214 # current directory. Also, the AIX compiler puts `$object:' at the
215 # start of each line; $object doesn't have directory information.
216 # Version 6 uses the directory in both cases.
217 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
218 test "x$dir" = "x$object" && dir=
219 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
220 if test "$libtool" = yes; then
221 tmpdepfile1=$dir$base.u
222 tmpdepfile2=$base.u
223 tmpdepfile3=$dir.libs/$base.u
224 "$@" -Wc,-M
225 else
226 tmpdepfile1=$dir$base.u
227 tmpdepfile2=$dir$base.u
228 tmpdepfile3=$dir$base.u
229 "$@" -M
230 fi
231 stat=$?
232
233 if test $stat -eq 0; then :
234 else
235 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
236 exit $stat
237 fi
238
239 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
240 do
241 test -f "$tmpdepfile" && break
242 done
243 if test -f "$tmpdepfile"; then
244 # Each line is of the form `foo.o: dependent.h'.
245 # Do two passes, one to just change these to
246 # `$object: dependent.h' and one to simply `dependent.h:'.
247 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
248 # That's a tab and a space in the [].
249 sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
250 else
251 # The sourcefile does not contain any dependencies, so just
252 # store a dummy comment line, to avoid errors with the Makefile
253 # "include basename.Plo" scheme.
254 echo "#dummy" > "$depfile"
255 fi
256 rm -f "$tmpdepfile"
257 ;;
258
259 icc)
260 # Intel's C compiler understands `-MD -MF file'. However on
261 # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
262 # ICC 7.0 will fill foo.d with something like
263 # foo.o: sub/foo.c
264 # foo.o: sub/foo.h
265 # which is wrong. We want:
266 # sub/foo.o: sub/foo.c
267 # sub/foo.o: sub/foo.h
268 # sub/foo.c:
269 # sub/foo.h:
270 # ICC 7.1 will output
271 # foo.o: sub/foo.c sub/foo.h
272 # and will wrap long lines using \ :
273 # foo.o: sub/foo.c ... \
274 # sub/foo.h ... \
275 # ...
276
277 "$@" -MD -MF "$tmpdepfile"
278 stat=$?
279 if test $stat -eq 0; then :
280 else
281 rm -f "$tmpdepfile"
282 exit $stat
283 fi
284 rm -f "$depfile"
285 # Each line is of the form `foo.o: dependent.h',
286 # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
287 # Do two passes, one to just change these to
288 # `$object: dependent.h' and one to simply `dependent.h:'.
289 sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
290 # Some versions of the HPUX 10.20 sed can't process this invocation
291 # correctly. Breaking it into two sed invocations is a workaround.
292 sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
293 sed -e 's/$/ :/' >> "$depfile"
294 rm -f "$tmpdepfile"
295 ;;
296
297 hp2)
298 # The "hp" stanza above does not work with aCC (C++) and HP's ia64
299 # compilers, which have integrated preprocessors. The correct option
300 # to use with these is +Maked; it writes dependencies to a file named
301 # 'foo.d', which lands next to the object file, wherever that
302 # happens to be.
303 # Much of this is similar to the tru64 case; see comments there.
304 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
305 test "x$dir" = "x$object" && dir=
306 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
307 if test "$libtool" = yes; then
308 tmpdepfile1=$dir$base.d
309 tmpdepfile2=$dir.libs/$base.d
310 "$@" -Wc,+Maked
311 else
312 tmpdepfile1=$dir$base.d
313 tmpdepfile2=$dir$base.d
314 "$@" +Maked
315 fi
316 stat=$?
317 if test $stat -eq 0; then :
318 else
319 rm -f "$tmpdepfile1" "$tmpdepfile2"
320 exit $stat
321 fi
322
323 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
324 do
325 test -f "$tmpdepfile" && break
326 done
327 if test -f "$tmpdepfile"; then
328 sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
329 # Add `dependent.h:' lines.
330 sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
331 else
332 echo "#dummy" > "$depfile"
333 fi
334 rm -f "$tmpdepfile" "$tmpdepfile2"
335 ;;
336
337 tru64)
338 # The Tru64 compiler uses -MD to generate dependencies as a side
339 # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
340 # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
341 # dependencies in `foo.d' instead, so we check for that too.
342 # Subdirectories are respected.
343 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
344 test "x$dir" = "x$object" && dir=
345 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
346
347 if test "$libtool" = yes; then
348 # With Tru64 cc, shared objects can also be used to make a
349 # static library. This mechanism is used in libtool 1.4 series to
350 # handle both shared and static libraries in a single compilation.
351 # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
352 #
353 # With libtool 1.5 this exception was removed, and libtool now
354 # generates 2 separate objects for the 2 libraries. These two
355 # compilations output dependencies in $dir.libs/$base.o.d and
356 # in $dir$base.o.d. We have to check for both files, because
357 # one of the two compilations can be disabled. We should prefer
358 # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
359 # automatically cleaned when .libs/ is deleted, while ignoring
360 # the former would cause a distcleancheck panic.
361 tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
362 tmpdepfile2=$dir$base.o.d # libtool 1.5
363 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
364 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
365 "$@" -Wc,-MD
366 else
367 tmpdepfile1=$dir$base.o.d
368 tmpdepfile2=$dir$base.d
369 tmpdepfile3=$dir$base.d
370 tmpdepfile4=$dir$base.d
371 "$@" -MD
372 fi
373
374 stat=$?
375 if test $stat -eq 0; then :
376 else
377 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
378 exit $stat
379 fi
380
381 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
382 do
383 test -f "$tmpdepfile" && break
384 done
385 if test -f "$tmpdepfile"; then
386 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
387 # That's a tab and a space in the [].
388 sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
389 else
390 echo "#dummy" > "$depfile"
391 fi
392 rm -f "$tmpdepfile"
393 ;;
394
395 #nosideeffect)
396 # This comment above is used by automake to tell side-effect
397 # dependency tracking mechanisms from slower ones.
398
399 dashmstdout)
400 # Important note: in order to support this mode, a compiler *must*
401 # always write the preprocessed file to stdout, regardless of -o.
402 "$@" || exit $?
403
404 # Remove the call to Libtool.
405 if test "$libtool" = yes; then
406 while test $1 != '--mode=compile'; do
407 shift
408 done
409 shift
410 fi
411
412 # Remove `-o $object'.
413 IFS=" "
414 for arg
415 do
416 case $arg in
417 -o)
418 shift
419 ;;
420 $object)
421 shift
422 ;;
423 *)
424 set fnord "$@" "$arg"
425 shift # fnord
426 shift # $arg
427 ;;
428 esac
429 done
430
431 test -z "$dashmflag" && dashmflag=-M
432 # Require at least two characters before searching for `:'
433 # in the target name. This is to cope with DOS-style filenames:
434 # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
435 "$@" $dashmflag |
436 sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
437 rm -f "$depfile"
438 cat < "$tmpdepfile" > "$depfile"
439 tr ' ' '
440 ' < "$tmpdepfile" | \
441 ## Some versions of the HPUX 10.20 sed can't process this invocation
442 ## correctly. Breaking it into two sed invocations is a workaround.
443 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
444 rm -f "$tmpdepfile"
445 ;;
446
447 dashXmstdout)
448 # This case only exists to satisfy depend.m4. It is never actually
449 # run, as this mode is specially recognized in the preamble.
450 exit 1
451 ;;
452
453 makedepend)
454 "$@" || exit $?
455 # Remove any Libtool call
456 if test "$libtool" = yes; then
457 while test $1 != '--mode=compile'; do
458 shift
459 done
460 shift
461 fi
462 # X makedepend
463 shift
464 cleared=no
465 for arg in "$@"; do
466 case $cleared in
467 no)
468 set ""; shift
469 cleared=yes ;;
470 esac
471 case "$arg" in
472 -D*|-I*)
473 set fnord "$@" "$arg"; shift ;;
474 # Strip any option that makedepend may not understand. Remove
475 # the object too, otherwise makedepend will parse it as a source file.
476 -*|$object)
477 ;;
478 *)
479 set fnord "$@" "$arg"; shift ;;
480 esac
481 done
482 obj_suffix="`echo $object | sed 's/^.*\././'`"
483 touch "$tmpdepfile"
484 ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
485 rm -f "$depfile"
486 cat < "$tmpdepfile" > "$depfile"
487 sed '1,2d' "$tmpdepfile" | tr ' ' '
488 ' | \
489 ## Some versions of the HPUX 10.20 sed can't process this invocation
490 ## correctly. Breaking it into two sed invocations is a workaround.
491 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
492 rm -f "$tmpdepfile" "$tmpdepfile".bak
493 ;;
494
495 cpp)
496 # Important note: in order to support this mode, a compiler *must*
497 # always write the preprocessed file to stdout.
498 "$@" || exit $?
499
500 # Remove the call to Libtool.
501 if test "$libtool" = yes; then
502 while test $1 != '--mode=compile'; do
503 shift
504 done
505 shift
506 fi
507
508 # Remove `-o $object'.
509 IFS=" "
510 for arg
511 do
512 case $arg in
513 -o)
514 shift
515 ;;
516 $object)
517 shift
518 ;;
519 *)
520 set fnord "$@" "$arg"
521 shift # fnord
522 shift # $arg
523 ;;
524 esac
525 done
526
527 "$@" -E |
528 sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
529 -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
530 sed '$ s: \\$::' > "$tmpdepfile"
531 rm -f "$depfile"
532 echo "$object : \\" > "$depfile"
533 cat < "$tmpdepfile" >> "$depfile"
534 sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
535 rm -f "$tmpdepfile"
536 ;;
537
538 msvisualcpp)
539 # Important note: in order to support this mode, a compiler *must*
540 # always write the preprocessed file to stdout, regardless of -o,
541 # because we must use -o when running libtool.
542 "$@" || exit $?
543 IFS=" "
544 for arg
545 do
546 case "$arg" in
547 "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
548 set fnord "$@"
549 shift
550 shift
551 ;;
552 *)
553 set fnord "$@" "$arg"
554 shift
555 shift
556 ;;
557 esac
558 done
559 "$@" -E |
560 sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
561 rm -f "$depfile"
562 echo "$object : \\" > "$depfile"
563 . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
564 echo " " >> "$depfile"
565 . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
566 rm -f "$tmpdepfile"
567 ;;
568
569 none)
570 exec "$@"
571 ;;
572
573 *)
574 echo "Unknown depmode $depmode" 1>&2
575 exit 1
576 ;;
577 esac
578
579 exit 0
580
581 # Local Variables:
582 # mode: shell-script
583 # sh-indentation: 2
584 # eval: (add-hook 'write-file-hooks 'time-stamp)
585 # time-stamp-start: "scriptversion="
586 # time-stamp-format: "%:y-%02m-%02d.%02H"
587 # time-stamp-end: "$"
588 # End:
00 .\" Hey, EMACS: -*- nroff -*-
1 .TH FFMPEG2THEORA 1 "December 30, 2005"
1 .TH FFMPEG2THEORA 1 "August 31, 2008"
22 .\" Please adjust this date whenever revising the manpage.
33 .\"
44 .\" Some roff macros, for reference:
116116 .TP
117117 .B \-H, \-\-samplerate
118118 Set output samplerate (in Hz).
119 .TP
120 .B \-\-nosound
121 Disable the sound from input.
122119 .SS Input options:
120 .TP
121 .B \-\-noaudio
122 Disable audio from input.
123 .TP
124 .B \-\-novideo
125 Disable video from input.
123126 .TP
124127 .B \-\-deinterlace
125128 Force deinterlace. Otherwise only material marked as interlaced will be
131134 .TP
132135 .B \-f, \-\-format
133136 Specify input format.
134 .TP
135 .B \-\-v4l /dev/video0
136 read data from v4l device /dev/video0,
137 you have to specify an output file with \-o.
138137 .TP
139138 .B \-\-inputfps
140139 Override input fps.
151150 .TP
152151 .B \-\-subtitles
153152 Encode subtitles from the given file to a multiplexed Kate stream.
154 The input file should be in SubRip (.srt) format, encoded in utf-8,
153 The input file should be in SubRip (.srt) format, encoded in UTF-8,
155154 unless the --subtitles-encoding option is also given.
156155 .TP
157156 .B \-\-subtitles-encoding encoding
158157 Assumes the corresponding subtitles file is encoded in the given
159 encoding (utf-8 and iso-8859-1 (aka latin1) are supported).
158 encoding (UTF-8 and iso-8859-1 (aka latin1) are supported). The
159 default is UTF-8.
160160 .TP
161161 .B \-\-subtitles-language language
162162 Sets the language of the corresponding subtitles stream. This will
163163 be set in the corresponding Kate stream so a video player may make
164 this available to the user for language selection.
164 this available to the user for language selection. Language is an
165 ISO 639-1 or RFC 3066 ASCII string and is limited to 15 characters.
165166 .TP
166167 .B \-\-subtitles-category category
167168 Sets the category of the corresponding subtitles stream. This will
168169 be set in the corresponding Kate stream so a video player may make
169170 this available to the user for selection. The default category is
170171 "subtitles". Suggested other categories may include "transcript",
171 "commentary", "lyrics", etc.
172 "commentary", "lyrics", etc. Category is an ASCII string and is
173 limited to 15 characters
174 .TP
175 .B \-\-subtitles-ignore-non-utf8
176 When reading an UTF-8 subtitles text file, any invalid UTF-8 sequence
177 will be ignored. This may be useful if there are stray sequences in
178 an otherwise UTF-8 file. Note that, since those invalid sequences
179 will be removed from the output, this option is not a substitute to
180 converting a non UTF-8 file to UTF-8.
172181 .SS Metadata options:
173182 .TP
174183 .B \-\-artist
208217 cat something.dv | ffmpeg2theora -f dv -o output.ogv \-
209218
210219 Encode a series of images:
211 ffmpeg2theora -f image2 frame%06d.png -o output.ogv
220 ffmpeg2theora frame%06d.png -o output.ogv
212221
213222 Live streaming from V4L Device:
214 ffmpeg2theora \-\-v4l /dev/video0 \-\-inputfps 15 \-x 160 \-y 128 \-o \- \\
215 | oggfwd iccast2server 8000 password /theora.ogv
223 ffmpeg2theora /dev/video0 \-f video4linux \-\-inputfps 15 \-x 160 \-y 128 \\
224 \-o \- | oggfwd iccast2server 8000 password /theora.ogv
216225
217226 Live encoding from a DV camcorder (needs a fast machine):
218227 dvgrab - | ffmpeg2theora -f dv -x 352 -y 288 -o output.ogv -\n"
+0
-2109
ffmpeg2theora.c less more
0 /* -*- tab-width:4;c-file-style:"cc-mode"; -*- */
1 /*
2 * ffmpeg2theora.c -- Convert ffmpeg supported a/v files to Ogg Theora / Ogg Vorbis
3 * Copyright (C) 2003-2006 <j@v2v.cc>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software Foundation,
17 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 *
19 */
20
21 #include <stdio.h>
22 #include <stdlib.h>
23 #include <unistd.h>
24 #include <string.h>
25 #include <getopt.h>
26 #include <math.h>
27 #include <errno.h>
28
29 #include "libavformat/avformat.h"
30 #include "libavdevice/avdevice.h"
31 #include "libswscale/swscale.h"
32 #include "libpostproc/postprocess.h"
33
34 #include "theora/theora.h"
35 #include "vorbis/codec.h"
36 #include "vorbis/vorbisenc.h"
37
38 #ifdef HAVE_KATE
39 #include "kate/kate.h"
40 #endif
41
42 #ifdef WIN32
43 #include "fcntl.h"
44 #endif
45
46 #include "theorautils.h"
47
48 #ifdef __linux__
49 #define VIDEO4LINUX_ENABLED
50 #endif
51
52 enum {
53 NULL_FLAG,
54 DEINTERLACE_FLAG,
55 OPTIMIZE_FLAG,
56 SYNC_FLAG,
57 NOSOUND_FLAG,
58 CROPTOP_FLAG,
59 CROPBOTTOM_FLAG,
60 CROPRIGHT_FLAG,
61 CROPLEFT_FLAG,
62 ASPECT_FLAG,
63 INPUTFPS_FLAG,
64 AUDIOSTREAM_FLAG,
65 SUBTITLES_FLAG,
66 SUBTITLES_ENCODING_FLAG,
67 SUBTITLES_LANGUAGE_FLAG,
68 SUBTITLES_CATEGORY_FLAG,
69 VHOOK_FLAG,
70 FRONTEND_FLAG,
71 SPEEDLEVEL_FLAG,
72 PP_FLAG,
73 NOSKELETON
74 } F2T_FLAGS;
75
76 enum {
77 V2V_PRESET_NONE,
78 V2V_PRESET_PRO,
79 V2V_PRESET_PREVIEW,
80 V2V_PRESET_VIDEOBIN,
81 V2V_PRESET_PADMA,
82 V2V_PRESET_PADMASTREAM,
83 } F2T_PRESETS;
84
85 typedef enum {
86 ENC_UNSET,
87 ENC_UTF8,
88 ENC_ISO_8859_1,
89 } F2T_ENCODING;
90
91 #define PAL_HALF_WIDTH 384
92 #define PAL_HALF_HEIGHT 288
93 #define NTSC_HALF_WIDTH 320
94 #define NTSC_HALF_HEIGHT 240
95
96 #define PAL_FULL_WIDTH 720
97 #define PAL_FULL_HEIGHT 576
98 #define NTSC_FULL_WIDTH 720
99 #define NTSC_FULL_HEIGHT 480
100
101
102 static int sws_flags = SWS_BICUBIC;
103
104 typedef struct ff2theora_subtitle{
105 char *text;
106 size_t len;
107 double t0;
108 double t1;
109 } ff2theora_subtitle;
110
111 typedef struct ff2theora_kate_stream{
112 const char *filename;
113 size_t num_subtitles;
114 ff2theora_subtitle *subtitles;
115 size_t subtitles_count; /* total subtitles output so far */
116 F2T_ENCODING subtitles_encoding;
117 char subtitles_language[16];
118 char subtitles_category[16];
119 } ff2theora_kate_stream;
120
121 typedef struct ff2theora{
122 AVFormatContext *context;
123 int video_index;
124 int audio_index;
125
126 int deinterlace;
127 int vhook;
128 int audiostream;
129 int sample_rate;
130 int channels;
131 int disable_audio;
132 float audio_quality;
133 int audio_bitrate;
134 int preset;
135
136 int picture_width;
137 int picture_height;
138 double fps;
139 struct SwsContext *sws_colorspace_ctx; /* for image resampling/resizing */
140 struct SwsContext *sws_scale_ctx; /* for image resampling/resizing */
141 ReSampleContext *audio_resample_ctx;
142 ogg_int32_t aspect_numerator;
143 ogg_int32_t aspect_denominator;
144 double frame_aspect;
145
146 int pix_fmt;
147 int video_quality;
148 int video_bitrate;
149 int sharpness;
150 int keyint;
151 char pp_mode[255];
152
153 double force_input_fps;
154 int sync;
155
156 /* cropping */
157 int frame_topBand;
158 int frame_bottomBand;
159 int frame_leftBand;
160 int frame_rightBand;
161
162 int frame_width;
163 int frame_height;
164 int frame_x_offset;
165 int frame_y_offset;
166
167 /* In seconds */
168 int start_time;
169 int end_time;
170
171 AVRational framerate_new;
172
173 double pts_offset; /* between given input pts and calculated output pts */
174 int64_t frame_count; /* total video frames output so far */
175 int64_t sample_count; /* total audio samples output so far */
176
177 size_t n_kate_streams;
178 ff2theora_kate_stream *kate_streams;
179 }
180 *ff2theora;
181
182
183 // gamma lookup table code
184
185 // ffmpeg2theora --nosound -f dv -H 32000 -S 0 -v 8 -x 384 -y 288 -G 1.5 input.dv
186 static double video_gamma = 0.0;
187 static double video_bright = 0.0;
188 static double video_contr = 0.0;
189 static double video_satur = 1.0;
190 static int y_lut_used = 0;
191 static int uv_lut_used = 0;
192 static unsigned char y_lut[256];
193 static unsigned char uv_lut[256];
194
195 #define SUPPORTED_ENCODINGS "utf-8, utf8, iso-8859-1, latin1"
196
197 static void report_unknown_subtitle_encoding(const char *name)
198 {
199 fprintf(stderr, "Unknown character encoding: %s\n",name);
200 fprintf(stderr, "Valid character encodings are:\n");
201 fprintf(stderr, " " SUPPORTED_ENCODINGS "\n");
202 }
203
204 static char *fgets2(char *s,size_t sz,FILE *f)
205 {
206 char *ret = fgets(s, sz, f);
207 /* fixup DOS newline character */
208 char *ptr=strchr(s, '\r');
209 if (ptr) *ptr='\n';
210 return ret;
211 }
212
213 #ifndef __GNUC__
214 /* Windows doesn't have strcasecmp but stricmp (at least, DOS had)
215 (or was that strcmpi ? Might have been Borland C) */
216 #define strcasecmp(s1, s2) stricmp(s1, s2)
217 #endif
218
219 static double hmsms2s(int h,int m,int s,int ms)
220 {
221 return h*3600+m*60+s+ms/1000.0;
222 }
223
224 /* very simple implementation when no iconv */
225 static void convert_subtitle_to_utf8(F2T_ENCODING encoding,unsigned char *text)
226 {
227 size_t nbytes;
228 unsigned char *ptr,*newtext;
229
230 if (!text || !*text) return;
231
232 switch (encoding) {
233 case ENC_UNSET:
234 /* we don't know what encoding this is, assume utf-8 and we'll yell if it ain't */
235 break;
236 case ENC_UTF8:
237 /* nothing to do, already in utf-8 */
238 break;
239 case ENC_ISO_8859_1:
240 /* simple, characters above 0x7f are broken in two,
241 and code points map to the iso-8859-1 8 bit codes */
242 nbytes=0;
243 for (ptr=text;*ptr;++ptr) {
244 nbytes++;
245 if (0x80&*ptr) nbytes++;
246 }
247 newtext=(unsigned char*)malloc(1+nbytes);
248 if (!newtext) {
249 fprintf(stderr, "Memory allocation failed - cannot convert text\n");
250 return;
251 }
252 nbytes=0;
253 for (ptr=text;*ptr;++ptr) {
254 if (0x80&*ptr) {
255 newtext[nbytes++]=0xc0|((*ptr)>>6);
256 newtext[nbytes++]=0x80|((*ptr)&0x3f);
257 }
258 else {
259 newtext[nbytes++]=*ptr;
260 }
261 }
262 newtext[nbytes++]=0;
263 memcpy(text,newtext,nbytes);
264 free(newtext);
265 break;
266 default:
267 fprintf(stderr, "ERROR: encoding %d not handled in conversion!\n", encoding);
268 break;
269 }
270 }
271
272 static int load_subtitles(ff2theora_kate_stream *this)
273 {
274 #ifdef HAVE_KATE
275 enum { need_id, need_timing, need_text };
276 int need = need_id;
277 int last_seen_id=0;
278 int ret;
279 int id;
280 static char text[4096];
281 int h0,m0,s0,ms0,h1,m1,s1,ms1;
282 double t0,t1;
283 static char str[4096];
284 int warned=0;
285
286 FILE *f = fopen(this->filename, "r");
287 if (!f) {
288 fprintf(stderr,"WARNING - Failed to open subtitles file %s (%s)\n", this->filename, strerror(errno));
289 return -1;
290 }
291
292 /* first, check for a BOM */
293 ret=fread(str,1,3,f);
294 if (ret<3 || memcmp(str,"\xef\xbb\xbf",3)) {
295 /* No BOM, rewind */
296 fseek(f,0,SEEK_SET);
297 }
298
299 fgets2(str,sizeof(str),f);
300 while (!feof(f)) {
301 switch (need) {
302 case need_id:
303 ret=sscanf(str,"%d\n",&id);
304 if (ret!=1) {
305 fprintf(stderr,"WARNING - Syntax error: %s\n",str);
306 fclose(f);
307 return -1;
308 }
309 if (id!=last_seen_id+1) {
310 fprintf(stderr,"WARNING - Error: non consecutive ids: %s\n",str);
311 fclose(f);
312 return -1;
313 }
314 last_seen_id=id;
315 need=need_timing;
316 strcpy(text,"");
317 break;
318 case need_timing:
319 ret=sscanf(str,"%d:%d:%d%*[.,]%d --> %d:%d:%d%*[.,]%d\n",&h0,&m0,&s0,&ms0,&h1,&m1,&s1,&ms1);
320 if (ret!=8) {
321 fprintf(stderr,"WARNING - Syntax error: %s\n",str);
322 fclose(f);
323 return -1;
324 }
325 else {
326 t0=hmsms2s(h0,m0,s0,ms0);
327 t1=hmsms2s(h1,m1,s1,ms1);
328 }
329 need=need_text;
330 break;
331 case need_text:
332 if (*str=='\n') {
333 convert_subtitle_to_utf8(this->subtitles_encoding,(unsigned char*)text);
334 size_t len = strlen(text);
335 this->subtitles = (ff2theora_subtitle*)realloc(this->subtitles, (this->num_subtitles+1)*sizeof(ff2theora_subtitle));
336 if (!this->subtitles) {
337 fprintf(stderr, "Out of memory\n");
338 fclose(f);
339 return -1;
340 }
341 ret=kate_text_validate(kate_utf8,text,len+1);
342 if (ret<0) {
343 if (!warned) {
344 fprintf(stderr,"WARNING: subtitle %s is not valid utf-8\n",text);
345 fprintf(stderr," further invalid subtitles will NOT be flagged\n");
346 warned=1;
347 }
348 }
349 else {
350 /* kill off trailing \n characters */
351 while (len>0) {
352 if (text[len-1]=='\n') text[--len]=0; else break;
353 }
354 this->subtitles[this->num_subtitles].text = (char*)malloc(len+1);
355 memcpy(this->subtitles[this->num_subtitles].text, text, len+1);
356 this->subtitles[this->num_subtitles].len = len;
357 this->subtitles[this->num_subtitles].t0 = t0;
358 this->subtitles[this->num_subtitles].t1 = t1;
359 this->num_subtitles++;
360 }
361 need=need_id;
362 }
363 else {
364 strcat(text,str);
365 }
366 break;
367 }
368 fgets2(str,sizeof(str),f);
369 }
370
371 fclose(f);
372
373 /* fprintf(stderr," %u subtitles loaded.\n", this->num_subtitles); */
374
375 return this->num_subtitles;
376 #else
377 return 0;
378 #endif
379 }
380
381 static void free_subtitles(ff2theora this)
382 {
383 size_t i,n;
384 for (i=0; i<this->n_kate_streams; ++i) {
385 ff2theora_kate_stream *ks=this->kate_streams+i;
386 for (n=0; n<ks->num_subtitles; ++n) free(ks->subtitles[n].text);
387 free(ks->subtitles);
388 }
389 free(this->kate_streams);
390 }
391
392 static void y_lut_init(unsigned char *lut, double c, double b, double g) {
393 int i;
394 double v;
395
396 if ((g < 0.01) || (g > 100.0)) g = 1.0;
397 if ((c < 0.01) || (c > 100.0)) c = 1.0;
398 if ((b < -1.0) || (b > 1.0)) b = 0.0;
399
400 if (g == 1.0 && c == 1.0 && b == 0.0) return;
401 y_lut_used = 1;
402
403 printf(" Video correction: gamma=%g, contrast=%g, brightness=%g\n", g, c, b);
404
405 g = 1.0 / g; // larger values shall make brighter video.
406
407 for (i = 0; i < 256; i++) {
408 v = (double) i / 255.0;
409 v = c * v + b * 0.1;
410 if (v < 0.0) v = 0.0;
411 v = pow(v, g) * 255.0; // mplayer's vf_eq2.c multiplies with 256 here, strange...
412
413 if (v >= 255)
414 lut[i] = 255;
415 else
416 lut[i] = (unsigned char)(v+0.5);
417 }
418 }
419
420
421 static void uv_lut_init(unsigned char *lut, double s) {
422 int i;
423 double v;
424
425 if ((s < 0.0) || (s > 100.0)) s = 1.0;
426
427 if (s == 1.0) return;
428 uv_lut_used = 1;
429
430 printf(" Color correction: saturation=%g\n", s);
431
432 for (i = 0; i < 256; i++) {
433 v = 127.0 + (s * ((double)i - 127.0));
434 if (v < 0.0) v = 0.0;
435
436 if (v >= 255.0)
437 lut[i] = 255;
438 else
439 lut[i] = (unsigned char)(v+0.5);
440 }
441 }
442
443 static void lut_init(double c, double b, double g, double s) {
444 y_lut_init(y_lut, c, b, g);
445 uv_lut_init(uv_lut, s);
446 }
447
448 static void lut_apply(unsigned char *lut, unsigned char *src, unsigned char *dst, int width, int height, int stride) {
449 int x, y;
450
451 for (y = 0; y < height; y++) {
452 for (x = 0; x < width; x++) {
453 dst[x] = lut[src[x]];
454 }
455 src += stride;
456 dst += stride;
457 }
458 }
459
460
461 oggmux_info info;
462
463 static int using_stdin = 0;
464
465
466 /**
467 * Allocate and initialise an AVFrame.
468 */
469 AVFrame *frame_alloc (int pix_fmt, int width, int height) {
470 AVFrame *picture;
471 uint8_t *picture_buf;
472 int size;
473
474 picture = avcodec_alloc_frame ();
475 if (!picture)
476 return NULL;
477 size = avpicture_get_size (pix_fmt, width, height);
478 picture_buf = av_malloc (size);
479 if (!picture_buf){
480 av_free (picture);
481 return NULL;
482 }
483 avpicture_fill ((AVPicture *) picture, picture_buf,
484 pix_fmt, width, height);
485 return picture;
486 }
487
488 /**
489 * adds a new kate stream structure
490 */
491 static void add_kate_stream(ff2theora this){
492 ff2theora_kate_stream *ks;
493 this->kate_streams=(ff2theora_kate_stream*)realloc(this->kate_streams,(this->n_kate_streams+1)*sizeof(ff2theora_kate_stream));
494 ks=&this->kate_streams[this->n_kate_streams++];
495 ks->filename = NULL;
496 ks->num_subtitles = 0;
497 ks->subtitles = 0;
498 ks->subtitles_count = 0; /* denotes not set yet */
499 ks->subtitles_encoding = ENC_UNSET;
500 strcpy(ks->subtitles_language, "");
501 strcpy(ks->subtitles_category, "");
502 }
503
504 /*
505 * sets the filename of the next subtitles file
506 */
507 static void set_subtitles_file(ff2theora this,const char *filename){
508 size_t n;
509 for (n=0; n<this->n_kate_streams;++n) {
510 if (!this->kate_streams[n].filename) break;
511 }
512 if (n==this->n_kate_streams) add_kate_stream(this);
513 this->kate_streams[n].filename = filename;
514 }
515
516 /*
517 * sets the language of the next subtitles file
518 */
519 static void set_subtitles_language(ff2theora this,const char *language){
520 size_t n;
521 for (n=0; n<this->n_kate_streams;++n) {
522 if (!this->kate_streams[n].subtitles_language[0]) break;
523 }
524 if (n==this->n_kate_streams) add_kate_stream(this);
525 strncpy(this->kate_streams[n].subtitles_language, language, 16);
526 this->kate_streams[n].subtitles_language[15] = 0;
527 }
528
529 /*
530 * sets the category of the next subtitles file
531 */
532 static void set_subtitles_category(ff2theora this,const char *category){
533 size_t n;
534 for (n=0; n<this->n_kate_streams;++n) {
535 if (!this->kate_streams[n].subtitles_category[0]) break;
536 }
537 if (n==this->n_kate_streams) add_kate_stream(this);
538 strncpy(this->kate_streams[n].subtitles_category, category, 16);
539 this->kate_streams[n].subtitles_category[15] = 0;
540 }
541
542 /**
543 * sets the encoding of the next subtitles file
544 */
545 static void set_subtitles_encoding(ff2theora this,F2T_ENCODING encoding){
546 size_t n;
547 for (n=0; n<this->n_kate_streams;++n) {
548 if (this->kate_streams[n].subtitles_encoding==ENC_UNSET) break;
549 }
550 if (n==this->n_kate_streams) add_kate_stream(this);
551 this->kate_streams[n].subtitles_encoding = encoding;
552 }
553
554 /**
555 * initialize ff2theora with default values
556 * @return ff2theora struct
557 */
558 ff2theora ff2theora_init (){
559 ff2theora this = calloc (1, sizeof (*this));
560 if (this != NULL){
561 this->disable_audio=0;
562 this->video_index = -1;
563 this->audio_index = -1;
564 this->start_time=0;
565 this->end_time=0; /* 0 denotes no end time set */
566
567 // audio
568 this->sample_rate = -1; // samplerate hmhmhm
569 this->channels = -1;
570 this->audio_quality = 1.00;// audio quality 1
571 this->audio_bitrate=0;
572 this->audiostream = -1;
573
574 // video
575 this->picture_width=0; // set to 0 to not resize the output
576 this->picture_height=0; // set to 0 to not resize the output
577 this->video_quality=rint(5*6.3); // video quality 5
578 this->video_bitrate=0;
579 this->sharpness=0;
580 this->keyint=64;
581 this->force_input_fps=0;
582 this->sync=0;
583 this->aspect_numerator=0;
584 this->aspect_denominator=0;
585 this->frame_aspect=0;
586 this->deinterlace=0; // auto by default, if input is flaged as interlaced it will deinterlace.
587 this->vhook=0;
588 this->framerate_new.num = -1;
589 this->framerate_new.den = 1;
590
591 this->frame_topBand=0;
592 this->frame_bottomBand=0;
593 this->frame_leftBand=0;
594 this->frame_rightBand=0;
595
596 this->n_kate_streams=0;
597 this->kate_streams=NULL;
598
599 this->pix_fmt = PIX_FMT_YUV420P;
600 }
601 return this;
602 }
603
604 void ff2theora_output(ff2theora this) {
605 int i;
606 AVCodecContext *aenc = NULL;
607 AVCodecContext *venc = NULL;
608 AVStream *astream = NULL;
609 AVStream *vstream = NULL;
610 AVCodec *acodec = NULL;
611 AVCodec *vcodec = NULL;
612 pp_mode_t *ppMode = NULL;
613 pp_context_t *ppContext = NULL;
614 float frame_aspect;
615 double fps = 0.0;
616
617 if(this->audiostream >= 0 && this->context->nb_streams > this->audiostream) {
618 AVCodecContext *enc = this->context->streams[this->audiostream]->codec;
619 if (enc->codec_type == CODEC_TYPE_AUDIO) {
620 this->audio_index = this->audiostream;
621 fprintf(stderr," Using stream #0.%d as audio input\n",this->audio_index);
622 }
623 else {
624 fprintf(stderr," The selected stream is not audio, falling back to automatic selection\n");
625 }
626 }
627
628 for (i = 0; i < this->context->nb_streams; i++){
629 AVCodecContext *enc = this->context->streams[i]->codec;
630 switch (enc->codec_type){
631 case CODEC_TYPE_VIDEO:
632 if (this->video_index < 0)
633 this->video_index = i;
634 break;
635 case CODEC_TYPE_AUDIO:
636 if (this->audio_index < 0 && !this->disable_audio)
637 this->audio_index = i;
638 break;
639 default:
640 break;
641 }
642 }
643
644 if (this->video_index >= 0){
645 vstream = this->context->streams[this->video_index];
646 venc = this->context->streams[this->video_index]->codec;
647 vcodec = avcodec_find_decoder (venc->codec_id);
648
649 fps = (double) vstream->r_frame_rate.num / vstream->r_frame_rate.den;
650 if (fps > 10000)
651 fps /= 1000;
652
653 if(this->force_input_fps)
654 fps=this->force_input_fps;
655 if (vcodec == NULL || avcodec_open (venc, vcodec) < 0) {
656 this->video_index = -1;
657 }
658 this->fps = fps;
659
660
661 if(this->preset == V2V_PRESET_PREVIEW){
662 if(abs(this->fps-30)<1 && (venc->width!=NTSC_HALF_WIDTH || venc->height!=NTSC_HALF_HEIGHT) ){
663 this->picture_width=NTSC_HALF_WIDTH;
664 this->picture_height=NTSC_HALF_HEIGHT;
665 }
666 else {
667 this->picture_width=PAL_HALF_WIDTH;
668 this->picture_height=PAL_HALF_HEIGHT;
669 }
670 }
671 else if(this->preset == V2V_PRESET_PRO){
672 if(abs(this->fps-30)<1 && (venc->width!=NTSC_FULL_WIDTH || venc->height!=NTSC_FULL_HEIGHT) ){
673 this->picture_width=NTSC_FULL_WIDTH;
674 this->picture_height=NTSC_FULL_HEIGHT;
675 }
676 else {
677 this->picture_width=PAL_FULL_WIDTH;
678 this->picture_height=PAL_FULL_HEIGHT;
679 }
680 }
681 else if(this->preset == V2V_PRESET_PADMA){
682 int width=venc->width-this->frame_leftBand-this->frame_rightBand;
683 int height=venc->height-this->frame_topBand-this->frame_bottomBand;
684 if(venc->sample_aspect_ratio.den!=0 && venc->sample_aspect_ratio.num!=0) {
685 height=((float)venc->sample_aspect_ratio.den/venc->sample_aspect_ratio.num) * height;
686 }
687 if(this->frame_aspect == 0)
688 this->frame_aspect = (float)width/height;
689 if(this->frame_aspect <= 1.5) {
690 if(width > 640 || height > 480) {
691 //4:3 640 x 480
692 this->picture_width=640;
693 this->picture_height=480;
694 }
695 else {
696 this->picture_width=width;
697 this->picture_height=height;
698 }
699 }
700 else {
701 if(width > 640 || height > 360) {
702 //16:9 640 x 360
703 this->picture_width=640;
704 this->picture_height=360;
705 }
706 else {
707 this->picture_width=width;
708 this->picture_height=height;
709 }
710 }
711
712 }
713 else if(this->preset == V2V_PRESET_PADMASTREAM){
714 int width=venc->width-this->frame_leftBand-this->frame_rightBand;
715 int height=venc->height-this->frame_topBand-this->frame_bottomBand;
716 if(venc->sample_aspect_ratio.den!=0 && venc->sample_aspect_ratio.num!=0) {
717 height=((float)venc->sample_aspect_ratio.den/venc->sample_aspect_ratio.num) * height;
718 }
719 if(this->frame_aspect == 0)
720 this->frame_aspect = (float)width/height;
721 if(this->frame_aspect <= 1.5) {
722 this->picture_width=128;
723 this->picture_height=96;
724 }
725 else {
726 this->picture_width=128;
727 this->picture_height=72;
728 }
729 }
730 else if(this->preset == V2V_PRESET_VIDEOBIN){
731 int width=venc->width-this->frame_leftBand-this->frame_rightBand;
732 int height=venc->height-this->frame_topBand-this->frame_bottomBand;
733 if(venc->sample_aspect_ratio.den!=0 && venc->sample_aspect_ratio.num!=0) {
734 height=((float)venc->sample_aspect_ratio.den/venc->sample_aspect_ratio.num) * height;
735 }
736 if( ((float)width /height) <= 1.5) {
737 if(width > 448) {
738 //4:3 448 x 336
739 this->picture_width=448;
740 this->picture_height=336;
741 }
742 else {
743 this->picture_width=width;
744 this->picture_height=height;
745 }
746 }
747 else {
748 if(width > 512) {
749 //16:9 512 x 288
750 this->picture_width=512;
751 this->picture_height=288;
752 }
753 else {
754 this->picture_width=width;
755 this->picture_height=height;
756 }
757 }
758
759 }
760 if(this->picture_height==0 &&
761 (this->frame_leftBand || this->frame_rightBand || this->frame_topBand || this->frame_bottomBand) ){
762 this->picture_height=venc->height-
763 this->frame_topBand-this->frame_bottomBand;
764 }
765 if(this->picture_width==0 &&
766 (this->frame_leftBand || this->frame_rightBand || this->frame_topBand || this->frame_bottomBand) ){
767 this->picture_width=venc->width-
768 this->frame_leftBand-this->frame_rightBand;
769 }
770 //so frame_aspect is set on the commandline
771 if(this->frame_aspect != 0){
772 if(this->picture_height){
773 this->aspect_numerator = 10000*this->frame_aspect*this->picture_height;
774 this->aspect_denominator = 10000*this->picture_width;
775 }
776 else{
777 this->aspect_numerator = 10000*this->frame_aspect*venc->height;
778 this->aspect_denominator = 10000*venc->width;
779 }
780 av_reduce(&this->aspect_numerator,&this->aspect_denominator,this->aspect_numerator,this->aspect_denominator,10000);
781 frame_aspect=this->frame_aspect;
782 }
783 if(venc->sample_aspect_ratio.num!=0 && this->frame_aspect==0){
784 // just use the ratio from the input
785 this->aspect_numerator=venc->sample_aspect_ratio.num;
786 this->aspect_denominator=venc->sample_aspect_ratio.den;
787 // or we use ratio for the output
788 if(this->picture_height){
789 int width=venc->width-this->frame_leftBand-this->frame_rightBand;
790 int height=venc->height-this->frame_topBand-this->frame_bottomBand;
791 av_reduce(&this->aspect_numerator,&this->aspect_denominator,
792 venc->sample_aspect_ratio.num*width*this->picture_height,
793 venc->sample_aspect_ratio.den*height*this->picture_width,10000);
794 frame_aspect=(float)(this->aspect_numerator*this->picture_width)/
795 (this->aspect_denominator*this->picture_height);
796 }
797 else{
798 frame_aspect=(float)(this->aspect_numerator*venc->width)/
799 (this->aspect_denominator*venc->height);
800 }
801 }
802 if((float)this->aspect_numerator/this->aspect_denominator < 1.09){
803 this->aspect_numerator = 1;
804 this->aspect_denominator = 1;
805 frame_aspect=(float)(this->aspect_numerator*this->picture_width)/
806 (this->aspect_denominator*this->picture_height);
807 }
808 if(this->aspect_denominator && frame_aspect){
809 fprintf(stderr," Pixel Aspect Ratio: %.2f/1 ",(float)this->aspect_numerator/this->aspect_denominator);
810 fprintf(stderr," Frame Aspect Ratio: %.2f/1\n",frame_aspect);
811 }
812
813 if (this->deinterlace==1)
814 fprintf(stderr," Deinterlace: on\n");
815
816 if (strcmp(this->pp_mode, "")) {
817 ppContext = pp_get_context(venc->width, venc->height, PP_FORMAT_420);
818 ppMode = pp_get_mode_by_name_and_quality(this->pp_mode, PP_QUALITY_MAX);
819 fprintf(stderr," Postprocessing: %s\n", this->pp_mode);
820 }
821
822 if(!this->picture_width)
823 this->picture_width = venc->width;
824 if(!this->picture_height)
825 this->picture_height = venc->height;
826
827 /* Theora has a divisible-by-sixteen restriction for the encoded video size */
828 /* scale the frame size up to the nearest /16 and calculate offsets */
829 this->frame_width = ((this->picture_width + 15) >>4)<<4;
830 this->frame_height = ((this->picture_height + 15) >>4)<<4;
831
832 this->frame_x_offset = 0;
833 this->frame_y_offset = 0;
834
835 if(this->frame_width > 0 || this->frame_height > 0){
836 this->sws_colorspace_ctx = sws_getContext(
837 venc->width, venc->height, venc->pix_fmt,
838 venc->width, venc->height, this->pix_fmt,
839 sws_flags, NULL, NULL, NULL
840 );
841 this->sws_scale_ctx = sws_getContext(
842 venc->width - (this->frame_leftBand + this->frame_rightBand),
843 venc->height - (this->frame_topBand + this->frame_bottomBand),
844 this->pix_fmt,
845 this->frame_width, this->frame_height, this->pix_fmt,
846 sws_flags, NULL, NULL, NULL
847 );
848 fprintf(stderr," Resize: %dx%d",venc->width,venc->height);
849 if(this->frame_topBand || this->frame_bottomBand ||
850 this->frame_leftBand || this->frame_rightBand){
851 fprintf(stderr," => %dx%d",
852 venc->width-this->frame_leftBand-this->frame_rightBand,
853 venc->height-this->frame_topBand-this->frame_bottomBand);
854 }
855 if(this->picture_width != (venc->width-this->frame_leftBand - this->frame_rightBand)
856 || this->picture_height != (venc->height-this->frame_topBand-this->frame_bottomBand))
857 fprintf(stderr," => %dx%d",this->picture_width, this->picture_height);
858 fprintf(stderr,"\n");
859 }
860
861 if (video_gamma != 0.0 || video_bright != 0.0 || video_contr != 0.0 || video_satur != 1.0)
862 lut_init(video_contr, video_bright, video_gamma, video_satur);
863 }
864 if (this->framerate_new.num > 0) {
865 fprintf(stderr," Resample Framerate: %0.2f => %0.2f\n",
866 this->fps,(double)this->framerate_new.num / this->framerate_new.den);
867 }
868 if (this->audio_index >= 0){
869 astream = this->context->streams[this->audio_index];
870 aenc = this->context->streams[this->audio_index]->codec;
871 acodec = avcodec_find_decoder (aenc->codec_id);
872 if (this->channels < 1) {
873 if (aenc->channels > 2)
874 this->channels = 2;
875 else
876 this->channels = aenc->channels;
877 }
878 if(this->sample_rate==-1) {
879 this->sample_rate = aenc->sample_rate;
880 }
881 if (this->channels != aenc->channels && aenc->codec_id == CODEC_ID_AC3)
882 aenc->channels = this->channels;
883
884 if (acodec != NULL && avcodec_open (aenc, acodec) >= 0){
885 if(this->sample_rate != aenc->sample_rate || this->channels != aenc->channels){
886 this->audio_resample_ctx = audio_resample_init (this->channels,aenc->channels,this->sample_rate,aenc->sample_rate);
887 if(this->sample_rate!=aenc->sample_rate)
888 fprintf(stderr," Resample: %dHz => %dHz\n",aenc->sample_rate,this->sample_rate);
889 if(this->channels!=aenc->channels)
890 fprintf(stderr," Channels: %d => %d\n",aenc->channels,this->channels);
891 }
892 else{
893 this->audio_resample_ctx=NULL;
894 }
895 }
896 else{
897 this->audio_index = -1;
898 }
899 }
900
901 if (this->video_index >= 0 || this->audio_index >=0){
902 AVFrame *frame=NULL;
903 AVFrame *output=NULL;
904 AVFrame *output_tmp=NULL;
905 AVFrame *output_resized=NULL;
906 AVFrame *output_buffered=NULL;
907
908 AVPacket pkt;
909 int len;
910 int len1;
911 int got_picture;
912 int first = 1;
913 int e_o_s = 0;
914 int ret;
915 uint8_t *ptr;
916 int16_t *audio_buf= av_malloc(4*AVCODEC_MAX_AUDIO_FRAME_SIZE);
917 int16_t *resampled= av_malloc(4*AVCODEC_MAX_AUDIO_FRAME_SIZE);
918 int no_frames;
919
920 double framerate_add;
921 double framerate_tmpcount = 0;
922
923 if(this->video_index >= 0)
924 info.audio_only=0;
925 else
926 info.audio_only=1;
927
928 if(this->audio_index>=0)
929 info.video_only=0;
930 else
931 info.video_only=1;
932
933 if(!info.audio_only){
934 frame = frame_alloc(vstream->codec->pix_fmt,
935 vstream->codec->width,vstream->codec->height);
936 output_tmp =frame_alloc(this->pix_fmt,
937 vstream->codec->width,vstream->codec->height);
938 output =frame_alloc(this->pix_fmt,
939 vstream->codec->width,vstream->codec->height);
940 output_resized =frame_alloc(this->pix_fmt,
941 this->frame_width, this->frame_height);
942 output_buffered =frame_alloc(this->pix_fmt,
943 this->frame_width, this->frame_height);
944
945 /* video settings here */
946 /* config file? commandline options? v2v presets? */
947
948 theora_info_init (&info.ti);
949
950 info.ti.width = this->frame_width;
951 info.ti.height = this->frame_height;
952 info.ti.frame_width = this->picture_width;
953 info.ti.frame_height = this->picture_height;
954 info.ti.offset_x = this->frame_x_offset;
955 info.ti.offset_y = this->frame_y_offset;
956 if(this->force_input_fps) {
957 info.ti.fps_numerator = 1000000 * (this->fps); /* fps= numerator/denominator */
958 info.ti.fps_denominator = 1000000;
959 }
960 else {
961 if (this->framerate_new.num > 0) {
962 // new framerate is interger only right now,
963 // so denominator is always 1
964 info.ti.fps_numerator = this->framerate_new.num;
965 info.ti.fps_denominator = this->framerate_new.den;
966 }
967 else {
968 info.ti.fps_numerator=vstream->r_frame_rate.num;
969 info.ti.fps_denominator = vstream->r_frame_rate.den;
970 }
971 }
972
973 /* this is pixel aspect ratio */
974 info.ti.aspect_numerator=this->aspect_numerator;
975 info.ti.aspect_denominator=this->aspect_denominator;
976 // FIXME: is all input material with fps==25 OC_CS_ITU_REC_470BG?
977 // guess not, commandline option to select colorspace would be the best.
978 if((this->fps-25)<1)
979 info.ti.colorspace = OC_CS_ITU_REC_470BG;
980 else if(abs(this->fps-30)<1)
981 info.ti.colorspace = OC_CS_ITU_REC_470M;
982 else
983 info.ti.colorspace = OC_CS_UNSPECIFIED;
984
985 info.ti.target_bitrate = this->video_bitrate;
986 info.ti.quality = this->video_quality;
987 info.ti.dropframes_p = 0;
988 info.ti.keyframe_auto_p = 1;
989 info.ti.keyframe_frequency = this->keyint;
990 info.ti.keyframe_frequency_force = this->keyint;
991 info.ti.keyframe_data_target_bitrate = info.ti.target_bitrate * 1.5;
992 info.ti.keyframe_auto_threshold = 80;
993 info.ti.keyframe_mindistance = 8;
994 info.ti.noise_sensitivity = 1;
995 // range 0-2, 0 sharp, 2 less sharp,less bandwidth
996 info.ti.sharpness = this->sharpness;
997
998 }
999 /* audio settings here */
1000 info.channels = this->channels;
1001 info.sample_rate = this->sample_rate;
1002 info.vorbis_quality = this->audio_quality * 0.1;
1003 info.vorbis_bitrate = this->audio_bitrate;
1004 /* subtitles */
1005 #ifdef HAVE_KATE
1006 for (i=0; i<this->n_kate_streams; ++i) {
1007 ff2theora_kate_stream *ks = this->kate_streams+i;
1008 kate_info *ki = &info.kate_streams[i].ki;
1009 if (ks->num_subtitles > 0) {
1010 kate_info_init(ki);
1011 kate_info_set_language(ki, ks->subtitles_language);
1012 kate_info_set_category(ki, ks->subtitles_category[0]?ks->subtitles_category:"subtitles");
1013 if(this->force_input_fps) {
1014 ki->gps_numerator = 1000000 * (this->fps); /* fps= numerator/denominator */
1015 ki->gps_denominator = 1000000;
1016 }
1017 else {
1018 if (this->framerate_new.num > 0) {
1019 // new framerate is interger only right now,
1020 // so denominator is always 1
1021 ki->gps_numerator = this->framerate_new.num;
1022 ki->gps_denominator = this->framerate_new.den;
1023 }
1024 else {
1025 ki->gps_numerator=vstream->r_frame_rate.num;
1026 ki->gps_denominator = vstream->r_frame_rate.den;
1027 }
1028 }
1029 ki->granule_shift = 32;
1030 }
1031 }
1032 #endif
1033 oggmux_init (&info);
1034 /*seek to start time*/
1035 if(this->start_time) {
1036 av_seek_frame( this->context, -1, (int64_t)AV_TIME_BASE*this->start_time, 1);
1037 /* discard subtitles by their end time, so we still have those that start before the start time,
1038 but end after it */
1039 for (i=0; i<this->n_kate_streams; ++i) {
1040 ff2theora_kate_stream *ks=this->kate_streams+i;
1041 while (ks->subtitles_count < ks->num_subtitles && ks->subtitles[ks->subtitles_count].t1 <= this->start_time) {
1042 /* printf("skipping subtitle %u\n", ks->subtitles_count); */
1043 ks->subtitles_count++;
1044 }
1045 }
1046 }
1047
1048 if(info.audio_only && (this->end_time>0 || this->start_time>0)){
1049 fprintf(stderr,"Sorry, right now start/end time does not work for audio only files.\n");
1050 exit(1);
1051 }
1052
1053 if (this->framerate_new.num > 0) {
1054 double framerate_new = (double)this->framerate_new.num / this->framerate_new.den;
1055 framerate_add = framerate_new/this->fps;
1056 //fprintf(stderr,"calculating framerate addition to %f\n",framerate_add);
1057 this->fps = framerate_new;
1058 }
1059
1060 /*check for end time and calculate number of frames to encode*/
1061 no_frames = this->fps*(this->end_time - this->start_time);
1062 if(this->end_time > 0 && no_frames <= 0){
1063 fprintf(stderr,"End time has to be bigger than start time.\n");
1064 exit(1);
1065 }
1066 /* main decoding loop */
1067 do{
1068 if(no_frames > 0){
1069 if(this->frame_count > no_frames){
1070 break;
1071 }
1072 }
1073 ret = av_read_frame(this->context,&pkt);
1074 if(ret<0){
1075 e_o_s=1;
1076 }
1077
1078 ptr = pkt.data;
1079 len = pkt.size;
1080 if (e_o_s && !info.audio_only || (ret >= 0 && pkt.stream_index == this->video_index)){
1081 if(len == 0 && !first && !e_o_s){
1082 fprintf (stderr, "no frame available\n");
1083 }
1084 while(e_o_s || len > 0){
1085 int dups = 0;
1086 yuv_buffer yuv;
1087 len1 = avcodec_decode_video(vstream->codec, frame, &got_picture, ptr, len);
1088 if(len1>=0) {
1089 if(got_picture){
1090 // this is disabled by default since it does not work
1091 // for all input formats the way it should.
1092 if(this->sync == 1) {
1093 double delta = ((double) pkt.dts /
1094 AV_TIME_BASE - this->pts_offset) *
1095 this->fps - this->frame_count;
1096 /* 0.7 is an arbitrary value */
1097 /* it should be larger than half a frame to
1098 avoid excessive dropping and duplicating */
1099 if (delta < -0.7) {
1100 #ifdef DEBUG
1101 fprintf(stderr,
1102 "Frame dropped to maintain sync\n");
1103 #endif
1104 break;
1105 }
1106 if (delta > 0.7) {
1107 //dups = lrintf(delta);
1108 dups = (int)delta;
1109 #ifdef DEBUG
1110 fprintf(stderr,
1111 "%d duplicate %s added to maintain sync\n",
1112 dups, (dups == 1) ? "frame" : "frames");
1113 #endif
1114 }
1115 }
1116
1117 if (this->framerate_new.num > 0) {
1118 framerate_tmpcount += framerate_add;
1119 if (framerate_tmpcount < (double)(this->frame_count+1)) {
1120 got_picture = 0;
1121 }
1122 else {
1123 dups = 0;
1124 while (framerate_tmpcount >= (double)(this->frame_count+2+dups)) {
1125 dups += 1;
1126 }
1127 }
1128 }
1129
1130 //For audio only files command line option"-e" will not work
1131 //as we don't increment frame_count in audio section.
1132
1133 if(venc->pix_fmt != this->pix_fmt) {
1134 sws_scale(this->sws_colorspace_ctx,
1135 frame->data, frame->linesize, 0, venc->height,
1136 output_tmp->data, output_tmp->linesize);
1137
1138 }
1139 else{
1140 output_tmp = frame;
1141 }
1142 if(frame->interlaced_frame || this->deinterlace){
1143 if(avpicture_deinterlace((AVPicture *)output,(AVPicture *)output_tmp,this->pix_fmt,venc->width,venc->height)<0){
1144 fprintf(stderr,"Deinterlace failed.\n");
1145 exit(1);
1146 }
1147 }
1148 else{
1149 output=output_tmp;
1150 }
1151 // now output
1152 if(ppMode)
1153 pp_postprocess(output->data, output->linesize,
1154 output->data, output->linesize,
1155 venc->width, venc->height,
1156 output->qscale_table, output->qstride,
1157 ppMode, ppContext, this->pix_fmt);
1158 if(this->vhook)
1159 frame_hook_process((AVPicture *)output, this->pix_fmt, venc->width,venc->height);
1160
1161 if (this->frame_topBand || this->frame_leftBand) {
1162 if (av_picture_crop((AVPicture *)output_tmp, (AVPicture *)output,
1163 this->pix_fmt, this->frame_topBand, this->frame_leftBand) < 0) {
1164 av_log(NULL, AV_LOG_ERROR, "error cropping picture\n");
1165 }
1166 output = output_tmp;
1167 }
1168 if(this->sws_scale_ctx){
1169 sws_scale(this->sws_scale_ctx,
1170 output->data, output->linesize, 0, venc->height - (this->frame_topBand + this->frame_bottomBand),
1171 output_resized->data, output_resized->linesize);
1172 }
1173 else{
1174 output_resized=output;
1175 }
1176
1177 }
1178 ptr += len1;
1179 len -= len1;
1180 }
1181 //now output_resized
1182 if(!first) {
1183 /* pysical pages */
1184 yuv.y_width = this->frame_width;
1185 yuv.y_height = this->frame_height;
1186 yuv.y_stride = output_buffered->linesize[0];
1187
1188 yuv.uv_width = this->frame_width / 2;
1189 yuv.uv_height = this->frame_height / 2;
1190 yuv.uv_stride = output_buffered->linesize[1];
1191
1192 yuv.y = output_buffered->data[0];
1193 yuv.u = output_buffered->data[1];
1194 yuv.v = output_buffered->data[2];
1195 if(got_picture || e_o_s) {
1196 do {
1197 if (y_lut_used) {
1198 lut_apply(y_lut, yuv.y, yuv.y, yuv.y_width, yuv.y_height, yuv.y_stride);
1199 }
1200 if (uv_lut_used) {
1201 lut_apply(uv_lut, yuv.u, yuv.u, yuv.uv_width, yuv.uv_height, yuv.uv_stride);
1202 lut_apply(uv_lut, yuv.v, yuv.v, yuv.uv_width, yuv.uv_height, yuv.uv_stride);
1203 }
1204 oggmux_add_video(&info, &yuv, e_o_s);
1205 this->frame_count++;
1206 } while(dups--);
1207 }
1208 }
1209 if(got_picture) {
1210 first=0;
1211 av_picture_copy ((AVPicture *)output_buffered, (AVPicture *)output_resized, this->pix_fmt, this->frame_width, this->frame_height);
1212 }
1213 if(!got_picture){
1214 break;
1215 }
1216 }
1217
1218 }
1219 if(e_o_s && !info.video_only
1220 || (ret >= 0 && pkt.stream_index == this->audio_index)){
1221 this->pts_offset = (double) pkt.pts / AV_TIME_BASE -
1222 (double) this->sample_count / this->sample_rate;
1223 while(e_o_s || len > 0 ){
1224 int samples=0;
1225 int samples_out=0;
1226 int data_size = 4*AVCODEC_MAX_AUDIO_FRAME_SIZE;
1227 if(len > 0){
1228 len1 = avcodec_decode_audio2(astream->codec, audio_buf, &data_size, ptr, len);
1229 if (len1 < 0){
1230 /* if error, we skip the frame */
1231 break;
1232 }
1233 len -= len1;
1234 ptr += len1;
1235 if(data_size >0){
1236 samples =data_size / (aenc->channels * 2);
1237
1238 samples_out = samples;
1239 if(this->audio_resample_ctx){
1240 samples_out = audio_resample(this->audio_resample_ctx, resampled, audio_buf, samples);
1241 }
1242 else
1243 resampled=audio_buf;
1244 }
1245 }
1246 oggmux_add_audio(&info, resampled,
1247 samples_out *(this->channels),samples_out,e_o_s);
1248 this->sample_count += samples_out;
1249 if(e_o_s && len <= 0){
1250 break;
1251 }
1252 }
1253
1254 }
1255
1256 /* if we have subtitles starting before then, add it */
1257 if (info.with_kate) {
1258 double avtime = info.audio_only ? info.audiotime :
1259 info.video_only ? info.videotime :
1260 info.audiotime < info.videotime ? info.audiotime : info.videotime;
1261 for (i=0; i<this->n_kate_streams; ++i) {
1262 ff2theora_kate_stream *ks = this->kate_streams+i;
1263 if (ks->num_subtitles > 0) {
1264 ff2theora_subtitle *sub = ks->subtitles+ks->subtitles_count;
1265 /* we encode a bit in advance so we're sure to hit the time, the packet will
1266 be held till the right time. If we don't do that, we can insert late and
1267 oggz-validate moans */
1268 while (ks->subtitles_count < ks->num_subtitles && sub->t0-1.0 <= avtime+this->start_time) {
1269 int eos = (ks->subtitles_count == ks->num_subtitles-1);
1270 oggmux_add_kate_text(&info, i, sub->t0, sub->t1, sub->text, sub->len, eos);
1271 ks->subtitles_count++;
1272 ++sub;
1273 }
1274 }
1275 }
1276 }
1277
1278 /* flush out the file */
1279 oggmux_flush (&info, e_o_s);
1280 av_free_packet (&pkt);
1281 }
1282 while (ret >= 0);
1283
1284 for (i=0; i<this->n_kate_streams; ++i) {
1285 ff2theora_kate_stream *ks = this->kate_streams+i;
1286 if (ks->num_subtitles > 0 && ks->subtitles_count<ks->num_subtitles) {
1287 double t = (info.videotime<info.audiotime?info.audiotime:info.videotime)+this->start_time;
1288 oggmux_add_kate_end_packet(&info, i, t);
1289 oggmux_flush (&info, e_o_s);
1290 }
1291 }
1292
1293 oggmux_close (&info);
1294 if(ppContext)
1295 pp_free_context(ppContext);
1296 }
1297 else{
1298 fprintf (stderr, "No video or audio stream found.\n");
1299 }
1300 }
1301
1302 void ff2theora_close (ff2theora this){
1303 /* clear out state */
1304 free_subtitles(this);
1305 av_free (this);
1306 }
1307
1308 double aspect_check(const char *arg)
1309 {
1310 int x = 0, y = 0;
1311 double ar = 0;
1312 const char *p;
1313
1314 p = strchr(arg, ':');
1315 if (!p) {
1316 p = strchr(arg, '/');
1317 }
1318 if (p) {
1319 x = strtol(arg, (char **)&arg, 10);
1320 if (arg == p)
1321 y = strtol(arg+1, (char **)&arg, 10);
1322 if (x > 0 && y > 0)
1323 ar = (double)x / (double)y;
1324 } else
1325 ar = strtod(arg, (char **)&arg);
1326
1327 if (!ar) {
1328 fprintf(stderr, "Incorrect aspect ratio specification.\n");
1329 exit(1);
1330 }
1331 return ar;
1332 }
1333
1334 static void add_frame_hooker(const char *arg)
1335 {
1336 int argc = 0;
1337 char *argv[64];
1338 int i;
1339 char *args = av_strdup(arg);
1340
1341 argv[0] = strtok(args, " ");
1342 while (argc < 62 && (argv[++argc] = strtok(NULL, " "))) {
1343 }
1344
1345 i = frame_hook_add(argc, argv);
1346 if (i != 0) {
1347 fprintf(stderr, "Failed to add video hook function: %s\n", arg);
1348 exit(1);
1349 }
1350 }
1351
1352 AVRational get_framerate(const char* arg)
1353 {
1354 const char *p;
1355 AVRational framerate;
1356
1357 p = strchr(arg, ':');
1358 if (!p) {
1359 p = strchr(arg, '/');
1360 }
1361 if (p) {
1362 framerate.num = strtol(arg, (char **)&arg, 10);
1363 if (arg == p)
1364 framerate.den = strtol(arg+1, (char **)&arg, 10);
1365 if(framerate.num <= 0)
1366 framerate.num = -1;
1367 if(framerate.den <= 0)
1368 framerate.den = 1;
1369 } else {
1370 framerate.num = strtol(arg, (char **)&arg,10);
1371 framerate.den = 1;
1372 }
1373 return(framerate);
1374 }
1375
1376 int crop_check(ff2theora this, char *name, const char *arg)
1377 {
1378 int crop_value = atoi(arg);
1379 if (crop_value < 0) {
1380 fprintf(stderr, "Incorrect crop size `%s'.\n",name);
1381 exit(1);
1382 }
1383 if ((crop_value % 2) != 0) {
1384 fprintf(stderr, "Crop size `%s' must be a multiple of 2.\n",name);
1385 exit(1);
1386 }
1387 /*
1388 if ((crop_value) >= this->height){
1389 fprintf(stderr, "Vertical crop dimensions are outside the range of the original image.\nRemember to crop first and scale second.\n");
1390 exit(1);
1391 }
1392 */
1393 return crop_value;
1394 }
1395
1396
1397
1398 void print_presets_info() {
1399 fprintf (stdout,
1400 // "v2v presets - more info at http://wiki.v2v.cc/presets"
1401 "v2v presets:\n"
1402 " preview Video: 320x240 if fps ~ 30, 384x288 otherwise\n"
1403 " Quality 5 - Sharpness 2\n"
1404 " Audio: Max 2 channels - Quality 1\n"
1405 "\n"
1406 " pro Video: 720x480 if fps ~ 30, 720x576 otherwise\n"
1407 " Quality 7 - Sharpness 0\n"
1408 " Audio: Max 2 channels - Quality 3\n"
1409 "\n"
1410 " videobin Video: 512x288 for 16:9 material, 448x336 for 4:3 material\n"
1411 " Bitrate 600kbs\n"
1412 " Audio: Max 2 channels - Quality 3\n"
1413 "\n"
1414 " padma Video: 640x360 for 16:9 material, 640x480 for 4:3 material\n"
1415 " Quality 5 - Sharpness 0\n"
1416 " Audio: Max 2 channels - Quality 3\n"
1417 "\n"
1418 " padma-stream Video: 128x72 for 16:9 material, 128x96 for 4:3 material\n"
1419 " Audio: mono quality -1\n"
1420 "\n"
1421 );
1422 }
1423
1424 void print_usage (){
1425 fprintf (stdout,
1426 PACKAGE " " PACKAGE_VERSION "\n"
1427 "\n"
1428 " Usage: " PACKAGE " [options] input\n"
1429 "\n"
1430 "General output options:\n"
1431 " -o, --output alternative output filename\n"
1432 " --no-skeleton disables ogg skeleton metadata output\n"
1433 " -s, --starttime start encoding at this time (in sec.)\n"
1434 " -e, --endtime end encoding at this time (in sec.)\n"
1435 " -p, --v2v-preset encode file with v2v preset.\n"
1436 " Right now there is preview, pro and videobin. Run\n"
1437 " '"PACKAGE" -p info' for more informations\n"
1438 "\n"
1439 "Video output options:\n"
1440 " -v, --videoquality [0 to 10] encoding quality for video (default: 5)\n"
1441 " use higher values for better quality\n"
1442 " -V, --videobitrate [1 to 16778] encoding bitrate for video (kb/s)\n"
1443 " --optimize optimize video output filesize (slower) (same as speedlevel 0)\n"
1444 " --speedlevel [0 2] encoding is faster with higher values the cost is quality and bandwidth\n"
1445 " -x, --width scale to given width (in pixels)\n"
1446 " -y, --height scale to given height (in pixels)\n"
1447 " --aspect define frame aspect ratio: i.e. 4:3 or 16:9\n"
1448 " -F, --framerate output framerate e.g 25:2 or 16\n"
1449 " --croptop, --cropbottom, --cropleft, --cropright\n"
1450 " crop input by given pixels before resizing\n"
1451 " -S, --sharpness [0 to 2] sharpness of images (default: 0).\n"
1452 " Note: lower values make the video sharper.\n"
1453 " -K, --keyint [1 to 65536] keyframe interval (default: 64)\n"
1454 "\n"
1455 "Video transfer options:\n"
1456 " --pp Video Postprocessing, denoise, deblock, deinterlacer\n"
1457 " use --pp help for a list of available filters.\n"
1458 " -C, --contrast [0.1 to 10.0] contrast correction (default: 1.0)\n"
1459 " Note: lower values make the video darker.\n"
1460 " -B, --brightness [-1.0 to 1.0] brightness correction (default: 0.0)\n"
1461 " Note: lower values make the video darker.\n"
1462 " -G, --gamma [0.1 to 10.0] gamma correction (default: 1.0)\n"
1463 " Note: lower values make the video darker.\n"
1464 " -Z, --saturation [0.1 to 10.0] saturation correction (default: 1.0)\n"
1465 " Note: lower values make the video grey.\n"
1466 "\n"
1467 "Audio output options:\n"
1468 " -a, --audioquality [-2 to 10] encoding quality for audio (default: 1)\n"
1469 " use higher values for better quality\n"
1470 " -A, --audiobitrate [32 to 500] encoding bitrate for audio (kb/s)\n"
1471 " -c, --channels set number of output channels\n"
1472 " -H, --samplerate set output samplerate (in Hz)\n"
1473 " --nosound disable the sound from input\n"
1474 "\n"
1475 "Input options:\n"
1476 " --deinterlace force deinterlace, otherwise only material\n"
1477 " marked as interlaced will be deinterlaced\n"
1478 " --vhook you can use ffmpeg's vhook system, example:\n"
1479 " ffmpeg2theora --vhook '/path/watermark.so -f wm.gif' input.dv\n"
1480 " -f, --format specify input format\n"
1481 " --inputfps fps override input fps\n"
1482 " --audiostream id by default the last audio stream is selected,\n"
1483 " use this to select another audio stream\n"
1484 " --sync use A/V sync from input container. Since this does\n"
1485 " not work with all input format you have to manually\n"
1486 " enable it if you have issues with A/V sync\n"
1487 "\n"
1488 #ifdef HAVE_KATE
1489 "Subtitles options:\n"
1490 " --subtitles file use subtitles from the given file (SubRip (.srt) format)\n"
1491 " --subtitles-encoding encoding set encoding of the subtitles file\n"
1492 " supported are " SUPPORTED_ENCODINGS "\n"
1493 " --subtitles-language language set subtitles language (de, en_GB, etc)\n"
1494 " --subtitles-category category set subtitles category (default \"subtitles\")\n"
1495 "\n"
1496 #endif
1497 "Metadata options:\n"
1498 " --artist Name of artist (director)\n"
1499 " --title Title\n"
1500 " --date Date\n"
1501 " --location Location\n"
1502 " --organization Name of organization (studio)\n"
1503 " --copyright Copyright\n"
1504 " --license License\n"
1505 " --contact Contact link\n"
1506 "\n"
1507 "Other options:\n"
1508 #ifndef _WIN32
1509 " --nice n set niceness to n\n"
1510 #endif
1511 " -P, --pid fname write the process' id to a file\n"
1512 " -h, --help this message\n"
1513 "\n"
1514 "Examples:\n"
1515 " ffmpeg2theora videoclip.avi (will write output to videoclip.ogv)\n"
1516 "\n"
1517 " ffmpeg2theora videoclip.avi --subtitles subtitles.srt (same, with subtitles)\n"
1518 "\n"
1519 " cat something.dv | ffmpeg2theora -f dv -o output.ogv -\n"
1520 "\n"
1521 " Encode a series of images:\n"
1522 " ffmpeg2theora -f image2 frame%%06d.png -o output.ogv\n"
1523 "\n"
1524 #if 0
1525 " Live streaming from V4L Device:\n"
1526 " ffmpeg2theora /dev/video0 -fps 15 -x 160 -y 128 -o - \\\n"
1527 " | oggfwd iccast2server 8000 password /theora.ogv\n"
1528 "\n"
1529 #endif
1530 " Live encoding from a DV camcorder (needs a fast machine):\n"
1531 " dvgrab - | ffmpeg2theora -f dv -x 352 -y 288 -o output.ogv -\n"
1532 "\n"
1533 " Live encoding and streaming to icecast server:\n"
1534 " dvgrab --format raw - \\\n"
1535 " | ffmpeg2theora -f dv -x 160 -y 128 -o /dev/stdout - \\\n"
1536 " | oggfwd iccast2server 8000 password /theora.ogv\n"
1537 "\n"
1538 );
1539 exit (0);
1540 }
1541
1542 int main (int argc, char **argv){
1543 int n;
1544 int outputfile_set=0;
1545 char outputfile_name[255];
1546 char inputfile_name[255];
1547 char *str_ptr;
1548
1549 static int flag = -1;
1550 static int metadata_flag = 0;
1551
1552 AVInputFormat *input_fmt = NULL;
1553 AVFormatParameters *formatParams = NULL;
1554
1555 int c,long_option_index;
1556 const char *optstring = "P:o:k:f:F:x:y:v:V:a:A:S:K:d:H:c:G:Z:C:B:p:N:s:e:D:h::";
1557 struct option options [] = {
1558 {"pid",required_argument,NULL, 'P'},
1559 {"output",required_argument,NULL,'o'},
1560 {"skeleton",no_argument,NULL,'k'},
1561 {"no-skeleton",no_argument,&flag,NOSKELETON},
1562 {"format",required_argument,NULL,'f'},
1563 {"width",required_argument,NULL,'x'},
1564 {"height",required_argument,NULL,'y'},
1565 {"videoquality",required_argument,NULL,'v'},
1566 {"videobitrate",required_argument,NULL,'V'},
1567 {"audioquality",required_argument,NULL,'a'},
1568 {"audiobitrate",required_argument,NULL,'A'},
1569 {"sharpness",required_argument,NULL,'S'},
1570 {"keyint",required_argument,NULL,'K'},
1571 {"deinterlace",0,&flag,DEINTERLACE_FLAG},
1572 {"pp",required_argument,&flag,PP_FLAG},
1573 {"samplerate",required_argument,NULL,'H'},
1574 {"channels",required_argument,NULL,'c'},
1575 {"gamma",required_argument,NULL,'G'},
1576 {"brightness",required_argument,NULL,'B'},
1577 {"contrast",required_argument,NULL,'C'},
1578 {"saturation",required_argument,NULL,'Z'},
1579 {"nosound",0,&flag,NOSOUND_FLAG},
1580 {"vhook",required_argument,&flag,VHOOK_FLAG},
1581 {"framerate",required_argument,NULL,'F'},
1582 {"aspect",required_argument,&flag,ASPECT_FLAG},
1583 {"v2v-preset",required_argument,NULL,'p'},
1584 {"nice",required_argument,NULL,'N'},
1585 {"croptop",required_argument,&flag,CROPTOP_FLAG},
1586 {"cropbottom",required_argument,&flag,CROPBOTTOM_FLAG},
1587 {"cropright",required_argument,&flag,CROPRIGHT_FLAG},
1588 {"cropleft",required_argument,&flag,CROPLEFT_FLAG},
1589 {"inputfps",required_argument,&flag,INPUTFPS_FLAG},
1590 {"audiostream",required_argument,&flag,AUDIOSTREAM_FLAG},
1591 {"subtitles",required_argument,&flag,SUBTITLES_FLAG},
1592 {"subtitles-encoding",required_argument,&flag,SUBTITLES_ENCODING_FLAG},
1593 {"subtitles-language",required_argument,&flag,SUBTITLES_LANGUAGE_FLAG},
1594 {"subtitles-category",required_argument,&flag,SUBTITLES_CATEGORY_FLAG},
1595 {"starttime",required_argument,NULL,'s'},
1596 {"endtime",required_argument,NULL,'e'},
1597 {"sync",0,&flag,SYNC_FLAG},
1598 {"optimize",0,&flag,OPTIMIZE_FLAG},
1599 {"speedlevel",required_argument,&flag,SPEEDLEVEL_FLAG},
1600 {"frontend",0,&flag,FRONTEND_FLAG},
1601
1602 {"artist",required_argument,&metadata_flag,10},
1603 {"title",required_argument,&metadata_flag,11},
1604 {"date",required_argument,&metadata_flag,12},
1605 {"location",required_argument,&metadata_flag,13},
1606 {"organization",required_argument,&metadata_flag,14},
1607 {"copyright",required_argument,&metadata_flag,15},
1608 {"license",required_argument,&metadata_flag,16},
1609 {"contact",required_argument,&metadata_flag,17},
1610 {"source-hash",required_argument,&metadata_flag,18},
1611
1612 {"help",0,NULL,'h'},
1613 {NULL,0,NULL,0}
1614 };
1615
1616 char pidfile_name[255] = { '\0' };
1617 FILE *fpid = NULL;
1618
1619 ff2theora convert = ff2theora_init ();
1620 avcodec_register_all();
1621 avdevice_register_all();
1622 av_register_all();
1623
1624 if (argc == 1){
1625 print_usage ();
1626 }
1627 // set some variables;
1628 init_info(&info);
1629 theora_comment_init (&info.tc);
1630
1631 while((c=getopt_long(argc,argv,optstring,options,&long_option_index))!=EOF){
1632 switch(c)
1633 {
1634 case 0:
1635 if (flag) {
1636 switch (flag)
1637 {
1638 case DEINTERLACE_FLAG:
1639 convert->deinterlace = 1;
1640 flag = -1;
1641 break;
1642 case PP_FLAG:
1643 if(!strcmp(optarg, "help")) {
1644 fprintf(stdout, pp_help);
1645 exit(1);
1646 }
1647 snprintf(convert->pp_mode,sizeof(convert->pp_mode),"%s",optarg);
1648 flag = -1;
1649 break;
1650 case VHOOK_FLAG:
1651 convert->vhook = 1;
1652 add_frame_hooker(optarg);
1653 flag = -1;
1654 break;
1655
1656 case SYNC_FLAG:
1657 convert->sync = 1;
1658 flag = -1;
1659 break;
1660 case NOSOUND_FLAG:
1661 convert->disable_audio = 1;
1662 flag = -1;
1663 break;
1664 case OPTIMIZE_FLAG:
1665 info.speed_level = 0;
1666 flag = -1;
1667 break;
1668 case SPEEDLEVEL_FLAG:
1669 info.speed_level = atoi(optarg);
1670 flag = -1;
1671 break;
1672 case FRONTEND_FLAG:
1673 info.frontend = 1;
1674 flag = -1;
1675 break;
1676 /* crop */
1677 case CROPTOP_FLAG:
1678 convert->frame_topBand = crop_check(convert,"top",optarg);
1679 flag = -1;
1680 break;
1681 case CROPBOTTOM_FLAG:
1682 convert->frame_bottomBand = crop_check(convert,"bottom",optarg);
1683 flag = -1;
1684 break;
1685 case CROPRIGHT_FLAG:
1686 convert->frame_rightBand = crop_check(convert,"right",optarg);
1687 flag = -1;
1688 break;
1689 case CROPLEFT_FLAG:
1690 convert->frame_leftBand = crop_check(convert,"left",optarg);
1691 flag = -1;
1692 break;
1693 case ASPECT_FLAG:
1694 convert->frame_aspect = aspect_check(optarg);
1695 flag = -1;
1696 break;
1697 case INPUTFPS_FLAG:
1698 convert->force_input_fps = atof(optarg);
1699 flag = -1;
1700 break;
1701 case AUDIOSTREAM_FLAG:
1702 convert->audiostream = atoi(optarg);
1703 flag = -1;
1704 break;
1705 case NOSKELETON:
1706 info.with_skeleton=0;
1707 break;
1708 #ifdef HAVE_KATE
1709 case SUBTITLES_FLAG:
1710 set_subtitles_file(convert,optarg);
1711 flag = -1;
1712 info.with_kate=1;
1713 break;
1714 case SUBTITLES_ENCODING_FLAG:
1715 if (!strcmp(optarg,"utf-8")) set_subtitles_encoding(convert,ENC_UTF8);
1716 if (!strcmp(optarg,"utf8")) set_subtitles_encoding(convert,ENC_UTF8);
1717 else if (!strcmp(optarg,"iso-8859-1")) set_subtitles_encoding(convert,ENC_ISO_8859_1);
1718 else if (!strcmp(optarg,"latin1")) set_subtitles_encoding(convert,ENC_ISO_8859_1);
1719 else report_unknown_subtitle_encoding(optarg);
1720 flag = -1;
1721 break;
1722 case SUBTITLES_LANGUAGE_FLAG:
1723 if (strlen(optarg)>15) {
1724 fprintf(stderr, "WARNING - language is limited to 15 characters, and will be truncated\n");
1725 }
1726 set_subtitles_language(convert,optarg);
1727 flag = -1;
1728 break;
1729 case SUBTITLES_CATEGORY_FLAG:
1730 if (strlen(optarg)>15) {
1731 fprintf(stderr, "WARNING - category is limited to 15 characters, and will be truncated\n");
1732 }
1733 set_subtitles_category(convert,optarg);
1734 flag = -1;
1735 break;
1736 #else
1737 case SUBTITLES_FLAG:
1738 case SUBTITLES_ENCODING_FLAG:
1739 case SUBTITLES_LANGUAGE_FLAG:
1740 case SUBTITLES_CATEGORY_FLAG:
1741 fprintf(stderr, "WARNING - Kate support not compiled in, subtitles will not be output\n"
1742 " - install libkate and rebuild ffmpeg2theora for subtitle support\n");
1743 break;
1744 #endif
1745 }
1746 }
1747
1748 /* metadata */
1749 if (metadata_flag){
1750 switch(metadata_flag) {
1751 case 10:
1752 theora_comment_add_tag(&info.tc, "ARTIST", optarg);
1753 break;
1754 case 11:
1755 theora_comment_add_tag(&info.tc, "TITLE", optarg);
1756 break;
1757 case 12:
1758 theora_comment_add_tag(&info.tc, "DATE", optarg);
1759 break;
1760 case 13:
1761 theora_comment_add_tag(&info.tc, "LOCATION", optarg);
1762 break;
1763 case 14:
1764 theora_comment_add_tag(&info.tc, "ORGANIZATION", optarg);
1765 break;
1766 case 15:
1767 theora_comment_add_tag(&info.tc, "COPYRIGHT", optarg);
1768 break;
1769 case 16:
1770 theora_comment_add_tag(&info.tc, "LICENSE", optarg);
1771 break;
1772 case 17:
1773 theora_comment_add_tag(&info.tc, "CONTACT", optarg);
1774 break;
1775 case 18:
1776 theora_comment_add_tag(&info.tc, "SOURCE HASH", optarg);
1777 break;
1778 }
1779 metadata_flag=0;
1780 }
1781 break;
1782 case 'e':
1783 convert->end_time = atoi(optarg);
1784 break;
1785 case 's':
1786 convert->start_time = atoi(optarg);
1787 break;
1788 case 'o':
1789 snprintf(outputfile_name,sizeof(outputfile_name),"%s",optarg);
1790 outputfile_set=1;
1791 break;
1792 case 'k':
1793 info.with_skeleton=1;
1794 break;
1795 case 'P':
1796 sprintf(pidfile_name,optarg);
1797 break;
1798 case 'f':
1799 input_fmt=av_find_input_format(optarg);
1800 break;
1801 case 'x':
1802 convert->picture_width=atoi(optarg);
1803 break;
1804 case 'y':
1805 convert->picture_height=atoi(optarg);
1806 break;
1807 case 'v':
1808 convert->video_quality = rint(atof(optarg)*6.3);
1809 if(convert->video_quality <0 || convert->video_quality >63){
1810 fprintf(stderr,"Only values from 0 to 10 are valid for video quality.\n");
1811 exit(1);
1812 }
1813 convert->video_bitrate=0;
1814 break;
1815 case 'V':
1816 convert->video_bitrate=rint(atof(optarg)*1000);
1817 if (convert->video_bitrate < 1) {
1818 fprintf(stderr, "Only values from 1 to 16000 are valid for video bitrate (in kb/s).\n");
1819 exit(1);
1820 }
1821 convert->video_quality=0;
1822 break;
1823 case 'a':
1824 convert->audio_quality=atof(optarg);
1825 if(convert->audio_quality<-2 || convert->audio_quality>10){
1826 fprintf(stderr,"Only values from -2 to 10 are valid for audio quality.\n");
1827 exit(1);
1828 }
1829 convert->audio_bitrate=0;
1830 break;
1831 case 'A':
1832 convert->audio_bitrate=atof(optarg)*1000;
1833 if(convert->audio_bitrate<0){
1834 fprintf(stderr,"Only values >0 are valid for audio bitrate.\n");
1835 exit(1);
1836 }
1837 convert->audio_quality = -990;
1838 break;
1839 case 'G':
1840 video_gamma = atof(optarg);
1841 break;
1842 case 'C':
1843 video_contr = atof(optarg);
1844 break;
1845 case 'Z':
1846 video_satur = atof(optarg);
1847 break;
1848 case 'B':
1849 video_bright = atof(optarg);
1850 break;
1851 case 'S':
1852 convert->sharpness = atoi(optarg);
1853 if (convert->sharpness < 0 || convert->sharpness > 2) {
1854 fprintf (stderr, "Only values from 0 to 2 are valid for sharpness.\n");
1855 exit(1);
1856 }
1857 break;
1858 case 'K':
1859 convert->keyint = atoi(optarg);
1860 if (convert->keyint < 1 || convert->keyint > 65536) {
1861 fprintf (stderr, "Only values from 1 to 65536 are valid for keyframe interval.\n");
1862 exit(1);
1863 }
1864 break;
1865 case 'H':
1866 convert->sample_rate=atoi(optarg);
1867 break;
1868 case 'F':
1869 convert->framerate_new = get_framerate(optarg);
1870 break;
1871 case 'c':
1872 convert->channels=atoi(optarg);
1873 if(convert->channels <= 0) {
1874 fprintf (stderr, "You can not have less than one audio channel.\n");
1875 exit(1);
1876 }
1877 break;
1878 case 'p':
1879 //v2v presets
1880 if(!strcmp(optarg, "info")){
1881 print_presets_info();
1882 exit(1);
1883 }
1884 else if(!strcmp(optarg, "pro")){
1885 //need a way to set resize here. and not later
1886 convert->preset=V2V_PRESET_PRO;
1887 convert->video_quality = rint(7*6.3);
1888 convert->audio_quality = 3.00;
1889 convert->sharpness = 0;
1890 info.speed_level = 0;
1891 }
1892 else if(!strcmp(optarg,"preview")){
1893 //need a way to set resize here. and not later
1894 convert->preset=V2V_PRESET_PREVIEW;
1895 convert->video_quality = rint(5*6.3);
1896 convert->audio_quality = 1.00;
1897 convert->sharpness = 2;
1898 info.speed_level = 0;
1899 }
1900 else if(!strcmp(optarg,"videobin")){
1901 convert->preset=V2V_PRESET_VIDEOBIN;
1902 convert->video_bitrate=rint(600*1000);
1903 convert->video_quality = 0;
1904 convert->audio_quality = 3.00;
1905 convert->sharpness = 2;
1906 info.speed_level = 0;
1907 }
1908 else if(!strcmp(optarg,"padma")){
1909 convert->preset=V2V_PRESET_PADMA;
1910 convert->video_quality = rint(5*6.3);
1911 convert->audio_quality = 3.00;
1912 convert->sharpness = 0;
1913 info.speed_level = 0;
1914 }
1915 else if(!strcmp(optarg,"padma-stream")){
1916 convert->preset=V2V_PRESET_PADMASTREAM;
1917 convert->video_bitrate=rint(180*1000);
1918 convert->video_quality = 0;
1919 convert->audio_quality = -1.00;
1920 convert->sample_rate=44100;
1921 convert->sharpness = 2;
1922 convert->keyint = 16;
1923 info.speed_level = 0;
1924 }
1925 else{
1926 fprintf(stderr,"\nUnknown preset.\n\n");
1927 print_presets_info();
1928 exit(1);
1929 }
1930 break;
1931 case 'N':
1932 n = atoi(optarg);
1933 if (n) {
1934 #ifndef _WIN32
1935 if (nice(n)<0) {
1936 fprintf(stderr,"Error setting `%d' for niceness.", n);
1937 }
1938 #endif
1939 }
1940 break;
1941 case 'h':
1942 print_usage ();
1943 exit(1);
1944 }
1945 }
1946
1947 while(optind<argc){
1948 /* assume that anything following the options must be a filename */
1949 snprintf(inputfile_name,sizeof(inputfile_name),"%s",argv[optind]);
1950 if(!strcmp(inputfile_name,"-")){
1951 snprintf(inputfile_name,sizeof(inputfile_name),"pipe:");
1952 }
1953 if(outputfile_set!=1){
1954 /* reserve 4 bytes in the buffer for the `.ogv' extension */
1955 snprintf(outputfile_name, sizeof(outputfile_name) - 4, "%s", argv[optind]);
1956 if((str_ptr = strrchr(outputfile_name, '.'))) {
1957 sprintf(str_ptr, ".ogv");
1958 if(!strcmp(inputfile_name, outputfile_name)){
1959 snprintf(outputfile_name, sizeof(outputfile_name), "%s.ogv", inputfile_name);
1960 }
1961 }
1962 else {
1963 snprintf(outputfile_name, sizeof(outputfile_name), "%s.ogv", outputfile_name);
1964 }
1965 outputfile_set=1;
1966 }
1967 optind++;
1968 }
1969
1970 #ifdef VIDEO4LINUX_ENABLED
1971 if(formatParams != NULL) {
1972 formatParams->channel = 0;
1973 formatParams->width = PAL_HALF_WIDTH;
1974 formatParams->height = PAL_HALF_HEIGHT;
1975 if(convert->picture_width)
1976 formatParams->width = convert->picture_width;
1977 if(convert->picture_height)
1978 formatParams->height = convert->picture_height;
1979
1980 formatParams->time_base.den = 25;
1981 formatParams->time_base.num = 1;
1982 if(convert->force_input_fps) {
1983
1984 formatParams->time_base.den = convert->force_input_fps * 1000;
1985 formatParams->time_base.num = 1000;
1986
1987 }
1988 formatParams->standard = "pal";
1989 input_fmt = av_find_input_format("video4linux");
1990 sprintf(inputfile_name,"");
1991 }
1992 #endif
1993
1994 //FIXME: is using_stdin still neded? is it needed as global variable?
1995 using_stdin |= !strcmp(inputfile_name, "pipe:" ) ||
1996 !strcmp( inputfile_name, "/dev/stdin" );
1997
1998 if(outputfile_set!=1){
1999 fprintf(stderr,"You have to specify an output file with -o output.ogv.\n");
2000 exit(1);
2001 }
2002
2003 /* could go, but so far no player supports offset_x/y */
2004 if(convert->picture_width % 8 || convert->picture_height % 8){
2005 fprintf(stderr,"Output size must be a multiple of 8 for now.\n");
2006 exit(1);
2007 }
2008 /*
2009 if(convert->picture_width % 4 || convert->picture_height % 4){
2010 fprintf(stderr,"Output width and height size must be a multiple of 2.\n");
2011 exit(1);
2012 }
2013 */
2014 if(convert->end_time>0 && convert->end_time <= convert->start_time){
2015 fprintf(stderr,"End time has to be bigger than start time.\n");
2016 exit(1);
2017 }
2018
2019 if (*pidfile_name)
2020 {
2021 fpid = fopen(pidfile_name, "w");
2022 if (fpid != NULL)
2023 {
2024 fprintf(fpid, "%i", getpid());
2025 fclose(fpid);
2026 }
2027 }
2028
2029 oggmux_setup_kate_streams(&info, convert->n_kate_streams);
2030
2031 for (n=0; n<convert->n_kate_streams; ++n) {
2032 ff2theora_kate_stream *ks=convert->kate_streams+n;
2033 if (load_subtitles(ks)>=0) {
2034 printf("Muxing Kate stream %d from %s as %s %s\n",
2035 n,ks->filename,
2036 ks->subtitles_language[0]?ks->subtitles_language:"<unknown language>",
2037 ks->subtitles_category[0]?ks->subtitles_category:"subtitles");
2038 }
2039 }
2040
2041 if (av_open_input_file(&convert->context, inputfile_name, input_fmt, 0, formatParams) >= 0){
2042 if (av_find_stream_info (convert->context) >= 0){
2043 #ifdef WIN32
2044 if(!strcmp(outputfile_name,"-") || !strcmp(outputfile_name,"/dev/stdout")){
2045 _setmode(_fileno(stdout), _O_BINARY);
2046 info.outfile = stdout;
2047 }
2048 else {
2049 info.outfile = fopen(outputfile_name,"wb");
2050 }
2051 #else
2052 if(!strcmp(outputfile_name,"-")){
2053 snprintf(outputfile_name,sizeof(outputfile_name),"/dev/stdout");
2054 }
2055 info.outfile = fopen(outputfile_name,"wb");
2056 #endif
2057 if(info.frontend) {
2058 fprintf(stderr, "\nf2t ;duration: %d;\n", convert->context->duration / AV_TIME_BASE);
2059 }
2060 else {
2061 dump_format (convert->context, 0,inputfile_name, 0);
2062 }
2063 if(convert->disable_audio){
2064 fprintf(stderr," [audio disabled].\n");
2065 }
2066 if(convert->sync){
2067 fprintf(stderr," Use A/V Sync from input container.\n");
2068 }
2069
2070 convert->pts_offset =
2071 (double) convert->context->start_time / AV_TIME_BASE;
2072 if(!info.outfile) {
2073 if(info.frontend)
2074 fprintf(stderr, "\nf2t ;result: Unable to open output file.;\n");
2075 else
2076 fprintf (stderr,"\nUnable to open output file `%s'.\n", outputfile_name);
2077 return(1);
2078 }
2079 if (convert->context->duration != AV_NOPTS_VALUE) {
2080 info.duration = convert->context->duration / AV_TIME_BASE;
2081 }
2082 ff2theora_output (convert);
2083 convert->audio_index =convert->video_index = -1;
2084 }
2085 else{
2086 if(info.frontend)
2087 fprintf(stderr, "\nf2t ;result: input format not suported.;\n");
2088 else
2089 fprintf (stderr,"\nUnable to decode input.\n");
2090 return(1);
2091 }
2092 av_close_input_file (convert->context);
2093 }
2094 else{
2095 fprintf (stderr, "\nFile `%s' does not exist or has an unknown data format.\n", inputfile_name);
2096 return(1);
2097 }
2098 ff2theora_close (convert);
2099 fprintf(stderr,"\n");
2100
2101 if (*pidfile_name)
2102 unlink(pidfile_name);
2103
2104 if(info.frontend)
2105 fprintf(stderr, "\nf2t ;result: ok;\n");
2106
2107 return(0);
2108 }
Binary diff not shown
0 FFMPEG_REVISION=17942
1 FFMPEG_CO_DIR=ffmpeg
2 FFMPEG_SVN=svn://svn.ffmpeg.org/ffmpeg/branches/0.5
3 # Because ffmpeg checks out libswscale via an svn:externals, checking
4 # out an old ffmpeg does not check out a corresponding libswscale.
5 # Keep the swscale checkout manually synchronized, then. Update this
6 # when you update FFMPEG_REVISION.
7 FFMPEG_EXTERNALS_REVISION=28777
0 Simple Theora Encoder a wxPython based cross platform GUI
1 for ffmpeg2theora.
2
3 for those that fear the command line
4
0 #!/usr/bin/env python
1 # -*- coding: utf-8 -*-
2 # vi:si:et:sw=2:sts=2:ts=2
3 # Written 2007 by j@v2v.cc
4 #
5 # see LICENSE.txt for license information
6 #
7 __version__ = "1.0"
8
9 import os
10 from os.path import join, dirname, basename, abspath
11 import sys
12 import time
13 import thread
14 import xmlrpclib
15
16 import wx
17 try:
18 from xml.etree.ElementTree import Element, SubElement, ElementTree, parse
19 except:
20 from elementtree.ElementTree import Element, SubElement, ElementTree, parse
21
22 from theoraenc.addVideoDialog import addVideoDialog
23 from theoraenc import theoraenc
24
25 #overwrite location of resources in submodules
26 if os.name != 'nt':
27 theoraenc.resourcePath = abspath(dirname(__file__))
28
29 class SimpleTheoraEncoder(wx.Frame):
30 queuedata = {}
31 _qd_key = {}
32 encodingQueueInitialized = False
33 inputFile = False
34
35 def initMainInterface(self):
36 #TODO: addd menue
37
38 self.encodingQueue = wx.ListCtrl(self, -1, style=wx.LC_REPORT)
39 self.encodingQueue.SetPosition(wx.Point(15,50))
40 self.encodingQueue.SetSize(wx.Size(435, 165))
41 self.encodingQueue.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnItemSelected)
42
43 buttonSize = wx.Size(88,-1)
44 self.addItem = wx.Button(self, wx.ID_ANY, "Add...", wx.Point(462, 71), buttonSize)
45 self.Bind(wx.EVT_BUTTON, self.OnClickAdd, self.addItem)
46
47 self.removeItem = wx.Button(self, wx.ID_ANY, "Remove", wx.Point(462, 106), buttonSize)
48 self.Bind(wx.EVT_BUTTON, self.OnClickRemove, self.removeItem)
49 self.removeItem.Disable()
50
51 self.buttonQuit = wx.Button(self, wx.ID_ANY, "Quit", wx.Point(462, 187), buttonSize)
52 self.Bind(wx.EVT_BUTTON, self.OnExit, self.buttonQuit)
53
54 #Title
55 self.title = wx.StaticText(self, -1, "Simple Theora Encoder", wx.Point(15, 10))
56
57 def __init__(self, parent, id, title, inputFile=None):
58 wx.Frame.__init__(self, parent, id, title, size=(559,260))
59 self.inputFile = inputFile
60 self.initMainInterface()
61 self.Show(True)
62
63 if self.addItem.IsEnabled:
64 self.OnClickAdd(None)
65
66 def initializeUploadQueue(self, selectItem = 0):
67 q = self.encodingQueue
68 q.ClearAll()
69 q.InsertColumn(0, "Name")
70 q.InsertColumn(1, "Stats")
71 q.SetColumnWidth(0, 195)
72 q.SetColumnWidth(1, 240)
73
74 q.itemDataMap = self.queuedata
75
76 items = self.queuedata.items()
77 for x in range(len(items)):
78 key, item = items[x]
79 self.queuedata[key]['itemID'] = x
80 self._qd_key[item['name']] = key
81 q.InsertStringItem(x, item['path'])
82 q.SetStringItem(x, 0, item['display_path'])
83 q.SetStringItem(x, 1, item['status'])
84 q.SetItemData(x, key)
85
86
87 # show how to select an item
88 self.currentItem = selectItem
89 if items:
90 q.SetItemState(self.currentItem, wx.LIST_STATE_SELECTED, wx.LIST_STATE_SELECTED)
91 else:
92 self.removeItem.Disable()
93 self.encodingQueueInitialized = True
94
95 def setItemStatus(self, itemID, value):
96 key = self.encodingQueue.GetItemData(itemID)
97 self.queuedata[key]['status'] = value
98 self.encodingQueue.SetStringItem(itemID, 1, value)
99
100 def updateItemStatus(self, name, status):
101 try:
102 item = self.queuedata[self._qd_key[name]]
103 except KeyError:
104 return
105 itemID = item['itemID']
106 if item['status'] != status:
107 item['status'] = status
108 self.encodingQueue.SetStringItem(itemID, 1, status)
109 now = time.mktime(time.localtime())
110
111 def getSettings(self, options):
112 settings = []
113 for key in ('width', 'height'):
114 if key in options and options[key]:
115 settings.append('--%s' % key)
116 settings.append("%s" % int(options[key]))
117 for key in ('videoquality', 'audioquality'):
118 if key in options and options[key]:
119 settings.append('--%s' % key)
120 settings.append("%s" % float(options[key]))
121 return settings
122
123 def addItemThread(self, item):
124 if not item['enc'].encode():
125 print "encoding failed"
126 return
127 return True
128
129 def addItemToQueue(self, videoFile, options):
130 name = os.path.basename(videoFile)
131 display_path = videoFile
132 if len(display_path) > 25:
133 display_path = "..." + display_path[-24:]
134 item = dict(
135 path = videoFile,
136 options = options,
137 display_path = display_path,
138 status = 'encoding... ',
139 listID = 0,
140 name = name,
141 )
142 item['enc'] = theoraenc.TheoraEnc(videoFile, None, lambda x: self.updateItemStatus(name, x))
143 item['enc'].settings = self.getSettings(options)
144
145 if self.encodingQueueInitialized:
146 x = self.encodingQueue.GetItemCount()
147 if self.queuedata:
148 key = max(self.queuedata.keys()) + 1
149 else:
150 key = 1
151 item['itemID'] = x
152 self.queuedata[key] = item
153 self.encodingQueue.InsertStringItem(x, item['path'])
154 self.encodingQueue.SetStringItem(x, 0, item['display_path'])
155 self.encodingQueue.SetStringItem(x, 1, item['status'])
156 self.encodingQueue.SetItemData(x, key)
157 else:
158 key = 1
159 self.queuedata[key] = item
160 self.initializeUploadQueue()
161 self._qd_key[name] = key
162 thread.start_new_thread(self.addItemThread, (item, ))
163
164 def OnItemSelected(self, event):
165 self.currentItem = event.m_itemIndex
166 self.removeItem.Enable()
167
168 def OnClickAdd(self, event):
169 result = addVideoDialog(self)
170 time.sleep(0.5)
171 if result['ok']:
172 self.addItemToQueue(result['videoFile'], result)
173
174 def OnClickRemove(self, event):
175 key = self.encodingQueue.GetItemData(self.currentItem)
176 print key
177 if 'enc' in self.queuedata[key]:
178 self.queuedata[key]['enc'].cancel()
179 del self.queuedata[key]
180 self.initializeUploadQueue(self.currentItem)
181
182 def OnExit(self, event):
183 for key in self.queuedata:
184 if 'enc' in self.queuedata[key]:
185 try:
186 self.queuedata[key]['enc'].cancel()
187 except:
188 pass
189 sys.exit()
190
191 def gui(inputFile = None):
192 app = wx.PySimpleApp()
193 frame=SimpleTheoraEncoder(None, wx.ID_ANY, 'Simple Theora Encoder', inputFile = inputFile)
194 app.MainLoop()
195
196 if __name__ == '__main__':
197 inputFile = None
198 if len(sys.argv) > 1 and not sys.argv[1].startswith('-'):
199 inputFile = sys.argv[1]
200 gui(inputFile)
0 example in python to parse ffmpeg2theora in frontend mode:
1
2 '''
3 import os
4
5 cmd = "ffmpeg2theora --frontend ..."
6 f_stdout, f_stdin, f = os.popen3(cmd)
7 info = {}
8 line = f.readline()
9 while line:
10 if line.startswith('f2t'):
11 for o in line.split(';')[1:]:
12 oo = o.split(': ')
13 if len(oo) >= 2:
14 info[oo[0]] = ": ".join(oo[1:]).strip()
15
16 #do something with info dict here
17
18 line = f.readline()
19 '''
20
0 from distutils.core import setup
1 from py2app.build_app import py2app
2
3 import os
4 import shutil
5
6 class mypy2app(py2app):
7 def run(self):
8 py2app.run(self)
9 print ">>>>> installing ffmpeg2theora <<<<<<"
10 resourcesRoot = os.path.join(self.dist_dir, 'Simple Theora Encoder.app/Contents/Resources')
11 shutil.copy('ffmpeg2theora', os.path.join(resourcesRoot, 'ffmpeg2theora'))
12 #rsrc_file = "Simple Theora Encoder.rsrc.py"
13 #shutil.copy(rsrc_file, os.path.join(resourcesRoot, rsrc_file))
14
15 imgPath = os.path.join(self.dist_dir, "Simple Theora Encoder.dmg")
16 os.system('''hdiutil create -srcfolder "%s" -volname "Simple Theora Encoder" -format UDZO "%s"''' %
17 (self.dist_dir, os.path.join(self.dist_dir, "Simple Theora Encoder.tmp.dmg")))
18 os.system('''hdiutil convert -format UDZO -imagekey zlib-level=9 -o "%s" "%s"''' %
19 (imgPath, os.path.join(self.dist_dir, "Simple Theora Encoder.tmp.dmg")))
20 os.remove(os.path.join(self.dist_dir,"Simple Theora Encoder.tmp.dmg"))
21
22 setup(
23 app=['Simple Theora Encoder.py'],
24 name='Simple Theora Encoder',
25 options={'py2app': {
26 'strip': True,
27 'optimize': 2,
28 'iconfile': 'Simple Theora Encoder.icns',
29 'plist': {'CFBundleIconFile': 'Simple Theora Encoder.icns'},
30 }},
31 cmdclass = {'py2app': mypy2app }
32
33 )
34
35
0 # -*- coding: utf-8 -*-
1 # vi:si:et:sw=2:sts=2:ts=2
2
3 import os
4 from os.path import basename
5 import time
6
7 import wx
8
9 class AddVideoDialog(wx.Dialog):
10 def __init__(
11 self, parent, ID, title, size=wx.DefaultSize, pos=wx.DefaultPosition,
12 style=wx.DEFAULT_DIALOG_STYLE,
13 ):
14
15 self.videoFile = ''
16
17 pre = wx.PreDialog()
18 #pre.SetExtraStyle(wx.DIALOG_EX_CONTEXTHELP)
19 pre.Create(parent, ID, title, pos, size, style)
20 self.PostCreate(pre)
21
22 # Now continue with the normal construction of the dialog
23 padding = 4
24 section_padding=60
25
26 mainBox = wx.BoxSizer(wx.VERTICAL)
27 hbox = wx.BoxSizer(wx.HORIZONTAL)
28 mainBox.Add(hbox)
29 hbox.AddSpacer((8, 8))
30
31 #Video File
32 hbox = wx.BoxSizer(wx.HORIZONTAL)
33 mainBox.Add(hbox)
34 hbox.Add(wx.StaticText(self, -1, "Video File"), 0, wx.EXPAND|wx.ALL, 16)
35
36 self.btnVideoFile = wx.Button(self, size=(380, -1))
37 self.btnVideoFile.SetLabel('Select...')
38 self.Bind(wx.EVT_BUTTON, self.OnClickVideoFile, self.btnVideoFile)
39 hbox.Add(self.btnVideoFile, 0, wx.EXPAND|wx.ALL, padding)
40
41 #Quality
42 hbox = wx.BoxSizer(wx.HORIZONTAL)
43 mainBox.Add(hbox)
44
45 label = wx.StaticText(self, -1, "Video")
46 hbox.AddSpacer((12, 10))
47 hbox.Add(label, 0, wx.EXPAND|wx.ALL, padding)
48 hbox = wx.BoxSizer(wx.HORIZONTAL)
49 mainBox.Add(hbox)
50 hbox.AddSpacer((section_padding, 10))
51
52 label = wx.StaticText(self, -1, "Quality:")
53 hbox.Add(label, 0, wx.EXPAND|wx.ALL, padding)
54 self.videoquality = wx.TextCtrl(self, -1, '5.0', size=(32,-1))
55 hbox.Add(self.videoquality, 0, wx.EXPAND|wx.ALL, padding)
56 label = wx.StaticText(self, -1, "Bitrate (kbps):")
57 hbox.Add(label, 0, wx.EXPAND|wx.ALL, padding)
58 self.videobitrate = wx.TextCtrl(self, -1, '', size=(65,-1))
59 hbox.Add(self.videobitrate, 0, wx.EXPAND|wx.ALL, padding)
60 hbox = wx.BoxSizer(wx.HORIZONTAL)
61 mainBox.Add(hbox)
62 hbox.AddSpacer((section_padding, 10))
63
64 #Size
65 box=45
66 label = wx.StaticText(self, -1, "Size:")
67 hbox.Add(label, 0, wx.EXPAND|wx.ALL, padding)
68 self.width = wx.TextCtrl(self, -1, '', size=(65,-1))
69 hbox.Add(self.width, 0, wx.EXPAND|wx.ALL, padding)
70 label = wx.StaticText(self, -1, "x")
71 hbox.Add(label, 0, wx.EXPAND|wx.ALL, padding)
72 self.height = wx.TextCtrl(self, -1, '', size=(65,-1))
73 hbox.Add(self.height, 0, wx.EXPAND|wx.ALL, padding)
74
75 #Framerate
76 label = wx.StaticText(self, -1, "Framerate:")
77 hbox.Add(label, 0, wx.EXPAND|wx.ALL, padding)
78 self.framerate = wx.TextCtrl(self, -1, '', size=(40,-1))
79 hbox.Add(self.framerate, 0, wx.EXPAND|wx.ALL, padding)
80
81 #Crop
82 box=35
83 hbox = wx.BoxSizer(wx.HORIZONTAL)
84 mainBox.Add(hbox)
85 hbox.AddSpacer((section_padding, 10))
86 label = wx.StaticText(self, -1, "Crop:")
87 hbox.Add(label, 0, wx.EXPAND|wx.ALL, padding)
88
89 label = wx.StaticText(self, -1, "Top")
90 hbox.Add(label, 0, wx.EXPAND|wx.ALL, padding)
91 self.cropTop = wx.TextCtrl(self, -1, '', size=(box,-1))
92 hbox.Add(self.cropTop, 0, wx.EXPAND|wx.ALL, padding)
93
94 label = wx.StaticText(self, -1, "Left")
95 hbox.Add(label, 0, wx.EXPAND|wx.ALL, padding)
96 self.cropLeft = wx.TextCtrl(self, -1, '', size=(box,-1))
97 hbox.Add(self.cropLeft, 0, wx.EXPAND|wx.ALL, padding)
98
99 label = wx.StaticText(self, -1, "Bottom")
100 hbox.Add(label, 0, wx.EXPAND|wx.ALL, padding)
101 self.cropBottom = wx.TextCtrl(self, -1, '', size=(box,-1))
102 hbox.Add(self.cropBottom, 0, wx.EXPAND|wx.ALL, padding)
103
104 label = wx.StaticText(self, -1, "Right")
105 hbox.Add(label, 0, wx.EXPAND|wx.ALL, padding)
106 self.cropRight = wx.TextCtrl(self, -1, '', size=(box,-1))
107 hbox.Add(self.cropRight, 0, wx.EXPAND|wx.ALL, padding)
108
109 box=45
110
111 hbox = wx.BoxSizer(wx.HORIZONTAL)
112 mainBox.Add(hbox)
113 label = wx.StaticText(self, -1, "Audio")
114 hbox.AddSpacer((12, 10))
115 hbox.Add(label, 0, wx.EXPAND|wx.ALL, padding)
116
117 #Quality & Bitrate
118 hbox = wx.BoxSizer(wx.HORIZONTAL)
119 mainBox.Add(hbox)
120 hbox.AddSpacer((section_padding, 10))
121 label = wx.StaticText(self, -1, "Quality:")
122 hbox.Add(label, 0, wx.EXPAND|wx.ALL, padding)
123 self.audioquality = wx.TextCtrl(self, -1, '1.0', size=(32,-1))
124 hbox.Add(self.audioquality, 0, wx.EXPAND|wx.ALL, padding)
125
126 label = wx.StaticText(self, -1, "Bitrate (kbps):")
127 hbox.Add(label, 0, wx.EXPAND|wx.ALL, padding)
128 self.audiobitrate = wx.TextCtrl(self, -1, '', size=(box,-1))
129 hbox.Add(self.audiobitrate, 0, wx.EXPAND|wx.ALL, padding)
130
131 #Samplerate / Channels
132 hbox = wx.BoxSizer(wx.HORIZONTAL)
133 mainBox.Add(hbox)
134 hbox.AddSpacer((section_padding, 10))
135 label = wx.StaticText(self, -1, "Samplerate (Hz)")
136 hbox.Add(label, 0, wx.EXPAND|wx.ALL, padding)
137 self.samplerate = wx.TextCtrl(self, -1, '', size=(56,-1))
138 hbox.Add(self.samplerate, 0, wx.EXPAND|wx.ALL, padding)
139 label = wx.StaticText(self, -1, "Channels")
140 hbox.Add(label, 0, wx.EXPAND|wx.ALL, padding)
141 self.channels = wx.TextCtrl(self, -1, '', size=(24,-1))
142 hbox.Add(self.channels, 0, wx.EXPAND|wx.ALL, padding)
143
144 hbox = wx.BoxSizer(wx.HORIZONTAL)
145 mainBox.Add(hbox)
146
147 '''
148 #Metadata
149 label = wx.StaticText(self, -1, "Metadata")
150 hbox.AddSpacer((12, 10))
151 hbox.Add(label, 0, wx.EXPAND|wx.ALL, padding)
152
153 mbox=180
154 hbox = wx.BoxSizer(wx.HORIZONTAL)
155 mainBox.Add(hbox)
156 labels = wx.BoxSizer(wx.VERTICAL)
157 inputs = wx.BoxSizer(wx.VERTICAL)
158 hbox.AddSpacer((section_padding, 10))
159 hbox.Add(labels, 0, wx.ALIGN_RIGHT|wx.EXPAND|wx.ALL)
160 hbox.Add(inputs,0, wx.ALIGN_LEFT|wx.EXPAND|wx.ALL)
161
162 #Title
163 label = wx.StaticText(self, -1, "Title")
164 labels.Add(label, 0, wx.EXPAND|wx.ALL, padding)
165 self.title = wx.TextCtrl(self, -1, '', size=(mbox,-1))
166 inputs.Add(self.title, 0, wx.EXPAND|wx.ALL)
167
168 #Artist
169 label = wx.StaticText(self, -1, "Artist")
170 labels.Add(label, 0, wx.EXPAND|wx.ALL, padding)
171 self.artist = wx.TextCtrl(self, -1, '', size=(mbox,-1))
172 inputs.Add(self.artist, 0, wx.EXPAND|wx.ALL)
173
174 #date
175 label = wx.StaticText(self, -1, "Date", size=(mbox,-1))
176 labels.Add(label, 0, wx.EXPAND|wx.ALL, padding)
177 self.date = wx.TextCtrl(self, -1, '', size=(mbox,-1))
178 inputs.Add(self.date, 0, wx.EXPAND|wx.ALL)
179
180 #Location
181 label = wx.StaticText(self, -1, "Location")
182 labels.Add(label, 0, wx.EXPAND|wx.ALL, padding)
183 self.location = wx.TextCtrl(self, -1, '', size=(mbox,-1))
184 inputs.Add(self.location, 0, wx.EXPAND|wx.ALL)
185
186 #Organization
187 label = wx.StaticText(self, -1, "Organization")
188 labels.Add(label, 0, wx.EXPAND|wx.ALL, padding)
189 self.organization = wx.TextCtrl(self, -1, '', size=(mbox,-1))
190 inputs.Add(self.organization, 0, wx.EXPAND|wx.ALL)
191
192 #Copyright
193 label = wx.StaticText(self, -1, "Copyright")
194 labels.Add(label, 0, wx.EXPAND|wx.ALL, padding)
195 self.copyright = wx.TextCtrl(self, -1, '', size=(mbox,-1))
196 inputs.Add(self.copyright, 0, wx.EXPAND|wx.ALL)
197
198 #License
199 label = wx.StaticText(self, -1, "License")
200 labels.Add(label, 0, wx.EXPAND|wx.ALL, padding)
201 self.license = wx.TextCtrl(self, -1, '', size=(mbox,-1))
202 inputs.Add(self.license, 0, wx.EXPAND|wx.ALL)
203
204 #Contact
205 label = wx.StaticText(self, -1, "Contact")
206 labels.Add(label, 0, wx.EXPAND|wx.ALL, padding)
207 self.contact = wx.TextCtrl(self, -1, '', size=(mbox,-1))
208 inputs.Add(self.contact, 0, wx.EXPAND|wx.ALL)
209 '''
210
211 #Buttons
212 hbox = wx.BoxSizer(wx.HORIZONTAL)
213 mainBox.Add(hbox)
214 hbox.AddSpacer((8, 16))
215
216 hbox = wx.BoxSizer(wx.HORIZONTAL)
217 mainBox.Add(hbox)
218 hbox.AddSpacer((280, 10))
219 self.btnCancel = wx.Button(self, wx.ID_CANCEL)
220 self.btnCancel.SetLabel('Cancel')
221 hbox.Add(self.btnCancel, 0, wx.EXPAND|wx.ALL, padding)
222
223 self.btnOK = wx.Button(self, wx.ID_OK)
224 self.btnOK.SetDefault()
225 self.btnOK.Disable()
226 self.btnOK.SetLabel('Encode')
227 hbox.Add(self.btnOK, 0, wx.EXPAND|wx.ALL, padding)
228
229 hbox = wx.BoxSizer(wx.HORIZONTAL)
230 mainBox.Add(hbox)
231 hbox.AddSpacer((8, 8))
232
233
234 self.SetSizerAndFit(mainBox)
235
236 if parent.inputFile and os.path.exists(parent.inputFile):
237 self.selectVideoFile(parent.inputFile)
238 parent.inputFile = None
239
240 def OnClickVideoFile(self, event):
241 #transcoding later...
242 wildcard = "Video files|*.OGG;*.ogg;*.OGV;*.ogv;*.AVI;*.avi;*.mov;*.MOV;*.dv;*.DV;*.mp4;*.MP4;*.m4v;*.mpg;*.mpeg;*.wmv;*.MPG;*.flv;*.FLV|All Files (*.*)|*.*"
243 dialogOptions = dict()
244 dialogOptions['message'] = 'Add Video..'
245 dialogOptions['wildcard'] = wildcard
246 dialog = wx.FileDialog(self, **dialogOptions)
247 if dialog.ShowModal() == wx.ID_OK:
248 filename = dialog.GetFilename()
249 dirname = dialog.GetDirectory()
250 self.selectVideoFile(os.path.join(dirname, filename))
251 else:
252 filename=None
253 dialog.Destroy()
254 return filename
255
256 def selectVideoFile(self, videoFile):
257 self.videoFile = videoFile
258 lValue = videoFile
259 lLenght = 45
260 if len(lValue) > lLenght:
261 lValue = "..." + lValue[-lLenght:]
262 self.btnVideoFile.SetLabel(lValue)
263 self.btnOK.Enable()
264
265 def addVideoDialog(parent):
266 dlg = AddVideoDialog(parent, -1, "Add Video", size=(490, 560), style=wx.DEFAULT_DIALOG_STYLE)
267 dlg.CenterOnScreen()
268 val = dlg.ShowModal()
269 result = dict()
270 if val == wx.ID_OK:
271 result['ok'] = True
272 result['videoFile'] = dlg.videoFile
273 for key in ('width', 'height', 'videoquality', 'videobitrate', 'framerate',
274 'audioquality', 'audiobitrate', 'samplerate'):
275 result[key] = getattr(dlg, key).GetValue()
276 print result
277 else:
278 result['ok'] = False
279 dlg.Destroy()
280 return result
0 # -*- coding: utf-8 -*-
1 # vi:si:et:sw=2:sts=2:ts=2
2
3 import os
4 from os.path import exists, join, dirname, abspath
5 import time
6 import sys
7 import signal
8 import subprocess
9
10 resourcePath = abspath(dirname(__file__))
11
12 def timestr(seconds):
13 hours = int(seconds/3600)
14 minutes = int((seconds-( hours*3600 ))/60)
15 seconds = (seconds-((hours*3600)+(minutes*60)))
16 return '%02d:%02d:%02d' % (hours, minutes, seconds)
17
18 class TheoraEnc:
19 settings = []
20 p = None
21 def __init__(self, inputFile, outputFile, updateGUI):
22 self.inputFile = inputFile
23 self.outputFile = outputFile
24 self.updateGUI = updateGUI
25 appname = 'ffmpeg2theora'
26 if os.name == 'nt':
27 appname = appname + '.exe'
28 self.ffmpeg2theora = join(resourcePath, appname)
29 if not exists(self.ffmpeg2theora):
30 self.ffmpeg2theora = appname
31
32 def commandline(self):
33 cmd = []
34 cmd.append(self.ffmpeg2theora)
35 cmd.append('--frontend')
36 for e in self.settings:
37 cmd.append(e)
38 cmd.append(self.inputFile)
39 if self.outputFile:
40 cmd.append('-o')
41 cmd.append(self.outputFile)
42 return cmd
43
44 def cancel(self):
45 if self.p:
46 print self.p.pid
47 p = self.p.pid
48 os.kill(p, signal.SIGTERM)
49 t = 2.5 # max wait time in secs
50 while self.p.poll() < 0:
51 if t > 0.5:
52 t -= 0.25
53 time.sleep(0.25)
54 else: # still there, force kill
55 try:
56 os.kill(p, signal.SIGKILL)
57 time.sleep(0.5)
58 p.poll() # final try
59 except:
60 pass
61 break
62 #self.p.terminate()
63
64 def encode(self):
65 cmd = self.commandline()
66 print cmd
67 p = subprocess.Popen(cmd, shell=False, stderr=subprocess.PIPE, close_fds=True)
68 self.p = p
69 f = p.stderr
70 line = f.readline()
71 info = dict()
72 status = ''
73 while line:
74 if line.startswith('f2t'):
75 for o in line.split(';')[1:]:
76 oo = o.split(': ')
77 if len(oo) >= 2:
78 info[oo[0]] = ": ".join(oo[1:]).strip()
79 if 'position' in info:
80 if 'duration' in info and float(info['duration']):
81 encoded = "encoding % 3d %% done " % ((float(info['position']) / float(info['duration'])) * 100)
82 else:
83 encoded = "encoded %s/" % timestr(float(info['position']))
84 if float(info['remaining'])>0:
85 status = encoded + '/ '+ timestr(float(info['remaining']))
86 else:
87 status = encoded
88 else:
89 status = "encoding.."
90 self.updateGUI(status)
91 line = f.readline()
92 f.close()
93 if info.get('result', 'no') == 'ok':
94 self.updateGUI('Encoding done.')
95 return True
96 else:
97 self.updateGUI(info.get('result', 'Encoding failed.'))
98 return False
99
44 #extra=" --enable-amr_nb --enable-amr_nb-fixed --enable-amr_wb --enable-amr_if2"
55
66 #apt-get install liba52-dev libfaad-dev libgsm1-dev
7 #extra=" --enable-liba52 --enable-libfaad --enable-libgsm"
7 #extra=" --enable-libfaad --enable-libgsm"
88
99 common="--enable-gpl --enable-swscale --enable-postproc --disable-encoders --enable-libvorbis"
1010
1414 #mingw32
1515 uname | grep MINGW && options="$common --enable-memalign-hack --enable-mingw32 --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib $extra"
1616
17 svn co svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
17 # load FFMPEG specific properties
18 . ./ffmpegrev
19
20 #Get ffmpeg from svn
21 svn -r $FFMPEG_REVISION co $FFMPEG_SVN $FFMPEG_CO_DIR
22 svn update -r $FFMPEG_EXTERNALS_REVISION $FFMPEG_CO_DIR/libswscale
23
24 #configure and build ffmpeg
1825 cd ffmpeg && ./configure $options && make
26
00 #!/bin/bash
11
2 version=0.1.1
2 version=0.3.0
33 baseurl="http://libkate.googlecode.com/files/libkate-$version.tar.gz"
44
55 which wget >& /dev/null
66 if [ $? -eq 0 ]
77 then
8 wget "$baseurl"
8 test -e "libkate-$version.tar.gz" || wget "$baseurl"
99 else
1010 which curl >& /dev/null
1111 if [ $? -eq 0 ]
1212 then
13 curl "$baseurl"
13 test -e "libkate-$version.tar.gz" || curl "$baseurl" -o "libkate-$version.tar.gz"
1414 else
1515 echo "Neither wget nor curl were found, cannot download libkate"
1616 exit 1
2424 fi
2525
2626 tar xfz "libkate-$version.tar.gz"
27 test -L libkate && rm libkate
2728 ln -fs "libkate-$version" libkate
28 cd libkate && make staticlib
29 cd libkate && ./configure && make && cd lib
2930
+0
-519
install-sh less more
0 #!/bin/sh
1 # install - install a program, script, or datafile
2
3 scriptversion=2006-12-25.00
4
5 # This originates from X11R5 (mit/util/scripts/install.sh), which was
6 # later released in X11R6 (xc/config/util/install.sh) with the
7 # following copyright and license.
8 #
9 # Copyright (C) 1994 X Consortium
10 #
11 # Permission is hereby granted, free of charge, to any person obtaining a copy
12 # of this software and associated documentation files (the "Software"), to
13 # deal in the Software without restriction, including without limitation the
14 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
15 # sell copies of the Software, and to permit persons to whom the Software is
16 # furnished to do so, subject to the following conditions:
17 #
18 # The above copyright notice and this permission notice shall be included in
19 # all copies or substantial portions of the Software.
20 #
21 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
25 # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
26 # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 #
28 # Except as contained in this notice, the name of the X Consortium shall not
29 # be used in advertising or otherwise to promote the sale, use or other deal-
30 # ings in this Software without prior written authorization from the X Consor-
31 # tium.
32 #
33 #
34 # FSF changes to this file are in the public domain.
35 #
36 # Calling this script install-sh is preferred over install.sh, to prevent
37 # `make' implicit rules from creating a file called install from it
38 # when there is no Makefile.
39 #
40 # This script is compatible with the BSD install script, but was written
41 # from scratch.
42
43 nl='
44 '
45 IFS=" "" $nl"
46
47 # set DOITPROG to echo to test this script
48
49 # Don't use :- since 4.3BSD and earlier shells don't like it.
50 doit=${DOITPROG-}
51 if test -z "$doit"; then
52 doit_exec=exec
53 else
54 doit_exec=$doit
55 fi
56
57 # Put in absolute file names if you don't have them in your path;
58 # or use environment vars.
59
60 chgrpprog=${CHGRPPROG-chgrp}
61 chmodprog=${CHMODPROG-chmod}
62 chownprog=${CHOWNPROG-chown}
63 cmpprog=${CMPPROG-cmp}
64 cpprog=${CPPROG-cp}
65 mkdirprog=${MKDIRPROG-mkdir}
66 mvprog=${MVPROG-mv}
67 rmprog=${RMPROG-rm}
68 stripprog=${STRIPPROG-strip}
69
70 posix_glob='?'
71 initialize_posix_glob='
72 test "$posix_glob" != "?" || {
73 if (set -f) 2>/dev/null; then
74 posix_glob=
75 else
76 posix_glob=:
77 fi
78 }
79 '
80
81 posix_mkdir=
82
83 # Desired mode of installed file.
84 mode=0755
85
86 chgrpcmd=
87 chmodcmd=$chmodprog
88 chowncmd=
89 mvcmd=$mvprog
90 rmcmd="$rmprog -f"
91 stripcmd=
92
93 src=
94 dst=
95 dir_arg=
96 dst_arg=
97
98 copy_on_change=false
99 no_target_directory=
100
101 usage="\
102 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
103 or: $0 [OPTION]... SRCFILES... DIRECTORY
104 or: $0 [OPTION]... -t DIRECTORY SRCFILES...
105 or: $0 [OPTION]... -d DIRECTORIES...
106
107 In the 1st form, copy SRCFILE to DSTFILE.
108 In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
109 In the 4th, create DIRECTORIES.
110
111 Options:
112 --help display this help and exit.
113 --version display version info and exit.
114
115 -c (ignored)
116 -C install only if different (preserve the last data modification time)
117 -d create directories instead of installing files.
118 -g GROUP $chgrpprog installed files to GROUP.
119 -m MODE $chmodprog installed files to MODE.
120 -o USER $chownprog installed files to USER.
121 -s $stripprog installed files.
122 -t DIRECTORY install into DIRECTORY.
123 -T report an error if DSTFILE is a directory.
124
125 Environment variables override the default commands:
126 CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
127 RMPROG STRIPPROG
128 "
129
130 while test $# -ne 0; do
131 case $1 in
132 -c) ;;
133
134 -C) copy_on_change=true;;
135
136 -d) dir_arg=true;;
137
138 -g) chgrpcmd="$chgrpprog $2"
139 shift;;
140
141 --help) echo "$usage"; exit $?;;
142
143 -m) mode=$2
144 case $mode in
145 *' '* | *' '* | *'
146 '* | *'*'* | *'?'* | *'['*)
147 echo "$0: invalid mode: $mode" >&2
148 exit 1;;
149 esac
150 shift;;
151
152 -o) chowncmd="$chownprog $2"
153 shift;;
154
155 -s) stripcmd=$stripprog;;
156
157 -t) dst_arg=$2
158 shift;;
159
160 -T) no_target_directory=true;;
161
162 --version) echo "$0 $scriptversion"; exit $?;;
163
164 --) shift
165 break;;
166
167 -*) echo "$0: invalid option: $1" >&2
168 exit 1;;
169
170 *) break;;
171 esac
172 shift
173 done
174
175 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
176 # When -d is used, all remaining arguments are directories to create.
177 # When -t is used, the destination is already specified.
178 # Otherwise, the last argument is the destination. Remove it from $@.
179 for arg
180 do
181 if test -n "$dst_arg"; then
182 # $@ is not empty: it contains at least $arg.
183 set fnord "$@" "$dst_arg"
184 shift # fnord
185 fi
186 shift # arg
187 dst_arg=$arg
188 done
189 fi
190
191 if test $# -eq 0; then
192 if test -z "$dir_arg"; then
193 echo "$0: no input file specified." >&2
194 exit 1
195 fi
196 # It's OK to call `install-sh -d' without argument.
197 # This can happen when creating conditional directories.
198 exit 0
199 fi
200
201 if test -z "$dir_arg"; then
202 trap '(exit $?); exit' 1 2 13 15
203
204 # Set umask so as not to create temps with too-generous modes.
205 # However, 'strip' requires both read and write access to temps.
206 case $mode in
207 # Optimize common cases.
208 *644) cp_umask=133;;
209 *755) cp_umask=22;;
210
211 *[0-7])
212 if test -z "$stripcmd"; then
213 u_plus_rw=
214 else
215 u_plus_rw='% 200'
216 fi
217 cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
218 *)
219 if test -z "$stripcmd"; then
220 u_plus_rw=
221 else
222 u_plus_rw=,u+rw
223 fi
224 cp_umask=$mode$u_plus_rw;;
225 esac
226 fi
227
228 for src
229 do
230 # Protect names starting with `-'.
231 case $src in
232 -*) src=./$src;;
233 esac
234
235 if test -n "$dir_arg"; then
236 dst=$src
237 dstdir=$dst
238 test -d "$dstdir"
239 dstdir_status=$?
240 else
241
242 # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
243 # might cause directories to be created, which would be especially bad
244 # if $src (and thus $dsttmp) contains '*'.
245 if test ! -f "$src" && test ! -d "$src"; then
246 echo "$0: $src does not exist." >&2
247 exit 1
248 fi
249
250 if test -z "$dst_arg"; then
251 echo "$0: no destination specified." >&2
252 exit 1
253 fi
254
255 dst=$dst_arg
256 # Protect names starting with `-'.
257 case $dst in
258 -*) dst=./$dst;;
259 esac
260
261 # If destination is a directory, append the input filename; won't work
262 # if double slashes aren't ignored.
263 if test -d "$dst"; then
264 if test -n "$no_target_directory"; then
265 echo "$0: $dst_arg: Is a directory" >&2
266 exit 1
267 fi
268 dstdir=$dst
269 dst=$dstdir/`basename "$src"`
270 dstdir_status=0
271 else
272 # Prefer dirname, but fall back on a substitute if dirname fails.
273 dstdir=`
274 (dirname "$dst") 2>/dev/null ||
275 expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
276 X"$dst" : 'X\(//\)[^/]' \| \
277 X"$dst" : 'X\(//\)$' \| \
278 X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
279 echo X"$dst" |
280 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
281 s//\1/
282 q
283 }
284 /^X\(\/\/\)[^/].*/{
285 s//\1/
286 q
287 }
288 /^X\(\/\/\)$/{
289 s//\1/
290 q
291 }
292 /^X\(\/\).*/{
293 s//\1/
294 q
295 }
296 s/.*/./; q'
297 `
298
299 test -d "$dstdir"
300 dstdir_status=$?
301 fi
302 fi
303
304 obsolete_mkdir_used=false
305
306 if test $dstdir_status != 0; then
307 case $posix_mkdir in
308 '')
309 # Create intermediate dirs using mode 755 as modified by the umask.
310 # This is like FreeBSD 'install' as of 1997-10-28.
311 umask=`umask`
312 case $stripcmd.$umask in
313 # Optimize common cases.
314 *[2367][2367]) mkdir_umask=$umask;;
315 .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
316
317 *[0-7])
318 mkdir_umask=`expr $umask + 22 \
319 - $umask % 100 % 40 + $umask % 20 \
320 - $umask % 10 % 4 + $umask % 2
321 `;;
322 *) mkdir_umask=$umask,go-w;;
323 esac
324
325 # With -d, create the new directory with the user-specified mode.
326 # Otherwise, rely on $mkdir_umask.
327 if test -n "$dir_arg"; then
328 mkdir_mode=-m$mode
329 else
330 mkdir_mode=
331 fi
332
333 posix_mkdir=false
334 case $umask in
335 *[123567][0-7][0-7])
336 # POSIX mkdir -p sets u+wx bits regardless of umask, which
337 # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
338 ;;
339 *)
340 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
341 trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
342
343 if (umask $mkdir_umask &&
344 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
345 then
346 if test -z "$dir_arg" || {
347 # Check for POSIX incompatibilities with -m.
348 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
349 # other-writeable bit of parent directory when it shouldn't.
350 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
351 ls_ld_tmpdir=`ls -ld "$tmpdir"`
352 case $ls_ld_tmpdir in
353 d????-?r-*) different_mode=700;;
354 d????-?--*) different_mode=755;;
355 *) false;;
356 esac &&
357 $mkdirprog -m$different_mode -p -- "$tmpdir" && {
358 ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
359 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
360 }
361 }
362 then posix_mkdir=:
363 fi
364 rmdir "$tmpdir/d" "$tmpdir"
365 else
366 # Remove any dirs left behind by ancient mkdir implementations.
367 rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
368 fi
369 trap '' 0;;
370 esac;;
371 esac
372
373 if
374 $posix_mkdir && (
375 umask $mkdir_umask &&
376 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
377 )
378 then :
379 else
380
381 # The umask is ridiculous, or mkdir does not conform to POSIX,
382 # or it failed possibly due to a race condition. Create the
383 # directory the slow way, step by step, checking for races as we go.
384
385 case $dstdir in
386 /*) prefix='/';;
387 -*) prefix='./';;
388 *) prefix='';;
389 esac
390
391 eval "$initialize_posix_glob"
392
393 oIFS=$IFS
394 IFS=/
395 $posix_glob set -f
396 set fnord $dstdir
397 shift
398 $posix_glob set +f
399 IFS=$oIFS
400
401 prefixes=
402
403 for d
404 do
405 test -z "$d" && continue
406
407 prefix=$prefix$d
408 if test -d "$prefix"; then
409 prefixes=
410 else
411 if $posix_mkdir; then
412 (umask=$mkdir_umask &&
413 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
414 # Don't fail if two instances are running concurrently.
415 test -d "$prefix" || exit 1
416 else
417 case $prefix in
418 *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
419 *) qprefix=$prefix;;
420 esac
421 prefixes="$prefixes '$qprefix'"
422 fi
423 fi
424 prefix=$prefix/
425 done
426
427 if test -n "$prefixes"; then
428 # Don't fail if two instances are running concurrently.
429 (umask $mkdir_umask &&
430 eval "\$doit_exec \$mkdirprog $prefixes") ||
431 test -d "$dstdir" || exit 1
432 obsolete_mkdir_used=true
433 fi
434 fi
435 fi
436
437 if test -n "$dir_arg"; then
438 { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
439 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
440 { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
441 test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
442 else
443
444 # Make a couple of temp file names in the proper directory.
445 dsttmp=$dstdir/_inst.$$_
446 rmtmp=$dstdir/_rm.$$_
447
448 # Trap to clean up those temp files at exit.
449 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
450
451 # Copy the file name to the temp name.
452 (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
453
454 # and set any options; do chmod last to preserve setuid bits.
455 #
456 # If any of these fail, we abort the whole thing. If we want to
457 # ignore errors from any of these, just make sure not to ignore
458 # errors from the above "$doit $cpprog $src $dsttmp" command.
459 #
460 { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
461 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
462 { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
463 { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
464
465 # If -C, don't bother to copy if it wouldn't change the file.
466 if $copy_on_change &&
467 old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
468 new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
469
470 eval "$initialize_posix_glob" &&
471 $posix_glob set -f &&
472 set X $old && old=:$2:$4:$5:$6 &&
473 set X $new && new=:$2:$4:$5:$6 &&
474 $posix_glob set +f &&
475
476 test "$old" = "$new" &&
477 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
478 then
479 rm -f "$dsttmp"
480 else
481 # Rename the file to the real destination.
482 $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
483
484 # The rename failed, perhaps because mv can't rename something else
485 # to itself, or perhaps because mv is so ancient that it does not
486 # support -f.
487 {
488 # Now remove or move aside any old file at destination location.
489 # We try this two ways since rm can't unlink itself on some
490 # systems and the destination file might be busy for other
491 # reasons. In this case, the final cleanup might fail but the new
492 # file should still install successfully.
493 {
494 test ! -f "$dst" ||
495 $doit $rmcmd -f "$dst" 2>/dev/null ||
496 { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
497 { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
498 } ||
499 { echo "$0: cannot unlink or rename $dst" >&2
500 (exit 1); exit 1
501 }
502 } &&
503
504 # Now rename the file to the real destination.
505 $doit $mvcmd "$dsttmp" "$dst"
506 }
507 fi || exit 1
508
509 trap '' 0
510 fi
511 done
512
513 # Local variables:
514 # eval: (add-hook 'write-file-hooks 'time-stamp)
515 # time-stamp-start: "scriptversion="
516 # time-stamp-format: "%:y-%02m-%02d.%02H"
517 # time-stamp-end: "$"
518 # End:
+0
-1
kino_export/Makefile.am less more
0 EXTRA_DIST=README ffmpeg2theora.sh
+0
-329
kino_export/Makefile.in less more
0 # Makefile.in generated by automake 1.10.1 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15 VPATH = @srcdir@
16 pkgdatadir = $(datadir)/@PACKAGE@
17 pkglibdir = $(libdir)/@PACKAGE@
18 pkgincludedir = $(includedir)/@PACKAGE@
19 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
20 install_sh_DATA = $(install_sh) -c -m 644
21 install_sh_PROGRAM = $(install_sh) -c
22 install_sh_SCRIPT = $(install_sh) -c
23 INSTALL_HEADER = $(INSTALL_DATA)
24 transform = $(program_transform_name)
25 NORMAL_INSTALL = :
26 PRE_INSTALL = :
27 POST_INSTALL = :
28 NORMAL_UNINSTALL = :
29 PRE_UNINSTALL = :
30 POST_UNINSTALL = :
31 build_triplet = @build@
32 host_triplet = @host@
33 subdir = kino_export
34 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
35 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
36 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
37 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
38 $(ACLOCAL_M4)
39 mkinstalldirs = $(install_sh) -d
40 CONFIG_CLEAN_FILES =
41 SOURCES =
42 DIST_SOURCES =
43 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
44 ACLOCAL = @ACLOCAL@
45 AMTAR = @AMTAR@
46 AR = @AR@
47 AUTOCONF = @AUTOCONF@
48 AUTOHEADER = @AUTOHEADER@
49 AUTOMAKE = @AUTOMAKE@
50 AWK = @AWK@
51 CC = @CC@
52 CCDEPMODE = @CCDEPMODE@
53 CFLAGS = @CFLAGS@
54 CPP = @CPP@
55 CPPFLAGS = @CPPFLAGS@
56 CXX = @CXX@
57 CXXCPP = @CXXCPP@
58 CXXDEPMODE = @CXXDEPMODE@
59 CXXFLAGS = @CXXFLAGS@
60 CYGPATH_W = @CYGPATH_W@
61 DEFS = @DEFS@
62 DEPDIR = @DEPDIR@
63 DSYMUTIL = @DSYMUTIL@
64 ECHO = @ECHO@
65 ECHO_C = @ECHO_C@
66 ECHO_N = @ECHO_N@
67 ECHO_T = @ECHO_T@
68 EGREP = @EGREP@
69 EXEEXT = @EXEEXT@
70 F77 = @F77@
71 FFLAGS = @FFLAGS@
72 FFMPEG_CFLAGS = @FFMPEG_CFLAGS@
73 FFMPEG_LIBS = @FFMPEG_LIBS@
74 GREP = @GREP@
75 INSTALL = @INSTALL@
76 INSTALL_DATA = @INSTALL_DATA@
77 INSTALL_PROGRAM = @INSTALL_PROGRAM@
78 INSTALL_SCRIPT = @INSTALL_SCRIPT@
79 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
80 KATE_CFLAGS = @KATE_CFLAGS@
81 KATE_LIBS = @KATE_LIBS@
82 LDFLAGS = @LDFLAGS@
83 LIBOBJS = @LIBOBJS@
84 LIBS = @LIBS@
85 LIBTOOL = @LIBTOOL@
86 LN_S = @LN_S@
87 LTLIBOBJS = @LTLIBOBJS@
88 MAKEINFO = @MAKEINFO@
89 MKDIR_P = @MKDIR_P@
90 NMEDIT = @NMEDIT@
91 OBJEXT = @OBJEXT@
92 PACKAGE = @PACKAGE@
93 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
94 PACKAGE_NAME = @PACKAGE_NAME@
95 PACKAGE_STRING = @PACKAGE_STRING@
96 PACKAGE_TARNAME = @PACKAGE_TARNAME@
97 PACKAGE_VERSION = @PACKAGE_VERSION@
98 PATH_SEPARATOR = @PATH_SEPARATOR@
99 PKG_CONFIG = @PKG_CONFIG@
100 RANLIB = @RANLIB@
101 SED = @SED@
102 SET_MAKE = @SET_MAKE@
103 SHELL = @SHELL@
104 STRIP = @STRIP@
105 VERSION = @VERSION@
106 XIPH_CFLAGS = @XIPH_CFLAGS@
107 XIPH_LIBS = @XIPH_LIBS@
108 abs_builddir = @abs_builddir@
109 abs_srcdir = @abs_srcdir@
110 abs_top_builddir = @abs_top_builddir@
111 abs_top_srcdir = @abs_top_srcdir@
112 ac_ct_CC = @ac_ct_CC@
113 ac_ct_CXX = @ac_ct_CXX@
114 ac_ct_F77 = @ac_ct_F77@
115 am__include = @am__include@
116 am__leading_dot = @am__leading_dot@
117 am__quote = @am__quote@
118 am__tar = @am__tar@
119 am__untar = @am__untar@
120 bindir = @bindir@
121 build = @build@
122 build_alias = @build_alias@
123 build_cpu = @build_cpu@
124 build_os = @build_os@
125 build_vendor = @build_vendor@
126 builddir = @builddir@
127 datadir = @datadir@
128 datarootdir = @datarootdir@
129 docdir = @docdir@
130 dvidir = @dvidir@
131 exec_prefix = @exec_prefix@
132 host = @host@
133 host_alias = @host_alias@
134 host_cpu = @host_cpu@
135 host_os = @host_os@
136 host_vendor = @host_vendor@
137 htmldir = @htmldir@
138 includedir = @includedir@
139 infodir = @infodir@
140 install_sh = @install_sh@
141 libdir = @libdir@
142 libexecdir = @libexecdir@
143 localedir = @localedir@
144 localstatedir = @localstatedir@
145 mandir = @mandir@
146 mkdir_p = @mkdir_p@
147 oldincludedir = @oldincludedir@
148 pdfdir = @pdfdir@
149 prefix = @prefix@
150 program_transform_name = @program_transform_name@
151 psdir = @psdir@
152 sbindir = @sbindir@
153 sharedstatedir = @sharedstatedir@
154 srcdir = @srcdir@
155 sysconfdir = @sysconfdir@
156 target_alias = @target_alias@
157 top_builddir = @top_builddir@
158 top_srcdir = @top_srcdir@
159 EXTRA_DIST = README ffmpeg2theora.sh
160 all: all-am
161
162 .SUFFIXES:
163 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
164 @for dep in $?; do \
165 case '$(am__configure_deps)' in \
166 *$$dep*) \
167 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
168 && exit 0; \
169 exit 1;; \
170 esac; \
171 done; \
172 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu kino_export/Makefile'; \
173 cd $(top_srcdir) && \
174 $(AUTOMAKE) --gnu kino_export/Makefile
175 .PRECIOUS: Makefile
176 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
177 @case '$?' in \
178 *config.status*) \
179 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
180 *) \
181 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
182 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
183 esac;
184
185 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
186 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
187
188 $(top_srcdir)/configure: $(am__configure_deps)
189 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
190 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
191 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
192
193 mostlyclean-libtool:
194 -rm -f *.lo
195
196 clean-libtool:
197 -rm -rf .libs _libs
198 tags: TAGS
199 TAGS:
200
201 ctags: CTAGS
202 CTAGS:
203
204
205 distdir: $(DISTFILES)
206 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
207 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
208 list='$(DISTFILES)'; \
209 dist_files=`for file in $$list; do echo $$file; done | \
210 sed -e "s|^$$srcdirstrip/||;t" \
211 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
212 case $$dist_files in \
213 */*) $(MKDIR_P) `echo "$$dist_files" | \
214 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
215 sort -u` ;; \
216 esac; \
217 for file in $$dist_files; do \
218 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
219 if test -d $$d/$$file; then \
220 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
221 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
222 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
223 fi; \
224 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
225 else \
226 test -f $(distdir)/$$file \
227 || cp -p $$d/$$file $(distdir)/$$file \
228 || exit 1; \
229 fi; \
230 done
231 check-am: all-am
232 check: check-am
233 all-am: Makefile
234 installdirs:
235 install: install-am
236 install-exec: install-exec-am
237 install-data: install-data-am
238 uninstall: uninstall-am
239
240 install-am: all-am
241 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
242
243 installcheck: installcheck-am
244 install-strip:
245 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
246 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
247 `test -z '$(STRIP)' || \
248 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
249 mostlyclean-generic:
250
251 clean-generic:
252
253 distclean-generic:
254 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
255
256 maintainer-clean-generic:
257 @echo "This command is intended for maintainers to use"
258 @echo "it deletes files that may require special tools to rebuild."
259 clean: clean-am
260
261 clean-am: clean-generic clean-libtool mostlyclean-am
262
263 distclean: distclean-am
264 -rm -f Makefile
265 distclean-am: clean-am distclean-generic
266
267 dvi: dvi-am
268
269 dvi-am:
270
271 html: html-am
272
273 info: info-am
274
275 info-am:
276
277 install-data-am:
278
279 install-dvi: install-dvi-am
280
281 install-exec-am:
282
283 install-html: install-html-am
284
285 install-info: install-info-am
286
287 install-man:
288
289 install-pdf: install-pdf-am
290
291 install-ps: install-ps-am
292
293 installcheck-am:
294
295 maintainer-clean: maintainer-clean-am
296 -rm -f Makefile
297 maintainer-clean-am: distclean-am maintainer-clean-generic
298
299 mostlyclean: mostlyclean-am
300
301 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
302
303 pdf: pdf-am
304
305 pdf-am:
306
307 ps: ps-am
308
309 ps-am:
310
311 uninstall-am:
312
313 .MAKE: install-am install-strip
314
315 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
316 distclean distclean-generic distclean-libtool distdir dvi \
317 dvi-am html html-am info info-am install install-am \
318 install-data install-data-am install-dvi install-dvi-am \
319 install-exec install-exec-am install-html install-html-am \
320 install-info install-info-am install-man install-pdf \
321 install-pdf-am install-ps install-ps-am install-strip \
322 installcheck installcheck-am installdirs maintainer-clean \
323 maintainer-clean-generic mostlyclean mostlyclean-generic \
324 mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
325
326 # Tell versions [3.59,3.63) of GNU make to not export all variables.
327 # Otherwise a system limit (for SysV at least) may be exceeded.
328 .NOEXPORT:
+0
-6964
ltmain.sh less more
0 # ltmain.sh - Provide generalized library-building support services.
1 # NOTE: Changing this file will not affect anything until you rerun configure.
2 #
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
4 # 2007, 2008 Free Software Foundation, Inc.
5 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6 #
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25
26 basename="s,^.*/,,g"
27
28 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
29 # is ksh but when the shell is invoked as "sh" and the current value of
30 # the _XPG environment variable is not equal to 1 (one), the special
31 # positional parameter $0, within a function call, is the name of the
32 # function.
33 progpath="$0"
34
35 # The name of this program:
36 progname=`echo "$progpath" | $SED $basename`
37 modename="$progname"
38
39 # Global variables:
40 EXIT_SUCCESS=0
41 EXIT_FAILURE=1
42
43 PROGRAM=ltmain.sh
44 PACKAGE=libtool
45 VERSION="1.5.26 Debian 1.5.26-1ubuntu1"
46 TIMESTAMP=" (1.1220.2.493 2008/02/01 16:58:18)"
47
48 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
49 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
50 emulate sh
51 NULLCMD=:
52 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
53 # is contrary to our usage. Disable this feature.
54 alias -g '${1+"$@"}'='"$@"'
55 setopt NO_GLOB_SUBST
56 else
57 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
58 fi
59 BIN_SH=xpg4; export BIN_SH # for Tru64
60 DUALCASE=1; export DUALCASE # for MKS sh
61
62 # Check that we have a working $echo.
63 if test "X$1" = X--no-reexec; then
64 # Discard the --no-reexec flag, and continue.
65 shift
66 elif test "X$1" = X--fallback-echo; then
67 # Avoid inline document here, it may be left over
68 :
69 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
70 # Yippee, $echo works!
71 :
72 else
73 # Restart under the correct shell, and then maybe $echo will work.
74 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
75 fi
76
77 if test "X$1" = X--fallback-echo; then
78 # used as fallback echo
79 shift
80 cat <<EOF
81 $*
82 EOF
83 exit $EXIT_SUCCESS
84 fi
85
86 default_mode=
87 help="Try \`$progname --help' for more information."
88 magic="%%%MAGIC variable%%%"
89 mkdir="mkdir"
90 mv="mv -f"
91 rm="rm -f"
92
93 # Sed substitution that helps us do robust quoting. It backslashifies
94 # metacharacters that are still active within double-quoted strings.
95 Xsed="${SED}"' -e 1s/^X//'
96 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
97 # test EBCDIC or ASCII
98 case `echo X|tr X '\101'` in
99 A) # ASCII based system
100 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
101 SP2NL='tr \040 \012'
102 NL2SP='tr \015\012 \040\040'
103 ;;
104 *) # EBCDIC based system
105 SP2NL='tr \100 \n'
106 NL2SP='tr \r\n \100\100'
107 ;;
108 esac
109
110 # NLS nuisances.
111 # Only set LANG and LC_ALL to C if already set.
112 # These must not be set unconditionally because not all systems understand
113 # e.g. LANG=C (notably SCO).
114 # We save the old values to restore during execute mode.
115 lt_env=
116 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
117 do
118 eval "if test \"\${$lt_var+set}\" = set; then
119 save_$lt_var=\$$lt_var
120 lt_env=\"$lt_var=\$$lt_var \$lt_env\"
121 $lt_var=C
122 export $lt_var
123 fi"
124 done
125
126 if test -n "$lt_env"; then
127 lt_env="env $lt_env"
128 fi
129
130 # Make sure IFS has a sensible default
131 lt_nl='
132 '
133 IFS=" $lt_nl"
134
135 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
136 $echo "$modename: not configured to build any kind of library" 1>&2
137 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
138 exit $EXIT_FAILURE
139 fi
140
141 # Global variables.
142 mode=$default_mode
143 nonopt=
144 prev=
145 prevopt=
146 run=
147 show="$echo"
148 show_help=
149 execute_dlfiles=
150 duplicate_deps=no
151 preserve_args=
152 lo2o="s/\\.lo\$/.${objext}/"
153 o2lo="s/\\.${objext}\$/.lo/"
154 extracted_archives=
155 extracted_serial=0
156
157 #####################################
158 # Shell function definitions:
159 # This seems to be the best place for them
160
161 # func_mktempdir [string]
162 # Make a temporary directory that won't clash with other running
163 # libtool processes, and avoids race conditions if possible. If
164 # given, STRING is the basename for that directory.
165 func_mktempdir ()
166 {
167 my_template="${TMPDIR-/tmp}/${1-$progname}"
168
169 if test "$run" = ":"; then
170 # Return a directory name, but don't create it in dry-run mode
171 my_tmpdir="${my_template}-$$"
172 else
173
174 # If mktemp works, use that first and foremost
175 my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
176
177 if test ! -d "$my_tmpdir"; then
178 # Failing that, at least try and use $RANDOM to avoid a race
179 my_tmpdir="${my_template}-${RANDOM-0}$$"
180
181 save_mktempdir_umask=`umask`
182 umask 0077
183 $mkdir "$my_tmpdir"
184 umask $save_mktempdir_umask
185 fi
186
187 # If we're not in dry-run mode, bomb out on failure
188 test -d "$my_tmpdir" || {
189 $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
190 exit $EXIT_FAILURE
191 }
192 fi
193
194 $echo "X$my_tmpdir" | $Xsed
195 }
196
197
198 # func_win32_libid arg
199 # return the library type of file 'arg'
200 #
201 # Need a lot of goo to handle *both* DLLs and import libs
202 # Has to be a shell function in order to 'eat' the argument
203 # that is supplied when $file_magic_command is called.
204 func_win32_libid ()
205 {
206 win32_libid_type="unknown"
207 win32_fileres=`file -L $1 2>/dev/null`
208 case $win32_fileres in
209 *ar\ archive\ import\ library*) # definitely import
210 win32_libid_type="x86 archive import"
211 ;;
212 *ar\ archive*) # could be an import, or static
213 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
214 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
215 win32_nmres=`eval $NM -f posix -A $1 | \
216 $SED -n -e '1,100{
217 / I /{
218 s,.*,import,
219 p
220 q
221 }
222 }'`
223 case $win32_nmres in
224 import*) win32_libid_type="x86 archive import";;
225 *) win32_libid_type="x86 archive static";;
226 esac
227 fi
228 ;;
229 *DLL*)
230 win32_libid_type="x86 DLL"
231 ;;
232 *executable*) # but shell scripts are "executable" too...
233 case $win32_fileres in
234 *MS\ Windows\ PE\ Intel*)
235 win32_libid_type="x86 DLL"
236 ;;
237 esac
238 ;;
239 esac
240 $echo $win32_libid_type
241 }
242
243
244 # func_infer_tag arg
245 # Infer tagged configuration to use if any are available and
246 # if one wasn't chosen via the "--tag" command line option.
247 # Only attempt this if the compiler in the base compile
248 # command doesn't match the default compiler.
249 # arg is usually of the form 'gcc ...'
250 func_infer_tag ()
251 {
252 if test -n "$available_tags" && test -z "$tagname"; then
253 CC_quoted=
254 for arg in $CC; do
255 case $arg in
256 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
257 arg="\"$arg\""
258 ;;
259 esac
260 CC_quoted="$CC_quoted $arg"
261 done
262 case $@ in
263 # Blanks in the command may have been stripped by the calling shell,
264 # but not from the CC environment variable when configure was run.
265 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
266 # Blanks at the start of $base_compile will cause this to fail
267 # if we don't check for them as well.
268 *)
269 for z in $available_tags; do
270 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
271 # Evaluate the configuration.
272 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
273 CC_quoted=
274 for arg in $CC; do
275 # Double-quote args containing other shell metacharacters.
276 case $arg in
277 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
278 arg="\"$arg\""
279 ;;
280 esac
281 CC_quoted="$CC_quoted $arg"
282 done
283 case "$@ " in
284 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
285 # The compiler in the base compile command matches
286 # the one in the tagged configuration.
287 # Assume this is the tagged configuration we want.
288 tagname=$z
289 break
290 ;;
291 esac
292 fi
293 done
294 # If $tagname still isn't set, then no tagged configuration
295 # was found and let the user know that the "--tag" command
296 # line option must be used.
297 if test -z "$tagname"; then
298 $echo "$modename: unable to infer tagged configuration"
299 $echo "$modename: specify a tag with \`--tag'" 1>&2
300 exit $EXIT_FAILURE
301 # else
302 # $echo "$modename: using $tagname tagged configuration"
303 fi
304 ;;
305 esac
306 fi
307 }
308
309
310 # func_extract_an_archive dir oldlib
311 func_extract_an_archive ()
312 {
313 f_ex_an_ar_dir="$1"; shift
314 f_ex_an_ar_oldlib="$1"
315
316 $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
317 $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
318 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
319 :
320 else
321 $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
322 exit $EXIT_FAILURE
323 fi
324 }
325
326 # func_extract_archives gentop oldlib ...
327 func_extract_archives ()
328 {
329 my_gentop="$1"; shift
330 my_oldlibs=${1+"$@"}
331 my_oldobjs=""
332 my_xlib=""
333 my_xabs=""
334 my_xdir=""
335 my_status=""
336
337 $show "${rm}r $my_gentop"
338 $run ${rm}r "$my_gentop"
339 $show "$mkdir $my_gentop"
340 $run $mkdir "$my_gentop"
341 my_status=$?
342 if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
343 exit $my_status
344 fi
345
346 for my_xlib in $my_oldlibs; do
347 # Extract the objects.
348 case $my_xlib in
349 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
350 *) my_xabs=`pwd`"/$my_xlib" ;;
351 esac
352 my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
353 my_xlib_u=$my_xlib
354 while :; do
355 case " $extracted_archives " in
356 *" $my_xlib_u "*)
357 extracted_serial=`expr $extracted_serial + 1`
358 my_xlib_u=lt$extracted_serial-$my_xlib ;;
359 *) break ;;
360 esac
361 done
362 extracted_archives="$extracted_archives $my_xlib_u"
363 my_xdir="$my_gentop/$my_xlib_u"
364
365 $show "${rm}r $my_xdir"
366 $run ${rm}r "$my_xdir"
367 $show "$mkdir $my_xdir"
368 $run $mkdir "$my_xdir"
369 exit_status=$?
370 if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
371 exit $exit_status
372 fi
373 case $host in
374 *-darwin*)
375 $show "Extracting $my_xabs"
376 # Do not bother doing anything if just a dry run
377 if test -z "$run"; then
378 darwin_orig_dir=`pwd`
379 cd $my_xdir || exit $?
380 darwin_archive=$my_xabs
381 darwin_curdir=`pwd`
382 darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
383 darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
384 if test -n "$darwin_arches"; then
385 darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
386 darwin_arch=
387 $show "$darwin_base_archive has multiple architectures $darwin_arches"
388 for darwin_arch in $darwin_arches ; do
389 mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
390 lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
391 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
392 func_extract_an_archive "`pwd`" "${darwin_base_archive}"
393 cd "$darwin_curdir"
394 $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
395 done # $darwin_arches
396 ## Okay now we have a bunch of thin objects, gotta fatten them up :)
397 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
398 darwin_file=
399 darwin_files=
400 for darwin_file in $darwin_filelist; do
401 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
402 lipo -create -output "$darwin_file" $darwin_files
403 done # $darwin_filelist
404 ${rm}r unfat-$$
405 cd "$darwin_orig_dir"
406 else
407 cd "$darwin_orig_dir"
408 func_extract_an_archive "$my_xdir" "$my_xabs"
409 fi # $darwin_arches
410 fi # $run
411 ;;
412 *)
413 func_extract_an_archive "$my_xdir" "$my_xabs"
414 ;;
415 esac
416 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
417 done
418 func_extract_archives_result="$my_oldobjs"
419 }
420 # End of Shell function definitions
421 #####################################
422
423 # Darwin sucks
424 eval std_shrext=\"$shrext_cmds\"
425
426 disable_libs=no
427
428 # Parse our command line options once, thoroughly.
429 while test "$#" -gt 0
430 do
431 arg="$1"
432 shift
433
434 case $arg in
435 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
436 *) optarg= ;;
437 esac
438
439 # If the previous option needs an argument, assign it.
440 if test -n "$prev"; then
441 case $prev in
442 execute_dlfiles)
443 execute_dlfiles="$execute_dlfiles $arg"
444 ;;
445 tag)
446 tagname="$arg"
447 preserve_args="${preserve_args}=$arg"
448
449 # Check whether tagname contains only valid characters
450 case $tagname in
451 *[!-_A-Za-z0-9,/]*)
452 $echo "$progname: invalid tag name: $tagname" 1>&2
453 exit $EXIT_FAILURE
454 ;;
455 esac
456
457 case $tagname in
458 CC)
459 # Don't test for the "default" C tag, as we know, it's there, but
460 # not specially marked.
461 ;;
462 *)
463 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
464 taglist="$taglist $tagname"
465 # Evaluate the configuration.
466 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
467 else
468 $echo "$progname: ignoring unknown tag $tagname" 1>&2
469 fi
470 ;;
471 esac
472 ;;
473 *)
474 eval "$prev=\$arg"
475 ;;
476 esac
477
478 prev=
479 prevopt=
480 continue
481 fi
482
483 # Have we seen a non-optional argument yet?
484 case $arg in
485 --help)
486 show_help=yes
487 ;;
488
489 --version)
490 echo "\
491 $PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
492
493 Copyright (C) 2008 Free Software Foundation, Inc.
494 This is free software; see the source for copying conditions. There is NO
495 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
496 exit $?
497 ;;
498
499 --config)
500 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
501 # Now print the configurations for the tags.
502 for tagname in $taglist; do
503 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
504 done
505 exit $?
506 ;;
507
508 --debug)
509 $echo "$progname: enabling shell trace mode"
510 set -x
511 preserve_args="$preserve_args $arg"
512 ;;
513
514 --dry-run | -n)
515 run=:
516 ;;
517
518 --features)
519 $echo "host: $host"
520 if test "$build_libtool_libs" = yes; then
521 $echo "enable shared libraries"
522 else
523 $echo "disable shared libraries"
524 fi
525 if test "$build_old_libs" = yes; then
526 $echo "enable static libraries"
527 else
528 $echo "disable static libraries"
529 fi
530 exit $?
531 ;;
532
533 --finish) mode="finish" ;;
534
535 --mode) prevopt="--mode" prev=mode ;;
536 --mode=*) mode="$optarg" ;;
537
538 --preserve-dup-deps) duplicate_deps="yes" ;;
539
540 --quiet | --silent)
541 show=:
542 preserve_args="$preserve_args $arg"
543 ;;
544
545 --tag)
546 prevopt="--tag"
547 prev=tag
548 preserve_args="$preserve_args --tag"
549 ;;
550 --tag=*)
551 set tag "$optarg" ${1+"$@"}
552 shift
553 prev=tag
554 preserve_args="$preserve_args --tag"
555 ;;
556
557 -dlopen)
558 prevopt="-dlopen"
559 prev=execute_dlfiles
560 ;;
561
562 -*)
563 $echo "$modename: unrecognized option \`$arg'" 1>&2
564 $echo "$help" 1>&2
565 exit $EXIT_FAILURE
566 ;;
567
568 *)
569 nonopt="$arg"
570 break
571 ;;
572 esac
573 done
574
575 if test -n "$prevopt"; then
576 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
577 $echo "$help" 1>&2
578 exit $EXIT_FAILURE
579 fi
580
581 case $disable_libs in
582 no)
583 ;;
584 shared)
585 build_libtool_libs=no
586 build_old_libs=yes
587 ;;
588 static)
589 build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
590 ;;
591 esac
592
593 # If this variable is set in any of the actions, the command in it
594 # will be execed at the end. This prevents here-documents from being
595 # left over by shells.
596 exec_cmd=
597
598 if test -z "$show_help"; then
599
600 # Infer the operation mode.
601 if test -z "$mode"; then
602 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
603 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
604 case $nonopt in
605 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
606 mode=link
607 for arg
608 do
609 case $arg in
610 -c)
611 mode=compile
612 break
613 ;;
614 esac
615 done
616 ;;
617 *db | *dbx | *strace | *truss)
618 mode=execute
619 ;;
620 *install*|cp|mv)
621 mode=install
622 ;;
623 *rm)
624 mode=uninstall
625 ;;
626 *)
627 # If we have no mode, but dlfiles were specified, then do execute mode.
628 test -n "$execute_dlfiles" && mode=execute
629
630 # Just use the default operation mode.
631 if test -z "$mode"; then
632 if test -n "$nonopt"; then
633 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
634 else
635 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
636 fi
637 fi
638 ;;
639 esac
640 fi
641
642 # Only execute mode is allowed to have -dlopen flags.
643 if test -n "$execute_dlfiles" && test "$mode" != execute; then
644 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
645 $echo "$help" 1>&2
646 exit $EXIT_FAILURE
647 fi
648
649 # Change the help message to a mode-specific one.
650 generic_help="$help"
651 help="Try \`$modename --help --mode=$mode' for more information."
652
653 # These modes are in order of execution frequency so that they run quickly.
654 case $mode in
655 # libtool compile mode
656 compile)
657 modename="$modename: compile"
658 # Get the compilation command and the source file.
659 base_compile=
660 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
661 suppress_opt=yes
662 suppress_output=
663 arg_mode=normal
664 libobj=
665 later=
666
667 for arg
668 do
669 case $arg_mode in
670 arg )
671 # do not "continue". Instead, add this to base_compile
672 lastarg="$arg"
673 arg_mode=normal
674 ;;
675
676 target )
677 libobj="$arg"
678 arg_mode=normal
679 continue
680 ;;
681
682 normal )
683 # Accept any command-line options.
684 case $arg in
685 -o)
686 if test -n "$libobj" ; then
687 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
688 exit $EXIT_FAILURE
689 fi
690 arg_mode=target
691 continue
692 ;;
693
694 -static | -prefer-pic | -prefer-non-pic)
695 later="$later $arg"
696 continue
697 ;;
698
699 -no-suppress)
700 suppress_opt=no
701 continue
702 ;;
703
704 -Xcompiler)
705 arg_mode=arg # the next one goes into the "base_compile" arg list
706 continue # The current "srcfile" will either be retained or
707 ;; # replaced later. I would guess that would be a bug.
708
709 -Wc,*)
710 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
711 lastarg=
712 save_ifs="$IFS"; IFS=','
713 for arg in $args; do
714 IFS="$save_ifs"
715
716 # Double-quote args containing other shell metacharacters.
717 # Many Bourne shells cannot handle close brackets correctly
718 # in scan sets, so we specify it separately.
719 case $arg in
720 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
721 arg="\"$arg\""
722 ;;
723 esac
724 lastarg="$lastarg $arg"
725 done
726 IFS="$save_ifs"
727 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
728
729 # Add the arguments to base_compile.
730 base_compile="$base_compile $lastarg"
731 continue
732 ;;
733
734 * )
735 # Accept the current argument as the source file.
736 # The previous "srcfile" becomes the current argument.
737 #
738 lastarg="$srcfile"
739 srcfile="$arg"
740 ;;
741 esac # case $arg
742 ;;
743 esac # case $arg_mode
744
745 # Aesthetically quote the previous argument.
746 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
747
748 case $lastarg in
749 # Double-quote args containing other shell metacharacters.
750 # Many Bourne shells cannot handle close brackets correctly
751 # in scan sets, and some SunOS ksh mistreat backslash-escaping
752 # in scan sets (worked around with variable expansion),
753 # and furthermore cannot handle '|' '&' '(' ')' in scan sets
754 # at all, so we specify them separately.
755 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
756 lastarg="\"$lastarg\""
757 ;;
758 esac
759
760 base_compile="$base_compile $lastarg"
761 done # for arg
762
763 case $arg_mode in
764 arg)
765 $echo "$modename: you must specify an argument for -Xcompile"
766 exit $EXIT_FAILURE
767 ;;
768 target)
769 $echo "$modename: you must specify a target with \`-o'" 1>&2
770 exit $EXIT_FAILURE
771 ;;
772 *)
773 # Get the name of the library object.
774 [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
775 ;;
776 esac
777
778 # Recognize several different file suffixes.
779 # If the user specifies -o file.o, it is replaced with file.lo
780 xform='[cCFSifmso]'
781 case $libobj in
782 *.ada) xform=ada ;;
783 *.adb) xform=adb ;;
784 *.ads) xform=ads ;;
785 *.asm) xform=asm ;;
786 *.c++) xform=c++ ;;
787 *.cc) xform=cc ;;
788 *.ii) xform=ii ;;
789 *.class) xform=class ;;
790 *.cpp) xform=cpp ;;
791 *.cxx) xform=cxx ;;
792 *.[fF][09]?) xform=[fF][09]. ;;
793 *.for) xform=for ;;
794 *.java) xform=java ;;
795 *.obj) xform=obj ;;
796 *.sx) xform=sx ;;
797 esac
798
799 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
800
801 case $libobj in
802 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
803 *)
804 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
805 exit $EXIT_FAILURE
806 ;;
807 esac
808
809 func_infer_tag $base_compile
810
811 for arg in $later; do
812 case $arg in
813 -static)
814 build_old_libs=yes
815 continue
816 ;;
817
818 -prefer-pic)
819 pic_mode=yes
820 continue
821 ;;
822
823 -prefer-non-pic)
824 pic_mode=no
825 continue
826 ;;
827 esac
828 done
829
830 qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
831 case $qlibobj in
832 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
833 qlibobj="\"$qlibobj\"" ;;
834 esac
835 test "X$libobj" != "X$qlibobj" \
836 && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
837 && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
838 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
839 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
840 if test "X$xdir" = "X$obj"; then
841 xdir=
842 else
843 xdir=$xdir/
844 fi
845 lobj=${xdir}$objdir/$objname
846
847 if test -z "$base_compile"; then
848 $echo "$modename: you must specify a compilation command" 1>&2
849 $echo "$help" 1>&2
850 exit $EXIT_FAILURE
851 fi
852
853 # Delete any leftover library objects.
854 if test "$build_old_libs" = yes; then
855 removelist="$obj $lobj $libobj ${libobj}T"
856 else
857 removelist="$lobj $libobj ${libobj}T"
858 fi
859
860 $run $rm $removelist
861 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
862
863 # On Cygwin there's no "real" PIC flag so we must build both object types
864 case $host_os in
865 cygwin* | mingw* | pw32* | os2*)
866 pic_mode=default
867 ;;
868 esac
869 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
870 # non-PIC code in shared libraries is not supported
871 pic_mode=default
872 fi
873
874 # Calculate the filename of the output object if compiler does
875 # not support -o with -c
876 if test "$compiler_c_o" = no; then
877 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
878 lockfile="$output_obj.lock"
879 removelist="$removelist $output_obj $lockfile"
880 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
881 else
882 output_obj=
883 need_locks=no
884 lockfile=
885 fi
886
887 # Lock this critical section if it is needed
888 # We use this script file to make the link, it avoids creating a new file
889 if test "$need_locks" = yes; then
890 until $run ln "$progpath" "$lockfile" 2>/dev/null; do
891 $show "Waiting for $lockfile to be removed"
892 sleep 2
893 done
894 elif test "$need_locks" = warn; then
895 if test -f "$lockfile"; then
896 $echo "\
897 *** ERROR, $lockfile exists and contains:
898 `cat $lockfile 2>/dev/null`
899
900 This indicates that another process is trying to use the same
901 temporary object file, and libtool could not work around it because
902 your compiler does not support \`-c' and \`-o' together. If you
903 repeat this compilation, it may succeed, by chance, but you had better
904 avoid parallel builds (make -j) in this platform, or get a better
905 compiler."
906
907 $run $rm $removelist
908 exit $EXIT_FAILURE
909 fi
910 $echo "$srcfile" > "$lockfile"
911 fi
912
913 if test -n "$fix_srcfile_path"; then
914 eval srcfile=\"$fix_srcfile_path\"
915 fi
916 qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
917 case $qsrcfile in
918 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
919 qsrcfile="\"$qsrcfile\"" ;;
920 esac
921
922 $run $rm "$libobj" "${libobj}T"
923
924 # Create a libtool object file (analogous to a ".la" file),
925 # but don't create it if we're doing a dry run.
926 test -z "$run" && cat > ${libobj}T <<EOF
927 # $libobj - a libtool object file
928 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
929 #
930 # Please DO NOT delete this file!
931 # It is necessary for linking the library.
932
933 # Name of the PIC object.
934 EOF
935
936 # Only build a PIC object if we are building libtool libraries.
937 if test "$build_libtool_libs" = yes; then
938 # Without this assignment, base_compile gets emptied.
939 fbsd_hideous_sh_bug=$base_compile
940
941 if test "$pic_mode" != no; then
942 command="$base_compile $qsrcfile $pic_flag"
943 else
944 # Don't build PIC code
945 command="$base_compile $qsrcfile"
946 fi
947
948 if test ! -d "${xdir}$objdir"; then
949 $show "$mkdir ${xdir}$objdir"
950 $run $mkdir ${xdir}$objdir
951 exit_status=$?
952 if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
953 exit $exit_status
954 fi
955 fi
956
957 if test -z "$output_obj"; then
958 # Place PIC objects in $objdir
959 command="$command -o $lobj"
960 fi
961
962 $run $rm "$lobj" "$output_obj"
963
964 $show "$command"
965 if $run eval $lt_env "$command"; then :
966 else
967 test -n "$output_obj" && $run $rm $removelist
968 exit $EXIT_FAILURE
969 fi
970
971 if test "$need_locks" = warn &&
972 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
973 $echo "\
974 *** ERROR, $lockfile contains:
975 `cat $lockfile 2>/dev/null`
976
977 but it should contain:
978 $srcfile
979
980 This indicates that another process is trying to use the same
981 temporary object file, and libtool could not work around it because
982 your compiler does not support \`-c' and \`-o' together. If you
983 repeat this compilation, it may succeed, by chance, but you had better
984 avoid parallel builds (make -j) in this platform, or get a better
985 compiler."
986
987 $run $rm $removelist
988 exit $EXIT_FAILURE
989 fi
990
991 # Just move the object if needed, then go on to compile the next one
992 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
993 $show "$mv $output_obj $lobj"
994 if $run $mv $output_obj $lobj; then :
995 else
996 error=$?
997 $run $rm $removelist
998 exit $error
999 fi
1000 fi
1001
1002 # Append the name of the PIC object to the libtool object file.
1003 test -z "$run" && cat >> ${libobj}T <<EOF
1004 pic_object='$objdir/$objname'
1005
1006 EOF
1007
1008 # Allow error messages only from the first compilation.
1009 if test "$suppress_opt" = yes; then
1010 suppress_output=' >/dev/null 2>&1'
1011 fi
1012 else
1013 # No PIC object so indicate it doesn't exist in the libtool
1014 # object file.
1015 test -z "$run" && cat >> ${libobj}T <<EOF
1016 pic_object=none
1017
1018 EOF
1019 fi
1020
1021 # Only build a position-dependent object if we build old libraries.
1022 if test "$build_old_libs" = yes; then
1023 if test "$pic_mode" != yes; then
1024 # Don't build PIC code
1025 command="$base_compile $qsrcfile"
1026 else
1027 command="$base_compile $qsrcfile $pic_flag"
1028 fi
1029 if test "$compiler_c_o" = yes; then
1030 command="$command -o $obj"
1031 fi
1032
1033 # Suppress compiler output if we already did a PIC compilation.
1034 command="$command$suppress_output"
1035 $run $rm "$obj" "$output_obj"
1036 $show "$command"
1037 if $run eval $lt_env "$command"; then :
1038 else
1039 $run $rm $removelist
1040 exit $EXIT_FAILURE
1041 fi
1042
1043 if test "$need_locks" = warn &&
1044 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1045 $echo "\
1046 *** ERROR, $lockfile contains:
1047 `cat $lockfile 2>/dev/null`
1048
1049 but it should contain:
1050 $srcfile
1051
1052 This indicates that another process is trying to use the same
1053 temporary object file, and libtool could not work around it because
1054 your compiler does not support \`-c' and \`-o' together. If you
1055 repeat this compilation, it may succeed, by chance, but you had better
1056 avoid parallel builds (make -j) in this platform, or get a better
1057 compiler."
1058
1059 $run $rm $removelist
1060 exit $EXIT_FAILURE
1061 fi
1062
1063 # Just move the object if needed
1064 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1065 $show "$mv $output_obj $obj"
1066 if $run $mv $output_obj $obj; then :
1067 else
1068 error=$?
1069 $run $rm $removelist
1070 exit $error
1071 fi
1072 fi
1073
1074 # Append the name of the non-PIC object the libtool object file.
1075 # Only append if the libtool object file exists.
1076 test -z "$run" && cat >> ${libobj}T <<EOF
1077 # Name of the non-PIC object.
1078 non_pic_object='$objname'
1079
1080 EOF
1081 else
1082 # Append the name of the non-PIC object the libtool object file.
1083 # Only append if the libtool object file exists.
1084 test -z "$run" && cat >> ${libobj}T <<EOF
1085 # Name of the non-PIC object.
1086 non_pic_object=none
1087
1088 EOF
1089 fi
1090
1091 $run $mv "${libobj}T" "${libobj}"
1092
1093 # Unlock the critical section if it was locked
1094 if test "$need_locks" != no; then
1095 $run $rm "$lockfile"
1096 fi
1097
1098 exit $EXIT_SUCCESS
1099 ;;
1100
1101 # libtool link mode
1102 link | relink)
1103 modename="$modename: link"
1104 case $host in
1105 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1106 # It is impossible to link a dll without this setting, and
1107 # we shouldn't force the makefile maintainer to figure out
1108 # which system we are compiling for in order to pass an extra
1109 # flag for every libtool invocation.
1110 # allow_undefined=no
1111
1112 # FIXME: Unfortunately, there are problems with the above when trying
1113 # to make a dll which has undefined symbols, in which case not
1114 # even a static library is built. For now, we need to specify
1115 # -no-undefined on the libtool link line when we can be certain
1116 # that all symbols are satisfied, otherwise we get a static library.
1117 allow_undefined=yes
1118 ;;
1119 *)
1120 allow_undefined=yes
1121 ;;
1122 esac
1123 libtool_args="$nonopt"
1124 base_compile="$nonopt $@"
1125 compile_command="$nonopt"
1126 finalize_command="$nonopt"
1127
1128 compile_rpath=
1129 finalize_rpath=
1130 compile_shlibpath=
1131 finalize_shlibpath=
1132 convenience=
1133 old_convenience=
1134 deplibs=
1135 old_deplibs=
1136 compiler_flags=
1137 linker_flags=
1138 dllsearchpath=
1139 lib_search_path=`pwd`
1140 inst_prefix_dir=
1141
1142 avoid_version=no
1143 dlfiles=
1144 dlprefiles=
1145 dlself=no
1146 export_dynamic=no
1147 export_symbols=
1148 export_symbols_regex=
1149 generated=
1150 libobjs=
1151 ltlibs=
1152 module=no
1153 no_install=no
1154 objs=
1155 non_pic_objects=
1156 notinst_path= # paths that contain not-installed libtool libraries
1157 precious_files_regex=
1158 prefer_static_libs=no
1159 preload=no
1160 prev=
1161 prevarg=
1162 release=
1163 rpath=
1164 xrpath=
1165 perm_rpath=
1166 temp_rpath=
1167 thread_safe=no
1168 vinfo=
1169 vinfo_number=no
1170 single_module="${wl}-single_module"
1171
1172 func_infer_tag $base_compile
1173
1174 # We need to know -static, to get the right output filenames.
1175 for arg
1176 do
1177 case $arg in
1178 -all-static | -static | -static-libtool-libs)
1179 case $arg in
1180 -all-static)
1181 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1182 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1183 fi
1184 if test -n "$link_static_flag"; then
1185 dlopen_self=$dlopen_self_static
1186 fi
1187 prefer_static_libs=yes
1188 ;;
1189 -static)
1190 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1191 dlopen_self=$dlopen_self_static
1192 fi
1193 prefer_static_libs=built
1194 ;;
1195 -static-libtool-libs)
1196 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1197 dlopen_self=$dlopen_self_static
1198 fi
1199 prefer_static_libs=yes
1200 ;;
1201 esac
1202 build_libtool_libs=no
1203 build_old_libs=yes
1204 break
1205 ;;
1206 esac
1207 done
1208
1209 # See if our shared archives depend on static archives.
1210 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
1211
1212 # Go through the arguments, transforming them on the way.
1213 while test "$#" -gt 0; do
1214 arg="$1"
1215 shift
1216 case $arg in
1217 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1218 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1219 ;;
1220 *) qarg=$arg ;;
1221 esac
1222 libtool_args="$libtool_args $qarg"
1223
1224 # If the previous option needs an argument, assign it.
1225 if test -n "$prev"; then
1226 case $prev in
1227 output)
1228 compile_command="$compile_command @OUTPUT@"
1229 finalize_command="$finalize_command @OUTPUT@"
1230 ;;
1231 esac
1232
1233 case $prev in
1234 dlfiles|dlprefiles)
1235 if test "$preload" = no; then
1236 # Add the symbol object into the linking commands.
1237 compile_command="$compile_command @SYMFILE@"
1238 finalize_command="$finalize_command @SYMFILE@"
1239 preload=yes
1240 fi
1241 case $arg in
1242 *.la | *.lo) ;; # We handle these cases below.
1243 force)
1244 if test "$dlself" = no; then
1245 dlself=needless
1246 export_dynamic=yes
1247 fi
1248 prev=
1249 continue
1250 ;;
1251 self)
1252 if test "$prev" = dlprefiles; then
1253 dlself=yes
1254 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
1255 dlself=yes
1256 else
1257 dlself=needless
1258 export_dynamic=yes
1259 fi
1260 prev=
1261 continue
1262 ;;
1263 *)
1264 if test "$prev" = dlfiles; then
1265 dlfiles="$dlfiles $arg"
1266 else
1267 dlprefiles="$dlprefiles $arg"
1268 fi
1269 prev=
1270 continue
1271 ;;
1272 esac
1273 ;;
1274 expsyms)
1275 export_symbols="$arg"
1276 if test ! -f "$arg"; then
1277 $echo "$modename: symbol file \`$arg' does not exist"
1278 exit $EXIT_FAILURE
1279 fi
1280 prev=
1281 continue
1282 ;;
1283 expsyms_regex)
1284 export_symbols_regex="$arg"
1285 prev=
1286 continue
1287 ;;
1288 inst_prefix)
1289 inst_prefix_dir="$arg"
1290 prev=
1291 continue
1292 ;;
1293 precious_regex)
1294 precious_files_regex="$arg"
1295 prev=
1296 continue
1297 ;;
1298 release)
1299 release="-$arg"
1300 prev=
1301 continue
1302 ;;
1303 objectlist)
1304 if test -f "$arg"; then
1305 save_arg=$arg
1306 moreargs=
1307 for fil in `cat $save_arg`
1308 do
1309 # moreargs="$moreargs $fil"
1310 arg=$fil
1311 # A libtool-controlled object.
1312
1313 # Check to see that this really is a libtool object.
1314 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1315 pic_object=
1316 non_pic_object=
1317
1318 # Read the .lo file
1319 # If there is no directory component, then add one.
1320 case $arg in
1321 */* | *\\*) . $arg ;;
1322 *) . ./$arg ;;
1323 esac
1324
1325 if test -z "$pic_object" || \
1326 test -z "$non_pic_object" ||
1327 test "$pic_object" = none && \
1328 test "$non_pic_object" = none; then
1329 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1330 exit $EXIT_FAILURE
1331 fi
1332
1333 # Extract subdirectory from the argument.
1334 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1335 if test "X$xdir" = "X$arg"; then
1336 xdir=
1337 else
1338 xdir="$xdir/"
1339 fi
1340
1341 if test "$pic_object" != none; then
1342 # Prepend the subdirectory the object is found in.
1343 pic_object="$xdir$pic_object"
1344
1345 if test "$prev" = dlfiles; then
1346 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1347 dlfiles="$dlfiles $pic_object"
1348 prev=
1349 continue
1350 else
1351 # If libtool objects are unsupported, then we need to preload.
1352 prev=dlprefiles
1353 fi
1354 fi
1355
1356 # CHECK ME: I think I busted this. -Ossama
1357 if test "$prev" = dlprefiles; then
1358 # Preload the old-style object.
1359 dlprefiles="$dlprefiles $pic_object"
1360 prev=
1361 fi
1362
1363 # A PIC object.
1364 libobjs="$libobjs $pic_object"
1365 arg="$pic_object"
1366 fi
1367
1368 # Non-PIC object.
1369 if test "$non_pic_object" != none; then
1370 # Prepend the subdirectory the object is found in.
1371 non_pic_object="$xdir$non_pic_object"
1372
1373 # A standard non-PIC object
1374 non_pic_objects="$non_pic_objects $non_pic_object"
1375 if test -z "$pic_object" || test "$pic_object" = none ; then
1376 arg="$non_pic_object"
1377 fi
1378 else
1379 # If the PIC object exists, use it instead.
1380 # $xdir was prepended to $pic_object above.
1381 non_pic_object="$pic_object"
1382 non_pic_objects="$non_pic_objects $non_pic_object"
1383 fi
1384 else
1385 # Only an error if not doing a dry-run.
1386 if test -z "$run"; then
1387 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1388 exit $EXIT_FAILURE
1389 else
1390 # Dry-run case.
1391
1392 # Extract subdirectory from the argument.
1393 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1394 if test "X$xdir" = "X$arg"; then
1395 xdir=
1396 else
1397 xdir="$xdir/"
1398 fi
1399
1400 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1401 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1402 libobjs="$libobjs $pic_object"
1403 non_pic_objects="$non_pic_objects $non_pic_object"
1404 fi
1405 fi
1406 done
1407 else
1408 $echo "$modename: link input file \`$save_arg' does not exist"
1409 exit $EXIT_FAILURE
1410 fi
1411 arg=$save_arg
1412 prev=
1413 continue
1414 ;;
1415 rpath | xrpath)
1416 # We need an absolute path.
1417 case $arg in
1418 [\\/]* | [A-Za-z]:[\\/]*) ;;
1419 *)
1420 $echo "$modename: only absolute run-paths are allowed" 1>&2
1421 exit $EXIT_FAILURE
1422 ;;
1423 esac
1424 if test "$prev" = rpath; then
1425 case "$rpath " in
1426 *" $arg "*) ;;
1427 *) rpath="$rpath $arg" ;;
1428 esac
1429 else
1430 case "$xrpath " in
1431 *" $arg "*) ;;
1432 *) xrpath="$xrpath $arg" ;;
1433 esac
1434 fi
1435 prev=
1436 continue
1437 ;;
1438 xcompiler)
1439 compiler_flags="$compiler_flags $qarg"
1440 prev=
1441 compile_command="$compile_command $qarg"
1442 finalize_command="$finalize_command $qarg"
1443 continue
1444 ;;
1445 xlinker)
1446 linker_flags="$linker_flags $qarg"
1447 compiler_flags="$compiler_flags $wl$qarg"
1448 prev=
1449 compile_command="$compile_command $wl$qarg"
1450 finalize_command="$finalize_command $wl$qarg"
1451 continue
1452 ;;
1453 xcclinker)
1454 linker_flags="$linker_flags $qarg"
1455 compiler_flags="$compiler_flags $qarg"
1456 prev=
1457 compile_command="$compile_command $qarg"
1458 finalize_command="$finalize_command $qarg"
1459 continue
1460 ;;
1461 shrext)
1462 shrext_cmds="$arg"
1463 prev=
1464 continue
1465 ;;
1466 darwin_framework|darwin_framework_skip)
1467 test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
1468 compile_command="$compile_command $arg"
1469 finalize_command="$finalize_command $arg"
1470 prev=
1471 continue
1472 ;;
1473 *)
1474 eval "$prev=\"\$arg\""
1475 prev=
1476 continue
1477 ;;
1478 esac
1479 fi # test -n "$prev"
1480
1481 prevarg="$arg"
1482
1483 case $arg in
1484 -all-static)
1485 if test -n "$link_static_flag"; then
1486 compile_command="$compile_command $link_static_flag"
1487 finalize_command="$finalize_command $link_static_flag"
1488 fi
1489 continue
1490 ;;
1491
1492 -allow-undefined)
1493 # FIXME: remove this flag sometime in the future.
1494 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1495 continue
1496 ;;
1497
1498 -avoid-version)
1499 avoid_version=yes
1500 continue
1501 ;;
1502
1503 -dlopen)
1504 prev=dlfiles
1505 continue
1506 ;;
1507
1508 -dlpreopen)
1509 prev=dlprefiles
1510 continue
1511 ;;
1512
1513 -export-dynamic)
1514 export_dynamic=yes
1515 continue
1516 ;;
1517
1518 -export-symbols | -export-symbols-regex)
1519 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1520 $echo "$modename: more than one -exported-symbols argument is not allowed"
1521 exit $EXIT_FAILURE
1522 fi
1523 if test "X$arg" = "X-export-symbols"; then
1524 prev=expsyms
1525 else
1526 prev=expsyms_regex
1527 fi
1528 continue
1529 ;;
1530
1531 -framework|-arch|-isysroot)
1532 case " $CC " in
1533 *" ${arg} ${1} "* | *" ${arg} ${1} "*)
1534 prev=darwin_framework_skip ;;
1535 *) compiler_flags="$compiler_flags $arg"
1536 prev=darwin_framework ;;
1537 esac
1538 compile_command="$compile_command $arg"
1539 finalize_command="$finalize_command $arg"
1540 continue
1541 ;;
1542
1543 -inst-prefix-dir)
1544 prev=inst_prefix
1545 continue
1546 ;;
1547
1548 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1549 # so, if we see these flags be careful not to treat them like -L
1550 -L[A-Z][A-Z]*:*)
1551 case $with_gcc/$host in
1552 no/*-*-irix* | /*-*-irix*)
1553 compile_command="$compile_command $arg"
1554 finalize_command="$finalize_command $arg"
1555 ;;
1556 esac
1557 continue
1558 ;;
1559
1560 -L*)
1561 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1562 # We need an absolute path.
1563 case $dir in
1564 [\\/]* | [A-Za-z]:[\\/]*) ;;
1565 *)
1566 absdir=`cd "$dir" && pwd`
1567 if test -z "$absdir"; then
1568 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1569 absdir="$dir"
1570 notinst_path="$notinst_path $dir"
1571 fi
1572 dir="$absdir"
1573 ;;
1574 esac
1575 case "$deplibs " in
1576 *" -L$dir "*) ;;
1577 *)
1578 deplibs="$deplibs -L$dir"
1579 lib_search_path="$lib_search_path $dir"
1580 ;;
1581 esac
1582 case $host in
1583 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1584 testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
1585 case :$dllsearchpath: in
1586 *":$dir:"*) ;;
1587 *) dllsearchpath="$dllsearchpath:$dir";;
1588 esac
1589 case :$dllsearchpath: in
1590 *":$testbindir:"*) ;;
1591 *) dllsearchpath="$dllsearchpath:$testbindir";;
1592 esac
1593 ;;
1594 esac
1595 continue
1596 ;;
1597
1598 -l*)
1599 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
1600 case $host in
1601 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
1602 # These systems don't actually have a C or math library (as such)
1603 continue
1604 ;;
1605 *-*-os2*)
1606 # These systems don't actually have a C library (as such)
1607 test "X$arg" = "X-lc" && continue
1608 ;;
1609 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1610 # Do not include libc due to us having libc/libc_r.
1611 test "X$arg" = "X-lc" && continue
1612 ;;
1613 *-*-rhapsody* | *-*-darwin1.[012])
1614 # Rhapsody C and math libraries are in the System framework
1615 deplibs="$deplibs -framework System"
1616 continue
1617 ;;
1618 *-*-sco3.2v5* | *-*-sco5v6*)
1619 # Causes problems with __ctype
1620 test "X$arg" = "X-lc" && continue
1621 ;;
1622 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
1623 # Compiler inserts libc in the correct place for threads to work
1624 test "X$arg" = "X-lc" && continue
1625 ;;
1626 esac
1627 elif test "X$arg" = "X-lc_r"; then
1628 case $host in
1629 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1630 # Do not include libc_r directly, use -pthread flag.
1631 continue
1632 ;;
1633 esac
1634 fi
1635 deplibs="$deplibs $arg"
1636 continue
1637 ;;
1638
1639 # Tru64 UNIX uses -model [arg] to determine the layout of C++
1640 # classes, name mangling, and exception handling.
1641 -model)
1642 compile_command="$compile_command $arg"
1643 compiler_flags="$compiler_flags $arg"
1644 finalize_command="$finalize_command $arg"
1645 prev=xcompiler
1646 continue
1647 ;;
1648
1649 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
1650 compiler_flags="$compiler_flags $arg"
1651 compile_command="$compile_command $arg"
1652 finalize_command="$finalize_command $arg"
1653 continue
1654 ;;
1655
1656 -multi_module)
1657 single_module="${wl}-multi_module"
1658 continue
1659 ;;
1660
1661 -module)
1662 module=yes
1663 continue
1664 ;;
1665
1666 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
1667 # -r[0-9][0-9]* specifies the processor on the SGI compiler
1668 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
1669 # +DA*, +DD* enable 64-bit mode on the HP compiler
1670 # -q* pass through compiler args for the IBM compiler
1671 # -m* pass through architecture-specific compiler args for GCC
1672 # -m*, -t[45]*, -txscale* pass through architecture-specific
1673 # compiler args for GCC
1674 # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
1675 # -F/path gives path to uninstalled frameworks, gcc on darwin
1676 # @file GCC response files
1677 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
1678 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
1679
1680 # Unknown arguments in both finalize_command and compile_command need
1681 # to be aesthetically quoted because they are evaled later.
1682 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1683 case $arg in
1684 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1685 arg="\"$arg\""
1686 ;;
1687 esac
1688 compile_command="$compile_command $arg"
1689 finalize_command="$finalize_command $arg"
1690 compiler_flags="$compiler_flags $arg"
1691 continue
1692 ;;
1693
1694 -shrext)
1695 prev=shrext
1696 continue
1697 ;;
1698
1699 -no-fast-install)
1700 fast_install=no
1701 continue
1702 ;;
1703
1704 -no-install)
1705 case $host in
1706 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
1707 # The PATH hackery in wrapper scripts is required on Windows
1708 # and Darwin in order for the loader to find any dlls it needs.
1709 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1710 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1711 fast_install=no
1712 ;;
1713 *) no_install=yes ;;
1714 esac
1715 continue
1716 ;;
1717
1718 -no-undefined)
1719 allow_undefined=no
1720 continue
1721 ;;
1722
1723 -objectlist)
1724 prev=objectlist
1725 continue
1726 ;;
1727
1728 -o) prev=output ;;
1729
1730 -precious-files-regex)
1731 prev=precious_regex
1732 continue
1733 ;;
1734
1735 -release)
1736 prev=release
1737 continue
1738 ;;
1739
1740 -rpath)
1741 prev=rpath
1742 continue
1743 ;;
1744
1745 -R)
1746 prev=xrpath
1747 continue
1748 ;;
1749
1750 -R*)
1751 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1752 # We need an absolute path.
1753 case $dir in
1754 [\\/]* | [A-Za-z]:[\\/]*) ;;
1755 *)
1756 $echo "$modename: only absolute run-paths are allowed" 1>&2
1757 exit $EXIT_FAILURE
1758 ;;
1759 esac
1760 case "$xrpath " in
1761 *" $dir "*) ;;
1762 *) xrpath="$xrpath $dir" ;;
1763 esac
1764 continue
1765 ;;
1766
1767 -static | -static-libtool-libs)
1768 # The effects of -static are defined in a previous loop.
1769 # We used to do the same as -all-static on platforms that
1770 # didn't have a PIC flag, but the assumption that the effects
1771 # would be equivalent was wrong. It would break on at least
1772 # Digital Unix and AIX.
1773 continue
1774 ;;
1775
1776 -thread-safe)
1777 thread_safe=yes
1778 continue
1779 ;;
1780
1781 -version-info)
1782 prev=vinfo
1783 continue
1784 ;;
1785 -version-number)
1786 prev=vinfo
1787 vinfo_number=yes
1788 continue
1789 ;;
1790
1791 -Wc,*)
1792 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1793 arg=
1794 save_ifs="$IFS"; IFS=','
1795 for flag in $args; do
1796 IFS="$save_ifs"
1797 case $flag in
1798 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1799 flag="\"$flag\""
1800 ;;
1801 esac
1802 arg="$arg $wl$flag"
1803 compiler_flags="$compiler_flags $flag"
1804 done
1805 IFS="$save_ifs"
1806 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1807 ;;
1808
1809 -Wl,*)
1810 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1811 arg=
1812 save_ifs="$IFS"; IFS=','
1813 for flag in $args; do
1814 IFS="$save_ifs"
1815 case $flag in
1816 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1817 flag="\"$flag\""
1818 ;;
1819 esac
1820 arg="$arg $wl$flag"
1821 compiler_flags="$compiler_flags $wl$flag"
1822 linker_flags="$linker_flags $flag"
1823 done
1824 IFS="$save_ifs"
1825 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1826 ;;
1827
1828 -Xcompiler)
1829 prev=xcompiler
1830 continue
1831 ;;
1832
1833 -Xlinker)
1834 prev=xlinker
1835 continue
1836 ;;
1837
1838 -XCClinker)
1839 prev=xcclinker
1840 continue
1841 ;;
1842
1843 # Some other compiler flag.
1844 -* | +*)
1845 # Unknown arguments in both finalize_command and compile_command need
1846 # to be aesthetically quoted because they are evaled later.
1847 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1848 case $arg in
1849 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1850 arg="\"$arg\""
1851 ;;
1852 esac
1853 ;;
1854
1855 *.$objext)
1856 # A standard object.
1857 objs="$objs $arg"
1858 ;;
1859
1860 *.lo)
1861 # A libtool-controlled object.
1862
1863 # Check to see that this really is a libtool object.
1864 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1865 pic_object=
1866 non_pic_object=
1867
1868 # Read the .lo file
1869 # If there is no directory component, then add one.
1870 case $arg in
1871 */* | *\\*) . $arg ;;
1872 *) . ./$arg ;;
1873 esac
1874
1875 if test -z "$pic_object" || \
1876 test -z "$non_pic_object" ||
1877 test "$pic_object" = none && \
1878 test "$non_pic_object" = none; then
1879 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1880 exit $EXIT_FAILURE
1881 fi
1882
1883 # Extract subdirectory from the argument.
1884 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1885 if test "X$xdir" = "X$arg"; then
1886 xdir=
1887 else
1888 xdir="$xdir/"
1889 fi
1890
1891 if test "$pic_object" != none; then
1892 # Prepend the subdirectory the object is found in.
1893 pic_object="$xdir$pic_object"
1894
1895 if test "$prev" = dlfiles; then
1896 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1897 dlfiles="$dlfiles $pic_object"
1898 prev=
1899 continue
1900 else
1901 # If libtool objects are unsupported, then we need to preload.
1902 prev=dlprefiles
1903 fi
1904 fi
1905
1906 # CHECK ME: I think I busted this. -Ossama
1907 if test "$prev" = dlprefiles; then
1908 # Preload the old-style object.
1909 dlprefiles="$dlprefiles $pic_object"
1910 prev=
1911 fi
1912
1913 # A PIC object.
1914 libobjs="$libobjs $pic_object"
1915 arg="$pic_object"
1916 fi
1917
1918 # Non-PIC object.
1919 if test "$non_pic_object" != none; then
1920 # Prepend the subdirectory the object is found in.
1921 non_pic_object="$xdir$non_pic_object"
1922
1923 # A standard non-PIC object
1924 non_pic_objects="$non_pic_objects $non_pic_object"
1925 if test -z "$pic_object" || test "$pic_object" = none ; then
1926 arg="$non_pic_object"
1927 fi
1928 else
1929 # If the PIC object exists, use it instead.
1930 # $xdir was prepended to $pic_object above.
1931 non_pic_object="$pic_object"
1932 non_pic_objects="$non_pic_objects $non_pic_object"
1933 fi
1934 else
1935 # Only an error if not doing a dry-run.
1936 if test -z "$run"; then
1937 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1938 exit $EXIT_FAILURE
1939 else
1940 # Dry-run case.
1941
1942 # Extract subdirectory from the argument.
1943 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1944 if test "X$xdir" = "X$arg"; then
1945 xdir=
1946 else
1947 xdir="$xdir/"
1948 fi
1949
1950 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1951 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1952 libobjs="$libobjs $pic_object"
1953 non_pic_objects="$non_pic_objects $non_pic_object"
1954 fi
1955 fi
1956 ;;
1957
1958 *.$libext)
1959 # An archive.
1960 deplibs="$deplibs $arg"
1961 old_deplibs="$old_deplibs $arg"
1962 continue
1963 ;;
1964
1965 *.la)
1966 # A libtool-controlled library.
1967
1968 if test "$prev" = dlfiles; then
1969 # This library was specified with -dlopen.
1970 dlfiles="$dlfiles $arg"
1971 prev=
1972 elif test "$prev" = dlprefiles; then
1973 # The library was specified with -dlpreopen.
1974 dlprefiles="$dlprefiles $arg"
1975 prev=
1976 else
1977 deplibs="$deplibs $arg"
1978 fi
1979 continue
1980 ;;
1981
1982 # Some other compiler argument.
1983 *)
1984 # Unknown arguments in both finalize_command and compile_command need
1985 # to be aesthetically quoted because they are evaled later.
1986 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1987 case $arg in
1988 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1989 arg="\"$arg\""
1990 ;;
1991 esac
1992 ;;
1993 esac # arg
1994
1995 # Now actually substitute the argument into the commands.
1996 if test -n "$arg"; then
1997 compile_command="$compile_command $arg"
1998 finalize_command="$finalize_command $arg"
1999 fi
2000 done # argument parsing loop
2001
2002 if test -n "$prev"; then
2003 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
2004 $echo "$help" 1>&2
2005 exit $EXIT_FAILURE
2006 fi
2007
2008 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
2009 eval arg=\"$export_dynamic_flag_spec\"
2010 compile_command="$compile_command $arg"
2011 finalize_command="$finalize_command $arg"
2012 fi
2013
2014 oldlibs=
2015 # calculate the name of the file, without its directory
2016 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
2017 libobjs_save="$libobjs"
2018
2019 if test -n "$shlibpath_var"; then
2020 # get the directories listed in $shlibpath_var
2021 eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
2022 else
2023 shlib_search_path=
2024 fi
2025 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
2026 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
2027
2028 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2029 if test "X$output_objdir" = "X$output"; then
2030 output_objdir="$objdir"
2031 else
2032 output_objdir="$output_objdir/$objdir"
2033 fi
2034 # Create the object directory.
2035 if test ! -d "$output_objdir"; then
2036 $show "$mkdir $output_objdir"
2037 $run $mkdir $output_objdir
2038 exit_status=$?
2039 if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
2040 exit $exit_status
2041 fi
2042 fi
2043
2044 # Determine the type of output
2045 case $output in
2046 "")
2047 $echo "$modename: you must specify an output file" 1>&2
2048 $echo "$help" 1>&2
2049 exit $EXIT_FAILURE
2050 ;;
2051 *.$libext) linkmode=oldlib ;;
2052 *.lo | *.$objext) linkmode=obj ;;
2053 *.la) linkmode=lib ;;
2054 *) linkmode=prog ;; # Anything else should be a program.
2055 esac
2056
2057 case $host in
2058 *cygwin* | *mingw* | *pw32*)
2059 # don't eliminate duplications in $postdeps and $predeps
2060 duplicate_compiler_generated_deps=yes
2061 ;;
2062 *)
2063 duplicate_compiler_generated_deps=$duplicate_deps
2064 ;;
2065 esac
2066 specialdeplibs=
2067
2068 libs=
2069 # Find all interdependent deplibs by searching for libraries
2070 # that are linked more than once (e.g. -la -lb -la)
2071 for deplib in $deplibs; do
2072 if test "X$duplicate_deps" = "Xyes" ; then
2073 case "$libs " in
2074 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2075 esac
2076 fi
2077 libs="$libs $deplib"
2078 done
2079
2080 if test "$linkmode" = lib; then
2081 libs="$predeps $libs $compiler_lib_search_path $postdeps"
2082
2083 # Compute libraries that are listed more than once in $predeps
2084 # $postdeps and mark them as special (i.e., whose duplicates are
2085 # not to be eliminated).
2086 pre_post_deps=
2087 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
2088 for pre_post_dep in $predeps $postdeps; do
2089 case "$pre_post_deps " in
2090 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
2091 esac
2092 pre_post_deps="$pre_post_deps $pre_post_dep"
2093 done
2094 fi
2095 pre_post_deps=
2096 fi
2097
2098 deplibs=
2099 newdependency_libs=
2100 newlib_search_path=
2101 need_relink=no # whether we're linking any uninstalled libtool libraries
2102 notinst_deplibs= # not-installed libtool libraries
2103 case $linkmode in
2104 lib)
2105 passes="conv link"
2106 for file in $dlfiles $dlprefiles; do
2107 case $file in
2108 *.la) ;;
2109 *)
2110 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
2111 exit $EXIT_FAILURE
2112 ;;
2113 esac
2114 done
2115 ;;
2116 prog)
2117 compile_deplibs=
2118 finalize_deplibs=
2119 alldeplibs=no
2120 newdlfiles=
2121 newdlprefiles=
2122 passes="conv scan dlopen dlpreopen link"
2123 ;;
2124 *) passes="conv"
2125 ;;
2126 esac
2127 for pass in $passes; do
2128 if test "$linkmode,$pass" = "lib,link" ||
2129 test "$linkmode,$pass" = "prog,scan"; then
2130 libs="$deplibs"
2131 deplibs=
2132 fi
2133 if test "$linkmode" = prog; then
2134 case $pass in
2135 dlopen) libs="$dlfiles" ;;
2136 dlpreopen) libs="$dlprefiles" ;;
2137 link)
2138 libs="$deplibs %DEPLIBS%"
2139 test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
2140 ;;
2141 esac
2142 fi
2143 if test "$pass" = dlopen; then
2144 # Collect dlpreopened libraries
2145 save_deplibs="$deplibs"
2146 deplibs=
2147 fi
2148 for deplib in $libs; do
2149 lib=
2150 found=no
2151 case $deplib in
2152 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
2153 if test "$linkmode,$pass" = "prog,link"; then
2154 compile_deplibs="$deplib $compile_deplibs"
2155 finalize_deplibs="$deplib $finalize_deplibs"
2156 else
2157 compiler_flags="$compiler_flags $deplib"
2158 fi
2159 continue
2160 ;;
2161 -l*)
2162 if test "$linkmode" != lib && test "$linkmode" != prog; then
2163 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2164 continue
2165 fi
2166 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2167 if test "$linkmode" = lib; then
2168 searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
2169 else
2170 searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
2171 fi
2172 for searchdir in $searchdirs; do
2173 for search_ext in .la $std_shrext .so .a; do
2174 # Search the libtool library
2175 lib="$searchdir/lib${name}${search_ext}"
2176 if test -f "$lib"; then
2177 if test "$search_ext" = ".la"; then
2178 found=yes
2179 else
2180 found=no
2181 fi
2182 break 2
2183 fi
2184 done
2185 done
2186 if test "$found" != yes; then
2187 # deplib doesn't seem to be a libtool library
2188 if test "$linkmode,$pass" = "prog,link"; then
2189 compile_deplibs="$deplib $compile_deplibs"
2190 finalize_deplibs="$deplib $finalize_deplibs"
2191 else
2192 deplibs="$deplib $deplibs"
2193 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2194 fi
2195 continue
2196 else # deplib is a libtool library
2197 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2198 # We need to do some special things here, and not later.
2199 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2200 case " $predeps $postdeps " in
2201 *" $deplib "*)
2202 if (${SED} -e '2q' $lib |
2203 grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
2204 library_names=
2205 old_library=
2206 case $lib in
2207 */* | *\\*) . $lib ;;
2208 *) . ./$lib ;;
2209 esac
2210 for l in $old_library $library_names; do
2211 ll="$l"
2212 done
2213 if test "X$ll" = "X$old_library" ; then # only static version available
2214 found=no
2215 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2216 test "X$ladir" = "X$lib" && ladir="."
2217 lib=$ladir/$old_library
2218 if test "$linkmode,$pass" = "prog,link"; then
2219 compile_deplibs="$deplib $compile_deplibs"
2220 finalize_deplibs="$deplib $finalize_deplibs"
2221 else
2222 deplibs="$deplib $deplibs"
2223 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2224 fi
2225 continue
2226 fi
2227 fi
2228 ;;
2229 *) ;;
2230 esac
2231 fi
2232 fi
2233 ;; # -l
2234 -L*)
2235 case $linkmode in
2236 lib)
2237 deplibs="$deplib $deplibs"
2238 test "$pass" = conv && continue
2239 newdependency_libs="$deplib $newdependency_libs"
2240 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2241 ;;
2242 prog)
2243 if test "$pass" = conv; then
2244 deplibs="$deplib $deplibs"
2245 continue
2246 fi
2247 if test "$pass" = scan; then
2248 deplibs="$deplib $deplibs"
2249 else
2250 compile_deplibs="$deplib $compile_deplibs"
2251 finalize_deplibs="$deplib $finalize_deplibs"
2252 fi
2253 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2254 ;;
2255 *)
2256 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2257 ;;
2258 esac # linkmode
2259 continue
2260 ;; # -L
2261 -R*)
2262 if test "$pass" = link; then
2263 dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
2264 # Make sure the xrpath contains only unique directories.
2265 case "$xrpath " in
2266 *" $dir "*) ;;
2267 *) xrpath="$xrpath $dir" ;;
2268 esac
2269 fi
2270 deplibs="$deplib $deplibs"
2271 continue
2272 ;;
2273 *.la) lib="$deplib" ;;
2274 *.$libext)
2275 if test "$pass" = conv; then
2276 deplibs="$deplib $deplibs"
2277 continue
2278 fi
2279 case $linkmode in
2280 lib)
2281 valid_a_lib=no
2282 case $deplibs_check_method in
2283 match_pattern*)
2284 set dummy $deplibs_check_method
2285 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2286 if eval $echo \"$deplib\" 2>/dev/null \
2287 | $SED 10q \
2288 | $EGREP "$match_pattern_regex" > /dev/null; then
2289 valid_a_lib=yes
2290 fi
2291 ;;
2292 pass_all)
2293 valid_a_lib=yes
2294 ;;
2295 esac
2296 if test "$valid_a_lib" != yes; then
2297 $echo
2298 $echo "*** Warning: Trying to link with static lib archive $deplib."
2299 $echo "*** I have the capability to make that library automatically link in when"
2300 $echo "*** you link to this library. But I can only do this if you have a"
2301 $echo "*** shared version of the library, which you do not appear to have"
2302 $echo "*** because the file extensions .$libext of this argument makes me believe"
2303 $echo "*** that it is just a static archive that I should not used here."
2304 else
2305 $echo
2306 $echo "*** Warning: Linking the shared library $output against the"
2307 $echo "*** static library $deplib is not portable!"
2308 deplibs="$deplib $deplibs"
2309 fi
2310 continue
2311 ;;
2312 prog)
2313 if test "$pass" != link; then
2314 deplibs="$deplib $deplibs"
2315 else
2316 compile_deplibs="$deplib $compile_deplibs"
2317 finalize_deplibs="$deplib $finalize_deplibs"
2318 fi
2319 continue
2320 ;;
2321 esac # linkmode
2322 ;; # *.$libext
2323 *.lo | *.$objext)
2324 if test "$pass" = conv; then
2325 deplibs="$deplib $deplibs"
2326 elif test "$linkmode" = prog; then
2327 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
2328 # If there is no dlopen support or we're linking statically,
2329 # we need to preload.
2330 newdlprefiles="$newdlprefiles $deplib"
2331 compile_deplibs="$deplib $compile_deplibs"
2332 finalize_deplibs="$deplib $finalize_deplibs"
2333 else
2334 newdlfiles="$newdlfiles $deplib"
2335 fi
2336 fi
2337 continue
2338 ;;
2339 %DEPLIBS%)
2340 alldeplibs=yes
2341 continue
2342 ;;
2343 esac # case $deplib
2344 if test "$found" = yes || test -f "$lib"; then :
2345 else
2346 $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
2347 exit $EXIT_FAILURE
2348 fi
2349
2350 # Check to see that this really is a libtool archive.
2351 if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
2352 else
2353 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2354 exit $EXIT_FAILURE
2355 fi
2356
2357 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2358 test "X$ladir" = "X$lib" && ladir="."
2359
2360 dlname=
2361 dlopen=
2362 dlpreopen=
2363 libdir=
2364 library_names=
2365 old_library=
2366 # If the library was installed with an old release of libtool,
2367 # it will not redefine variables installed, or shouldnotlink
2368 installed=yes
2369 shouldnotlink=no
2370 avoidtemprpath=
2371
2372
2373 # Read the .la file
2374 case $lib in
2375 */* | *\\*) . $lib ;;
2376 *) . ./$lib ;;
2377 esac
2378
2379 if test "$linkmode,$pass" = "lib,link" ||
2380 test "$linkmode,$pass" = "prog,scan" ||
2381 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
2382 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
2383 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
2384 fi
2385
2386 if test "$pass" = conv; then
2387 # Only check for convenience libraries
2388 deplibs="$lib $deplibs"
2389 if test -z "$libdir"; then
2390 if test -z "$old_library"; then
2391 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2392 exit $EXIT_FAILURE
2393 fi
2394 # It is a libtool convenience library, so add in its objects.
2395 convenience="$convenience $ladir/$objdir/$old_library"
2396 old_convenience="$old_convenience $ladir/$objdir/$old_library"
2397 tmp_libs=
2398 for deplib in $dependency_libs; do
2399 deplibs="$deplib $deplibs"
2400 if test "X$duplicate_deps" = "Xyes" ; then
2401 case "$tmp_libs " in
2402 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2403 esac
2404 fi
2405 tmp_libs="$tmp_libs $deplib"
2406 done
2407 elif test "$linkmode" != prog && test "$linkmode" != lib; then
2408 $echo "$modename: \`$lib' is not a convenience library" 1>&2
2409 exit $EXIT_FAILURE
2410 fi
2411 continue
2412 fi # $pass = conv
2413
2414
2415 # Get the name of the library we link against.
2416 linklib=
2417 for l in $old_library $library_names; do
2418 linklib="$l"
2419 done
2420 if test -z "$linklib"; then
2421 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2422 exit $EXIT_FAILURE
2423 fi
2424
2425 # This library was specified with -dlopen.
2426 if test "$pass" = dlopen; then
2427 if test -z "$libdir"; then
2428 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2429 exit $EXIT_FAILURE
2430 fi
2431 if test -z "$dlname" ||
2432 test "$dlopen_support" != yes ||
2433 test "$build_libtool_libs" = no; then
2434 # If there is no dlname, no dlopen support or we're linking
2435 # statically, we need to preload. We also need to preload any
2436 # dependent libraries so libltdl's deplib preloader doesn't
2437 # bomb out in the load deplibs phase.
2438 dlprefiles="$dlprefiles $lib $dependency_libs"
2439 else
2440 newdlfiles="$newdlfiles $lib"
2441 fi
2442 continue
2443 fi # $pass = dlopen
2444
2445 # We need an absolute path.
2446 case $ladir in
2447 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
2448 *)
2449 abs_ladir=`cd "$ladir" && pwd`
2450 if test -z "$abs_ladir"; then
2451 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
2452 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
2453 abs_ladir="$ladir"
2454 fi
2455 ;;
2456 esac
2457 laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
2458
2459 # Find the relevant object directory and library name.
2460 if test "X$installed" = Xyes; then
2461 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2462 $echo "$modename: warning: library \`$lib' was moved." 1>&2
2463 dir="$ladir"
2464 absdir="$abs_ladir"
2465 libdir="$abs_ladir"
2466 else
2467 dir="$libdir"
2468 absdir="$libdir"
2469 fi
2470 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
2471 else
2472 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2473 dir="$ladir"
2474 absdir="$abs_ladir"
2475 # Remove this search path later
2476 notinst_path="$notinst_path $abs_ladir"
2477 else
2478 dir="$ladir/$objdir"
2479 absdir="$abs_ladir/$objdir"
2480 # Remove this search path later
2481 notinst_path="$notinst_path $abs_ladir"
2482 fi
2483 fi # $installed = yes
2484 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2485
2486 # This library was specified with -dlpreopen.
2487 if test "$pass" = dlpreopen; then
2488 if test -z "$libdir"; then
2489 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2490 exit $EXIT_FAILURE
2491 fi
2492 # Prefer using a static library (so that no silly _DYNAMIC symbols
2493 # are required to link).
2494 if test -n "$old_library"; then
2495 newdlprefiles="$newdlprefiles $dir/$old_library"
2496 # Otherwise, use the dlname, so that lt_dlopen finds it.
2497 elif test -n "$dlname"; then
2498 newdlprefiles="$newdlprefiles $dir/$dlname"
2499 else
2500 newdlprefiles="$newdlprefiles $dir/$linklib"
2501 fi
2502 fi # $pass = dlpreopen
2503
2504 if test -z "$libdir"; then
2505 # Link the convenience library
2506 if test "$linkmode" = lib; then
2507 deplibs="$dir/$old_library $deplibs"
2508 elif test "$linkmode,$pass" = "prog,link"; then
2509 compile_deplibs="$dir/$old_library $compile_deplibs"
2510 finalize_deplibs="$dir/$old_library $finalize_deplibs"
2511 else
2512 deplibs="$lib $deplibs" # used for prog,scan pass
2513 fi
2514 continue
2515 fi
2516
2517
2518 if test "$linkmode" = prog && test "$pass" != link; then
2519 newlib_search_path="$newlib_search_path $ladir"
2520 deplibs="$lib $deplibs"
2521
2522 linkalldeplibs=no
2523 if test "$link_all_deplibs" != no || test -z "$library_names" ||
2524 test "$build_libtool_libs" = no; then
2525 linkalldeplibs=yes
2526 fi
2527
2528 tmp_libs=
2529 for deplib in $dependency_libs; do
2530 case $deplib in
2531 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2532 esac
2533 # Need to link against all dependency_libs?
2534 if test "$linkalldeplibs" = yes; then
2535 deplibs="$deplib $deplibs"
2536 else
2537 # Need to hardcode shared library paths
2538 # or/and link against static libraries
2539 newdependency_libs="$deplib $newdependency_libs"
2540 fi
2541 if test "X$duplicate_deps" = "Xyes" ; then
2542 case "$tmp_libs " in
2543 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2544 esac
2545 fi
2546 tmp_libs="$tmp_libs $deplib"
2547 done # for deplib
2548 continue
2549 fi # $linkmode = prog...
2550
2551 if test "$linkmode,$pass" = "prog,link"; then
2552 if test -n "$library_names" &&
2553 { { test "$prefer_static_libs" = no ||
2554 test "$prefer_static_libs,$installed" = "built,yes"; } ||
2555 test -z "$old_library"; }; then
2556 # We need to hardcode the library path
2557 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2558 # Make sure the rpath contains only unique directories.
2559 case "$temp_rpath " in
2560 *" $dir "*) ;;
2561 *" $absdir "*) ;;
2562 *) temp_rpath="$temp_rpath $absdir" ;;
2563 esac
2564 fi
2565
2566 # Hardcode the library path.
2567 # Skip directories that are in the system default run-time
2568 # search path.
2569 case " $sys_lib_dlsearch_path " in
2570 *" $absdir "*) ;;
2571 *)
2572 case "$compile_rpath " in
2573 *" $absdir "*) ;;
2574 *) compile_rpath="$compile_rpath $absdir"
2575 esac
2576 ;;
2577 esac
2578 case " $sys_lib_dlsearch_path " in
2579 *" $libdir "*) ;;
2580 *)
2581 case "$finalize_rpath " in
2582 *" $libdir "*) ;;
2583 *) finalize_rpath="$finalize_rpath $libdir"
2584 esac
2585 ;;
2586 esac
2587 fi # $linkmode,$pass = prog,link...
2588
2589 if test "$alldeplibs" = yes &&
2590 { test "$deplibs_check_method" = pass_all ||
2591 { test "$build_libtool_libs" = yes &&
2592 test -n "$library_names"; }; }; then
2593 # We only need to search for static libraries
2594 continue
2595 fi
2596 fi
2597
2598 link_static=no # Whether the deplib will be linked statically
2599 use_static_libs=$prefer_static_libs
2600 if test "$use_static_libs" = built && test "$installed" = yes ; then
2601 use_static_libs=no
2602 fi
2603 if test -n "$library_names" &&
2604 { test "$use_static_libs" = no || test -z "$old_library"; }; then
2605 if test "$installed" = no; then
2606 notinst_deplibs="$notinst_deplibs $lib"
2607 need_relink=yes
2608 fi
2609 # This is a shared library
2610
2611 # Warn about portability, can't link against -module's on
2612 # some systems (darwin)
2613 if test "$shouldnotlink" = yes && test "$pass" = link ; then
2614 $echo
2615 if test "$linkmode" = prog; then
2616 $echo "*** Warning: Linking the executable $output against the loadable module"
2617 else
2618 $echo "*** Warning: Linking the shared library $output against the loadable module"
2619 fi
2620 $echo "*** $linklib is not portable!"
2621 fi
2622 if test "$linkmode" = lib &&
2623 test "$hardcode_into_libs" = yes; then
2624 # Hardcode the library path.
2625 # Skip directories that are in the system default run-time
2626 # search path.
2627 case " $sys_lib_dlsearch_path " in
2628 *" $absdir "*) ;;
2629 *)
2630 case "$compile_rpath " in
2631 *" $absdir "*) ;;
2632 *) compile_rpath="$compile_rpath $absdir"
2633 esac
2634 ;;
2635 esac
2636 case " $sys_lib_dlsearch_path " in
2637 *" $libdir "*) ;;
2638 *)
2639 case "$finalize_rpath " in
2640 *" $libdir "*) ;;
2641 *) finalize_rpath="$finalize_rpath $libdir"
2642 esac
2643 ;;
2644 esac
2645 fi
2646
2647 if test -n "$old_archive_from_expsyms_cmds"; then
2648 # figure out the soname
2649 set dummy $library_names
2650 realname="$2"
2651 shift; shift
2652 libname=`eval \\$echo \"$libname_spec\"`
2653 # use dlname if we got it. it's perfectly good, no?
2654 if test -n "$dlname"; then
2655 soname="$dlname"
2656 elif test -n "$soname_spec"; then
2657 # bleh windows
2658 case $host in
2659 *cygwin* | mingw*)
2660 major=`expr $current - $age`
2661 versuffix="-$major"
2662 ;;
2663 esac
2664 eval soname=\"$soname_spec\"
2665 else
2666 soname="$realname"
2667 fi
2668
2669 # Make a new name for the extract_expsyms_cmds to use
2670 soroot="$soname"
2671 soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
2672 newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
2673
2674 # If the library has no export list, then create one now
2675 if test -f "$output_objdir/$soname-def"; then :
2676 else
2677 $show "extracting exported symbol list from \`$soname'"
2678 save_ifs="$IFS"; IFS='~'
2679 cmds=$extract_expsyms_cmds
2680 for cmd in $cmds; do
2681 IFS="$save_ifs"
2682 eval cmd=\"$cmd\"
2683 $show "$cmd"
2684 $run eval "$cmd" || exit $?
2685 done
2686 IFS="$save_ifs"
2687 fi
2688
2689 # Create $newlib
2690 if test -f "$output_objdir/$newlib"; then :; else
2691 $show "generating import library for \`$soname'"
2692 save_ifs="$IFS"; IFS='~'
2693 cmds=$old_archive_from_expsyms_cmds
2694 for cmd in $cmds; do
2695 IFS="$save_ifs"
2696 eval cmd=\"$cmd\"
2697 $show "$cmd"
2698 $run eval "$cmd" || exit $?
2699 done
2700 IFS="$save_ifs"
2701 fi
2702 # make sure the library variables are pointing to the new library
2703 dir=$output_objdir
2704 linklib=$newlib
2705 fi # test -n "$old_archive_from_expsyms_cmds"
2706
2707 if test "$linkmode" = prog || test "$mode" != relink; then
2708 add_shlibpath=
2709 add_dir=
2710 add=
2711 lib_linked=yes
2712 case $hardcode_action in
2713 immediate | unsupported)
2714 if test "$hardcode_direct" = no; then
2715 add="$dir/$linklib"
2716 case $host in
2717 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
2718 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
2719 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
2720 *-*-unixware7*) add_dir="-L$dir" ;;
2721 *-*-darwin* )
2722 # if the lib is a module then we can not link against
2723 # it, someone is ignoring the new warnings I added
2724 if /usr/bin/file -L $add 2> /dev/null |
2725 $EGREP ": [^:]* bundle" >/dev/null ; then
2726 $echo "** Warning, lib $linklib is a module, not a shared library"
2727 if test -z "$old_library" ; then
2728 $echo
2729 $echo "** And there doesn't seem to be a static archive available"
2730 $echo "** The link will probably fail, sorry"
2731 else
2732 add="$dir/$old_library"
2733 fi
2734 fi
2735 esac
2736 elif test "$hardcode_minus_L" = no; then
2737 case $host in
2738 *-*-sunos*) add_shlibpath="$dir" ;;
2739 esac
2740 add_dir="-L$dir"
2741 add="-l$name"
2742 elif test "$hardcode_shlibpath_var" = no; then
2743 add_shlibpath="$dir"
2744 add="-l$name"
2745 else
2746 lib_linked=no
2747 fi
2748 ;;
2749 relink)
2750 if test "$hardcode_direct" = yes; then
2751 add="$dir/$linklib"
2752 elif test "$hardcode_minus_L" = yes; then
2753 add_dir="-L$dir"
2754 # Try looking first in the location we're being installed to.
2755 if test -n "$inst_prefix_dir"; then
2756 case $libdir in
2757 [\\/]*)
2758 add_dir="$add_dir -L$inst_prefix_dir$libdir"
2759 ;;
2760 esac
2761 fi
2762 add="-l$name"
2763 elif test "$hardcode_shlibpath_var" = yes; then
2764 add_shlibpath="$dir"
2765 add="-l$name"
2766 else
2767 lib_linked=no
2768 fi
2769 ;;
2770 *) lib_linked=no ;;
2771 esac
2772
2773 if test "$lib_linked" != yes; then
2774 $echo "$modename: configuration error: unsupported hardcode properties"
2775 exit $EXIT_FAILURE
2776 fi
2777
2778 if test -n "$add_shlibpath"; then
2779 case :$compile_shlibpath: in
2780 *":$add_shlibpath:"*) ;;
2781 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
2782 esac
2783 fi
2784 if test "$linkmode" = prog; then
2785 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
2786 test -n "$add" && compile_deplibs="$add $compile_deplibs"
2787 else
2788 test -n "$add_dir" && deplibs="$add_dir $deplibs"
2789 test -n "$add" && deplibs="$add $deplibs"
2790 if test "$hardcode_direct" != yes && \
2791 test "$hardcode_minus_L" != yes && \
2792 test "$hardcode_shlibpath_var" = yes; then
2793 case :$finalize_shlibpath: in
2794 *":$libdir:"*) ;;
2795 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2796 esac
2797 fi
2798 fi
2799 fi
2800
2801 if test "$linkmode" = prog || test "$mode" = relink; then
2802 add_shlibpath=
2803 add_dir=
2804 add=
2805 # Finalize command for both is simple: just hardcode it.
2806 if test "$hardcode_direct" = yes; then
2807 add="$libdir/$linklib"
2808 elif test "$hardcode_minus_L" = yes; then
2809 add_dir="-L$libdir"
2810 add="-l$name"
2811 elif test "$hardcode_shlibpath_var" = yes; then
2812 case :$finalize_shlibpath: in
2813 *":$libdir:"*) ;;
2814 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2815 esac
2816 add="-l$name"
2817 elif test "$hardcode_automatic" = yes; then
2818 if test -n "$inst_prefix_dir" &&
2819 test -f "$inst_prefix_dir$libdir/$linklib" ; then
2820 add="$inst_prefix_dir$libdir/$linklib"
2821 else
2822 add="$libdir/$linklib"
2823 fi
2824 else
2825 # We cannot seem to hardcode it, guess we'll fake it.
2826 add_dir="-L$libdir"
2827 # Try looking first in the location we're being installed to.
2828 if test -n "$inst_prefix_dir"; then
2829 case $libdir in
2830 [\\/]*)
2831 add_dir="$add_dir -L$inst_prefix_dir$libdir"
2832 ;;
2833 esac
2834 fi
2835 add="-l$name"
2836 fi
2837
2838 if test "$linkmode" = prog; then
2839 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
2840 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
2841 else
2842 test -n "$add_dir" && deplibs="$add_dir $deplibs"
2843 test -n "$add" && deplibs="$add $deplibs"
2844 fi
2845 fi
2846 elif test "$linkmode" = prog; then
2847 # Here we assume that one of hardcode_direct or hardcode_minus_L
2848 # is not unsupported. This is valid on all known static and
2849 # shared platforms.
2850 if test "$hardcode_direct" != unsupported; then
2851 test -n "$old_library" && linklib="$old_library"
2852 compile_deplibs="$dir/$linklib $compile_deplibs"
2853 finalize_deplibs="$dir/$linklib $finalize_deplibs"
2854 else
2855 compile_deplibs="-l$name -L$dir $compile_deplibs"
2856 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
2857 fi
2858 elif test "$build_libtool_libs" = yes; then
2859 # Not a shared library
2860 if test "$deplibs_check_method" != pass_all; then
2861 # We're trying link a shared library against a static one
2862 # but the system doesn't support it.
2863
2864 # Just print a warning and add the library to dependency_libs so
2865 # that the program can be linked against the static library.
2866 $echo
2867 $echo "*** Warning: This system can not link to static lib archive $lib."
2868 $echo "*** I have the capability to make that library automatically link in when"
2869 $echo "*** you link to this library. But I can only do this if you have a"
2870 $echo "*** shared version of the library, which you do not appear to have."
2871 if test "$module" = yes; then
2872 $echo "*** But as you try to build a module library, libtool will still create "
2873 $echo "*** a static module, that should work as long as the dlopening application"
2874 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
2875 if test -z "$global_symbol_pipe"; then
2876 $echo
2877 $echo "*** However, this would only work if libtool was able to extract symbol"
2878 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2879 $echo "*** not find such a program. So, this module is probably useless."
2880 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
2881 fi
2882 if test "$build_old_libs" = no; then
2883 build_libtool_libs=module
2884 build_old_libs=yes
2885 else
2886 build_libtool_libs=no
2887 fi
2888 fi
2889 else
2890 deplibs="$dir/$old_library $deplibs"
2891 link_static=yes
2892 fi
2893 fi # link shared/static library?
2894
2895 if test "$linkmode" = lib; then
2896 if test -n "$dependency_libs" &&
2897 { test "$hardcode_into_libs" != yes ||
2898 test "$build_old_libs" = yes ||
2899 test "$link_static" = yes; }; then
2900 # Extract -R from dependency_libs
2901 temp_deplibs=
2902 for libdir in $dependency_libs; do
2903 case $libdir in
2904 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
2905 case " $xrpath " in
2906 *" $temp_xrpath "*) ;;
2907 *) xrpath="$xrpath $temp_xrpath";;
2908 esac;;
2909 *) temp_deplibs="$temp_deplibs $libdir";;
2910 esac
2911 done
2912 dependency_libs="$temp_deplibs"
2913 fi
2914
2915 newlib_search_path="$newlib_search_path $absdir"
2916 # Link against this library
2917 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
2918 # ... and its dependency_libs
2919 tmp_libs=
2920 for deplib in $dependency_libs; do
2921 newdependency_libs="$deplib $newdependency_libs"
2922 if test "X$duplicate_deps" = "Xyes" ; then
2923 case "$tmp_libs " in
2924 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2925 esac
2926 fi
2927 tmp_libs="$tmp_libs $deplib"
2928 done
2929
2930 if test "$link_all_deplibs" != no; then
2931 # Add the search paths of all dependency libraries
2932 for deplib in $dependency_libs; do
2933 case $deplib in
2934 -L*) path="$deplib" ;;
2935 *.la)
2936 dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
2937 test "X$dir" = "X$deplib" && dir="."
2938 # We need an absolute path.
2939 case $dir in
2940 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
2941 *)
2942 absdir=`cd "$dir" && pwd`
2943 if test -z "$absdir"; then
2944 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
2945 absdir="$dir"
2946 fi
2947 ;;
2948 esac
2949 if grep "^installed=no" $deplib > /dev/null; then
2950 path="$absdir/$objdir"
2951 else
2952 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2953 if test -z "$libdir"; then
2954 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2955 exit $EXIT_FAILURE
2956 fi
2957 if test "$absdir" != "$libdir"; then
2958 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
2959 fi
2960 path="$absdir"
2961 fi
2962 depdepl=
2963 case $host in
2964 *-*-darwin*)
2965 # we do not want to link against static libs,
2966 # but need to link against shared
2967 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
2968 eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2969 if test -n "$deplibrary_names" ; then
2970 for tmp in $deplibrary_names ; do
2971 depdepl=$tmp
2972 done
2973 if test -f "$deplibdir/$depdepl" ; then
2974 depdepl="$deplibdir/$depdepl"
2975 elif test -f "$path/$depdepl" ; then
2976 depdepl="$path/$depdepl"
2977 else
2978 # Can't find it, oh well...
2979 depdepl=
2980 fi
2981 # do not add paths which are already there
2982 case " $newlib_search_path " in
2983 *" $path "*) ;;
2984 *) newlib_search_path="$newlib_search_path $path";;
2985 esac
2986 fi
2987 path=""
2988 ;;
2989 *)
2990 path="-L$path"
2991 ;;
2992 esac
2993 ;;
2994 -l*)
2995 case $host in
2996 *-*-darwin*)
2997 # Again, we only want to link against shared libraries
2998 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
2999 for tmp in $newlib_search_path ; do
3000 if test -f "$tmp/lib$tmp_libs.dylib" ; then
3001 eval depdepl="$tmp/lib$tmp_libs.dylib"
3002 break
3003 fi
3004 done
3005 path=""
3006 ;;
3007 *) continue ;;
3008 esac
3009 ;;
3010 *) continue ;;
3011 esac
3012 case " $deplibs " in
3013 *" $path "*) ;;
3014 *) deplibs="$path $deplibs" ;;
3015 esac
3016 case " $deplibs " in
3017 *" $depdepl "*) ;;
3018 *) deplibs="$depdepl $deplibs" ;;
3019 esac
3020 done
3021 fi # link_all_deplibs != no
3022 fi # linkmode = lib
3023 done # for deplib in $libs
3024 dependency_libs="$newdependency_libs"
3025 if test "$pass" = dlpreopen; then
3026 # Link the dlpreopened libraries before other libraries
3027 for deplib in $save_deplibs; do
3028 deplibs="$deplib $deplibs"
3029 done
3030 fi
3031 if test "$pass" != dlopen; then
3032 if test "$pass" != conv; then
3033 # Make sure lib_search_path contains only unique directories.
3034 lib_search_path=
3035 for dir in $newlib_search_path; do
3036 case "$lib_search_path " in
3037 *" $dir "*) ;;
3038 *) lib_search_path="$lib_search_path $dir" ;;
3039 esac
3040 done
3041 newlib_search_path=
3042 fi
3043
3044 if test "$linkmode,$pass" != "prog,link"; then
3045 vars="deplibs"
3046 else
3047 vars="compile_deplibs finalize_deplibs"
3048 fi
3049 for var in $vars dependency_libs; do
3050 # Add libraries to $var in reverse order
3051 eval tmp_libs=\"\$$var\"
3052 new_libs=
3053 for deplib in $tmp_libs; do
3054 # FIXME: Pedantically, this is the right thing to do, so
3055 # that some nasty dependency loop isn't accidentally
3056 # broken:
3057 #new_libs="$deplib $new_libs"
3058 # Pragmatically, this seems to cause very few problems in
3059 # practice:
3060 case $deplib in
3061 -L*) new_libs="$deplib $new_libs" ;;
3062 -R*) ;;
3063 *)
3064 # And here is the reason: when a library appears more
3065 # than once as an explicit dependence of a library, or
3066 # is implicitly linked in more than once by the
3067 # compiler, it is considered special, and multiple
3068 # occurrences thereof are not removed. Compare this
3069 # with having the same library being listed as a
3070 # dependency of multiple other libraries: in this case,
3071 # we know (pedantically, we assume) the library does not
3072 # need to be listed more than once, so we keep only the
3073 # last copy. This is not always right, but it is rare
3074 # enough that we require users that really mean to play
3075 # such unportable linking tricks to link the library
3076 # using -Wl,-lname, so that libtool does not consider it
3077 # for duplicate removal.
3078 case " $specialdeplibs " in
3079 *" $deplib "*) new_libs="$deplib $new_libs" ;;
3080 *)
3081 case " $new_libs " in
3082 *" $deplib "*) ;;
3083 *) new_libs="$deplib $new_libs" ;;
3084 esac
3085 ;;
3086 esac
3087 ;;
3088 esac
3089 done
3090 tmp_libs=
3091 for deplib in $new_libs; do
3092 case $deplib in
3093 -L*)
3094 case " $tmp_libs " in
3095 *" $deplib "*) ;;
3096 *) tmp_libs="$tmp_libs $deplib" ;;
3097 esac
3098 ;;
3099 *) tmp_libs="$tmp_libs $deplib" ;;
3100 esac
3101 done
3102 eval $var=\"$tmp_libs\"
3103 done # for var
3104 fi
3105 # Last step: remove runtime libs from dependency_libs
3106 # (they stay in deplibs)
3107 tmp_libs=
3108 for i in $dependency_libs ; do
3109 case " $predeps $postdeps $compiler_lib_search_path " in
3110 *" $i "*)
3111 i=""
3112 ;;
3113 esac
3114 if test -n "$i" ; then
3115 tmp_libs="$tmp_libs $i"
3116 fi
3117 done
3118 dependency_libs=$tmp_libs
3119 done # for pass
3120 if test "$linkmode" = prog; then
3121 dlfiles="$newdlfiles"
3122 dlprefiles="$newdlprefiles"
3123 fi
3124
3125 case $linkmode in
3126 oldlib)
3127 case " $deplibs" in
3128 *\ -l* | *\ -L*)
3129 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;;
3130 esac
3131
3132 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3133 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3134 fi
3135
3136 if test -n "$rpath"; then
3137 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3138 fi
3139
3140 if test -n "$xrpath"; then
3141 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
3142 fi
3143
3144 if test -n "$vinfo"; then
3145 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
3146 fi
3147
3148 if test -n "$release"; then
3149 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
3150 fi
3151
3152 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
3153 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
3154 fi
3155
3156 # Now set the variables for building old libraries.
3157 build_libtool_libs=no
3158 oldlibs="$output"
3159 objs="$objs$old_deplibs"
3160 ;;
3161
3162 lib)
3163 # Make sure we only generate libraries of the form `libNAME.la'.
3164 case $outputname in
3165 lib*)
3166 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3167 eval shared_ext=\"$shrext_cmds\"
3168 eval libname=\"$libname_spec\"
3169 ;;
3170 *)
3171 if test "$module" = no; then
3172 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3173 $echo "$help" 1>&2
3174 exit $EXIT_FAILURE
3175 fi
3176 if test "$need_lib_prefix" != no; then
3177 # Add the "lib" prefix for modules if required
3178 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3179 eval shared_ext=\"$shrext_cmds\"
3180 eval libname=\"$libname_spec\"
3181 else
3182 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3183 fi
3184 ;;
3185 esac
3186
3187 if test -n "$objs"; then
3188 if test "$deplibs_check_method" != pass_all; then
3189 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3190 exit $EXIT_FAILURE
3191 else
3192 $echo
3193 $echo "*** Warning: Linking the shared library $output against the non-libtool"
3194 $echo "*** objects $objs is not portable!"
3195 libobjs="$libobjs $objs"
3196 fi
3197 fi
3198
3199 if test "$dlself" != no; then
3200 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
3201 fi
3202
3203 set dummy $rpath
3204 if test "$#" -gt 2; then
3205 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3206 fi
3207 install_libdir="$2"
3208
3209 oldlibs=
3210 if test -z "$rpath"; then
3211 if test "$build_libtool_libs" = yes; then
3212 # Building a libtool convenience library.
3213 # Some compilers have problems with a `.al' extension so
3214 # convenience libraries should have the same extension an
3215 # archive normally would.
3216 oldlibs="$output_objdir/$libname.$libext $oldlibs"
3217 build_libtool_libs=convenience
3218 build_old_libs=yes
3219 fi
3220
3221 if test -n "$vinfo"; then
3222 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
3223 fi
3224
3225 if test -n "$release"; then
3226 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3227 fi
3228 else
3229
3230 # Parse the version information argument.
3231 save_ifs="$IFS"; IFS=':'
3232 set dummy $vinfo 0 0 0
3233 IFS="$save_ifs"
3234
3235 if test -n "$8"; then
3236 $echo "$modename: too many parameters to \`-version-info'" 1>&2
3237 $echo "$help" 1>&2
3238 exit $EXIT_FAILURE
3239 fi
3240
3241 # convert absolute version numbers to libtool ages
3242 # this retains compatibility with .la files and attempts
3243 # to make the code below a bit more comprehensible
3244
3245 case $vinfo_number in
3246 yes)
3247 number_major="$2"
3248 number_minor="$3"
3249 number_revision="$4"
3250 #
3251 # There are really only two kinds -- those that
3252 # use the current revision as the major version
3253 # and those that subtract age and use age as
3254 # a minor version. But, then there is irix
3255 # which has an extra 1 added just for fun
3256 #
3257 case $version_type in
3258 darwin|linux|osf|windows|none)
3259 current=`expr $number_major + $number_minor`
3260 age="$number_minor"
3261 revision="$number_revision"
3262 ;;
3263 freebsd-aout|freebsd-elf|sunos)
3264 current="$number_major"
3265 revision="$number_minor"
3266 age="0"
3267 ;;
3268 irix|nonstopux)
3269 current=`expr $number_major + $number_minor`
3270 age="$number_minor"
3271 revision="$number_minor"
3272 lt_irix_increment=no
3273 ;;
3274 *)
3275 $echo "$modename: unknown library version type \`$version_type'" 1>&2
3276 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3277 exit $EXIT_FAILURE
3278 ;;
3279 esac
3280 ;;
3281 no)
3282 current="$2"
3283 revision="$3"
3284 age="$4"
3285 ;;
3286 esac
3287
3288 # Check that each of the things are valid numbers.
3289 case $current in
3290 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
3291 *)
3292 $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
3293 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3294 exit $EXIT_FAILURE
3295 ;;
3296 esac
3297
3298 case $revision in
3299 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
3300 *)
3301 $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
3302 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3303 exit $EXIT_FAILURE
3304 ;;
3305 esac
3306
3307 case $age in
3308 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
3309 *)
3310 $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
3311 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3312 exit $EXIT_FAILURE
3313 ;;
3314 esac
3315
3316 if test "$age" -gt "$current"; then
3317 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3318 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3319 exit $EXIT_FAILURE
3320 fi
3321
3322 # Calculate the version variables.
3323 major=
3324 versuffix=
3325 verstring=
3326 case $version_type in
3327 none) ;;
3328
3329 darwin)
3330 # Like Linux, but with the current version available in
3331 # verstring for coding it into the library header
3332 major=.`expr $current - $age`
3333 versuffix="$major.$age.$revision"
3334 # Darwin ld doesn't like 0 for these options...
3335 minor_current=`expr $current + 1`
3336 xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
3337 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
3338 ;;
3339
3340 freebsd-aout)
3341 major=".$current"
3342 versuffix=".$current.$revision";
3343 ;;
3344
3345 freebsd-elf)
3346 major=".$current"
3347 versuffix=".$current";
3348 ;;
3349
3350 irix | nonstopux)
3351 if test "X$lt_irix_increment" = "Xno"; then
3352 major=`expr $current - $age`
3353 else
3354 major=`expr $current - $age + 1`
3355 fi
3356 case $version_type in
3357 nonstopux) verstring_prefix=nonstopux ;;
3358 *) verstring_prefix=sgi ;;
3359 esac
3360 verstring="$verstring_prefix$major.$revision"
3361
3362 # Add in all the interfaces that we are compatible with.
3363 loop=$revision
3364 while test "$loop" -ne 0; do
3365 iface=`expr $revision - $loop`
3366 loop=`expr $loop - 1`
3367 verstring="$verstring_prefix$major.$iface:$verstring"
3368 done
3369
3370 # Before this point, $major must not contain `.'.
3371 major=.$major
3372 versuffix="$major.$revision"
3373 ;;
3374
3375 linux)
3376 major=.`expr $current - $age`
3377 versuffix="$major.$age.$revision"
3378 ;;
3379
3380 osf)
3381 major=.`expr $current - $age`
3382 versuffix=".$current.$age.$revision"
3383 verstring="$current.$age.$revision"
3384
3385 # Add in all the interfaces that we are compatible with.
3386 loop=$age
3387 while test "$loop" -ne 0; do
3388 iface=`expr $current - $loop`
3389 loop=`expr $loop - 1`
3390 verstring="$verstring:${iface}.0"
3391 done
3392
3393 # Make executables depend on our current version.
3394 verstring="$verstring:${current}.0"
3395 ;;
3396
3397 sunos)
3398 major=".$current"
3399 versuffix=".$current.$revision"
3400 ;;
3401
3402 windows)
3403 # Use '-' rather than '.', since we only want one
3404 # extension on DOS 8.3 filesystems.
3405 major=`expr $current - $age`
3406 versuffix="-$major"
3407 ;;
3408
3409 *)
3410 $echo "$modename: unknown library version type \`$version_type'" 1>&2
3411 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3412 exit $EXIT_FAILURE
3413 ;;
3414 esac
3415
3416 # Clear the version info if we defaulted, and they specified a release.
3417 if test -z "$vinfo" && test -n "$release"; then
3418 major=
3419 case $version_type in
3420 darwin)
3421 # we can't check for "0.0" in archive_cmds due to quoting
3422 # problems, so we reset it completely
3423 verstring=
3424 ;;
3425 *)
3426 verstring="0.0"
3427 ;;
3428 esac
3429 if test "$need_version" = no; then
3430 versuffix=
3431 else
3432 versuffix=".0.0"
3433 fi
3434 fi
3435
3436 # Remove version info from name if versioning should be avoided
3437 if test "$avoid_version" = yes && test "$need_version" = no; then
3438 major=
3439 versuffix=
3440 verstring=""
3441 fi
3442
3443 # Check to see if the archive will have undefined symbols.
3444 if test "$allow_undefined" = yes; then
3445 if test "$allow_undefined_flag" = unsupported; then
3446 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3447 build_libtool_libs=no
3448 build_old_libs=yes
3449 fi
3450 else
3451 # Don't allow undefined symbols.
3452 allow_undefined_flag="$no_undefined_flag"
3453 fi
3454 fi
3455
3456 if test "$mode" != relink; then
3457 # Remove our outputs, but don't remove object files since they
3458 # may have been created when compiling PIC objects.
3459 removelist=
3460 tempremovelist=`$echo "$output_objdir/*"`
3461 for p in $tempremovelist; do
3462 case $p in
3463 *.$objext)
3464 ;;
3465 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
3466 if test "X$precious_files_regex" != "X"; then
3467 if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
3468 then
3469 continue
3470 fi
3471 fi
3472 removelist="$removelist $p"
3473 ;;
3474 *) ;;
3475 esac
3476 done
3477 if test -n "$removelist"; then
3478 $show "${rm}r $removelist"
3479 $run ${rm}r $removelist
3480 fi
3481 fi
3482
3483 # Now set the variables for building old libraries.
3484 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
3485 oldlibs="$oldlibs $output_objdir/$libname.$libext"
3486
3487 # Transform .lo files to .o files.
3488 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3489 fi
3490
3491 # Eliminate all temporary directories.
3492 #for path in $notinst_path; do
3493 # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
3494 # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
3495 # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
3496 #done
3497
3498 if test -n "$xrpath"; then
3499 # If the user specified any rpath flags, then add them.
3500 temp_xrpath=
3501 for libdir in $xrpath; do
3502 temp_xrpath="$temp_xrpath -R$libdir"
3503 case "$finalize_rpath " in
3504 *" $libdir "*) ;;
3505 *) finalize_rpath="$finalize_rpath $libdir" ;;
3506 esac
3507 done
3508 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
3509 dependency_libs="$temp_xrpath $dependency_libs"
3510 fi
3511 fi
3512
3513 # Make sure dlfiles contains only unique files that won't be dlpreopened
3514 old_dlfiles="$dlfiles"
3515 dlfiles=
3516 for lib in $old_dlfiles; do
3517 case " $dlprefiles $dlfiles " in
3518 *" $lib "*) ;;
3519 *) dlfiles="$dlfiles $lib" ;;
3520 esac
3521 done
3522
3523 # Make sure dlprefiles contains only unique files
3524 old_dlprefiles="$dlprefiles"
3525 dlprefiles=
3526 for lib in $old_dlprefiles; do
3527 case "$dlprefiles " in
3528 *" $lib "*) ;;
3529 *) dlprefiles="$dlprefiles $lib" ;;
3530 esac
3531 done
3532
3533 if test "$build_libtool_libs" = yes; then
3534 if test -n "$rpath"; then
3535 case $host in
3536 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
3537 # these systems don't actually have a c library (as such)!
3538 ;;
3539 *-*-rhapsody* | *-*-darwin1.[012])
3540 # Rhapsody C library is in the System framework
3541 deplibs="$deplibs -framework System"
3542 ;;
3543 *-*-netbsd*)
3544 # Don't link with libc until the a.out ld.so is fixed.
3545 ;;
3546 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
3547 # Do not include libc due to us having libc/libc_r.
3548 ;;
3549 *-*-sco3.2v5* | *-*-sco5v6*)
3550 # Causes problems with __ctype
3551 ;;
3552 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
3553 # Compiler inserts libc in the correct place for threads to work
3554 ;;
3555 *)
3556 # Add libc to deplibs on all other systems if necessary.
3557 if test "$build_libtool_need_lc" = "yes"; then
3558 deplibs="$deplibs -lc"
3559 fi
3560 ;;
3561 esac
3562 fi
3563
3564 # Transform deplibs into only deplibs that can be linked in shared.
3565 name_save=$name
3566 libname_save=$libname
3567 release_save=$release
3568 versuffix_save=$versuffix
3569 major_save=$major
3570 # I'm not sure if I'm treating the release correctly. I think
3571 # release should show up in the -l (ie -lgmp5) so we don't want to
3572 # add it in twice. Is that correct?
3573 release=""
3574 versuffix=""
3575 major=""
3576 newdeplibs=
3577 droppeddeps=no
3578 case $deplibs_check_method in
3579 pass_all)
3580 # Don't check for shared/static. Everything works.
3581 # This might be a little naive. We might want to check
3582 # whether the library exists or not. But this is on
3583 # osf3 & osf4 and I'm not really sure... Just
3584 # implementing what was already the behavior.
3585 newdeplibs=$deplibs
3586 ;;
3587 test_compile)
3588 # This code stresses the "libraries are programs" paradigm to its
3589 # limits. Maybe even breaks it. We compile a program, linking it
3590 # against the deplibs as a proxy for the library. Then we can check
3591 # whether they linked in statically or dynamically with ldd.
3592 $rm conftest.c
3593 cat > conftest.c <<EOF
3594 int main() { return 0; }
3595 EOF
3596 $rm conftest
3597 if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
3598 ldd_output=`ldd conftest`
3599 for i in $deplibs; do
3600 name=`expr $i : '-l\(.*\)'`
3601 # If $name is empty we are operating on a -L argument.
3602 if test "$name" != "" && test "$name" != "0"; then
3603 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3604 case " $predeps $postdeps " in
3605 *" $i "*)
3606 newdeplibs="$newdeplibs $i"
3607 i=""
3608 ;;
3609 esac
3610 fi
3611 if test -n "$i" ; then
3612 libname=`eval \\$echo \"$libname_spec\"`
3613 deplib_matches=`eval \\$echo \"$library_names_spec\"`
3614 set dummy $deplib_matches
3615 deplib_match=$2
3616 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3617 newdeplibs="$newdeplibs $i"
3618 else
3619 droppeddeps=yes
3620 $echo
3621 $echo "*** Warning: dynamic linker does not accept needed library $i."
3622 $echo "*** I have the capability to make that library automatically link in when"
3623 $echo "*** you link to this library. But I can only do this if you have a"
3624 $echo "*** shared version of the library, which I believe you do not have"
3625 $echo "*** because a test_compile did reveal that the linker did not use it for"
3626 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
3627 fi
3628 fi
3629 else
3630 newdeplibs="$newdeplibs $i"
3631 fi
3632 done
3633 else
3634 # Error occurred in the first compile. Let's try to salvage
3635 # the situation: Compile a separate program for each library.
3636 for i in $deplibs; do
3637 name=`expr $i : '-l\(.*\)'`
3638 # If $name is empty we are operating on a -L argument.
3639 if test "$name" != "" && test "$name" != "0"; then
3640 $rm conftest
3641 if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
3642 ldd_output=`ldd conftest`
3643 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3644 case " $predeps $postdeps " in
3645 *" $i "*)
3646 newdeplibs="$newdeplibs $i"
3647 i=""
3648 ;;
3649 esac
3650 fi
3651 if test -n "$i" ; then
3652 libname=`eval \\$echo \"$libname_spec\"`
3653 deplib_matches=`eval \\$echo \"$library_names_spec\"`
3654 set dummy $deplib_matches
3655 deplib_match=$2
3656 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3657 newdeplibs="$newdeplibs $i"
3658 else
3659 droppeddeps=yes
3660 $echo
3661 $echo "*** Warning: dynamic linker does not accept needed library $i."
3662 $echo "*** I have the capability to make that library automatically link in when"
3663 $echo "*** you link to this library. But I can only do this if you have a"
3664 $echo "*** shared version of the library, which you do not appear to have"
3665 $echo "*** because a test_compile did reveal that the linker did not use this one"
3666 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
3667 fi
3668 fi
3669 else
3670 droppeddeps=yes
3671 $echo
3672 $echo "*** Warning! Library $i is needed by this library but I was not able to"
3673 $echo "*** make it link in! You will probably need to install it or some"
3674 $echo "*** library that it depends on before this library will be fully"
3675 $echo "*** functional. Installing it before continuing would be even better."
3676 fi
3677 else
3678 newdeplibs="$newdeplibs $i"
3679 fi
3680 done
3681 fi
3682 ;;
3683 file_magic*)
3684 set dummy $deplibs_check_method
3685 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3686 for a_deplib in $deplibs; do
3687 name=`expr $a_deplib : '-l\(.*\)'`
3688 # If $name is empty we are operating on a -L argument.
3689 if test "$name" != "" && test "$name" != "0"; then
3690 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3691 case " $predeps $postdeps " in
3692 *" $a_deplib "*)
3693 newdeplibs="$newdeplibs $a_deplib"
3694 a_deplib=""
3695 ;;
3696 esac
3697 fi
3698 if test -n "$a_deplib" ; then
3699 libname=`eval \\$echo \"$libname_spec\"`
3700 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3701 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
3702 for potent_lib in $potential_libs; do
3703 # Follow soft links.
3704 if ls -lLd "$potent_lib" 2>/dev/null \
3705 | grep " -> " >/dev/null; then
3706 continue
3707 fi
3708 # The statement above tries to avoid entering an
3709 # endless loop below, in case of cyclic links.
3710 # We might still enter an endless loop, since a link
3711 # loop can be closed while we follow links,
3712 # but so what?
3713 potlib="$potent_lib"
3714 while test -h "$potlib" 2>/dev/null; do
3715 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
3716 case $potliblink in
3717 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
3718 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
3719 esac
3720 done
3721 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
3722 | ${SED} 10q \
3723 | $EGREP "$file_magic_regex" > /dev/null; then
3724 newdeplibs="$newdeplibs $a_deplib"
3725 a_deplib=""
3726 break 2
3727 fi
3728 done
3729 done
3730 fi
3731 if test -n "$a_deplib" ; then
3732 droppeddeps=yes
3733 $echo
3734 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3735 $echo "*** I have the capability to make that library automatically link in when"
3736 $echo "*** you link to this library. But I can only do this if you have a"
3737 $echo "*** shared version of the library, which you do not appear to have"
3738 $echo "*** because I did check the linker path looking for a file starting"
3739 if test -z "$potlib" ; then
3740 $echo "*** with $libname but no candidates were found. (...for file magic test)"
3741 else
3742 $echo "*** with $libname and none of the candidates passed a file format test"
3743 $echo "*** using a file magic. Last file checked: $potlib"
3744 fi
3745 fi
3746 else
3747 # Add a -L argument.
3748 newdeplibs="$newdeplibs $a_deplib"
3749 fi
3750 done # Gone through all deplibs.
3751 ;;
3752 match_pattern*)
3753 set dummy $deplibs_check_method
3754 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3755 for a_deplib in $deplibs; do
3756 name=`expr $a_deplib : '-l\(.*\)'`
3757 # If $name is empty we are operating on a -L argument.
3758 if test -n "$name" && test "$name" != "0"; then
3759 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3760 case " $predeps $postdeps " in
3761 *" $a_deplib "*)
3762 newdeplibs="$newdeplibs $a_deplib"
3763 a_deplib=""
3764 ;;
3765 esac
3766 fi
3767 if test -n "$a_deplib" ; then
3768 libname=`eval \\$echo \"$libname_spec\"`
3769 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3770 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
3771 for potent_lib in $potential_libs; do
3772 potlib="$potent_lib" # see symlink-check above in file_magic test
3773 if eval $echo \"$potent_lib\" 2>/dev/null \
3774 | ${SED} 10q \
3775 | $EGREP "$match_pattern_regex" > /dev/null; then
3776 newdeplibs="$newdeplibs $a_deplib"
3777 a_deplib=""
3778 break 2
3779 fi
3780 done
3781 done
3782 fi
3783 if test -n "$a_deplib" ; then
3784 droppeddeps=yes
3785 $echo
3786 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3787 $echo "*** I have the capability to make that library automatically link in when"
3788 $echo "*** you link to this library. But I can only do this if you have a"
3789 $echo "*** shared version of the library, which you do not appear to have"
3790 $echo "*** because I did check the linker path looking for a file starting"
3791 if test -z "$potlib" ; then
3792 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
3793 else
3794 $echo "*** with $libname and none of the candidates passed a file format test"
3795 $echo "*** using a regex pattern. Last file checked: $potlib"
3796 fi
3797 fi
3798 else
3799 # Add a -L argument.
3800 newdeplibs="$newdeplibs $a_deplib"
3801 fi
3802 done # Gone through all deplibs.
3803 ;;
3804 none | unknown | *)
3805 newdeplibs=""
3806 tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
3807 -e 's/ -[LR][^ ]*//g'`
3808 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3809 for i in $predeps $postdeps ; do
3810 # can't use Xsed below, because $i might contain '/'
3811 tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
3812 done
3813 fi
3814 if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
3815 | grep . >/dev/null; then
3816 $echo
3817 if test "X$deplibs_check_method" = "Xnone"; then
3818 $echo "*** Warning: inter-library dependencies are not supported in this platform."
3819 else
3820 $echo "*** Warning: inter-library dependencies are not known to be supported."
3821 fi
3822 $echo "*** All declared inter-library dependencies are being dropped."
3823 droppeddeps=yes
3824 fi
3825 ;;
3826 esac
3827 versuffix=$versuffix_save
3828 major=$major_save
3829 release=$release_save
3830 libname=$libname_save
3831 name=$name_save
3832
3833 case $host in
3834 *-*-rhapsody* | *-*-darwin1.[012])
3835 # On Rhapsody replace the C library is the System framework
3836 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
3837 ;;
3838 esac
3839
3840 if test "$droppeddeps" = yes; then
3841 if test "$module" = yes; then
3842 $echo
3843 $echo "*** Warning: libtool could not satisfy all declared inter-library"
3844 $echo "*** dependencies of module $libname. Therefore, libtool will create"
3845 $echo "*** a static module, that should work as long as the dlopening"
3846 $echo "*** application is linked with the -dlopen flag."
3847 if test -z "$global_symbol_pipe"; then
3848 $echo
3849 $echo "*** However, this would only work if libtool was able to extract symbol"
3850 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3851 $echo "*** not find such a program. So, this module is probably useless."
3852 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
3853 fi
3854 if test "$build_old_libs" = no; then
3855 oldlibs="$output_objdir/$libname.$libext"
3856 build_libtool_libs=module
3857 build_old_libs=yes
3858 else
3859 build_libtool_libs=no
3860 fi
3861 else
3862 $echo "*** The inter-library dependencies that have been dropped here will be"
3863 $echo "*** automatically added whenever a program is linked with this library"
3864 $echo "*** or is declared to -dlopen it."
3865
3866 if test "$allow_undefined" = no; then
3867 $echo
3868 $echo "*** Since this library must not contain undefined symbols,"
3869 $echo "*** because either the platform does not support them or"
3870 $echo "*** it was explicitly requested with -no-undefined,"
3871 $echo "*** libtool will only create a static version of it."
3872 if test "$build_old_libs" = no; then
3873 oldlibs="$output_objdir/$libname.$libext"
3874 build_libtool_libs=module
3875 build_old_libs=yes
3876 else
3877 build_libtool_libs=no
3878 fi
3879 fi
3880 fi
3881 fi
3882 # Done checking deplibs!
3883 deplibs=$newdeplibs
3884 fi
3885
3886
3887 # move library search paths that coincide with paths to not yet
3888 # installed libraries to the beginning of the library search list
3889 new_libs=
3890 for path in $notinst_path; do
3891 case " $new_libs " in
3892 *" -L$path/$objdir "*) ;;
3893 *)
3894 case " $deplibs " in
3895 *" -L$path/$objdir "*)
3896 new_libs="$new_libs -L$path/$objdir" ;;
3897 esac
3898 ;;
3899 esac
3900 done
3901 for deplib in $deplibs; do
3902 case $deplib in
3903 -L*)
3904 case " $new_libs " in
3905 *" $deplib "*) ;;
3906 *) new_libs="$new_libs $deplib" ;;
3907 esac
3908 ;;
3909 *) new_libs="$new_libs $deplib" ;;
3910 esac
3911 done
3912 deplibs="$new_libs"
3913
3914
3915 # All the library-specific variables (install_libdir is set above).
3916 library_names=
3917 old_library=
3918 dlname=
3919
3920 # Test again, we may have decided not to build it any more
3921 if test "$build_libtool_libs" = yes; then
3922 if test "$hardcode_into_libs" = yes; then
3923 # Hardcode the library paths
3924 hardcode_libdirs=
3925 dep_rpath=
3926 rpath="$finalize_rpath"
3927 test "$mode" != relink && rpath="$compile_rpath$rpath"
3928 for libdir in $rpath; do
3929 if test -n "$hardcode_libdir_flag_spec"; then
3930 if test -n "$hardcode_libdir_separator"; then
3931 if test -z "$hardcode_libdirs"; then
3932 hardcode_libdirs="$libdir"
3933 else
3934 # Just accumulate the unique libdirs.
3935 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3936 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3937 ;;
3938 *)
3939 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3940 ;;
3941 esac
3942 fi
3943 else
3944 eval flag=\"$hardcode_libdir_flag_spec\"
3945 dep_rpath="$dep_rpath $flag"
3946 fi
3947 elif test -n "$runpath_var"; then
3948 case "$perm_rpath " in
3949 *" $libdir "*) ;;
3950 *) perm_rpath="$perm_rpath $libdir" ;;
3951 esac
3952 fi
3953 done
3954 # Substitute the hardcoded libdirs into the rpath.
3955 if test -n "$hardcode_libdir_separator" &&
3956 test -n "$hardcode_libdirs"; then
3957 libdir="$hardcode_libdirs"
3958 if test -n "$hardcode_libdir_flag_spec_ld"; then
3959 case $archive_cmds in
3960 *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
3961 *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
3962 esac
3963 else
3964 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
3965 fi
3966 fi
3967 if test -n "$runpath_var" && test -n "$perm_rpath"; then
3968 # We should set the runpath_var.
3969 rpath=
3970 for dir in $perm_rpath; do
3971 rpath="$rpath$dir:"
3972 done
3973 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
3974 fi
3975 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
3976 fi
3977
3978 shlibpath="$finalize_shlibpath"
3979 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
3980 if test -n "$shlibpath"; then
3981 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
3982 fi
3983
3984 # Get the real and link names of the library.
3985 eval shared_ext=\"$shrext_cmds\"
3986 eval library_names=\"$library_names_spec\"
3987 set dummy $library_names
3988 realname="$2"
3989 shift; shift
3990
3991 if test -n "$soname_spec"; then
3992 eval soname=\"$soname_spec\"
3993 else
3994 soname="$realname"
3995 fi
3996 if test -z "$dlname"; then
3997 dlname=$soname
3998 fi
3999
4000 lib="$output_objdir/$realname"
4001 linknames=
4002 for link
4003 do
4004 linknames="$linknames $link"
4005 done
4006
4007 # Use standard objects if they are pic
4008 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4009
4010 # Prepare the list of exported symbols
4011 if test -z "$export_symbols"; then
4012 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
4013 $show "generating symbol list for \`$libname.la'"
4014 export_symbols="$output_objdir/$libname.exp"
4015 $run $rm $export_symbols
4016 cmds=$export_symbols_cmds
4017 save_ifs="$IFS"; IFS='~'
4018 for cmd in $cmds; do
4019 IFS="$save_ifs"
4020 eval cmd=\"$cmd\"
4021 if len=`expr "X$cmd" : ".*"` &&
4022 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
4023 $show "$cmd"
4024 $run eval "$cmd" || exit $?
4025 skipped_export=false
4026 else
4027 # The command line is too long to execute in one step.
4028 $show "using reloadable object file for export list..."
4029 skipped_export=:
4030 # Break out early, otherwise skipped_export may be
4031 # set to false by a later but shorter cmd.
4032 break
4033 fi
4034 done
4035 IFS="$save_ifs"
4036 if test -n "$export_symbols_regex"; then
4037 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
4038 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
4039 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
4040 $run eval '$mv "${export_symbols}T" "$export_symbols"'
4041 fi
4042 fi
4043 fi
4044
4045 if test -n "$export_symbols" && test -n "$include_expsyms"; then
4046 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
4047 fi
4048
4049 tmp_deplibs=
4050 for test_deplib in $deplibs; do
4051 case " $convenience " in
4052 *" $test_deplib "*) ;;
4053 *)
4054 tmp_deplibs="$tmp_deplibs $test_deplib"
4055 ;;
4056 esac
4057 done
4058 deplibs="$tmp_deplibs"
4059
4060 if test -n "$convenience"; then
4061 if test -n "$whole_archive_flag_spec"; then
4062 save_libobjs=$libobjs
4063 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4064 else
4065 gentop="$output_objdir/${outputname}x"
4066 generated="$generated $gentop"
4067
4068 func_extract_archives $gentop $convenience
4069 libobjs="$libobjs $func_extract_archives_result"
4070 fi
4071 fi
4072
4073 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4074 eval flag=\"$thread_safe_flag_spec\"
4075 linker_flags="$linker_flags $flag"
4076 fi
4077
4078 # Make a backup of the uninstalled library when relinking
4079 if test "$mode" = relink; then
4080 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
4081 fi
4082
4083 # Do each of the archive commands.
4084 if test "$module" = yes && test -n "$module_cmds" ; then
4085 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4086 eval test_cmds=\"$module_expsym_cmds\"
4087 cmds=$module_expsym_cmds
4088 else
4089 eval test_cmds=\"$module_cmds\"
4090 cmds=$module_cmds
4091 fi
4092 else
4093 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4094 eval test_cmds=\"$archive_expsym_cmds\"
4095 cmds=$archive_expsym_cmds
4096 else
4097 eval test_cmds=\"$archive_cmds\"
4098 cmds=$archive_cmds
4099 fi
4100 fi
4101
4102 if test "X$skipped_export" != "X:" &&
4103 len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4104 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
4105 :
4106 else
4107 # The command line is too long to link in one step, link piecewise.
4108 $echo "creating reloadable object files..."
4109
4110 # Save the value of $output and $libobjs because we want to
4111 # use them later. If we have whole_archive_flag_spec, we
4112 # want to use save_libobjs as it was before
4113 # whole_archive_flag_spec was expanded, because we can't
4114 # assume the linker understands whole_archive_flag_spec.
4115 # This may have to be revisited, in case too many
4116 # convenience libraries get linked in and end up exceeding
4117 # the spec.
4118 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
4119 save_libobjs=$libobjs
4120 fi
4121 save_output=$output
4122 output_la=`$echo "X$output" | $Xsed -e "$basename"`
4123
4124 # Clear the reloadable object creation command queue and
4125 # initialize k to one.
4126 test_cmds=
4127 concat_cmds=
4128 objlist=
4129 delfiles=
4130 last_robj=
4131 k=1
4132 output=$output_objdir/$output_la-${k}.$objext
4133 # Loop over the list of objects to be linked.
4134 for obj in $save_libobjs
4135 do
4136 eval test_cmds=\"$reload_cmds $objlist $last_robj\"
4137 if test "X$objlist" = X ||
4138 { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4139 test "$len" -le "$max_cmd_len"; }; then
4140 objlist="$objlist $obj"
4141 else
4142 # The command $test_cmds is almost too long, add a
4143 # command to the queue.
4144 if test "$k" -eq 1 ; then
4145 # The first file doesn't have a previous command to add.
4146 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
4147 else
4148 # All subsequent reloadable object files will link in
4149 # the last one created.
4150 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
4151 fi
4152 last_robj=$output_objdir/$output_la-${k}.$objext
4153 k=`expr $k + 1`
4154 output=$output_objdir/$output_la-${k}.$objext
4155 objlist=$obj
4156 len=1
4157 fi
4158 done
4159 # Handle the remaining objects by creating one last
4160 # reloadable object file. All subsequent reloadable object
4161 # files will link in the last one created.
4162 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
4163 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
4164
4165 if ${skipped_export-false}; then
4166 $show "generating symbol list for \`$libname.la'"
4167 export_symbols="$output_objdir/$libname.exp"
4168 $run $rm $export_symbols
4169 libobjs=$output
4170 # Append the command to create the export file.
4171 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
4172 fi
4173
4174 # Set up a command to remove the reloadable object files
4175 # after they are used.
4176 i=0
4177 while test "$i" -lt "$k"
4178 do
4179 i=`expr $i + 1`
4180 delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
4181 done
4182
4183 $echo "creating a temporary reloadable object file: $output"
4184
4185 # Loop through the commands generated above and execute them.
4186 save_ifs="$IFS"; IFS='~'
4187 for cmd in $concat_cmds; do
4188 IFS="$save_ifs"
4189 $show "$cmd"
4190 $run eval "$cmd" || exit $?
4191 done
4192 IFS="$save_ifs"
4193
4194 libobjs=$output
4195 # Restore the value of output.
4196 output=$save_output
4197
4198 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
4199 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4200 fi
4201 # Expand the library linking commands again to reset the
4202 # value of $libobjs for piecewise linking.
4203
4204 # Do each of the archive commands.
4205 if test "$module" = yes && test -n "$module_cmds" ; then
4206 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4207 cmds=$module_expsym_cmds
4208 else
4209 cmds=$module_cmds
4210 fi
4211 else
4212 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4213 cmds=$archive_expsym_cmds
4214 else
4215 cmds=$archive_cmds
4216 fi
4217 fi
4218
4219 # Append the command to remove the reloadable object files
4220 # to the just-reset $cmds.
4221 eval cmds=\"\$cmds~\$rm $delfiles\"
4222 fi
4223 save_ifs="$IFS"; IFS='~'
4224 for cmd in $cmds; do
4225 IFS="$save_ifs"
4226 eval cmd=\"$cmd\"
4227 $show "$cmd"
4228 $run eval "$cmd" || {
4229 lt_exit=$?
4230
4231 # Restore the uninstalled library and exit
4232 if test "$mode" = relink; then
4233 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
4234 fi
4235
4236 exit $lt_exit
4237 }
4238 done
4239 IFS="$save_ifs"
4240
4241 # Restore the uninstalled library and exit
4242 if test "$mode" = relink; then
4243 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
4244
4245 if test -n "$convenience"; then
4246 if test -z "$whole_archive_flag_spec"; then
4247 $show "${rm}r $gentop"
4248 $run ${rm}r "$gentop"
4249 fi
4250 fi
4251
4252 exit $EXIT_SUCCESS
4253 fi
4254
4255 # Create links to the real library.
4256 for linkname in $linknames; do
4257 if test "$realname" != "$linkname"; then
4258 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4259 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
4260 fi
4261 done
4262
4263 # If -module or -export-dynamic was specified, set the dlname.
4264 if test "$module" = yes || test "$export_dynamic" = yes; then
4265 # On all known operating systems, these are identical.
4266 dlname="$soname"
4267 fi
4268 fi
4269 ;;
4270
4271 obj)
4272 case " $deplibs" in
4273 *\ -l* | *\ -L*)
4274 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;;
4275 esac
4276
4277 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4278 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4279 fi
4280
4281 if test -n "$rpath"; then
4282 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4283 fi
4284
4285 if test -n "$xrpath"; then
4286 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4287 fi
4288
4289 if test -n "$vinfo"; then
4290 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4291 fi
4292
4293 if test -n "$release"; then
4294 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4295 fi
4296
4297 case $output in
4298 *.lo)
4299 if test -n "$objs$old_deplibs"; then
4300 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4301 exit $EXIT_FAILURE
4302 fi
4303 libobj="$output"
4304 obj=`$echo "X$output" | $Xsed -e "$lo2o"`
4305 ;;
4306 *)
4307 libobj=
4308 obj="$output"
4309 ;;
4310 esac
4311
4312 # Delete the old objects.
4313 $run $rm $obj $libobj
4314
4315 # Objects from convenience libraries. This assumes
4316 # single-version convenience libraries. Whenever we create
4317 # different ones for PIC/non-PIC, this we'll have to duplicate
4318 # the extraction.
4319 reload_conv_objs=
4320 gentop=
4321 # reload_cmds runs $LD directly, so let us get rid of
4322 # -Wl from whole_archive_flag_spec and hope we can get by with
4323 # turning comma into space..
4324 wl=
4325
4326 if test -n "$convenience"; then
4327 if test -n "$whole_archive_flag_spec"; then
4328 eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
4329 reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
4330 else
4331 gentop="$output_objdir/${obj}x"
4332 generated="$generated $gentop"
4333
4334 func_extract_archives $gentop $convenience
4335 reload_conv_objs="$reload_objs $func_extract_archives_result"
4336 fi
4337 fi
4338
4339 # Create the old-style object.
4340 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
4341
4342 output="$obj"
4343 cmds=$reload_cmds
4344 save_ifs="$IFS"; IFS='~'
4345 for cmd in $cmds; do
4346 IFS="$save_ifs"
4347 eval cmd=\"$cmd\"
4348 $show "$cmd"
4349 $run eval "$cmd" || exit $?
4350 done
4351 IFS="$save_ifs"
4352
4353 # Exit if we aren't doing a library object file.
4354 if test -z "$libobj"; then
4355 if test -n "$gentop"; then
4356 $show "${rm}r $gentop"
4357 $run ${rm}r $gentop
4358 fi
4359
4360 exit $EXIT_SUCCESS
4361 fi
4362
4363 if test "$build_libtool_libs" != yes; then
4364 if test -n "$gentop"; then
4365 $show "${rm}r $gentop"
4366 $run ${rm}r $gentop
4367 fi
4368
4369 # Create an invalid libtool object if no PIC, so that we don't
4370 # accidentally link it into a program.
4371 # $show "echo timestamp > $libobj"
4372 # $run eval "echo timestamp > $libobj" || exit $?
4373 exit $EXIT_SUCCESS
4374 fi
4375
4376 if test -n "$pic_flag" || test "$pic_mode" != default; then
4377 # Only do commands if we really have different PIC objects.
4378 reload_objs="$libobjs $reload_conv_objs"
4379 output="$libobj"
4380 cmds=$reload_cmds
4381 save_ifs="$IFS"; IFS='~'
4382 for cmd in $cmds; do
4383 IFS="$save_ifs"
4384 eval cmd=\"$cmd\"
4385 $show "$cmd"
4386 $run eval "$cmd" || exit $?
4387 done
4388 IFS="$save_ifs"
4389 fi
4390
4391 if test -n "$gentop"; then
4392 $show "${rm}r $gentop"
4393 $run ${rm}r $gentop
4394 fi
4395
4396 exit $EXIT_SUCCESS
4397 ;;
4398
4399 prog)
4400 case $host in
4401 *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
4402 esac
4403 if test -n "$vinfo"; then
4404 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4405 fi
4406
4407 if test -n "$release"; then
4408 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4409 fi
4410
4411 if test "$preload" = yes; then
4412 if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
4413 test "$dlopen_self_static" = unknown; then
4414 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4415 fi
4416 fi
4417
4418 case $host in
4419 *-*-rhapsody* | *-*-darwin1.[012])
4420 # On Rhapsody replace the C library is the System framework
4421 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4422 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4423 ;;
4424 esac
4425
4426 case $host in
4427 *darwin*)
4428 # Don't allow lazy linking, it breaks C++ global constructors
4429 if test "$tagname" = CXX ; then
4430 compile_command="$compile_command ${wl}-bind_at_load"
4431 finalize_command="$finalize_command ${wl}-bind_at_load"
4432 fi
4433 ;;
4434 esac
4435
4436
4437 # move library search paths that coincide with paths to not yet
4438 # installed libraries to the beginning of the library search list
4439 new_libs=
4440 for path in $notinst_path; do
4441 case " $new_libs " in
4442 *" -L$path/$objdir "*) ;;
4443 *)
4444 case " $compile_deplibs " in
4445 *" -L$path/$objdir "*)
4446 new_libs="$new_libs -L$path/$objdir" ;;
4447 esac
4448 ;;
4449 esac
4450 done
4451 for deplib in $compile_deplibs; do
4452 case $deplib in
4453 -L*)
4454 case " $new_libs " in
4455 *" $deplib "*) ;;
4456 *) new_libs="$new_libs $deplib" ;;
4457 esac
4458 ;;
4459 *) new_libs="$new_libs $deplib" ;;
4460 esac
4461 done
4462 compile_deplibs="$new_libs"
4463
4464
4465 compile_command="$compile_command $compile_deplibs"
4466 finalize_command="$finalize_command $finalize_deplibs"
4467
4468 if test -n "$rpath$xrpath"; then
4469 # If the user specified any rpath flags, then add them.
4470 for libdir in $rpath $xrpath; do
4471 # This is the magic to use -rpath.
4472 case "$finalize_rpath " in
4473 *" $libdir "*) ;;
4474 *) finalize_rpath="$finalize_rpath $libdir" ;;
4475 esac
4476 done
4477 fi
4478
4479 # Now hardcode the library paths
4480 rpath=
4481 hardcode_libdirs=
4482 for libdir in $compile_rpath $finalize_rpath; do
4483 if test -n "$hardcode_libdir_flag_spec"; then
4484 if test -n "$hardcode_libdir_separator"; then
4485 if test -z "$hardcode_libdirs"; then
4486 hardcode_libdirs="$libdir"
4487 else
4488 # Just accumulate the unique libdirs.
4489 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4490 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4491 ;;
4492 *)
4493 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4494 ;;
4495 esac
4496 fi
4497 else
4498 eval flag=\"$hardcode_libdir_flag_spec\"
4499 rpath="$rpath $flag"
4500 fi
4501 elif test -n "$runpath_var"; then
4502 case "$perm_rpath " in
4503 *" $libdir "*) ;;
4504 *) perm_rpath="$perm_rpath $libdir" ;;
4505 esac
4506 fi
4507 case $host in
4508 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
4509 testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
4510 case :$dllsearchpath: in
4511 *":$libdir:"*) ;;
4512 *) dllsearchpath="$dllsearchpath:$libdir";;
4513 esac
4514 case :$dllsearchpath: in
4515 *":$testbindir:"*) ;;
4516 *) dllsearchpath="$dllsearchpath:$testbindir";;
4517 esac
4518 ;;
4519 esac
4520 done
4521 # Substitute the hardcoded libdirs into the rpath.
4522 if test -n "$hardcode_libdir_separator" &&
4523 test -n "$hardcode_libdirs"; then
4524 libdir="$hardcode_libdirs"
4525 eval rpath=\" $hardcode_libdir_flag_spec\"
4526 fi
4527 compile_rpath="$rpath"
4528
4529 rpath=
4530 hardcode_libdirs=
4531 for libdir in $finalize_rpath; do
4532 if test -n "$hardcode_libdir_flag_spec"; then
4533 if test -n "$hardcode_libdir_separator"; then
4534 if test -z "$hardcode_libdirs"; then
4535 hardcode_libdirs="$libdir"
4536 else
4537 # Just accumulate the unique libdirs.
4538 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4539 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4540 ;;
4541 *)
4542 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4543 ;;
4544 esac
4545 fi
4546 else
4547 eval flag=\"$hardcode_libdir_flag_spec\"
4548 rpath="$rpath $flag"
4549 fi
4550 elif test -n "$runpath_var"; then
4551 case "$finalize_perm_rpath " in
4552 *" $libdir "*) ;;
4553 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
4554 esac
4555 fi
4556 done
4557 # Substitute the hardcoded libdirs into the rpath.
4558 if test -n "$hardcode_libdir_separator" &&
4559 test -n "$hardcode_libdirs"; then
4560 libdir="$hardcode_libdirs"
4561 eval rpath=\" $hardcode_libdir_flag_spec\"
4562 fi
4563 finalize_rpath="$rpath"
4564
4565 if test -n "$libobjs" && test "$build_old_libs" = yes; then
4566 # Transform all the library objects into standard objects.
4567 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4568 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4569 fi
4570
4571 dlsyms=
4572 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4573 if test -n "$NM" && test -n "$global_symbol_pipe"; then
4574 dlsyms="${outputname}S.c"
4575 else
4576 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4577 fi
4578 fi
4579
4580 if test -n "$dlsyms"; then
4581 case $dlsyms in
4582 "") ;;
4583 *.c)
4584 # Discover the nlist of each of the dlfiles.
4585 nlist="$output_objdir/${outputname}.nm"
4586
4587 $show "$rm $nlist ${nlist}S ${nlist}T"
4588 $run $rm "$nlist" "${nlist}S" "${nlist}T"
4589
4590 # Parse the name list into a source file.
4591 $show "creating $output_objdir/$dlsyms"
4592
4593 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4594 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4595 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4596
4597 #ifdef __cplusplus
4598 extern \"C\" {
4599 #endif
4600
4601 /* Prevent the only kind of declaration conflicts we can make. */
4602 #define lt_preloaded_symbols some_other_symbol
4603
4604 /* External symbol declarations for the compiler. */\
4605 "
4606
4607 if test "$dlself" = yes; then
4608 $show "generating symbol list for \`$output'"
4609
4610 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4611
4612 # Add our own program objects to the symbol list.
4613 progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4614 for arg in $progfiles; do
4615 $show "extracting global C symbols from \`$arg'"
4616 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4617 done
4618
4619 if test -n "$exclude_expsyms"; then
4620 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4621 $run eval '$mv "$nlist"T "$nlist"'
4622 fi
4623
4624 if test -n "$export_symbols_regex"; then
4625 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4626 $run eval '$mv "$nlist"T "$nlist"'
4627 fi
4628
4629 # Prepare the list of exported symbols
4630 if test -z "$export_symbols"; then
4631 export_symbols="$output_objdir/$outputname.exp"
4632 $run $rm $export_symbols
4633 $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4634 case $host in
4635 *cygwin* | *mingw* )
4636 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4637 $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
4638 ;;
4639 esac
4640 else
4641 $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4642 $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4643 $run eval 'mv "$nlist"T "$nlist"'
4644 case $host in
4645 *cygwin* | *mingw* )
4646 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4647 $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
4648 ;;
4649 esac
4650 fi
4651 fi
4652
4653 for arg in $dlprefiles; do
4654 $show "extracting global C symbols from \`$arg'"
4655 name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4656 $run eval '$echo ": $name " >> "$nlist"'
4657 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4658 done
4659
4660 if test -z "$run"; then
4661 # Make sure we have at least an empty file.
4662 test -f "$nlist" || : > "$nlist"
4663
4664 if test -n "$exclude_expsyms"; then
4665 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4666 $mv "$nlist"T "$nlist"
4667 fi
4668
4669 # Try sorting and uniquifying the output.
4670 if grep -v "^: " < "$nlist" |
4671 if sort -k 3 </dev/null >/dev/null 2>&1; then
4672 sort -k 3
4673 else
4674 sort +2
4675 fi |
4676 uniq > "$nlist"S; then
4677 :
4678 else
4679 grep -v "^: " < "$nlist" > "$nlist"S
4680 fi
4681
4682 if test -f "$nlist"S; then
4683 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
4684 else
4685 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
4686 fi
4687
4688 $echo >> "$output_objdir/$dlsyms" "\
4689
4690 #undef lt_preloaded_symbols
4691
4692 #if defined (__STDC__) && __STDC__
4693 # define lt_ptr void *
4694 #else
4695 # define lt_ptr char *
4696 # define const
4697 #endif
4698
4699 /* The mapping between symbol names and symbols. */
4700 "
4701
4702 case $host in
4703 *cygwin* | *mingw* )
4704 $echo >> "$output_objdir/$dlsyms" "\
4705 /* DATA imports from DLLs on WIN32 can't be const, because
4706 runtime relocations are performed -- see ld's documentation
4707 on pseudo-relocs */
4708 struct {
4709 "
4710 ;;
4711 * )
4712 $echo >> "$output_objdir/$dlsyms" "\
4713 const struct {
4714 "
4715 ;;
4716 esac
4717
4718
4719 $echo >> "$output_objdir/$dlsyms" "\
4720 const char *name;
4721 lt_ptr address;
4722 }
4723 lt_preloaded_symbols[] =
4724 {\
4725 "
4726
4727 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
4728
4729 $echo >> "$output_objdir/$dlsyms" "\
4730 {0, (lt_ptr) 0}
4731 };
4732
4733 /* This works around a problem in FreeBSD linker */
4734 #ifdef FREEBSD_WORKAROUND
4735 static const void *lt_preloaded_setup() {
4736 return lt_preloaded_symbols;
4737 }
4738 #endif
4739
4740 #ifdef __cplusplus
4741 }
4742 #endif\
4743 "
4744 fi
4745
4746 pic_flag_for_symtable=
4747 case $host in
4748 # compiling the symbol table file with pic_flag works around
4749 # a FreeBSD bug that causes programs to crash when -lm is
4750 # linked before any other PIC object. But we must not use
4751 # pic_flag when linking with -static. The problem exists in
4752 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
4753 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
4754 case "$compile_command " in
4755 *" -static "*) ;;
4756 *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
4757 esac;;
4758 *-*-hpux*)
4759 case "$compile_command " in
4760 *" -static "*) ;;
4761 *) pic_flag_for_symtable=" $pic_flag";;
4762 esac
4763 esac
4764
4765 # Now compile the dynamic symbol file.
4766 $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
4767 $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
4768
4769 # Clean up the generated files.
4770 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
4771 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
4772
4773 # Transform the symbol file into the correct name.
4774 case $host in
4775 *cygwin* | *mingw* )
4776 if test -f "$output_objdir/${outputname}.def" ; then
4777 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
4778 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
4779 else
4780 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4781 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4782 fi
4783 ;;
4784 * )
4785 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4786 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4787 ;;
4788 esac
4789 ;;
4790 *)
4791 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
4792 exit $EXIT_FAILURE
4793 ;;
4794 esac
4795 else
4796 # We keep going just in case the user didn't refer to
4797 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
4798 # really was required.
4799
4800 # Nullify the symbol file.
4801 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
4802 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
4803 fi
4804
4805 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
4806 # Replace the output file specification.
4807 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
4808 link_command="$compile_command$compile_rpath"
4809
4810 # We have no uninstalled library dependencies, so finalize right now.
4811 $show "$link_command"
4812 $run eval "$link_command"
4813 exit_status=$?
4814
4815 # Delete the generated files.
4816 if test -n "$dlsyms"; then
4817 $show "$rm $output_objdir/${outputname}S.${objext}"
4818 $run $rm "$output_objdir/${outputname}S.${objext}"
4819 fi
4820
4821 exit $exit_status
4822 fi
4823
4824 if test -n "$shlibpath_var"; then
4825 # We should set the shlibpath_var
4826 rpath=
4827 for dir in $temp_rpath; do
4828 case $dir in
4829 [\\/]* | [A-Za-z]:[\\/]*)
4830 # Absolute path.
4831 rpath="$rpath$dir:"
4832 ;;
4833 *)
4834 # Relative path: add a thisdir entry.
4835 rpath="$rpath\$thisdir/$dir:"
4836 ;;
4837 esac
4838 done
4839 temp_rpath="$rpath"
4840 fi
4841
4842 if test -n "$compile_shlibpath$finalize_shlibpath"; then
4843 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
4844 fi
4845 if test -n "$finalize_shlibpath"; then
4846 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
4847 fi
4848
4849 compile_var=
4850 finalize_var=
4851 if test -n "$runpath_var"; then
4852 if test -n "$perm_rpath"; then
4853 # We should set the runpath_var.
4854 rpath=
4855 for dir in $perm_rpath; do
4856 rpath="$rpath$dir:"
4857 done
4858 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
4859 fi
4860 if test -n "$finalize_perm_rpath"; then
4861 # We should set the runpath_var.
4862 rpath=
4863 for dir in $finalize_perm_rpath; do
4864 rpath="$rpath$dir:"
4865 done
4866 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
4867 fi
4868 fi
4869
4870 if test "$no_install" = yes; then
4871 # We don't need to create a wrapper script.
4872 link_command="$compile_var$compile_command$compile_rpath"
4873 # Replace the output file specification.
4874 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4875 # Delete the old output file.
4876 $run $rm $output
4877 # Link the executable and exit
4878 $show "$link_command"
4879 $run eval "$link_command" || exit $?
4880 exit $EXIT_SUCCESS
4881 fi
4882
4883 if test "$hardcode_action" = relink; then
4884 # Fast installation is not supported
4885 link_command="$compile_var$compile_command$compile_rpath"
4886 relink_command="$finalize_var$finalize_command$finalize_rpath"
4887
4888 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
4889 $echo "$modename: \`$output' will be relinked during installation" 1>&2
4890 else
4891 if test "$fast_install" != no; then
4892 link_command="$finalize_var$compile_command$finalize_rpath"
4893 if test "$fast_install" = yes; then
4894 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
4895 else
4896 # fast_install is set to needless
4897 relink_command=
4898 fi
4899 else
4900 link_command="$compile_var$compile_command$compile_rpath"
4901 relink_command="$finalize_var$finalize_command$finalize_rpath"
4902 fi
4903 fi
4904
4905 # Replace the output file specification.
4906 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
4907
4908 # Delete the old output files.
4909 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
4910
4911 $show "$link_command"
4912 $run eval "$link_command" || exit $?
4913
4914 # Now create the wrapper script.
4915 $show "creating $output"
4916
4917 # Quote the relink command for shipping.
4918 if test -n "$relink_command"; then
4919 # Preserve any variables that may affect compiler behavior
4920 for var in $variables_saved_for_relink; do
4921 if eval test -z \"\${$var+set}\"; then
4922 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
4923 elif eval var_value=\$$var; test -z "$var_value"; then
4924 relink_command="$var=; export $var; $relink_command"
4925 else
4926 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
4927 relink_command="$var=\"$var_value\"; export $var; $relink_command"
4928 fi
4929 done
4930 relink_command="(cd `pwd`; $relink_command)"
4931 relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
4932 fi
4933
4934 # Quote $echo for shipping.
4935 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
4936 case $progpath in
4937 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
4938 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
4939 esac
4940 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
4941 else
4942 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
4943 fi
4944
4945 # Only actually do things if our run command is non-null.
4946 if test -z "$run"; then
4947 # win32 will think the script is a binary if it has
4948 # a .exe suffix, so we strip it off here.
4949 case $output in
4950 *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
4951 esac
4952 # test for cygwin because mv fails w/o .exe extensions
4953 case $host in
4954 *cygwin*)
4955 exeext=.exe
4956 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
4957 *) exeext= ;;
4958 esac
4959 case $host in
4960 *cygwin* | *mingw* )
4961 output_name=`basename $output`
4962 output_path=`dirname $output`
4963 cwrappersource="$output_path/$objdir/lt-$output_name.c"
4964 cwrapper="$output_path/$output_name.exe"
4965 $rm $cwrappersource $cwrapper
4966 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
4967
4968 cat > $cwrappersource <<EOF
4969
4970 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
4971 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4972
4973 The $output program cannot be directly executed until all the libtool
4974 libraries that it depends on are installed.
4975
4976 This wrapper executable should never be moved out of the build directory.
4977 If it is, it will not operate correctly.
4978
4979 Currently, it simply execs the wrapper *script* "/bin/sh $output",
4980 but could eventually absorb all of the scripts functionality and
4981 exec $objdir/$outputname directly.
4982 */
4983 EOF
4984 cat >> $cwrappersource<<"EOF"
4985 #include <stdio.h>
4986 #include <stdlib.h>
4987 #include <unistd.h>
4988 #include <malloc.h>
4989 #include <stdarg.h>
4990 #include <assert.h>
4991 #include <string.h>
4992 #include <ctype.h>
4993 #include <sys/stat.h>
4994
4995 #if defined(PATH_MAX)
4996 # define LT_PATHMAX PATH_MAX
4997 #elif defined(MAXPATHLEN)
4998 # define LT_PATHMAX MAXPATHLEN
4999 #else
5000 # define LT_PATHMAX 1024
5001 #endif
5002
5003 #ifndef DIR_SEPARATOR
5004 # define DIR_SEPARATOR '/'
5005 # define PATH_SEPARATOR ':'
5006 #endif
5007
5008 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
5009 defined (__OS2__)
5010 # define HAVE_DOS_BASED_FILE_SYSTEM
5011 # ifndef DIR_SEPARATOR_2
5012 # define DIR_SEPARATOR_2 '\\'
5013 # endif
5014 # ifndef PATH_SEPARATOR_2
5015 # define PATH_SEPARATOR_2 ';'
5016 # endif
5017 #endif
5018
5019 #ifndef DIR_SEPARATOR_2
5020 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
5021 #else /* DIR_SEPARATOR_2 */
5022 # define IS_DIR_SEPARATOR(ch) \
5023 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
5024 #endif /* DIR_SEPARATOR_2 */
5025
5026 #ifndef PATH_SEPARATOR_2
5027 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
5028 #else /* PATH_SEPARATOR_2 */
5029 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
5030 #endif /* PATH_SEPARATOR_2 */
5031
5032 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
5033 #define XFREE(stale) do { \
5034 if (stale) { free ((void *) stale); stale = 0; } \
5035 } while (0)
5036
5037 /* -DDEBUG is fairly common in CFLAGS. */
5038 #undef DEBUG
5039 #if defined DEBUGWRAPPER
5040 # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
5041 #else
5042 # define DEBUG(format, ...)
5043 #endif
5044
5045 const char *program_name = NULL;
5046
5047 void * xmalloc (size_t num);
5048 char * xstrdup (const char *string);
5049 const char * base_name (const char *name);
5050 char * find_executable(const char *wrapper);
5051 int check_executable(const char *path);
5052 char * strendzap(char *str, const char *pat);
5053 void lt_fatal (const char *message, ...);
5054
5055 int
5056 main (int argc, char *argv[])
5057 {
5058 char **newargz;
5059 int i;
5060
5061 program_name = (char *) xstrdup (base_name (argv[0]));
5062 DEBUG("(main) argv[0] : %s\n",argv[0]);
5063 DEBUG("(main) program_name : %s\n",program_name);
5064 newargz = XMALLOC(char *, argc+2);
5065 EOF
5066
5067 cat >> $cwrappersource <<EOF
5068 newargz[0] = (char *) xstrdup("$SHELL");
5069 EOF
5070
5071 cat >> $cwrappersource <<"EOF"
5072 newargz[1] = find_executable(argv[0]);
5073 if (newargz[1] == NULL)
5074 lt_fatal("Couldn't find %s", argv[0]);
5075 DEBUG("(main) found exe at : %s\n",newargz[1]);
5076 /* we know the script has the same name, without the .exe */
5077 /* so make sure newargz[1] doesn't end in .exe */
5078 strendzap(newargz[1],".exe");
5079 for (i = 1; i < argc; i++)
5080 newargz[i+1] = xstrdup(argv[i]);
5081 newargz[argc+1] = NULL;
5082
5083 for (i=0; i<argc+1; i++)
5084 {
5085 DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
5086 ;
5087 }
5088
5089 EOF
5090
5091 case $host_os in
5092 mingw*)
5093 cat >> $cwrappersource <<EOF
5094 execv("$SHELL",(char const **)newargz);
5095 EOF
5096 ;;
5097 *)
5098 cat >> $cwrappersource <<EOF
5099 execv("$SHELL",newargz);
5100 EOF
5101 ;;
5102 esac
5103
5104 cat >> $cwrappersource <<"EOF"
5105 return 127;
5106 }
5107
5108 void *
5109 xmalloc (size_t num)
5110 {
5111 void * p = (void *) malloc (num);
5112 if (!p)
5113 lt_fatal ("Memory exhausted");
5114
5115 return p;
5116 }
5117
5118 char *
5119 xstrdup (const char *string)
5120 {
5121 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
5122 ;
5123 }
5124
5125 const char *
5126 base_name (const char *name)
5127 {
5128 const char *base;
5129
5130 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5131 /* Skip over the disk name in MSDOS pathnames. */
5132 if (isalpha ((unsigned char)name[0]) && name[1] == ':')
5133 name += 2;
5134 #endif
5135
5136 for (base = name; *name; name++)
5137 if (IS_DIR_SEPARATOR (*name))
5138 base = name + 1;
5139 return base;
5140 }
5141
5142 int
5143 check_executable(const char * path)
5144 {
5145 struct stat st;
5146
5147 DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
5148 if ((!path) || (!*path))
5149 return 0;
5150
5151 if ((stat (path, &st) >= 0) &&
5152 (
5153 /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
5154 #if defined (S_IXOTH)
5155 ((st.st_mode & S_IXOTH) == S_IXOTH) ||
5156 #endif
5157 #if defined (S_IXGRP)
5158 ((st.st_mode & S_IXGRP) == S_IXGRP) ||
5159 #endif
5160 ((st.st_mode & S_IXUSR) == S_IXUSR))
5161 )
5162 return 1;
5163 else
5164 return 0;
5165 }
5166
5167 /* Searches for the full path of the wrapper. Returns
5168 newly allocated full path name if found, NULL otherwise */
5169 char *
5170 find_executable (const char* wrapper)
5171 {
5172 int has_slash = 0;
5173 const char* p;
5174 const char* p_next;
5175 /* static buffer for getcwd */
5176 char tmp[LT_PATHMAX + 1];
5177 int tmp_len;
5178 char* concat_name;
5179
5180 DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
5181
5182 if ((wrapper == NULL) || (*wrapper == '\0'))
5183 return NULL;
5184
5185 /* Absolute path? */
5186 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5187 if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
5188 {
5189 concat_name = xstrdup (wrapper);
5190 if (check_executable(concat_name))
5191 return concat_name;
5192 XFREE(concat_name);
5193 }
5194 else
5195 {
5196 #endif
5197 if (IS_DIR_SEPARATOR (wrapper[0]))
5198 {
5199 concat_name = xstrdup (wrapper);
5200 if (check_executable(concat_name))
5201 return concat_name;
5202 XFREE(concat_name);
5203 }
5204 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5205 }
5206 #endif
5207
5208 for (p = wrapper; *p; p++)
5209 if (*p == '/')
5210 {
5211 has_slash = 1;
5212 break;
5213 }
5214 if (!has_slash)
5215 {
5216 /* no slashes; search PATH */
5217 const char* path = getenv ("PATH");
5218 if (path != NULL)
5219 {
5220 for (p = path; *p; p = p_next)
5221 {
5222 const char* q;
5223 size_t p_len;
5224 for (q = p; *q; q++)
5225 if (IS_PATH_SEPARATOR(*q))
5226 break;
5227 p_len = q - p;
5228 p_next = (*q == '\0' ? q : q + 1);
5229 if (p_len == 0)
5230 {
5231 /* empty path: current directory */
5232 if (getcwd (tmp, LT_PATHMAX) == NULL)
5233 lt_fatal ("getcwd failed");
5234 tmp_len = strlen(tmp);
5235 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5236 memcpy (concat_name, tmp, tmp_len);
5237 concat_name[tmp_len] = '/';
5238 strcpy (concat_name + tmp_len + 1, wrapper);
5239 }
5240 else
5241 {
5242 concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
5243 memcpy (concat_name, p, p_len);
5244 concat_name[p_len] = '/';
5245 strcpy (concat_name + p_len + 1, wrapper);
5246 }
5247 if (check_executable(concat_name))
5248 return concat_name;
5249 XFREE(concat_name);
5250 }
5251 }
5252 /* not found in PATH; assume curdir */
5253 }
5254 /* Relative path | not found in path: prepend cwd */
5255 if (getcwd (tmp, LT_PATHMAX) == NULL)
5256 lt_fatal ("getcwd failed");
5257 tmp_len = strlen(tmp);
5258 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5259 memcpy (concat_name, tmp, tmp_len);
5260 concat_name[tmp_len] = '/';
5261 strcpy (concat_name + tmp_len + 1, wrapper);
5262
5263 if (check_executable(concat_name))
5264 return concat_name;
5265 XFREE(concat_name);
5266 return NULL;
5267 }
5268
5269 char *
5270 strendzap(char *str, const char *pat)
5271 {
5272 size_t len, patlen;
5273
5274 assert(str != NULL);
5275 assert(pat != NULL);
5276
5277 len = strlen(str);
5278 patlen = strlen(pat);
5279
5280 if (patlen <= len)
5281 {
5282 str += len - patlen;
5283 if (strcmp(str, pat) == 0)
5284 *str = '\0';
5285 }
5286 return str;
5287 }
5288
5289 static void
5290 lt_error_core (int exit_status, const char * mode,
5291 const char * message, va_list ap)
5292 {
5293 fprintf (stderr, "%s: %s: ", program_name, mode);
5294 vfprintf (stderr, message, ap);
5295 fprintf (stderr, ".\n");
5296
5297 if (exit_status >= 0)
5298 exit (exit_status);
5299 }
5300
5301 void
5302 lt_fatal (const char *message, ...)
5303 {
5304 va_list ap;
5305 va_start (ap, message);
5306 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
5307 va_end (ap);
5308 }
5309 EOF
5310 # we should really use a build-platform specific compiler
5311 # here, but OTOH, the wrappers (shell script and this C one)
5312 # are only useful if you want to execute the "real" binary.
5313 # Since the "real" binary is built for $host, then this
5314 # wrapper might as well be built for $host, too.
5315 $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
5316 ;;
5317 esac
5318 $rm $output
5319 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
5320
5321 $echo > $output "\
5322 #! $SHELL
5323
5324 # $output - temporary wrapper script for $objdir/$outputname
5325 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5326 #
5327 # The $output program cannot be directly executed until all the libtool
5328 # libraries that it depends on are installed.
5329 #
5330 # This wrapper script should never be moved out of the build directory.
5331 # If it is, it will not operate correctly.
5332
5333 # Sed substitution that helps us do robust quoting. It backslashifies
5334 # metacharacters that are still active within double-quoted strings.
5335 Xsed='${SED} -e 1s/^X//'
5336 sed_quote_subst='$sed_quote_subst'
5337
5338 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
5339 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
5340 emulate sh
5341 NULLCMD=:
5342 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
5343 # is contrary to our usage. Disable this feature.
5344 alias -g '\${1+\"\$@\"}'='\"\$@\"'
5345 setopt NO_GLOB_SUBST
5346 else
5347 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
5348 fi
5349 BIN_SH=xpg4; export BIN_SH # for Tru64
5350 DUALCASE=1; export DUALCASE # for MKS sh
5351
5352 # The HP-UX ksh and POSIX shell print the target directory to stdout
5353 # if CDPATH is set.
5354 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5355
5356 relink_command=\"$relink_command\"
5357
5358 # This environment variable determines our operation mode.
5359 if test \"\$libtool_install_magic\" = \"$magic\"; then
5360 # install mode needs the following variable:
5361 notinst_deplibs='$notinst_deplibs'
5362 else
5363 # When we are sourced in execute mode, \$file and \$echo are already set.
5364 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5365 echo=\"$qecho\"
5366 file=\"\$0\"
5367 # Make sure echo works.
5368 if test \"X\$1\" = X--no-reexec; then
5369 # Discard the --no-reexec flag, and continue.
5370 shift
5371 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
5372 # Yippee, \$echo works!
5373 :
5374 else
5375 # Restart under the correct shell, and then maybe \$echo will work.
5376 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
5377 fi
5378 fi\
5379 "
5380 $echo >> $output "\
5381
5382 # Find the directory that this script lives in.
5383 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
5384 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5385
5386 # Follow symbolic links until we get to the real thisdir.
5387 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
5388 while test -n \"\$file\"; do
5389 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
5390
5391 # If there was a directory component, then change thisdir.
5392 if test \"x\$destdir\" != \"x\$file\"; then
5393 case \"\$destdir\" in
5394 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5395 *) thisdir=\"\$thisdir/\$destdir\" ;;
5396 esac
5397 fi
5398
5399 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
5400 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
5401 done
5402
5403 # Try to get the absolute directory name.
5404 absdir=\`cd \"\$thisdir\" && pwd\`
5405 test -n \"\$absdir\" && thisdir=\"\$absdir\"
5406 "
5407
5408 if test "$fast_install" = yes; then
5409 $echo >> $output "\
5410 program=lt-'$outputname'$exeext
5411 progdir=\"\$thisdir/$objdir\"
5412
5413 if test ! -f \"\$progdir/\$program\" || \\
5414 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5415 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5416
5417 file=\"\$\$-\$program\"
5418
5419 if test ! -d \"\$progdir\"; then
5420 $mkdir \"\$progdir\"
5421 else
5422 $rm \"\$progdir/\$file\"
5423 fi"
5424
5425 $echo >> $output "\
5426
5427 # relink executable if necessary
5428 if test -n \"\$relink_command\"; then
5429 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5430 else
5431 $echo \"\$relink_command_output\" >&2
5432 $rm \"\$progdir/\$file\"
5433 exit $EXIT_FAILURE
5434 fi
5435 fi
5436
5437 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5438 { $rm \"\$progdir/\$program\";
5439 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5440 $rm \"\$progdir/\$file\"
5441 fi"
5442 else
5443 $echo >> $output "\
5444 program='$outputname'
5445 progdir=\"\$thisdir/$objdir\"
5446 "
5447 fi
5448
5449 $echo >> $output "\
5450
5451 if test -f \"\$progdir/\$program\"; then"
5452
5453 # Export our shlibpath_var if we have one.
5454 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5455 $echo >> $output "\
5456 # Add our own library path to $shlibpath_var
5457 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5458
5459 # Some systems cannot cope with colon-terminated $shlibpath_var
5460 # The second colon is a workaround for a bug in BeOS R4 sed
5461 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
5462
5463 export $shlibpath_var
5464 "
5465 fi
5466
5467 # fixup the dll searchpath if we need to.
5468 if test -n "$dllsearchpath"; then
5469 $echo >> $output "\
5470 # Add the dll search path components to the executable PATH
5471 PATH=$dllsearchpath:\$PATH
5472 "
5473 fi
5474
5475 $echo >> $output "\
5476 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5477 # Run the actual program with our arguments.
5478 "
5479 case $host in
5480 # Backslashes separate directories on plain windows
5481 *-*-mingw | *-*-os2*)
5482 $echo >> $output "\
5483 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
5484 "
5485 ;;
5486
5487 *)
5488 $echo >> $output "\
5489 exec \"\$progdir/\$program\" \${1+\"\$@\"}
5490 "
5491 ;;
5492 esac
5493 $echo >> $output "\
5494 \$echo \"\$0: cannot exec \$program \$*\"
5495 exit $EXIT_FAILURE
5496 fi
5497 else
5498 # The program doesn't exist.
5499 \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
5500 \$echo \"This script is just a wrapper for \$program.\" 1>&2
5501 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5502 exit $EXIT_FAILURE
5503 fi
5504 fi\
5505 "
5506 chmod +x $output
5507 fi
5508 exit $EXIT_SUCCESS
5509 ;;
5510 esac
5511
5512 # See if we need to build an old-fashioned archive.
5513 for oldlib in $oldlibs; do
5514
5515 if test "$build_libtool_libs" = convenience; then
5516 oldobjs="$libobjs_save"
5517 addlibs="$convenience"
5518 build_libtool_libs=no
5519 else
5520 if test "$build_libtool_libs" = module; then
5521 oldobjs="$libobjs_save"
5522 build_libtool_libs=no
5523 else
5524 oldobjs="$old_deplibs $non_pic_objects"
5525 fi
5526 addlibs="$old_convenience"
5527 fi
5528
5529 if test -n "$addlibs"; then
5530 gentop="$output_objdir/${outputname}x"
5531 generated="$generated $gentop"
5532
5533 func_extract_archives $gentop $addlibs
5534 oldobjs="$oldobjs $func_extract_archives_result"
5535 fi
5536
5537 # Do each command in the archive commands.
5538 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5539 cmds=$old_archive_from_new_cmds
5540 else
5541 # POSIX demands no paths to be encoded in archives. We have
5542 # to avoid creating archives with duplicate basenames if we
5543 # might have to extract them afterwards, e.g., when creating a
5544 # static archive out of a convenience library, or when linking
5545 # the entirety of a libtool archive into another (currently
5546 # not supported by libtool).
5547 if (for obj in $oldobjs
5548 do
5549 $echo "X$obj" | $Xsed -e 's%^.*/%%'
5550 done | sort | sort -uc >/dev/null 2>&1); then
5551 :
5552 else
5553 $echo "copying selected object files to avoid basename conflicts..."
5554
5555 if test -z "$gentop"; then
5556 gentop="$output_objdir/${outputname}x"
5557 generated="$generated $gentop"
5558
5559 $show "${rm}r $gentop"
5560 $run ${rm}r "$gentop"
5561 $show "$mkdir $gentop"
5562 $run $mkdir "$gentop"
5563 exit_status=$?
5564 if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
5565 exit $exit_status
5566 fi
5567 fi
5568
5569 save_oldobjs=$oldobjs
5570 oldobjs=
5571 counter=1
5572 for obj in $save_oldobjs
5573 do
5574 objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
5575 case " $oldobjs " in
5576 " ") oldobjs=$obj ;;
5577 *[\ /]"$objbase "*)
5578 while :; do
5579 # Make sure we don't pick an alternate name that also
5580 # overlaps.
5581 newobj=lt$counter-$objbase
5582 counter=`expr $counter + 1`
5583 case " $oldobjs " in
5584 *[\ /]"$newobj "*) ;;
5585 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
5586 esac
5587 done
5588 $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5589 $run ln "$obj" "$gentop/$newobj" ||
5590 $run cp "$obj" "$gentop/$newobj"
5591 oldobjs="$oldobjs $gentop/$newobj"
5592 ;;
5593 *) oldobjs="$oldobjs $obj" ;;
5594 esac
5595 done
5596 fi
5597
5598 eval cmds=\"$old_archive_cmds\"
5599
5600 if len=`expr "X$cmds" : ".*"` &&
5601 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5602 cmds=$old_archive_cmds
5603 else
5604 # the command line is too long to link in one step, link in parts
5605 $echo "using piecewise archive linking..."
5606 save_RANLIB=$RANLIB
5607 RANLIB=:
5608 objlist=
5609 concat_cmds=
5610 save_oldobjs=$oldobjs
5611
5612 # Is there a better way of finding the last object in the list?
5613 for obj in $save_oldobjs
5614 do
5615 last_oldobj=$obj
5616 done
5617 for obj in $save_oldobjs
5618 do
5619 oldobjs="$objlist $obj"
5620 objlist="$objlist $obj"
5621 eval test_cmds=\"$old_archive_cmds\"
5622 if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
5623 test "$len" -le "$max_cmd_len"; then
5624 :
5625 else
5626 # the above command should be used before it gets too long
5627 oldobjs=$objlist
5628 if test "$obj" = "$last_oldobj" ; then
5629 RANLIB=$save_RANLIB
5630 fi
5631 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
5632 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
5633 objlist=
5634 fi
5635 done
5636 RANLIB=$save_RANLIB
5637 oldobjs=$objlist
5638 if test "X$oldobjs" = "X" ; then
5639 eval cmds=\"\$concat_cmds\"
5640 else
5641 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
5642 fi
5643 fi
5644 fi
5645 save_ifs="$IFS"; IFS='~'
5646 for cmd in $cmds; do
5647 eval cmd=\"$cmd\"
5648 IFS="$save_ifs"
5649 $show "$cmd"
5650 $run eval "$cmd" || exit $?
5651 done
5652 IFS="$save_ifs"
5653 done
5654
5655 if test -n "$generated"; then
5656 $show "${rm}r$generated"
5657 $run ${rm}r$generated
5658 fi
5659
5660 # Now create the libtool archive.
5661 case $output in
5662 *.la)
5663 old_library=
5664 test "$build_old_libs" = yes && old_library="$libname.$libext"
5665 $show "creating $output"
5666
5667 # Preserve any variables that may affect compiler behavior
5668 for var in $variables_saved_for_relink; do
5669 if eval test -z \"\${$var+set}\"; then
5670 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5671 elif eval var_value=\$$var; test -z "$var_value"; then
5672 relink_command="$var=; export $var; $relink_command"
5673 else
5674 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5675 relink_command="$var=\"$var_value\"; export $var; $relink_command"
5676 fi
5677 done
5678 # Quote the link command for shipping.
5679 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
5680 relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
5681 if test "$hardcode_automatic" = yes ; then
5682 relink_command=
5683 fi
5684
5685
5686 # Only create the output if not a dry run.
5687 if test -z "$run"; then
5688 for installed in no yes; do
5689 if test "$installed" = yes; then
5690 if test -z "$install_libdir"; then
5691 break
5692 fi
5693 output="$output_objdir/$outputname"i
5694 # Replace all uninstalled libtool libraries with the installed ones
5695 newdependency_libs=
5696 for deplib in $dependency_libs; do
5697 case $deplib in
5698 *.la)
5699 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
5700 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5701 if test -z "$libdir"; then
5702 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
5703 exit $EXIT_FAILURE
5704 fi
5705 newdependency_libs="$newdependency_libs $libdir/$name"
5706 ;;
5707 *) newdependency_libs="$newdependency_libs $deplib" ;;
5708 esac
5709 done
5710 dependency_libs="$newdependency_libs"
5711 newdlfiles=
5712 for lib in $dlfiles; do
5713 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5714 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5715 if test -z "$libdir"; then
5716 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5717 exit $EXIT_FAILURE
5718 fi
5719 newdlfiles="$newdlfiles $libdir/$name"
5720 done
5721 dlfiles="$newdlfiles"
5722 newdlprefiles=
5723 for lib in $dlprefiles; do
5724 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5725 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5726 if test -z "$libdir"; then
5727 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5728 exit $EXIT_FAILURE
5729 fi
5730 newdlprefiles="$newdlprefiles $libdir/$name"
5731 done
5732 dlprefiles="$newdlprefiles"
5733 else
5734 newdlfiles=
5735 for lib in $dlfiles; do
5736 case $lib in
5737 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5738 *) abs=`pwd`"/$lib" ;;
5739 esac
5740 newdlfiles="$newdlfiles $abs"
5741 done
5742 dlfiles="$newdlfiles"
5743 newdlprefiles=
5744 for lib in $dlprefiles; do
5745 case $lib in
5746 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5747 *) abs=`pwd`"/$lib" ;;
5748 esac
5749 newdlprefiles="$newdlprefiles $abs"
5750 done
5751 dlprefiles="$newdlprefiles"
5752 fi
5753 $rm $output
5754 # place dlname in correct position for cygwin
5755 tdlname=$dlname
5756 case $host,$output,$installed,$module,$dlname in
5757 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
5758 esac
5759 $echo > $output "\
5760 # $outputname - a libtool library file
5761 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5762 #
5763 # Please DO NOT delete this file!
5764 # It is necessary for linking the library.
5765
5766 # The name that we can dlopen(3).
5767 dlname='$tdlname'
5768
5769 # Names of this library.
5770 library_names='$library_names'
5771
5772 # The name of the static archive.
5773 old_library='$old_library'
5774
5775 # Libraries that this one depends upon.
5776 dependency_libs='$dependency_libs'
5777
5778 # Version information for $libname.
5779 current=$current
5780 age=$age
5781 revision=$revision
5782
5783 # Is this an already installed library?
5784 installed=$installed
5785
5786 # Should we warn about portability when linking against -modules?
5787 shouldnotlink=$module
5788
5789 # Files to dlopen/dlpreopen
5790 dlopen='$dlfiles'
5791 dlpreopen='$dlprefiles'
5792
5793 # Directory that this library needs to be installed in:
5794 libdir='$install_libdir'"
5795 if test "$installed" = no && test "$need_relink" = yes; then
5796 $echo >> $output "\
5797 relink_command=\"$relink_command\""
5798 fi
5799 done
5800 fi
5801
5802 # Do a symbolic link so that the libtool archive can be found in
5803 # LD_LIBRARY_PATH before the program is installed.
5804 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
5805 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
5806 ;;
5807 esac
5808 exit $EXIT_SUCCESS
5809 ;;
5810
5811 # libtool install mode
5812 install)
5813 modename="$modename: install"
5814
5815 # There may be an optional sh(1) argument at the beginning of
5816 # install_prog (especially on Windows NT).
5817 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
5818 # Allow the use of GNU shtool's install command.
5819 $echo "X$nonopt" | grep shtool > /dev/null; then
5820 # Aesthetically quote it.
5821 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5822 case $arg in
5823 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5824 arg="\"$arg\""
5825 ;;
5826 esac
5827 install_prog="$arg "
5828 arg="$1"
5829 shift
5830 else
5831 install_prog=
5832 arg=$nonopt
5833 fi
5834
5835 # The real first argument should be the name of the installation program.
5836 # Aesthetically quote it.
5837 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5838 case $arg in
5839 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5840 arg="\"$arg\""
5841 ;;
5842 esac
5843 install_prog="$install_prog$arg"
5844
5845 # We need to accept at least all the BSD install flags.
5846 dest=
5847 files=
5848 opts=
5849 prev=
5850 install_type=
5851 isdir=no
5852 stripme=
5853 for arg
5854 do
5855 if test -n "$dest"; then
5856 files="$files $dest"
5857 dest=$arg
5858 continue
5859 fi
5860
5861 case $arg in
5862 -d) isdir=yes ;;
5863 -f)
5864 case " $install_prog " in
5865 *[\\\ /]cp\ *) ;;
5866 *) prev=$arg ;;
5867 esac
5868 ;;
5869 -g | -m | -o) prev=$arg ;;
5870 -s)
5871 stripme=" -s"
5872 continue
5873 ;;
5874 -*)
5875 ;;
5876 *)
5877 # If the previous option needed an argument, then skip it.
5878 if test -n "$prev"; then
5879 prev=
5880 else
5881 dest=$arg
5882 continue
5883 fi
5884 ;;
5885 esac
5886
5887 # Aesthetically quote the argument.
5888 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5889 case $arg in
5890 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5891 arg="\"$arg\""
5892 ;;
5893 esac
5894 install_prog="$install_prog $arg"
5895 done
5896
5897 if test -z "$install_prog"; then
5898 $echo "$modename: you must specify an install program" 1>&2
5899 $echo "$help" 1>&2
5900 exit $EXIT_FAILURE
5901 fi
5902
5903 if test -n "$prev"; then
5904 $echo "$modename: the \`$prev' option requires an argument" 1>&2
5905 $echo "$help" 1>&2
5906 exit $EXIT_FAILURE
5907 fi
5908
5909 if test -z "$files"; then
5910 if test -z "$dest"; then
5911 $echo "$modename: no file or destination specified" 1>&2
5912 else
5913 $echo "$modename: you must specify a destination" 1>&2
5914 fi
5915 $echo "$help" 1>&2
5916 exit $EXIT_FAILURE
5917 fi
5918
5919 # Strip any trailing slash from the destination.
5920 dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
5921
5922 # Check to see that the destination is a directory.
5923 test -d "$dest" && isdir=yes
5924 if test "$isdir" = yes; then
5925 destdir="$dest"
5926 destname=
5927 else
5928 destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
5929 test "X$destdir" = "X$dest" && destdir=.
5930 destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
5931
5932 # Not a directory, so check to see that there is only one file specified.
5933 set dummy $files
5934 if test "$#" -gt 2; then
5935 $echo "$modename: \`$dest' is not a directory" 1>&2
5936 $echo "$help" 1>&2
5937 exit $EXIT_FAILURE
5938 fi
5939 fi
5940 case $destdir in
5941 [\\/]* | [A-Za-z]:[\\/]*) ;;
5942 *)
5943 for file in $files; do
5944 case $file in
5945 *.lo) ;;
5946 *)
5947 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
5948 $echo "$help" 1>&2
5949 exit $EXIT_FAILURE
5950 ;;
5951 esac
5952 done
5953 ;;
5954 esac
5955
5956 # This variable tells wrapper scripts just to set variables rather
5957 # than running their programs.
5958 libtool_install_magic="$magic"
5959
5960 staticlibs=
5961 future_libdirs=
5962 current_libdirs=
5963 for file in $files; do
5964
5965 # Do each installation.
5966 case $file in
5967 *.$libext)
5968 # Do the static libraries later.
5969 staticlibs="$staticlibs $file"
5970 ;;
5971
5972 *.la)
5973 # Check to see that this really is a libtool archive.
5974 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
5975 else
5976 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
5977 $echo "$help" 1>&2
5978 exit $EXIT_FAILURE
5979 fi
5980
5981 library_names=
5982 old_library=
5983 relink_command=
5984 # If there is no directory component, then add one.
5985 case $file in
5986 */* | *\\*) . $file ;;
5987 *) . ./$file ;;
5988 esac
5989
5990 # Add the libdir to current_libdirs if it is the destination.
5991 if test "X$destdir" = "X$libdir"; then
5992 case "$current_libdirs " in
5993 *" $libdir "*) ;;
5994 *) current_libdirs="$current_libdirs $libdir" ;;
5995 esac
5996 else
5997 # Note the libdir as a future libdir.
5998 case "$future_libdirs " in
5999 *" $libdir "*) ;;
6000 *) future_libdirs="$future_libdirs $libdir" ;;
6001 esac
6002 fi
6003
6004 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
6005 test "X$dir" = "X$file/" && dir=
6006 dir="$dir$objdir"
6007
6008 if test -n "$relink_command"; then
6009 # Determine the prefix the user has applied to our future dir.
6010 inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
6011
6012 # Don't allow the user to place us outside of our expected
6013 # location b/c this prevents finding dependent libraries that
6014 # are installed to the same prefix.
6015 # At present, this check doesn't affect windows .dll's that
6016 # are installed into $libdir/../bin (currently, that works fine)
6017 # but it's something to keep an eye on.
6018 if test "$inst_prefix_dir" = "$destdir"; then
6019 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
6020 exit $EXIT_FAILURE
6021 fi
6022
6023 if test -n "$inst_prefix_dir"; then
6024 # Stick the inst_prefix_dir data into the link command.
6025 relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
6026 else
6027 relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
6028 fi
6029
6030 $echo "$modename: warning: relinking \`$file'" 1>&2
6031 $show "$relink_command"
6032 if $run eval "$relink_command"; then :
6033 else
6034 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6035 exit $EXIT_FAILURE
6036 fi
6037 fi
6038
6039 # See the names of the shared library.
6040 set dummy $library_names
6041 if test -n "$2"; then
6042 realname="$2"
6043 shift
6044 shift
6045
6046 srcname="$realname"
6047 test -n "$relink_command" && srcname="$realname"T
6048
6049 # Install the shared library and build the symlinks.
6050 $show "$install_prog $dir/$srcname $destdir/$realname"
6051 $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
6052 if test -n "$stripme" && test -n "$striplib"; then
6053 $show "$striplib $destdir/$realname"
6054 $run eval "$striplib $destdir/$realname" || exit $?
6055 fi
6056
6057 if test "$#" -gt 0; then
6058 # Delete the old symlinks, and create new ones.
6059 # Try `ln -sf' first, because the `ln' binary might depend on
6060 # the symlink we replace! Solaris /bin/ln does not understand -f,
6061 # so we also need to try rm && ln -s.
6062 for linkname
6063 do
6064 if test "$linkname" != "$realname"; then
6065 $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
6066 $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
6067 fi
6068 done
6069 fi
6070
6071 # Do each command in the postinstall commands.
6072 lib="$destdir/$realname"
6073 cmds=$postinstall_cmds
6074 save_ifs="$IFS"; IFS='~'
6075 for cmd in $cmds; do
6076 IFS="$save_ifs"
6077 eval cmd=\"$cmd\"
6078 $show "$cmd"
6079 $run eval "$cmd" || {
6080 lt_exit=$?
6081
6082 # Restore the uninstalled library and exit
6083 if test "$mode" = relink; then
6084 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
6085 fi
6086
6087 exit $lt_exit
6088 }
6089 done
6090 IFS="$save_ifs"
6091 fi
6092
6093 # Install the pseudo-library for information purposes.
6094 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6095 instname="$dir/$name"i
6096 $show "$install_prog $instname $destdir/$name"
6097 $run eval "$install_prog $instname $destdir/$name" || exit $?
6098
6099 # Maybe install the static library, too.
6100 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
6101 ;;
6102
6103 *.lo)
6104 # Install (i.e. copy) a libtool object.
6105
6106 # Figure out destination file name, if it wasn't already specified.
6107 if test -n "$destname"; then
6108 destfile="$destdir/$destname"
6109 else
6110 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6111 destfile="$destdir/$destfile"
6112 fi
6113
6114 # Deduce the name of the destination old-style object file.
6115 case $destfile in
6116 *.lo)
6117 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
6118 ;;
6119 *.$objext)
6120 staticdest="$destfile"
6121 destfile=
6122 ;;
6123 *)
6124 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
6125 $echo "$help" 1>&2
6126 exit $EXIT_FAILURE
6127 ;;
6128 esac
6129
6130 # Install the libtool object if requested.
6131 if test -n "$destfile"; then
6132 $show "$install_prog $file $destfile"
6133 $run eval "$install_prog $file $destfile" || exit $?
6134 fi
6135
6136 # Install the old object if enabled.
6137 if test "$build_old_libs" = yes; then
6138 # Deduce the name of the old-style object file.
6139 staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
6140
6141 $show "$install_prog $staticobj $staticdest"
6142 $run eval "$install_prog \$staticobj \$staticdest" || exit $?
6143 fi
6144 exit $EXIT_SUCCESS
6145 ;;
6146
6147 *)
6148 # Figure out destination file name, if it wasn't already specified.
6149 if test -n "$destname"; then
6150 destfile="$destdir/$destname"
6151 else
6152 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6153 destfile="$destdir/$destfile"
6154 fi
6155
6156 # If the file is missing, and there is a .exe on the end, strip it
6157 # because it is most likely a libtool script we actually want to
6158 # install
6159 stripped_ext=""
6160 case $file in
6161 *.exe)
6162 if test ! -f "$file"; then
6163 file=`$echo $file|${SED} 's,.exe$,,'`
6164 stripped_ext=".exe"
6165 fi
6166 ;;
6167 esac
6168
6169 # Do a test to see if this is really a libtool program.
6170 case $host in
6171 *cygwin*|*mingw*)
6172 wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
6173 ;;
6174 *)
6175 wrapper=$file
6176 ;;
6177 esac
6178 if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
6179 notinst_deplibs=
6180 relink_command=
6181
6182 # Note that it is not necessary on cygwin/mingw to append a dot to
6183 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6184 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6185 # `FILE.' does not work on cygwin managed mounts.
6186 #
6187 # If there is no directory component, then add one.
6188 case $wrapper in
6189 */* | *\\*) . ${wrapper} ;;
6190 *) . ./${wrapper} ;;
6191 esac
6192
6193 # Check the variables that should have been set.
6194 if test -z "$notinst_deplibs"; then
6195 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
6196 exit $EXIT_FAILURE
6197 fi
6198
6199 finalize=yes
6200 for lib in $notinst_deplibs; do
6201 # Check to see that each library is installed.
6202 libdir=
6203 if test -f "$lib"; then
6204 # If there is no directory component, then add one.
6205 case $lib in
6206 */* | *\\*) . $lib ;;
6207 *) . ./$lib ;;
6208 esac
6209 fi
6210 libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
6211 if test -n "$libdir" && test ! -f "$libfile"; then
6212 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
6213 finalize=no
6214 fi
6215 done
6216
6217 relink_command=
6218 # Note that it is not necessary on cygwin/mingw to append a dot to
6219 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6220 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6221 # `FILE.' does not work on cygwin managed mounts.
6222 #
6223 # If there is no directory component, then add one.
6224 case $wrapper in
6225 */* | *\\*) . ${wrapper} ;;
6226 *) . ./${wrapper} ;;
6227 esac
6228
6229 outputname=
6230 if test "$fast_install" = no && test -n "$relink_command"; then
6231 if test "$finalize" = yes && test -z "$run"; then
6232 tmpdir=`func_mktempdir`
6233 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6234 outputname="$tmpdir/$file"
6235 # Replace the output file specification.
6236 relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
6237
6238 $show "$relink_command"
6239 if $run eval "$relink_command"; then :
6240 else
6241 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6242 ${rm}r "$tmpdir"
6243 continue
6244 fi
6245 file="$outputname"
6246 else
6247 $echo "$modename: warning: cannot relink \`$file'" 1>&2
6248 fi
6249 else
6250 # Install the binary that we compiled earlier.
6251 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
6252 fi
6253 fi
6254
6255 # remove .exe since cygwin /usr/bin/install will append another
6256 # one anyway
6257 case $install_prog,$host in
6258 */usr/bin/install*,*cygwin*)
6259 case $file:$destfile in
6260 *.exe:*.exe)
6261 # this is ok
6262 ;;
6263 *.exe:*)
6264 destfile=$destfile.exe
6265 ;;
6266 *:*.exe)
6267 destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
6268 ;;
6269 esac
6270 ;;
6271 esac
6272 $show "$install_prog$stripme $file $destfile"
6273 $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
6274 test -n "$outputname" && ${rm}r "$tmpdir"
6275 ;;
6276 esac
6277 done
6278
6279 for file in $staticlibs; do
6280 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6281
6282 # Set up the ranlib parameters.
6283 oldlib="$destdir/$name"
6284
6285 $show "$install_prog $file $oldlib"
6286 $run eval "$install_prog \$file \$oldlib" || exit $?
6287
6288 if test -n "$stripme" && test -n "$old_striplib"; then
6289 $show "$old_striplib $oldlib"
6290 $run eval "$old_striplib $oldlib" || exit $?
6291 fi
6292
6293 # Do each command in the postinstall commands.
6294 cmds=$old_postinstall_cmds
6295 save_ifs="$IFS"; IFS='~'
6296 for cmd in $cmds; do
6297 IFS="$save_ifs"
6298 eval cmd=\"$cmd\"
6299 $show "$cmd"
6300 $run eval "$cmd" || exit $?
6301 done
6302 IFS="$save_ifs"
6303 done
6304
6305 if test -n "$future_libdirs"; then
6306 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
6307 fi
6308
6309 if test -n "$current_libdirs"; then
6310 # Maybe just do a dry run.
6311 test -n "$run" && current_libdirs=" -n$current_libdirs"
6312 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
6313 else
6314 exit $EXIT_SUCCESS
6315 fi
6316 ;;
6317
6318 # libtool finish mode
6319 finish)
6320 modename="$modename: finish"
6321 libdirs="$nonopt"
6322 admincmds=
6323
6324 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
6325 for dir
6326 do
6327 libdirs="$libdirs $dir"
6328 done
6329
6330 for libdir in $libdirs; do
6331 if test -n "$finish_cmds"; then
6332 # Do each command in the finish commands.
6333 cmds=$finish_cmds
6334 save_ifs="$IFS"; IFS='~'
6335 for cmd in $cmds; do
6336 IFS="$save_ifs"
6337 eval cmd=\"$cmd\"
6338 $show "$cmd"
6339 $run eval "$cmd" || admincmds="$admincmds
6340 $cmd"
6341 done
6342 IFS="$save_ifs"
6343 fi
6344 if test -n "$finish_eval"; then
6345 # Do the single finish_eval.
6346 eval cmds=\"$finish_eval\"
6347 $run eval "$cmds" || admincmds="$admincmds
6348 $cmds"
6349 fi
6350 done
6351 fi
6352
6353 # Exit here if they wanted silent mode.
6354 test "$show" = : && exit $EXIT_SUCCESS
6355
6356 $echo "X----------------------------------------------------------------------" | $Xsed
6357 $echo "Libraries have been installed in:"
6358 for libdir in $libdirs; do
6359 $echo " $libdir"
6360 done
6361 $echo
6362 $echo "If you ever happen to want to link against installed libraries"
6363 $echo "in a given directory, LIBDIR, you must either use libtool, and"
6364 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
6365 $echo "flag during linking and do at least one of the following:"
6366 if test -n "$shlibpath_var"; then
6367 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
6368 $echo " during execution"
6369 fi
6370 if test -n "$runpath_var"; then
6371 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
6372 $echo " during linking"
6373 fi
6374 if test -n "$hardcode_libdir_flag_spec"; then
6375 libdir=LIBDIR
6376 eval flag=\"$hardcode_libdir_flag_spec\"
6377
6378 $echo " - use the \`$flag' linker flag"
6379 fi
6380 if test -n "$admincmds"; then
6381 $echo " - have your system administrator run these commands:$admincmds"
6382 fi
6383 if test -f /etc/ld.so.conf; then
6384 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
6385 fi
6386 $echo
6387 $echo "See any operating system documentation about shared libraries for"
6388 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
6389 $echo "X----------------------------------------------------------------------" | $Xsed
6390 exit $EXIT_SUCCESS
6391 ;;
6392
6393 # libtool execute mode
6394 execute)
6395 modename="$modename: execute"
6396
6397 # The first argument is the command name.
6398 cmd="$nonopt"
6399 if test -z "$cmd"; then
6400 $echo "$modename: you must specify a COMMAND" 1>&2
6401 $echo "$help"
6402 exit $EXIT_FAILURE
6403 fi
6404
6405 # Handle -dlopen flags immediately.
6406 for file in $execute_dlfiles; do
6407 if test ! -f "$file"; then
6408 $echo "$modename: \`$file' is not a file" 1>&2
6409 $echo "$help" 1>&2
6410 exit $EXIT_FAILURE
6411 fi
6412
6413 dir=
6414 case $file in
6415 *.la)
6416 # Check to see that this really is a libtool archive.
6417 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
6418 else
6419 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6420 $echo "$help" 1>&2
6421 exit $EXIT_FAILURE
6422 fi
6423
6424 # Read the libtool library.
6425 dlname=
6426 library_names=
6427
6428 # If there is no directory component, then add one.
6429 case $file in
6430 */* | *\\*) . $file ;;
6431 *) . ./$file ;;
6432 esac
6433
6434 # Skip this library if it cannot be dlopened.
6435 if test -z "$dlname"; then
6436 # Warn if it was a shared library.
6437 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
6438 continue
6439 fi
6440
6441 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6442 test "X$dir" = "X$file" && dir=.
6443
6444 if test -f "$dir/$objdir/$dlname"; then
6445 dir="$dir/$objdir"
6446 else
6447 if test ! -f "$dir/$dlname"; then
6448 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6449 exit $EXIT_FAILURE
6450 fi
6451 fi
6452 ;;
6453
6454 *.lo)
6455 # Just add the directory containing the .lo file.
6456 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6457 test "X$dir" = "X$file" && dir=.
6458 ;;
6459
6460 *)
6461 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
6462 continue
6463 ;;
6464 esac
6465
6466 # Get the absolute pathname.
6467 absdir=`cd "$dir" && pwd`
6468 test -n "$absdir" && dir="$absdir"
6469
6470 # Now add the directory to shlibpath_var.
6471 if eval "test -z \"\$$shlibpath_var\""; then
6472 eval "$shlibpath_var=\"\$dir\""
6473 else
6474 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
6475 fi
6476 done
6477
6478 # This variable tells wrapper scripts just to set shlibpath_var
6479 # rather than running their programs.
6480 libtool_execute_magic="$magic"
6481
6482 # Check if any of the arguments is a wrapper script.
6483 args=
6484 for file
6485 do
6486 case $file in
6487 -*) ;;
6488 *)
6489 # Do a test to see if this is really a libtool program.
6490 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6491 # If there is no directory component, then add one.
6492 case $file in
6493 */* | *\\*) . $file ;;
6494 *) . ./$file ;;
6495 esac
6496
6497 # Transform arg to wrapped name.
6498 file="$progdir/$program"
6499 fi
6500 ;;
6501 esac
6502 # Quote arguments (to preserve shell metacharacters).
6503 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
6504 args="$args \"$file\""
6505 done
6506
6507 if test -z "$run"; then
6508 if test -n "$shlibpath_var"; then
6509 # Export the shlibpath_var.
6510 eval "export $shlibpath_var"
6511 fi
6512
6513 # Restore saved environment variables
6514 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
6515 do
6516 eval "if test \"\${save_$lt_var+set}\" = set; then
6517 $lt_var=\$save_$lt_var; export $lt_var
6518 fi"
6519 done
6520
6521 # Now prepare to actually exec the command.
6522 exec_cmd="\$cmd$args"
6523 else
6524 # Display what would be done.
6525 if test -n "$shlibpath_var"; then
6526 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
6527 $echo "export $shlibpath_var"
6528 fi
6529 $echo "$cmd$args"
6530 exit $EXIT_SUCCESS
6531 fi
6532 ;;
6533
6534 # libtool clean and uninstall mode
6535 clean | uninstall)
6536 modename="$modename: $mode"
6537 rm="$nonopt"
6538 files=
6539 rmforce=
6540 exit_status=0
6541
6542 # This variable tells wrapper scripts just to set variables rather
6543 # than running their programs.
6544 libtool_install_magic="$magic"
6545
6546 for arg
6547 do
6548 case $arg in
6549 -f) rm="$rm $arg"; rmforce=yes ;;
6550 -*) rm="$rm $arg" ;;
6551 *) files="$files $arg" ;;
6552 esac
6553 done
6554
6555 if test -z "$rm"; then
6556 $echo "$modename: you must specify an RM program" 1>&2
6557 $echo "$help" 1>&2
6558 exit $EXIT_FAILURE
6559 fi
6560
6561 rmdirs=
6562
6563 origobjdir="$objdir"
6564 for file in $files; do
6565 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6566 if test "X$dir" = "X$file"; then
6567 dir=.
6568 objdir="$origobjdir"
6569 else
6570 objdir="$dir/$origobjdir"
6571 fi
6572 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6573 test "$mode" = uninstall && objdir="$dir"
6574
6575 # Remember objdir for removal later, being careful to avoid duplicates
6576 if test "$mode" = clean; then
6577 case " $rmdirs " in
6578 *" $objdir "*) ;;
6579 *) rmdirs="$rmdirs $objdir" ;;
6580 esac
6581 fi
6582
6583 # Don't error if the file doesn't exist and rm -f was used.
6584 if (test -L "$file") >/dev/null 2>&1 \
6585 || (test -h "$file") >/dev/null 2>&1 \
6586 || test -f "$file"; then
6587 :
6588 elif test -d "$file"; then
6589 exit_status=1
6590 continue
6591 elif test "$rmforce" = yes; then
6592 continue
6593 fi
6594
6595 rmfiles="$file"
6596
6597 case $name in
6598 *.la)
6599 # Possibly a libtool archive, so verify it.
6600 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6601 . $dir/$name
6602
6603 # Delete the libtool libraries and symlinks.
6604 for n in $library_names; do
6605 rmfiles="$rmfiles $objdir/$n"
6606 done
6607 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
6608
6609 case "$mode" in
6610 clean)
6611 case " $library_names " in
6612 # " " in the beginning catches empty $dlname
6613 *" $dlname "*) ;;
6614 *) rmfiles="$rmfiles $objdir/$dlname" ;;
6615 esac
6616 test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
6617 ;;
6618 uninstall)
6619 if test -n "$library_names"; then
6620 # Do each command in the postuninstall commands.
6621 cmds=$postuninstall_cmds
6622 save_ifs="$IFS"; IFS='~'
6623 for cmd in $cmds; do
6624 IFS="$save_ifs"
6625 eval cmd=\"$cmd\"
6626 $show "$cmd"
6627 $run eval "$cmd"
6628 if test "$?" -ne 0 && test "$rmforce" != yes; then
6629 exit_status=1
6630 fi
6631 done
6632 IFS="$save_ifs"
6633 fi
6634
6635 if test -n "$old_library"; then
6636 # Do each command in the old_postuninstall commands.
6637 cmds=$old_postuninstall_cmds
6638 save_ifs="$IFS"; IFS='~'
6639 for cmd in $cmds; do
6640 IFS="$save_ifs"
6641 eval cmd=\"$cmd\"
6642 $show "$cmd"
6643 $run eval "$cmd"
6644 if test "$?" -ne 0 && test "$rmforce" != yes; then
6645 exit_status=1
6646 fi
6647 done
6648 IFS="$save_ifs"
6649 fi
6650 # FIXME: should reinstall the best remaining shared library.
6651 ;;
6652 esac
6653 fi
6654 ;;
6655
6656 *.lo)
6657 # Possibly a libtool object, so verify it.
6658 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6659
6660 # Read the .lo file
6661 . $dir/$name
6662
6663 # Add PIC object to the list of files to remove.
6664 if test -n "$pic_object" \
6665 && test "$pic_object" != none; then
6666 rmfiles="$rmfiles $dir/$pic_object"
6667 fi
6668
6669 # Add non-PIC object to the list of files to remove.
6670 if test -n "$non_pic_object" \
6671 && test "$non_pic_object" != none; then
6672 rmfiles="$rmfiles $dir/$non_pic_object"
6673 fi
6674 fi
6675 ;;
6676
6677 *)
6678 if test "$mode" = clean ; then
6679 noexename=$name
6680 case $file in
6681 *.exe)
6682 file=`$echo $file|${SED} 's,.exe$,,'`
6683 noexename=`$echo $name|${SED} 's,.exe$,,'`
6684 # $file with .exe has already been added to rmfiles,
6685 # add $file without .exe
6686 rmfiles="$rmfiles $file"
6687 ;;
6688 esac
6689 # Do a test to see if this is a libtool program.
6690 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6691 relink_command=
6692 . $dir/$noexename
6693
6694 # note $name still contains .exe if it was in $file originally
6695 # as does the version of $file that was added into $rmfiles
6696 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
6697 if test "$fast_install" = yes && test -n "$relink_command"; then
6698 rmfiles="$rmfiles $objdir/lt-$name"
6699 fi
6700 if test "X$noexename" != "X$name" ; then
6701 rmfiles="$rmfiles $objdir/lt-${noexename}.c"
6702 fi
6703 fi
6704 fi
6705 ;;
6706 esac
6707 $show "$rm $rmfiles"
6708 $run $rm $rmfiles || exit_status=1
6709 done
6710 objdir="$origobjdir"
6711
6712 # Try to remove the ${objdir}s in the directories where we deleted files
6713 for dir in $rmdirs; do
6714 if test -d "$dir"; then
6715 $show "rmdir $dir"
6716 $run rmdir $dir >/dev/null 2>&1
6717 fi
6718 done
6719
6720 exit $exit_status
6721 ;;
6722
6723 "")
6724 $echo "$modename: you must specify a MODE" 1>&2
6725 $echo "$generic_help" 1>&2
6726 exit $EXIT_FAILURE
6727 ;;
6728 esac
6729
6730 if test -z "$exec_cmd"; then
6731 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6732 $echo "$generic_help" 1>&2
6733 exit $EXIT_FAILURE
6734 fi
6735 fi # test -z "$show_help"
6736
6737 if test -n "$exec_cmd"; then
6738 eval exec $exec_cmd
6739 exit $EXIT_FAILURE
6740 fi
6741
6742 # We need to display help for each of the modes.
6743 case $mode in
6744 "") $echo \
6745 "Usage: $modename [OPTION]... [MODE-ARG]...
6746
6747 Provide generalized library-building support services.
6748
6749 --config show all configuration variables
6750 --debug enable verbose shell tracing
6751 -n, --dry-run display commands without modifying any files
6752 --features display basic configuration information and exit
6753 --finish same as \`--mode=finish'
6754 --help display this help message and exit
6755 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
6756 --quiet same as \`--silent'
6757 --silent don't print informational messages
6758 --tag=TAG use configuration variables from tag TAG
6759 --version print version information
6760
6761 MODE must be one of the following:
6762
6763 clean remove files from the build directory
6764 compile compile a source file into a libtool object
6765 execute automatically set library path, then run a program
6766 finish complete the installation of libtool libraries
6767 install install libraries or executables
6768 link create a library or an executable
6769 uninstall remove libraries from an installed directory
6770
6771 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
6772 a more detailed description of MODE.
6773
6774 Report bugs to <bug-libtool@gnu.org>."
6775 exit $EXIT_SUCCESS
6776 ;;
6777
6778 clean)
6779 $echo \
6780 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
6781
6782 Remove files from the build directory.
6783
6784 RM is the name of the program to use to delete files associated with each FILE
6785 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6786 to RM.
6787
6788 If FILE is a libtool library, object or program, all the files associated
6789 with it are deleted. Otherwise, only FILE itself is deleted using RM."
6790 ;;
6791
6792 compile)
6793 $echo \
6794 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
6795
6796 Compile a source file into a libtool library object.
6797
6798 This mode accepts the following additional options:
6799
6800 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
6801 -prefer-pic try to building PIC objects only
6802 -prefer-non-pic try to building non-PIC objects only
6803 -static always build a \`.o' file suitable for static linking
6804
6805 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
6806 from the given SOURCEFILE.
6807
6808 The output file name is determined by removing the directory component from
6809 SOURCEFILE, then substituting the C source code suffix \`.c' with the
6810 library object suffix, \`.lo'."
6811 ;;
6812
6813 execute)
6814 $echo \
6815 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
6816
6817 Automatically set library path, then run a program.
6818
6819 This mode accepts the following additional options:
6820
6821 -dlopen FILE add the directory containing FILE to the library path
6822
6823 This mode sets the library path environment variable according to \`-dlopen'
6824 flags.
6825
6826 If any of the ARGS are libtool executable wrappers, then they are translated
6827 into their corresponding uninstalled binary, and any of their required library
6828 directories are added to the library path.
6829
6830 Then, COMMAND is executed, with ARGS as arguments."
6831 ;;
6832
6833 finish)
6834 $echo \
6835 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
6836
6837 Complete the installation of libtool libraries.
6838
6839 Each LIBDIR is a directory that contains libtool libraries.
6840
6841 The commands that this mode executes may require superuser privileges. Use
6842 the \`--dry-run' option if you just want to see what would be executed."
6843 ;;
6844
6845 install)
6846 $echo \
6847 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
6848
6849 Install executables or libraries.
6850
6851 INSTALL-COMMAND is the installation command. The first component should be
6852 either the \`install' or \`cp' program.
6853
6854 The rest of the components are interpreted as arguments to that command (only
6855 BSD-compatible install options are recognized)."
6856 ;;
6857
6858 link)
6859 $echo \
6860 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
6861
6862 Link object files or libraries together to form another library, or to
6863 create an executable program.
6864
6865 LINK-COMMAND is a command using the C compiler that you would use to create
6866 a program from several object files.
6867
6868 The following components of LINK-COMMAND are treated specially:
6869
6870 -all-static do not do any dynamic linking at all
6871 -avoid-version do not add a version suffix if possible
6872 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
6873 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
6874 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
6875 -export-symbols SYMFILE
6876 try to export only the symbols listed in SYMFILE
6877 -export-symbols-regex REGEX
6878 try to export only the symbols matching REGEX
6879 -LLIBDIR search LIBDIR for required installed libraries
6880 -lNAME OUTPUT-FILE requires the installed library libNAME
6881 -module build a library that can dlopened
6882 -no-fast-install disable the fast-install mode
6883 -no-install link a not-installable executable
6884 -no-undefined declare that a library does not refer to external symbols
6885 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
6886 -objectlist FILE Use a list of object files found in FILE to specify objects
6887 -precious-files-regex REGEX
6888 don't remove output files matching REGEX
6889 -release RELEASE specify package release information
6890 -rpath LIBDIR the created library will eventually be installed in LIBDIR
6891 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
6892 -static do not do any dynamic linking of uninstalled libtool libraries
6893 -static-libtool-libs
6894 do not do any dynamic linking of libtool libraries
6895 -version-info CURRENT[:REVISION[:AGE]]
6896 specify library version info [each variable defaults to 0]
6897
6898 All other options (arguments beginning with \`-') are ignored.
6899
6900 Every other argument is treated as a filename. Files ending in \`.la' are
6901 treated as uninstalled libtool libraries, other files are standard or library
6902 object files.
6903
6904 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
6905 only library objects (\`.lo' files) may be specified, and \`-rpath' is
6906 required, except when creating a convenience library.
6907
6908 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
6909 using \`ar' and \`ranlib', or on Windows using \`lib'.
6910
6911 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
6912 is created, otherwise an executable program is created."
6913 ;;
6914
6915 uninstall)
6916 $echo \
6917 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
6918
6919 Remove libraries from an installation directory.
6920
6921 RM is the name of the program to use to delete files associated with each FILE
6922 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6923 to RM.
6924
6925 If FILE is a libtool library, all the files associated with it are deleted.
6926 Otherwise, only FILE itself is deleted using RM."
6927 ;;
6928
6929 *)
6930 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6931 $echo "$help" 1>&2
6932 exit $EXIT_FAILURE
6933 ;;
6934 esac
6935
6936 $echo
6937 $echo "Try \`$modename --help' for more information about other modes."
6938
6939 exit $?
6940
6941 # The TAGs below are defined such that we never get into a situation
6942 # in which we disable both kinds of libraries. Given conflicting
6943 # choices, we go for a static library, that is the most portable,
6944 # since we can't tell whether shared libraries were disabled because
6945 # the user asked for that or because the platform doesn't support
6946 # them. This is particularly important on AIX, because we don't
6947 # support having both static and shared libraries enabled at the same
6948 # time on that platform, so we default to a shared-only configuration.
6949 # If a disable-shared tag is given, we'll fallback to a static-only
6950 # configuration. But we'll never go from static-only to shared-only.
6951
6952 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
6953 disable_libs=shared
6954 # ### END LIBTOOL TAG CONFIG: disable-shared
6955
6956 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
6957 disable_libs=static
6958 # ### END LIBTOOL TAG CONFIG: disable-static
6959
6960 # Local Variables:
6961 # mode:shell-script
6962 # sh-indentation:2
6963 # End:
+0
-367
missing less more
0 #! /bin/sh
1 # Common stub for a few missing GNU programs while installing.
2
3 scriptversion=2006-05-10.23
4
5 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
6 # Free Software Foundation, Inc.
7 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
8
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2, or (at your option)
12 # any later version.
13
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
18
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software
21 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 # 02110-1301, USA.
23
24 # As a special exception to the GNU General Public License, if you
25 # distribute this file as part of a program that contains a
26 # configuration script generated by Autoconf, you may include it under
27 # the same distribution terms that you use for the rest of that program.
28
29 if test $# -eq 0; then
30 echo 1>&2 "Try \`$0 --help' for more information"
31 exit 1
32 fi
33
34 run=:
35 sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
36 sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
37
38 # In the cases where this matters, `missing' is being run in the
39 # srcdir already.
40 if test -f configure.ac; then
41 configure_ac=configure.ac
42 else
43 configure_ac=configure.in
44 fi
45
46 msg="missing on your system"
47
48 case $1 in
49 --run)
50 # Try to run requested program, and just exit if it succeeds.
51 run=
52 shift
53 "$@" && exit 0
54 # Exit code 63 means version mismatch. This often happens
55 # when the user try to use an ancient version of a tool on
56 # a file that requires a minimum version. In this case we
57 # we should proceed has if the program had been absent, or
58 # if --run hadn't been passed.
59 if test $? = 63; then
60 run=:
61 msg="probably too old"
62 fi
63 ;;
64
65 -h|--h|--he|--hel|--help)
66 echo "\
67 $0 [OPTION]... PROGRAM [ARGUMENT]...
68
69 Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
70 error status if there is no known handling for PROGRAM.
71
72 Options:
73 -h, --help display this help and exit
74 -v, --version output version information and exit
75 --run try to run the given command, and emulate it if it fails
76
77 Supported PROGRAM values:
78 aclocal touch file \`aclocal.m4'
79 autoconf touch file \`configure'
80 autoheader touch file \`config.h.in'
81 autom4te touch the output file, or create a stub one
82 automake touch all \`Makefile.in' files
83 bison create \`y.tab.[ch]', if possible, from existing .[ch]
84 flex create \`lex.yy.c', if possible, from existing .c
85 help2man touch the output file
86 lex create \`lex.yy.c', if possible, from existing .c
87 makeinfo touch the output file
88 tar try tar, gnutar, gtar, then tar without non-portable flags
89 yacc create \`y.tab.[ch]', if possible, from existing .[ch]
90
91 Send bug reports to <bug-automake@gnu.org>."
92 exit $?
93 ;;
94
95 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
96 echo "missing $scriptversion (GNU Automake)"
97 exit $?
98 ;;
99
100 -*)
101 echo 1>&2 "$0: Unknown \`$1' option"
102 echo 1>&2 "Try \`$0 --help' for more information"
103 exit 1
104 ;;
105
106 esac
107
108 # Now exit if we have it, but it failed. Also exit now if we
109 # don't have it and --version was passed (most likely to detect
110 # the program).
111 case $1 in
112 lex|yacc)
113 # Not GNU programs, they don't have --version.
114 ;;
115
116 tar)
117 if test -n "$run"; then
118 echo 1>&2 "ERROR: \`tar' requires --run"
119 exit 1
120 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
121 exit 1
122 fi
123 ;;
124
125 *)
126 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
127 # We have it, but it failed.
128 exit 1
129 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
130 # Could not run --version or --help. This is probably someone
131 # running `$TOOL --version' or `$TOOL --help' to check whether
132 # $TOOL exists and not knowing $TOOL uses missing.
133 exit 1
134 fi
135 ;;
136 esac
137
138 # If it does not exist, or fails to run (possibly an outdated version),
139 # try to emulate it.
140 case $1 in
141 aclocal*)
142 echo 1>&2 "\
143 WARNING: \`$1' is $msg. You should only need it if
144 you modified \`acinclude.m4' or \`${configure_ac}'. You might want
145 to install the \`Automake' and \`Perl' packages. Grab them from
146 any GNU archive site."
147 touch aclocal.m4
148 ;;
149
150 autoconf)
151 echo 1>&2 "\
152 WARNING: \`$1' is $msg. You should only need it if
153 you modified \`${configure_ac}'. You might want to install the
154 \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
155 archive site."
156 touch configure
157 ;;
158
159 autoheader)
160 echo 1>&2 "\
161 WARNING: \`$1' is $msg. You should only need it if
162 you modified \`acconfig.h' or \`${configure_ac}'. You might want
163 to install the \`Autoconf' and \`GNU m4' packages. Grab them
164 from any GNU archive site."
165 files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
166 test -z "$files" && files="config.h"
167 touch_files=
168 for f in $files; do
169 case $f in
170 *:*) touch_files="$touch_files "`echo "$f" |
171 sed -e 's/^[^:]*://' -e 's/:.*//'`;;
172 *) touch_files="$touch_files $f.in";;
173 esac
174 done
175 touch $touch_files
176 ;;
177
178 automake*)
179 echo 1>&2 "\
180 WARNING: \`$1' is $msg. You should only need it if
181 you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
182 You might want to install the \`Automake' and \`Perl' packages.
183 Grab them from any GNU archive site."
184 find . -type f -name Makefile.am -print |
185 sed 's/\.am$/.in/' |
186 while read f; do touch "$f"; done
187 ;;
188
189 autom4te)
190 echo 1>&2 "\
191 WARNING: \`$1' is needed, but is $msg.
192 You might have modified some files without having the
193 proper tools for further handling them.
194 You can get \`$1' as part of \`Autoconf' from any GNU
195 archive site."
196
197 file=`echo "$*" | sed -n "$sed_output"`
198 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
199 if test -f "$file"; then
200 touch $file
201 else
202 test -z "$file" || exec >$file
203 echo "#! /bin/sh"
204 echo "# Created by GNU Automake missing as a replacement of"
205 echo "# $ $@"
206 echo "exit 0"
207 chmod +x $file
208 exit 1
209 fi
210 ;;
211
212 bison|yacc)
213 echo 1>&2 "\
214 WARNING: \`$1' $msg. You should only need it if
215 you modified a \`.y' file. You may need the \`Bison' package
216 in order for those modifications to take effect. You can get
217 \`Bison' from any GNU archive site."
218 rm -f y.tab.c y.tab.h
219 if test $# -ne 1; then
220 eval LASTARG="\${$#}"
221 case $LASTARG in
222 *.y)
223 SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
224 if test -f "$SRCFILE"; then
225 cp "$SRCFILE" y.tab.c
226 fi
227 SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
228 if test -f "$SRCFILE"; then
229 cp "$SRCFILE" y.tab.h
230 fi
231 ;;
232 esac
233 fi
234 if test ! -f y.tab.h; then
235 echo >y.tab.h
236 fi
237 if test ! -f y.tab.c; then
238 echo 'main() { return 0; }' >y.tab.c
239 fi
240 ;;
241
242 lex|flex)
243 echo 1>&2 "\
244 WARNING: \`$1' is $msg. You should only need it if
245 you modified a \`.l' file. You may need the \`Flex' package
246 in order for those modifications to take effect. You can get
247 \`Flex' from any GNU archive site."
248 rm -f lex.yy.c
249 if test $# -ne 1; then
250 eval LASTARG="\${$#}"
251 case $LASTARG in
252 *.l)
253 SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
254 if test -f "$SRCFILE"; then
255 cp "$SRCFILE" lex.yy.c
256 fi
257 ;;
258 esac
259 fi
260 if test ! -f lex.yy.c; then
261 echo 'main() { return 0; }' >lex.yy.c
262 fi
263 ;;
264
265 help2man)
266 echo 1>&2 "\
267 WARNING: \`$1' is $msg. You should only need it if
268 you modified a dependency of a manual page. You may need the
269 \`Help2man' package in order for those modifications to take
270 effect. You can get \`Help2man' from any GNU archive site."
271
272 file=`echo "$*" | sed -n "$sed_output"`
273 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
274 if test -f "$file"; then
275 touch $file
276 else
277 test -z "$file" || exec >$file
278 echo ".ab help2man is required to generate this page"
279 exit 1
280 fi
281 ;;
282
283 makeinfo)
284 echo 1>&2 "\
285 WARNING: \`$1' is $msg. You should only need it if
286 you modified a \`.texi' or \`.texinfo' file, or any other file
287 indirectly affecting the aspect of the manual. The spurious
288 call might also be the consequence of using a buggy \`make' (AIX,
289 DU, IRIX). You might want to install the \`Texinfo' package or
290 the \`GNU make' package. Grab either from any GNU archive site."
291 # The file to touch is that specified with -o ...
292 file=`echo "$*" | sed -n "$sed_output"`
293 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
294 if test -z "$file"; then
295 # ... or it is the one specified with @setfilename ...
296 infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
297 file=`sed -n '
298 /^@setfilename/{
299 s/.* \([^ ]*\) *$/\1/
300 p
301 q
302 }' $infile`
303 # ... or it is derived from the source name (dir/f.texi becomes f.info)
304 test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
305 fi
306 # If the file does not exist, the user really needs makeinfo;
307 # let's fail without touching anything.
308 test -f $file || exit 1
309 touch $file
310 ;;
311
312 tar)
313 shift
314
315 # We have already tried tar in the generic part.
316 # Look for gnutar/gtar before invocation to avoid ugly error
317 # messages.
318 if (gnutar --version > /dev/null 2>&1); then
319 gnutar "$@" && exit 0
320 fi
321 if (gtar --version > /dev/null 2>&1); then
322 gtar "$@" && exit 0
323 fi
324 firstarg="$1"
325 if shift; then
326 case $firstarg in
327 *o*)
328 firstarg=`echo "$firstarg" | sed s/o//`
329 tar "$firstarg" "$@" && exit 0
330 ;;
331 esac
332 case $firstarg in
333 *h*)
334 firstarg=`echo "$firstarg" | sed s/h//`
335 tar "$firstarg" "$@" && exit 0
336 ;;
337 esac
338 fi
339
340 echo 1>&2 "\
341 WARNING: I can't seem to be able to run \`tar' with the given arguments.
342 You may want to install GNU tar or Free paxutils, or check the
343 command line arguments."
344 exit 1
345 ;;
346
347 *)
348 echo 1>&2 "\
349 WARNING: \`$1' is needed, and is $msg.
350 You might have modified some files without having the
351 proper tools for further handling them. Check the \`README' file,
352 it often tells you about the needed prerequisites for installing
353 this package. You may also peek at any GNU archive site, in case
354 some other package would contain this missing \`$1' program."
355 exit 1
356 ;;
357 esac
358
359 exit 0
360
361 # Local variables:
362 # eval: (add-hook 'write-file-hooks 'time-stamp)
363 # time-stamp-start: "scriptversion="
364 # time-stamp-format: "%:y-%02m-%02d.%02H"
365 # time-stamp-end: "$"
366 # End:
0 #
1 # Copyright (c) 2001, 2002, 2003, 2004 The SCons Foundation
2 #
3 # Permission is hereby granted, free of charge, to any person obtaining
4 # a copy of this software and associated documentation files (the
5 # "Software"), to deal in the Software without restriction, including
6 # without limitation the rights to use, copy, modify, merge, publish,
7 # distribute, sublicense, and/or sell copies of the Software, and to
8 # permit persons to whom the Software is furnished to do so, subject to
9 # the following conditions:
10 #
11 # The above copyright notice and this permission notice shall be included
12 # in all copies or substantial portions of the Software.
13 #
14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
15 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
16 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 #
22
23 __revision__ = "crossmingw.py 0.96.90.D001 2005/02/15 20:11:37 knight"
24
25 import os
26 import os.path
27 import string
28
29 import SCons.Action
30 import SCons.Builder
31 import SCons.Tool
32 import SCons.Util
33
34 # This is what we search for to find mingw:
35 prefixes = SCons.Util.Split("""
36 mingw32-
37 mingw32msvc-
38 i386-mingw32-
39 i486-mingw32-
40 i586-mingw32-
41 i686-mingw32-
42 i386-mingw32msvc-
43 i486-mingw32msvc-
44 i586-mingw32msvc-
45 i686-mingw32msvc-
46 """)
47
48 def find(env):
49 for prefix in prefixes:
50 # First search in the SCons path and then the OS path:
51 if env.WhereIs(prefix + 'gcc') or SCons.Util.WhereIs(prefix + 'gcc'):
52 return prefix
53
54 return ''
55
56 def shlib_generator(target, source, env, for_signature):
57 cmd = SCons.Util.CLVar(['$SHLINK', '$SHLINKFLAGS'])
58
59 dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
60 if dll: cmd.extend(['-o', dll])
61
62 cmd.extend(['$SOURCES', '$_LIBDIRFLAGS', '$_LIBFLAGS'])
63
64 implib = env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX')
65 if implib: cmd.append('-Wl,--out-implib,'+implib.get_string(for_signature))
66
67 def_target = env.FindIxes(target, 'WIN32DEFPREFIX', 'WIN32DEFSUFFIX')
68 if def_target: cmd.append('-Wl,--output-def,'+def_target.get_string(for_signature))
69
70 return [cmd]
71
72 def shlib_emitter(target, source, env):
73 dll = env.FindIxes(target, 'SHLIBPREFIX', 'SHLIBSUFFIX')
74 no_import_lib = env.get('no_import_lib', 0)
75
76 if not dll:
77 raise SCons.Errors.UserError, "A shared library should have exactly one target with the suffix: %s" % env.subst("$SHLIBSUFFIX")
78
79 if not no_import_lib and \
80 not env.FindIxes(target, 'LIBPREFIX', 'LIBSUFFIX'):
81
82 # Append an import library to the list of targets.
83 target.append(env.ReplaceIxes(dll,
84 'SHLIBPREFIX', 'SHLIBSUFFIX',
85 'LIBPREFIX', 'LIBSUFFIX'))
86
87 # Append a def file target if there isn't already a def file target
88 # or a def file source. There is no option to disable def file
89 # target emitting, because I can't figure out why someone would ever
90 # want to turn it off.
91 def_source = env.FindIxes(source, 'WIN32DEFPREFIX', 'WIN32DEFSUFFIX')
92 def_target = env.FindIxes(target, 'WIN32DEFPREFIX', 'WIN32DEFSUFFIX')
93 if not def_source and not def_target:
94 target.append(env.ReplaceIxes(dll,
95 'SHLIBPREFIX', 'SHLIBSUFFIX',
96 'WIN32DEFPREFIX', 'WIN32DEFSUFFIX'))
97
98 return (target, source)
99
100
101 shlib_action = SCons.Action.Action(shlib_generator, generator=1)
102
103 res_action = SCons.Action.Action('$RCCOM', '$RCCOMSTR')
104
105 res_builder = SCons.Builder.Builder(action=res_action, suffix='.o',
106 source_scanner=SCons.Tool.SourceFileScanner)
107 SCons.Tool.SourceFileScanner.add_scanner('.rc', SCons.Defaults.CScan)
108
109 def generate(env):
110 mingw_prefix = find(env)
111
112 if mingw_prefix:
113 dir = os.path.dirname(env.WhereIs(mingw_prefix + 'gcc') or SCons.Util.WhereIs(mingw_prefix + 'gcc'))
114
115 # The mingw bin directory must be added to the path:
116 path = env['ENV'].get('PATH', [])
117 if not path:
118 path = []
119 if SCons.Util.is_String(path):
120 path = string.split(path, os.pathsep)
121
122 env['ENV']['PATH'] = string.join([dir] + path, os.pathsep)
123
124 # Most of mingw is the same as gcc and friends...
125 gnu_tools = ['gcc', 'g++', 'gnulink', 'ar', 'gas']
126 for tool in gnu_tools:
127 SCons.Tool.Tool(tool)(env)
128
129 #... but a few things differ:
130 env['CC'] = mingw_prefix + 'gcc'
131 env['SHCCFLAGS'] = SCons.Util.CLVar('$CCFLAGS')
132 env['CXX'] = mingw_prefix + 'g++'
133 env['SHCXXFLAGS'] = SCons.Util.CLVar('$CXXFLAGS')
134 env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -shared')
135 env['SHLINKCOM'] = shlib_action
136 env.Append(SHLIBEMITTER = [shlib_emitter])
137 env['LINK'] = mingw_prefix + 'g++'
138 env['AS'] = mingw_prefix + 'as'
139 env['WIN32DEFPREFIX'] = ''
140 env['WIN32DEFSUFFIX'] = '.def'
141 env['SHOBJSUFFIX'] = '.o'
142 env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1
143
144 env['RC'] = mingw_prefix + 'windres'
145 env['RCFLAGS'] = SCons.Util.CLVar('')
146 env['RCCOM'] = '$RC $_CPPDEFFLAGS $_CPPINCFLAGS ${INCPREFIX}${SOURCE.dir} $RCFLAGS -i $SOURCE -o $TARGET'
147 env['BUILDERS']['RES'] = res_builder
148
149 # Some setting from the platform also have to be overridden:
150 env['OBJPREFIX'] = ''
151 env['OBJSUFFIX'] = '.o'
152 env['LIBPREFIX'] = 'lib'
153 env['LIBSUFFIX'] = '.a'
154 env['SHOBJPREFIX'] = '$OBJPREFIX'
155 env['SHOBJSUFFIX'] = '$OBJSUFFIX'
156 env['PROGPREFIX'] = ''
157 env['PROGSUFFIX'] = '.exe'
158 env['LIBPREFIX'] = ''
159 env['LIBSUFFIX'] = '.lib'
160 env['SHLIBPREFIX'] = ''
161 env['SHLIBSUFFIX'] = '.dll'
162 env['LIBPREFIXES'] = [ '$LIBPREFIX' ]
163 env['LIBSUFFIXES'] = [ '$LIBSUFFIX' ]
164
165 def exists(env):
166 return find(env)
0 /* -*- tab-width:4;c-file-style:"cc-mode"; -*- */
1 /*
2 * ffmpeg2theora.c -- Convert ffmpeg supported a/v files to Ogg Theora / Ogg Vorbis
3 * Copyright (C) 2003-2008 <j@v2v.cc>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software Foundation,
17 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 *
19 */
20
21 #include <stdio.h>
22 #include <stdlib.h>
23 #include <unistd.h>
24 #include <string.h>
25 #include <getopt.h>
26 #include <math.h>
27 #include <errno.h>
28
29 #include "libavformat/avformat.h"
30 #include "libavdevice/avdevice.h"
31 #ifdef HAVE_FRAMEHOOK
32 #include "libavformat/framehook.h"
33 #endif
34 #include "libswscale/swscale.h"
35 #include "libpostproc/postprocess.h"
36
37 #include "theora/theora.h"
38 #include "vorbis/codec.h"
39 #include "vorbis/vorbisenc.h"
40
41 #ifdef WIN32
42 #include "fcntl.h"
43 #endif
44
45 #include "theorautils.h"
46 #include "subtitles.h"
47 #include "ffmpeg2theora.h"
48
49 enum {
50 NULL_FLAG,
51 DEINTERLACE_FLAG,
52 OPTIMIZE_FLAG,
53 SYNC_FLAG,
54 NOAUDIO_FLAG,
55 NOVIDEO_FLAG,
56 NOUPSCALING_FLAG,
57 CROPTOP_FLAG,
58 CROPBOTTOM_FLAG,
59 CROPRIGHT_FLAG,
60 CROPLEFT_FLAG,
61 ASPECT_FLAG,
62 MAXSIZE_FLAG,
63 INPUTFPS_FLAG,
64 AUDIOSTREAM_FLAG,
65 SUBTITLES_FLAG,
66 SUBTITLES_ENCODING_FLAG,
67 SUBTITLES_LANGUAGE_FLAG,
68 SUBTITLES_CATEGORY_FLAG,
69 SUBTITLES_IGNORE_NON_UTF8_FLAG,
70 VHOOK_FLAG,
71 FRONTEND_FLAG,
72 FRONTENDFILE_FLAG,
73 SPEEDLEVEL_FLAG,
74 PP_FLAG,
75 NOSKELETON
76 } F2T_FLAGS;
77
78 enum {
79 V2V_PRESET_NONE,
80 V2V_PRESET_PRO,
81 V2V_PRESET_PREVIEW,
82 V2V_PRESET_VIDEOBIN,
83 V2V_PRESET_PADMA,
84 V2V_PRESET_PADMASTREAM,
85 } F2T_PRESETS;
86
87
88 #define PAL_HALF_WIDTH 384
89 #define PAL_HALF_HEIGHT 288
90 #define NTSC_HALF_WIDTH 320
91 #define NTSC_HALF_HEIGHT 240
92
93 #define PAL_FULL_WIDTH 720
94 #define PAL_FULL_HEIGHT 576
95 #define NTSC_FULL_WIDTH 720
96 #define NTSC_FULL_HEIGHT 480
97
98
99 static int sws_flags = SWS_BICUBIC;
100
101 oggmux_info info;
102
103 static int using_stdin = 0;
104
105 static int padcolor[3] = { 16, 128, 128 };
106
107
108 /**
109 * Allocate and initialise an AVFrame.
110 */
111 static AVFrame *frame_alloc (int pix_fmt, int width, int height) {
112 AVFrame *picture;
113 uint8_t *picture_buf;
114 int size;
115
116 picture = avcodec_alloc_frame ();
117 if (!picture)
118 return NULL;
119 size = avpicture_get_size (pix_fmt, width, height);
120 picture_buf = av_malloc (size);
121 if (!picture_buf){
122 av_free (picture);
123 return NULL;
124 }
125 avpicture_fill ((AVPicture *) picture, picture_buf,
126 pix_fmt, width, height);
127 return picture;
128 }
129
130 /**
131 * Frees an AVFrame.
132 */
133 static void frame_dealloc (AVFrame *frame) {
134 if (frame) {
135 avpicture_free((AVPicture*)frame);
136 av_free(frame);
137 }
138 }
139
140 /**
141 * initialize ff2theora with default values
142 * @return ff2theora struct
143 */
144 static ff2theora ff2theora_init (){
145 ff2theora this = calloc (1, sizeof (*this));
146 if (this != NULL){
147 this->disable_audio=0;
148 this->disable_video=0;
149 this->no_upscaling=0;
150 this->video_index = -1;
151 this->audio_index = -1;
152 this->start_time=0;
153 this->end_time=0; /* 0 denotes no end time set */
154
155 // audio
156 this->sample_rate = -1; // samplerate hmhmhm
157 this->channels = -1;
158 this->audio_quality = 1.00;// audio quality 1
159 this->audio_bitrate=0;
160 this->audiostream = -1;
161
162 // video
163 this->picture_width=0; // set to 0 to not resize the output
164 this->picture_height=0; // set to 0 to not resize the output
165 this->video_quality=rint(5*6.3); // video quality 5
166 this->video_bitrate=0;
167 this->sharpness=0;
168 this->keyint=64;
169 this->force_input_fps.num = -1;
170 this->force_input_fps.den = 1;
171 this->sync=0;
172 this->aspect_numerator=0;
173 this->aspect_denominator=0;
174 this->frame_aspect=0;
175 this->max_size=-1;
176 this->deinterlace=0; // auto by default, if input is flaged as interlaced it will deinterlace.
177 this->vhook=0;
178 this->framerate_new.num = -1;
179 this->framerate_new.den = 1;
180
181 this->frame_topBand=0;
182 this->frame_bottomBand=0;
183 this->frame_leftBand=0;
184 this->frame_rightBand=0;
185
186 this->n_kate_streams=0;
187 this->kate_streams=NULL;
188 this->ignore_non_utf8 = 0;
189
190 this->pix_fmt = PIX_FMT_YUV420P;
191
192 // ffmpeg2theora --nosound -f dv -H 32000 -S 0 -v 8 -x 384 -y 288 -G 1.5 input.dv
193 this->video_gamma = 0.0;
194 this->video_bright = 0.0;
195 this->video_contr = 0.0;
196 this->video_satur = 1.0;
197
198 this->y_lut_used = 0;
199 this->uv_lut_used = 0;
200 }
201 return this;
202 }
203
204 // gamma lookup table code
205
206 static void y_lut_init(ff2theora this) {
207 int i;
208 double v;
209
210 double c = this->video_contr;
211 double b = this->video_bright;
212 double g = this->video_gamma;
213
214 if ((g < 0.01) || (g > 100.0)) g = 1.0;
215 if ((c < 0.01) || (c > 100.0)) c = 1.0;
216 if ((b < -1.0) || (b > 1.0)) b = 0.0;
217
218 if (g == 1.0 && c == 1.0 && b == 0.0) return;
219 this->y_lut_used = 1;
220
221 printf(" Video correction: gamma=%g, contrast=%g, brightness=%g\n", g, c, b);
222
223 g = 1.0 / g; // larger values shall make brighter video.
224
225 for (i = 0; i < 256; i++) {
226 v = (double) i / 255.0;
227 v = c * v + b * 0.1;
228 if (v < 0.0) v = 0.0;
229 v = pow(v, g) * 255.0; // mplayer's vf_eq2.c multiplies with 256 here, strange...
230
231 if (v >= 255)
232 this->y_lut[i] = 255;
233 else
234 this->y_lut[i] = (unsigned char)(v+0.5);
235 }
236 }
237
238
239 static void uv_lut_init(ff2theora this) {
240 int i;
241 double v, s;
242 s = this->video_satur;
243
244 if ((s < 0.0) || (s > 100.0)) s = 1.0;
245
246 if (s == 1.0) return;
247 this->uv_lut_used = 1;
248
249 printf(" Color correction: saturation=%g\n", s);
250
251 for (i = 0; i < 256; i++) {
252 v = 127.0 + (s * ((double)i - 127.0));
253 if (v < 0.0) v = 0.0;
254
255 if (v >= 255.0)
256 this->uv_lut[i] = 255;
257 else
258 this->uv_lut[i] = (unsigned char)(v+0.5);
259 }
260 }
261
262 static void lut_init(ff2theora this) {
263 y_lut_init(this);
264 uv_lut_init(this);
265 }
266
267 static void lut_apply(unsigned char *lut, unsigned char *src, unsigned char *dst, int width, int height, int stride) {
268 int x, y;
269
270 for (y = 0; y < height; y++) {
271 for (x = 0; x < width; x++) {
272 dst[x] = lut[src[x]];
273 }
274 src += stride;
275 dst += stride;
276 }
277 }
278
279 static void prepare_yuv_buffer(ff2theora this, yuv_buffer *yuv, AVFrame *frame) {
280 /* pysical pages */
281 yuv->y_width = this->frame_width;
282 yuv->y_height = this->frame_height;
283 yuv->y_stride = frame->linesize[0];
284
285 yuv->uv_width = this->frame_width / 2;
286 yuv->uv_height = this->frame_height / 2;
287 yuv->uv_stride = frame->linesize[1];
288
289 yuv->y = frame->data[0];
290 yuv->u = frame->data[1];
291 yuv->v = frame->data[2];
292 if (this->y_lut_used) {
293 lut_apply(this->y_lut, yuv->y, yuv->y, yuv->y_width, yuv->y_height, yuv->y_stride);
294 }
295 if (this->uv_lut_used) {
296 lut_apply(this->uv_lut, yuv->u, yuv->u, yuv->uv_width, yuv->uv_height, yuv->uv_stride);
297 lut_apply(this->uv_lut, yuv->v, yuv->v, yuv->uv_width, yuv->uv_height, yuv->uv_stride);
298 }
299 }
300
301 void ff2theora_output(ff2theora this) {
302 unsigned int i;
303 AVCodecContext *aenc = NULL;
304 AVCodecContext *venc = NULL;
305 AVStream *astream = NULL;
306 AVStream *vstream = NULL;
307 AVCodec *acodec = NULL;
308 AVCodec *vcodec = NULL;
309 pp_mode_t *ppMode = NULL;
310 pp_context_t *ppContext = NULL;
311 float frame_aspect = 0;
312 double fps = 0.0;
313
314 if(this->audiostream >= 0 && this->context->nb_streams > this->audiostream) {
315 AVCodecContext *enc = this->context->streams[this->audiostream]->codec;
316 if (enc->codec_type == CODEC_TYPE_AUDIO) {
317 this->audio_index = this->audiostream;
318 fprintf(stderr, " Using stream #0.%d as audio input\n",this->audio_index);
319 }
320 else {
321 fprintf(stderr, " The selected stream is not audio, falling back to automatic selection\n");
322 }
323 }
324
325 for (i = 0; i < this->context->nb_streams; i++){
326 AVCodecContext *enc = this->context->streams[i]->codec;
327 switch (enc->codec_type){
328 case CODEC_TYPE_VIDEO:
329 if (this->video_index < 0 && !this->disable_video)
330 this->video_index = i;
331 break;
332 case CODEC_TYPE_AUDIO:
333 if (this->audio_index < 0 && !this->disable_audio)
334 this->audio_index = i;
335 break;
336 default:
337 break;
338 }
339 }
340
341 if (this->video_index >= 0){
342 vstream = this->context->streams[this->video_index];
343 venc = this->context->streams[this->video_index]->codec;
344 vcodec = avcodec_find_decoder (venc->codec_id);
345
346 fps = (double) vstream->r_frame_rate.num / vstream->r_frame_rate.den;
347 if (fps > 10000)
348 fps /= 1000;
349
350 if(this->force_input_fps.num > 0)
351 fps=(double)this->force_input_fps.num / this->force_input_fps.den;
352 if (vcodec == NULL || avcodec_open (venc, vcodec) < 0) {
353 this->video_index = -1;
354 }
355 this->fps = fps;
356
357 if(this->picture_width && !this->picture_height) {
358 this->picture_height = this->picture_width / ((double)venc->width/venc->height);
359 this->picture_height = this->picture_height - this->picture_height%2;
360 }
361 if(this->picture_height && !this->picture_width) {
362 this->picture_width = this->picture_height * ((double)venc->width/venc->height);
363 this->picture_width = this->picture_width - this->picture_width%2;
364 }
365
366 if(this->preset == V2V_PRESET_PREVIEW){
367 if(abs(this->fps-30)<1 && (venc->width!=NTSC_HALF_WIDTH || venc->height!=NTSC_HALF_HEIGHT) ){
368 this->picture_width=NTSC_HALF_WIDTH;
369 this->picture_height=NTSC_HALF_HEIGHT;
370 }
371 else {
372 this->picture_width=PAL_HALF_WIDTH;
373 this->picture_height=PAL_HALF_HEIGHT;
374 }
375 }
376 else if(this->preset == V2V_PRESET_PRO){
377 if(abs(this->fps-30)<1 && (venc->width!=NTSC_FULL_WIDTH || venc->height!=NTSC_FULL_HEIGHT) ){
378 this->picture_width=NTSC_FULL_WIDTH;
379 this->picture_height=NTSC_FULL_HEIGHT;
380 }
381 else {
382 this->picture_width=PAL_FULL_WIDTH;
383 this->picture_height=PAL_FULL_HEIGHT;
384 }
385 }
386 else if(this->preset == V2V_PRESET_PADMA){
387 int width=venc->width-this->frame_leftBand-this->frame_rightBand;
388 int height=venc->height-this->frame_topBand-this->frame_bottomBand;
389 if(venc->sample_aspect_ratio.den!=0 && venc->sample_aspect_ratio.num!=0) {
390 height=((float)venc->sample_aspect_ratio.den/venc->sample_aspect_ratio.num) * height;
391 }
392 if(this->frame_aspect == 0)
393 this->frame_aspect = (float)width/height;
394 if(this->frame_aspect <= 1.5) {
395 if(width > 640 || height > 480) {
396 //4:3 640 x 480
397 this->picture_width=640;
398 this->picture_height=480;
399 }
400 else {
401 this->picture_width=width;
402 this->picture_height=height;
403 }
404 }
405 else {
406 if(width > 640 || height > 360) {
407 //16:9 640 x 360
408 this->picture_width=640;
409 this->picture_height=360;
410 }
411 else {
412 this->picture_width=width;
413 this->picture_height=height;
414 }
415 }
416
417 }
418 else if(this->preset == V2V_PRESET_PADMASTREAM){
419 int width=venc->width-this->frame_leftBand-this->frame_rightBand;
420 int height=venc->height-this->frame_topBand-this->frame_bottomBand;
421 if(venc->sample_aspect_ratio.den!=0 && venc->sample_aspect_ratio.num!=0) {
422 height=((float)venc->sample_aspect_ratio.den/venc->sample_aspect_ratio.num) * height;
423 }
424 if(this->frame_aspect == 0)
425 this->frame_aspect = (float)width/height;
426 if(this->frame_aspect <= 1.5) {
427 this->picture_width=128;
428 this->picture_height=96;
429 }
430 else {
431 this->picture_width=128;
432 this->picture_height=72;
433 }
434 }
435 else if(this->preset == V2V_PRESET_VIDEOBIN){
436 int width=venc->width-this->frame_leftBand-this->frame_rightBand;
437 int height=venc->height-this->frame_topBand-this->frame_bottomBand;
438 if(venc->sample_aspect_ratio.den!=0 && venc->sample_aspect_ratio.num!=0) {
439 height=((float)venc->sample_aspect_ratio.den/venc->sample_aspect_ratio.num) * height;
440 }
441 if( ((float)width /height) <= 1.5) {
442 if(width > 448) {
443 //4:3 448 x 336
444 this->picture_width=448;
445 this->picture_height=336;
446 }
447 else {
448 this->picture_width=width;
449 this->picture_height=height;
450 }
451 }
452 else {
453 if(width > 512) {
454 //16:9 512 x 288
455 this->picture_width=512;
456 this->picture_height=288;
457 }
458 else {
459 this->picture_width=width;
460 this->picture_height=height;
461 }
462 }
463
464 }
465 if(this->max_size > 0){
466 int width = venc->width-this->frame_leftBand-this->frame_rightBand;
467 int height = venc->height-this->frame_topBand-this->frame_bottomBand;
468 if(venc->sample_aspect_ratio.den!=0 && venc->sample_aspect_ratio.num!=0) {
469 height = ((float)venc->sample_aspect_ratio.den/venc->sample_aspect_ratio.num) * height;
470 }
471 if(this->frame_aspect == 0)
472 this->frame_aspect = (float)width/height;
473 if(width > height) {
474 this->picture_width = this->max_size;
475 this->picture_height = this->max_size / this->frame_aspect;
476 this->picture_height = this->picture_height + this->picture_height%2;
477 } else {
478 this->picture_height = this->max_size;
479 this->picture_width = this->max_size * this->frame_aspect;
480 this->picture_width = this->picture_width + this->picture_width%2;
481 }
482 }
483
484 if(this->no_upscaling) {
485 if(this->picture_width && this->picture_width > venc->width) {
486 this->picture_width = venc->width;
487 this->picture_height = venc->height;
488 }
489 if(this->fps < (double)this->framerate_new.num / this->framerate_new.den) {
490 this->framerate_new.num = vstream->r_frame_rate.num;
491 this->framerate_new.den = vstream->r_frame_rate.den;
492 }
493 }
494
495 if(this->picture_height==0 &&
496 (this->frame_leftBand || this->frame_rightBand || this->frame_topBand || this->frame_bottomBand) ){
497 this->picture_height=venc->height-
498 this->frame_topBand-this->frame_bottomBand;
499 }
500 if(this->picture_width==0 &&
501 (this->frame_leftBand || this->frame_rightBand || this->frame_topBand || this->frame_bottomBand) ){
502 this->picture_width=venc->width-
503 this->frame_leftBand-this->frame_rightBand;
504 }
505 //so frame_aspect is set on the commandline
506 if(this->frame_aspect != 0){
507 if(this->picture_height){
508 this->aspect_numerator = 10000*this->frame_aspect*this->picture_height;
509 this->aspect_denominator = 10000*this->picture_width;
510 }
511 else{
512 this->aspect_numerator = 10000*this->frame_aspect*venc->height;
513 this->aspect_denominator = 10000*venc->width;
514 }
515 av_reduce(&this->aspect_numerator,&this->aspect_denominator,this->aspect_numerator,this->aspect_denominator,10000);
516 frame_aspect=this->frame_aspect;
517 }
518 if(venc->sample_aspect_ratio.num!=0 && this->frame_aspect==0){
519 // just use the ratio from the input
520 this->aspect_numerator=venc->sample_aspect_ratio.num;
521 this->aspect_denominator=venc->sample_aspect_ratio.den;
522 // or we use ratio for the output
523 if(this->picture_height){
524 int width=venc->width-this->frame_leftBand-this->frame_rightBand;
525 int height=venc->height-this->frame_topBand-this->frame_bottomBand;
526 av_reduce(&this->aspect_numerator,&this->aspect_denominator,
527 venc->sample_aspect_ratio.num*width*this->picture_height,
528 venc->sample_aspect_ratio.den*height*this->picture_width,10000);
529 frame_aspect=(float)(this->aspect_numerator*this->picture_width)/
530 (this->aspect_denominator*this->picture_height);
531 }
532 else{
533 frame_aspect=(float)(this->aspect_numerator*venc->width)/
534 (this->aspect_denominator*venc->height);
535 }
536 }
537 if((float)this->aspect_numerator/this->aspect_denominator < 1.09){
538 this->aspect_numerator = 1;
539 this->aspect_denominator = 1;
540 frame_aspect=(float)(this->aspect_numerator*this->picture_width)/
541 (this->aspect_denominator*this->picture_height);
542 }
543 if(this->aspect_denominator && frame_aspect){
544 fprintf(stderr, " Pixel Aspect Ratio: %.2f/1 ",(float)this->aspect_numerator/this->aspect_denominator);
545 fprintf(stderr, " Frame Aspect Ratio: %.2f/1\n",frame_aspect);
546 }
547
548 if (this->deinterlace==1)
549 fprintf(stderr, " Deinterlace: on\n");
550
551 if (strcmp(this->pp_mode, "")) {
552 ppContext = pp_get_context(venc->width, venc->height, PP_FORMAT_420);
553 ppMode = pp_get_mode_by_name_and_quality(this->pp_mode, PP_QUALITY_MAX);
554 fprintf(stderr, " Postprocessing: %s\n", this->pp_mode);
555 }
556
557 if(!this->picture_width)
558 this->picture_width = venc->width;
559 if(!this->picture_height)
560 this->picture_height = venc->height;
561
562 /* Theora has a divisible-by-sixteen restriction for the encoded video size */
563 /* scale the frame size up to the nearest /16 and calculate offsets */
564 this->frame_width = ((this->picture_width + 15) >>4)<<4;
565 this->frame_height = ((this->picture_height + 15) >>4)<<4;
566
567 this->frame_x_offset = 0;
568 this->frame_y_offset = 0;
569
570 if(this->frame_width > 0 || this->frame_height > 0){
571 this->sws_colorspace_ctx = sws_getContext(
572 venc->width, venc->height, venc->pix_fmt,
573 venc->width, venc->height, this->pix_fmt,
574 sws_flags, NULL, NULL, NULL
575 );
576 this->sws_scale_ctx = sws_getContext(
577 venc->width - (this->frame_leftBand + this->frame_rightBand),
578 venc->height - (this->frame_topBand + this->frame_bottomBand),
579 this->pix_fmt,
580 this->picture_width, this->picture_height, this->pix_fmt,
581 sws_flags, NULL, NULL, NULL
582 );
583 fprintf(stderr, " Resize: %dx%d",venc->width,venc->height);
584 if(this->frame_topBand || this->frame_bottomBand ||
585 this->frame_leftBand || this->frame_rightBand){
586 fprintf(stderr, " => %dx%d",
587 venc->width-this->frame_leftBand-this->frame_rightBand,
588 venc->height-this->frame_topBand-this->frame_bottomBand);
589 }
590 if(this->picture_width != (venc->width-this->frame_leftBand - this->frame_rightBand)
591 || this->picture_height != (venc->height-this->frame_topBand-this->frame_bottomBand))
592 fprintf(stderr, " => %dx%d",this->picture_width, this->picture_height);
593 fprintf(stderr, "\n");
594 }
595
596 lut_init(this);
597 }
598 if (this->framerate_new.num > 0 && this->fps != (double)this->framerate_new.num / this->framerate_new.den) {
599 fprintf(stderr, " Resample Framerate: %0.2f => %0.2f\n",
600 this->fps, (double)this->framerate_new.num / this->framerate_new.den);
601 }
602 if (this->audio_index >= 0){
603 astream = this->context->streams[this->audio_index];
604 aenc = this->context->streams[this->audio_index]->codec;
605 acodec = avcodec_find_decoder (aenc->codec_id);
606 if (this->channels < 1) {
607 if (aenc->channels > 2)
608 this->channels = 2;
609 else
610 this->channels = aenc->channels;
611 }
612 if(this->sample_rate==-1) {
613 this->sample_rate = aenc->sample_rate;
614 }
615 if (this->channels != aenc->channels && aenc->codec_id == CODEC_ID_AC3)
616 aenc->channels = this->channels;
617
618 if(this->no_upscaling) {
619 if(this->sample_rate > aenc->sample_rate)
620 this->sample_rate = aenc->sample_rate;
621 if(this->channels > aenc->channels)
622 this->channels = aenc->channels;
623 }
624
625 if (acodec != NULL && avcodec_open (aenc, acodec) >= 0){
626 if(this->sample_rate != aenc->sample_rate || this->channels != aenc->channels){
627 this->audio_resample_ctx = audio_resample_init (this->channels,aenc->channels,this->sample_rate,aenc->sample_rate);
628 if(this->sample_rate!=aenc->sample_rate)
629 fprintf(stderr, " Resample: %dHz => %dHz\n",aenc->sample_rate,this->sample_rate);
630 if(this->channels!=aenc->channels)
631 fprintf(stderr, " Channels: %d => %d\n",aenc->channels,this->channels);
632 }
633 else{
634 this->audio_resample_ctx=NULL;
635 }
636 }
637 else{
638 this->audio_index = -1;
639 }
640 }
641
642 if (this->video_index >= 0 || this->audio_index >= 0){
643 AVFrame *frame=NULL;
644 AVFrame *frame_p=NULL;
645 AVFrame *output=NULL;
646 AVFrame *output_p=NULL;
647 AVFrame *output_tmp_p=NULL;
648 AVFrame *output_tmp=NULL;
649 AVFrame *output_resized_p=NULL;
650 AVFrame *output_resized=NULL;
651 AVFrame *output_buffered_p=NULL;
652 AVFrame *output_buffered=NULL;
653 AVFrame *output_cropped_p=NULL;
654 AVFrame *output_cropped=NULL;
655 AVFrame *output_padded_p=NULL;
656 AVFrame *output_padded=NULL;
657
658
659
660 AVPacket pkt;
661 int len;
662 int len1;
663 int got_picture;
664 int first = 1;
665 int e_o_s = 0;
666 int ret;
667 uint8_t *ptr;
668 int16_t *audio_buf=av_malloc(4*AVCODEC_MAX_AUDIO_FRAME_SIZE);
669 int16_t *resampled=av_malloc(4*AVCODEC_MAX_AUDIO_FRAME_SIZE);
670 int16_t *audio_p=NULL;
671 int no_frames;
672 int no_samples;
673
674 double framerate_add = 0;
675 double framerate_tmpcount = 0;
676
677 if(this->video_index >= 0)
678 info.audio_only=0;
679 else
680 info.audio_only=1;
681
682 if(this->audio_index>=0)
683 info.video_only=0;
684 else
685 info.video_only=1;
686
687 if(!info.audio_only){
688 frame_p = frame = frame_alloc(vstream->codec->pix_fmt,
689 vstream->codec->width,vstream->codec->height);
690 output_tmp_p = output_tmp = frame_alloc(this->pix_fmt,
691 vstream->codec->width, vstream->codec->height);
692 output_p = output = frame_alloc(this->pix_fmt,
693 vstream->codec->width,vstream->codec->height);
694 output_resized_p = output_resized = frame_alloc(this->pix_fmt,
695 this->picture_width, this->picture_height);
696 output_cropped_p = output_cropped = frame_alloc(this->pix_fmt,
697 vstream->codec->width-this->frame_leftBand,
698 vstream->codec->height-this->frame_topBand);
699 output_buffered_p = output_buffered = frame_alloc(this->pix_fmt,
700 this->frame_width, this->frame_height);
701 output_padded_p = output_padded = frame_alloc(this->pix_fmt,
702 this->frame_width, this->frame_height);
703
704 /* video settings here */
705 /* config file? commandline options? v2v presets? */
706
707 theora_info_init (&info.ti);
708
709 info.ti.width = this->frame_width;
710 info.ti.height = this->frame_height;
711 info.ti.frame_width = this->picture_width;
712 info.ti.frame_height = this->picture_height;
713 info.ti.offset_x = this->frame_x_offset;
714 info.ti.offset_y = this->frame_y_offset;
715 if (this->framerate_new.num > 0) {
716 // new framerate is interger only right now,
717 // so denominator is always 1
718 info.ti.fps_numerator = this->framerate_new.num;
719 info.ti.fps_denominator = this->framerate_new.den;
720 }
721 else {
722 info.ti.fps_numerator=vstream->r_frame_rate.num;
723 info.ti.fps_denominator = vstream->r_frame_rate.den;
724 }
725 /* this is pixel aspect ratio */
726 info.ti.aspect_numerator=this->aspect_numerator;
727 info.ti.aspect_denominator=this->aspect_denominator;
728 // FIXME: is all input material with fps==25 OC_CS_ITU_REC_470BG?
729 // guess not, commandline option to select colorspace would be the best.
730 if((this->fps-25)<1)
731 info.ti.colorspace = OC_CS_ITU_REC_470BG;
732 else if(abs(this->fps-30)<1)
733 info.ti.colorspace = OC_CS_ITU_REC_470M;
734 else
735 info.ti.colorspace = OC_CS_UNSPECIFIED;
736
737 info.ti.target_bitrate = this->video_bitrate;
738 info.ti.quality = this->video_quality;
739 info.ti.dropframes_p = 0;
740 info.ti.keyframe_auto_p = 1;
741 info.ti.keyframe_frequency = this->keyint;
742 info.ti.keyframe_frequency_force = this->keyint;
743 info.ti.keyframe_data_target_bitrate = info.ti.target_bitrate * 5;
744 info.ti.keyframe_auto_threshold = 80;
745 info.ti.keyframe_mindistance = 8;
746 info.ti.noise_sensitivity = 1;
747 // range 0-2, 0 sharp, 2 less sharp,less bandwidth
748 info.ti.sharpness = this->sharpness;
749
750 }
751 /* audio settings here */
752 info.channels = this->channels;
753 info.sample_rate = this->sample_rate;
754 info.vorbis_quality = this->audio_quality * 0.1;
755 info.vorbis_bitrate = this->audio_bitrate;
756 /* subtitles */
757 #ifdef HAVE_KATE
758 for (i=0; i<this->n_kate_streams; ++i) {
759 ff2theora_kate_stream *ks = this->kate_streams+i;
760 kate_info *ki = &info.kate_streams[i].ki;
761 kate_info_init(ki);
762 if (ks->num_subtitles > 0) {
763 if (!ks->subtitles_language[0]) {
764 fprintf(stderr, "WARNING - Subtitles language not set for input file %d\n",i);
765 }
766 kate_info_set_language(ki, ks->subtitles_language);
767 kate_info_set_category(ki, ks->subtitles_category[0]?ks->subtitles_category:"SUB");
768 if(this->force_input_fps.num > 0) {
769 ki->gps_numerator = this->force_input_fps.num; /* fps= numerator/denominator */
770 ki->gps_denominator = this->force_input_fps.den;
771 }
772 else {
773 if (this->framerate_new.num > 0) {
774 // new framerate is interger only right now,
775 // so denominator is always 1
776 ki->gps_numerator = this->framerate_new.num;
777 ki->gps_denominator = this->framerate_new.den;
778 }
779 else {
780 ki->gps_numerator=vstream->r_frame_rate.num;
781 ki->gps_denominator = vstream->r_frame_rate.den;
782 }
783 }
784 ki->granule_shift = 32;
785 }
786 }
787 #endif
788 oggmux_init (&info);
789 /*seek to start time*/
790 if(this->start_time) {
791 av_seek_frame( this->context, -1, (int64_t)AV_TIME_BASE*this->start_time, 1);
792 /* discard subtitles by their end time, so we still have those that start before the start time,
793 but end after it */
794 for (i=0; i<this->n_kate_streams; ++i) {
795 ff2theora_kate_stream *ks=this->kate_streams+i;
796 while (ks->subtitles_count < ks->num_subtitles && ks->subtitles[ks->subtitles_count].t1 <= this->start_time) {
797 /* printf("skipping subtitle %u\n", ks->subtitles_count); */
798 ks->subtitles_count++;
799 }
800 }
801 }
802
803 if (this->framerate_new.num > 0) {
804 double framerate_new = (double)this->framerate_new.num / this->framerate_new.den;
805 framerate_add = framerate_new/this->fps;
806 //fprintf(stderr, "calculating framerate addition to %f\n",framerate_add);
807 this->fps = framerate_new;
808 }
809
810 /*check for end time and calculate number of frames to encode*/
811 no_frames = this->fps*(this->end_time - this->start_time);
812 no_samples = this->sample_rate * (this->end_time - this->start_time);
813 if((info.audio_only && this->end_time > 0 && no_samples <= 0)
814 || (!info.audio_only && this->end_time > 0 && no_frames <= 0)){
815 fprintf(stderr, "End time has to be bigger than start time.\n");
816 exit(1);
817 }
818 /* main decoding loop */
819 do{
820 if(info.audio_only && no_samples > 0){
821 if(this->sample_count > no_samples){
822 break;
823 }
824 }
825 if(no_frames > 0){
826 if(this->frame_count > no_frames){
827 break;
828 }
829 }
830 ret = av_read_frame(this->context,&pkt);
831 if(ret<0){
832 e_o_s=1;
833 }
834
835 ptr = pkt.data;
836 len = pkt.size;
837 if ((e_o_s && !info.audio_only) || (ret >= 0 && pkt.stream_index == this->video_index)){
838 if(len == 0 && !first && !e_o_s){
839 fprintf (stderr, "no frame available\n");
840 }
841 while(e_o_s || len > 0){
842 int dups = 0;
843 yuv_buffer yuv;
844 len1 = avcodec_decode_video(vstream->codec, frame, &got_picture, ptr, len);
845 if(len1>=0) {
846 if(got_picture){
847 // this is disabled by default since it does not work
848 // for all input formats the way it should.
849 if(this->sync == 1) {
850 double delta = ((double) pkt.dts /
851 AV_TIME_BASE - this->pts_offset) *
852 this->fps - this->frame_count;
853 /* 0.7 is an arbitrary value */
854 /* it should be larger than half a frame to
855 avoid excessive dropping and duplicating */
856 if (delta < -0.7) {
857 #ifdef DEBUG
858 fprintf(stderr,
859 "Frame dropped to maintain sync\n");
860 #endif
861 break;
862 }
863 if (delta > 0.7) {
864 //dups = lrintf(delta);
865 dups = (int)delta;
866 #ifdef DEBUG
867 fprintf(stderr,
868 "%d duplicate %s added to maintain sync\n",
869 dups, (dups == 1) ? "frame" : "frames");
870 #endif
871 }
872 }
873
874 if (this->framerate_new.num > 0) {
875 framerate_tmpcount += framerate_add;
876 if (framerate_tmpcount < (double)(this->frame_count+1)) {
877 got_picture = 0;
878 }
879 else {
880 dups = 0;
881 while (framerate_tmpcount >= (double)(this->frame_count+2+dups)) {
882 dups += 1;
883 }
884 }
885 }
886
887 //For audio only files command line option"-e" will not work
888 //as we don't increment frame_count in audio section.
889
890 if(venc->pix_fmt != this->pix_fmt) {
891 sws_scale(this->sws_colorspace_ctx,
892 frame->data, frame->linesize, 0, venc->height,
893 output_tmp->data, output_tmp->linesize);
894
895 }
896 else{
897 av_picture_copy((AVPicture *)output_tmp, (AVPicture *)frame, this->pix_fmt,
898 venc->width, venc->height);
899 output_tmp_p=NULL;
900 }
901 if(frame->interlaced_frame || this->deinterlace){
902 if(avpicture_deinterlace((AVPicture *)output,(AVPicture *)output_tmp,this->pix_fmt,venc->width,venc->height)<0){
903 fprintf(stderr, "Deinterlace failed.\n");
904 exit(1);
905 }
906 }
907 else{
908 av_picture_copy((AVPicture *)output, (AVPicture *)output_tmp, this->pix_fmt,
909 venc->width, venc->height);
910 }
911 // now output
912
913 if(ppMode)
914 pp_postprocess(output->data, output->linesize,
915 output->data, output->linesize,
916 venc->width, venc->height,
917 output->qscale_table, output->qstride,
918 ppMode, ppContext, this->pix_fmt);
919 #ifdef HAVE_FRAMEHOOK
920 if(this->vhook)
921 frame_hook_process((AVPicture *)output, this->pix_fmt, venc->width,venc->height, 0);
922 #endif
923
924 if (this->frame_topBand || this->frame_leftBand) {
925 if (av_picture_crop((AVPicture *)output_cropped,
926 (AVPicture *)output, this->pix_fmt,
927 this->frame_topBand, this->frame_leftBand) < 0) {
928 av_log(NULL, AV_LOG_ERROR, "error cropping picture\n");
929 }
930 output_cropped_p = NULL;
931 } else {
932 output_cropped = output;
933 }
934 if(this->sws_scale_ctx){
935 sws_scale(this->sws_scale_ctx,
936 output_cropped->data, output_cropped->linesize, 0,
937 venc->height - (this->frame_topBand + this->frame_bottomBand),
938 output_resized->data, output_resized->linesize);
939 }
940 else{
941 output_resized = output_cropped;
942 }
943 if ((this->frame_width!=this->picture_width) || (this->frame_height!=this->picture_height)) {
944 if (av_picture_pad((AVPicture *)output_padded,
945 (AVPicture *)output_resized,
946 this->frame_height, this->frame_width, this->pix_fmt,
947 0, this->frame_height - this->picture_height,
948 0, this->frame_width - this->picture_width,
949 padcolor ) < 0 ) {
950 av_log(NULL, AV_LOG_ERROR, "error padding frame\n");
951 }
952 } else {
953 output_padded = output_resized;
954 }
955 }
956 ptr += len1;
957 len -= len1;
958 }
959 //now output_resized
960
961 if(!first) {
962 if(got_picture || e_o_s) {
963 prepare_yuv_buffer(this, &yuv, output_buffered);
964 do {
965 oggmux_add_video(&info, &yuv, e_o_s);
966 this->frame_count++;
967 } while(dups--);
968 }
969 }
970 if(got_picture) {
971 first=0;
972 av_picture_copy ((AVPicture *)output_buffered, (AVPicture *)output_padded, this->pix_fmt, this->frame_width, this->frame_height);
973 }
974 if(!got_picture){
975 break;
976 }
977 }
978
979 }
980 if((e_o_s && !info.video_only)
981 || (ret >= 0 && pkt.stream_index == this->audio_index)){
982 this->pts_offset = (double) pkt.pts / AV_TIME_BASE -
983 (double) this->sample_count / this->sample_rate;
984 while(e_o_s || len > 0 ){
985 int samples=0;
986 int samples_out=0;
987 int data_size = 4*AVCODEC_MAX_AUDIO_FRAME_SIZE;
988 if(len > 0){
989 len1 = avcodec_decode_audio2(astream->codec, audio_buf, &data_size, ptr, len);
990 if (len1 < 0){
991 /* if error, we skip the frame */
992 break;
993 }
994 len -= len1;
995 ptr += len1;
996 if(data_size >0){
997 samples =data_size / (aenc->channels * 2);
998
999 samples_out = samples;
1000 if(this->audio_resample_ctx){
1001 samples_out = audio_resample(this->audio_resample_ctx, resampled, audio_buf, samples);
1002 audio_p = resampled;
1003 }
1004 else
1005 audio_p = audio_buf;
1006 }
1007 }
1008 oggmux_add_audio(&info, audio_p,
1009 samples_out *(this->channels),samples_out,e_o_s);
1010 this->sample_count += samples_out;
1011 if(e_o_s && len <= 0){
1012 break;
1013 }
1014 }
1015
1016 }
1017
1018 /* if we have subtitles starting before then, add it */
1019 if (info.with_kate) {
1020 double avtime = info.audio_only ? info.audiotime :
1021 info.video_only ? info.videotime :
1022 info.audiotime < info.videotime ? info.audiotime : info.videotime;
1023 for (i=0; i<this->n_kate_streams; ++i) {
1024 ff2theora_kate_stream *ks = this->kate_streams+i;
1025 if (ks->num_subtitles > 0) {
1026 ff2theora_subtitle *sub = ks->subtitles+ks->subtitles_count;
1027 /* we encode a bit in advance so we're sure to hit the time, the packet will
1028 be held till the right time. If we don't do that, we can insert late and
1029 oggz-validate moans */
1030 while (ks->subtitles_count < ks->num_subtitles && sub->t0-1.0 <= avtime+this->start_time) {
1031 oggmux_add_kate_text(&info, i, sub->t0, sub->t1, sub->text, sub->len);
1032 ks->subtitles_count++;
1033 ++sub;
1034 }
1035 }
1036 }
1037 }
1038
1039 /* flush out the file */
1040 oggmux_flush (&info, e_o_s);
1041 av_free_packet (&pkt);
1042 }
1043 while (ret >= 0);
1044
1045 for (i=0; i<this->n_kate_streams; ++i) {
1046 ff2theora_kate_stream *ks = this->kate_streams+i;
1047 if (ks->num_subtitles > 0) {
1048 double t = (info.videotime<info.audiotime?info.audiotime:info.videotime)+this->start_time;
1049 oggmux_add_kate_end_packet(&info, i, t);
1050 oggmux_flush (&info, e_o_s);
1051 }
1052 }
1053
1054 if (this->video_index >= 0) {
1055 avcodec_close(venc);
1056 }
1057 if (this->audio_index >= 0) {
1058 if (this->audio_resample_ctx)
1059 audio_resample_close(this->audio_resample_ctx);
1060 avcodec_close(aenc);
1061 }
1062 oggmux_close (&info);
1063 if(ppContext)
1064 pp_free_context(ppContext);
1065 if (!info.audio_only) {
1066 av_free(frame_p);
1067 frame_dealloc(output_p);
1068 frame_dealloc(output_tmp_p);
1069 frame_dealloc(output_resized_p);
1070 frame_dealloc(output_buffered_p);
1071 frame_dealloc(output_cropped_p);
1072 frame_dealloc(output_padded_p);
1073 }
1074 av_free(audio_buf);
1075 av_free(resampled);
1076 }
1077 else{
1078 fprintf (stderr, "No video or audio stream found.\n");
1079 }
1080 }
1081
1082 void ff2theora_close (ff2theora this){
1083 sws_freeContext(this->sws_colorspace_ctx);
1084 sws_freeContext(this->sws_scale_ctx);
1085 /* clear out state */
1086 free_subtitles(this);
1087 av_free (this);
1088 }
1089
1090 double aspect_check(const char *arg)
1091 {
1092 int x = 0, y = 0;
1093 double ar = 0;
1094 const char *p;
1095
1096 p = strchr(arg, ':');
1097 if (!p) {
1098 p = strchr(arg, '/');
1099 }
1100 if (p) {
1101 x = strtol(arg, (char **)&arg, 10);
1102 if (arg == p)
1103 y = strtol(arg+1, (char **)&arg, 10);
1104 if (x > 0 && y > 0)
1105 ar = (double)x / (double)y;
1106 } else
1107 ar = strtod(arg, (char **)&arg);
1108
1109 if (!ar) {
1110 fprintf(stderr, "Incorrect aspect ratio specification.\n");
1111 exit(1);
1112 }
1113 return ar;
1114 }
1115
1116 static void add_frame_hooker(const char *arg)
1117 {
1118 #ifdef HAVE_FRAMEHOOK
1119 int argc = 0;
1120 char *argv[64];
1121 int i;
1122 char *args = av_strdup(arg);
1123
1124 argv[0] = strtok(args, " ");
1125 while (argc < 62 && (argv[++argc] = strtok(NULL, " "))) {
1126 }
1127
1128 i = frame_hook_add(argc, argv);
1129 if (i != 0) {
1130 fprintf(stderr, "Failed to add video hook function: %s\n", arg);
1131 exit(1);
1132 }
1133 #endif
1134 }
1135
1136 AVRational get_framerate(const char* arg)
1137 {
1138 const char *p;
1139 AVRational framerate;
1140
1141 framerate.num = -1;
1142 framerate.den = 1;
1143
1144 p = strchr(arg, ':');
1145 if (!p) {
1146 p = strchr(arg, '/');
1147 }
1148 if (p) {
1149 framerate.num = strtol(arg, (char **)&arg, 10);
1150 if (arg == p)
1151 framerate.den = strtol(arg+1, (char **)&arg, 10);
1152 if(framerate.num <= 0)
1153 framerate.num = -1;
1154 if(framerate.den <= 0)
1155 framerate.den = 1;
1156 } else {
1157 framerate.num = strtol(arg, (char **)&arg,10);
1158 framerate.den = 1;
1159 }
1160 return(framerate);
1161 }
1162
1163 int crop_check(ff2theora this, char *name, const char *arg)
1164 {
1165 int crop_value = atoi(arg);
1166 if (crop_value < 0) {
1167 fprintf(stderr, "Incorrect crop size `%s'.\n",name);
1168 exit(1);
1169 }
1170 if ((crop_value % 2) != 0) {
1171 fprintf(stderr, "Crop size `%s' must be a multiple of 2.\n",name);
1172 exit(1);
1173 }
1174 /*
1175 if ((crop_value) >= this->height){
1176 fprintf(stderr, "Vertical crop dimensions are outside the range of the original image.\nRemember to crop first and scale second.\n");
1177 exit(1);
1178 }
1179 */
1180 return crop_value;
1181 }
1182
1183
1184
1185 void print_presets_info() {
1186 fprintf (stdout,
1187 // "v2v presets - more info at http://wiki.v2v.cc/presets"
1188 "v2v presets:\n"
1189 " preview Video: 320x240 if fps ~ 30, 384x288 otherwise\n"
1190 " Quality 5 - Sharpness 2\n"
1191 " Audio: Max 2 channels - Quality 1\n"
1192 "\n"
1193 " pro Video: 720x480 if fps ~ 30, 720x576 otherwise\n"
1194 " Quality 7 - Sharpness 0\n"
1195 " Audio: Max 2 channels - Quality 3\n"
1196 "\n"
1197 " videobin Video: 512x288 for 16:9 material, 448x336 for 4:3 material\n"
1198 " Bitrate 600kbs\n"
1199 " Audio: Max 2 channels - Quality 3\n"
1200 "\n"
1201 " padma Video: 640x360 for 16:9 material, 640x480 for 4:3 material\n"
1202 " Quality 5 - Sharpness 0\n"
1203 " Audio: Max 2 channels - Quality 3\n"
1204 "\n"
1205 " padma-stream Video: 128x72 for 16:9 material, 128x96 for 4:3 material\n"
1206 " Audio: mono quality -1\n"
1207 "\n"
1208 );
1209 }
1210
1211 void print_usage (){
1212 fprintf (stdout,
1213 PACKAGE " " PACKAGE_VERSION "\n"
1214 "\n"
1215 " Usage: " PACKAGE " [options] input\n"
1216 "\n"
1217 "General output options:\n"
1218 " -o, --output alternative output filename\n"
1219 " --no-skeleton disables ogg skeleton metadata output\n"
1220 " -s, --starttime start encoding at this time (in sec.)\n"
1221 " -e, --endtime end encoding at this time (in sec.)\n"
1222 " -p, --preset encode file with preset.\n"
1223 " Right now there is preview, pro and videobin. Run\n"
1224 " '"PACKAGE" -p info' for more informations\n"
1225 "\n"
1226 "Video output options:\n"
1227 " -v, --videoquality [0 to 10] encoding quality for video (default: 5)\n"
1228 " use higher values for better quality\n"
1229 " -V, --videobitrate [1 to 16778] encoding bitrate for video (kb/s)\n"
1230 " --optimize optimize video output filesize (slower) (same as speedlevel 0)\n"
1231 " --speedlevel [0 2] encoding is faster with higher values the cost is quality and bandwidth\n"
1232 " -x, --width scale to given width (in pixels)\n"
1233 " -y, --height scale to given height (in pixels)\n"
1234 " --max_size scale output frame to be withing box of \n"
1235 " given size (in pixels)\n"
1236 " --aspect define frame aspect ratio: i.e. 4:3 or 16:9\n"
1237 " -F, --framerate output framerate e.g 25:2 or 16\n"
1238 " --croptop, --cropbottom, --cropleft, --cropright\n"
1239 " crop input by given pixels before resizing\n"
1240 " -S, --sharpness [0 to 2] sharpness of images (default: 0).\n"
1241 " Note: lower values make the video sharper.\n"
1242 " -K, --keyint [1 to 65536] keyframe interval (default: 64)\n"
1243 " --no-upscaling only scale video or resample audio if input is\n"
1244 " bigger than provided parameters\n"
1245 "\n"
1246 "Video transfer options:\n"
1247 " --pp Video Postprocessing, denoise, deblock, deinterlacer\n"
1248 " use --pp help for a list of available filters.\n"
1249 " -C, --contrast [0.1 to 10.0] contrast correction (default: 1.0)\n"
1250 " Note: lower values make the video darker.\n"
1251 " -B, --brightness [-1.0 to 1.0] brightness correction (default: 0.0)\n"
1252 " Note: lower values make the video darker.\n"
1253 " -G, --gamma [0.1 to 10.0] gamma correction (default: 1.0)\n"
1254 " Note: lower values make the video darker.\n"
1255 " -Z, --saturation [0.1 to 10.0] saturation correction (default: 1.0)\n"
1256 " Note: lower values make the video grey.\n"
1257 "\n"
1258 "Audio output options:\n"
1259 " -a, --audioquality [-2 to 10] encoding quality for audio (default: 1)\n"
1260 " use higher values for better quality\n"
1261 " -A, --audiobitrate [32 to 500] encoding bitrate for audio (kb/s)\n"
1262 " -c, --channels set number of output channels\n"
1263 " -H, --samplerate set output samplerate (in Hz)\n"
1264 " --noaudio disable audio from input\n"
1265 " --novideo disable video from input\n"
1266 "\n"
1267 "Input options:\n"
1268 " --deinterlace force deinterlace, otherwise only material\n"
1269 " marked as interlaced will be deinterlaced\n"
1270 #ifdef HAVE_FRAMEHOOK
1271 " --vhook you can use ffmpeg's vhook system, example:\n"
1272 " ffmpeg2theora --vhook '/path/watermark.so -f wm.gif' input.dv\n"
1273 #endif
1274 " -f, --format specify input format\n"
1275 " --inputfps fps override input fps\n"
1276 " --audiostream id by default the last audio stream is selected,\n"
1277 " use this to select another audio stream\n"
1278 " --sync use A/V sync from input container. Since this does\n"
1279 " not work with all input format you have to manually\n"
1280 " enable it if you have issues with A/V sync\n"
1281 "\n"
1282 #ifdef HAVE_KATE
1283 "Subtitles options:\n"
1284 " --subtitles file use subtitles from the given file (SubRip (.srt) format)\n"
1285 " --subtitles-encoding encoding set encoding of the subtitles file\n"
1286 " supported are " SUPPORTED_ENCODINGS "\n"
1287 " --subtitles-language language set subtitles language (de, en_GB, etc)\n"
1288 " --subtitles-category category set subtitles category (default \"subtitles\")\n"
1289 " --subtitles-ignore-non-utf8 ignores any non utf-8 sequence in utf-8 text\n"
1290 "\n"
1291 #endif
1292 "Metadata options:\n"
1293 " --artist Name of artist (director)\n"
1294 " --title Title\n"
1295 " --date Date\n"
1296 " --location Location\n"
1297 " --organization Name of organization (studio)\n"
1298 " --copyright Copyright\n"
1299 " --license License\n"
1300 " --contact Contact link\n"
1301 "\n"
1302 "Other options:\n"
1303 #ifndef _WIN32
1304 " --nice n set niceness to n\n"
1305 #endif
1306 " -P, --pid fname write the process' id to a file\n"
1307 " -h, --help this message\n"
1308 "\n"
1309 "Examples:\n"
1310 " ffmpeg2theora videoclip.avi (will write output to videoclip.ogv)\n"
1311 "\n"
1312 " ffmpeg2theora videoclip.avi --subtitles subtitles.srt (same, with subtitles)\n"
1313 "\n"
1314 " cat something.dv | ffmpeg2theora -f dv -o output.ogv -\n"
1315 "\n"
1316 " Encode a series of images:\n"
1317 " ffmpeg2theora frame%%06d.png -o output.ogv\n"
1318 "\n"
1319 " Live streaming from V4L Device:\n"
1320 " ffmpeg2theora /dev/video0 -f video4linux --inputfps 15 -x 160 -y 128 -o - \\\n"
1321 " | oggfwd iccast2server 8000 password /theora.ogv\n"
1322 "\n"
1323 " Live encoding from a DV camcorder (needs a fast machine):\n"
1324 " dvgrab - | ffmpeg2theora -f dv -x 352 -y 288 -o output.ogv -\n"
1325 "\n"
1326 " Live encoding and streaming to icecast server:\n"
1327 " dvgrab --format raw - \\\n"
1328 " | ffmpeg2theora -f dv -x 160 -y 128 -o /dev/stdout - \\\n"
1329 " | oggfwd iccast2server 8000 password /theora.ogv\n"
1330 "\n"
1331 );
1332 exit (0);
1333 }
1334
1335 int main (int argc, char **argv){
1336 int n;
1337 int outputfile_set=0;
1338 char outputfile_name[255];
1339 char inputfile_name[255];
1340 char *str_ptr;
1341
1342 static int flag = -1;
1343 static int metadata_flag = 0;
1344
1345 AVInputFormat *input_fmt = NULL;
1346 AVFormatParameters params, *formatParams = NULL;
1347
1348 int c,long_option_index;
1349 const char *optstring = "P:o:k:f:F:x:y:v:V:a:A:S:K:d:H:c:G:Z:C:B:p:N:s:e:D:h::";
1350 struct option options [] = {
1351 {"pid",required_argument,NULL, 'P'},
1352 {"output",required_argument,NULL,'o'},
1353 {"skeleton",no_argument,NULL,'k'},
1354 {"no-skeleton",no_argument,&flag,NOSKELETON},
1355 {"format",required_argument,NULL,'f'},
1356 {"width",required_argument,NULL,'x'},
1357 {"height",required_argument,NULL,'y'},
1358 {"max_size",required_argument,&flag,MAXSIZE_FLAG},
1359 {"videoquality",required_argument,NULL,'v'},
1360 {"videobitrate",required_argument,NULL,'V'},
1361 {"audioquality",required_argument,NULL,'a'},
1362 {"audiobitrate",required_argument,NULL,'A'},
1363 {"sharpness",required_argument,NULL,'S'},
1364 {"keyint",required_argument,NULL,'K'},
1365 {"deinterlace",0,&flag,DEINTERLACE_FLAG},
1366 {"pp",required_argument,&flag,PP_FLAG},
1367 {"samplerate",required_argument,NULL,'H'},
1368 {"channels",required_argument,NULL,'c'},
1369 {"gamma",required_argument,NULL,'G'},
1370 {"brightness",required_argument,NULL,'B'},
1371 {"contrast",required_argument,NULL,'C'},
1372 {"saturation",required_argument,NULL,'Z'},
1373 {"nosound",0,&flag,NOAUDIO_FLAG},
1374 {"noaudio",0,&flag,NOAUDIO_FLAG},
1375 {"novideo",0,&flag,NOVIDEO_FLAG},
1376 {"no-upscaling",0,&flag,NOUPSCALING_FLAG},
1377 #ifdef HAVE_FRAMEHOOK
1378 {"vhook",required_argument,&flag,VHOOK_FLAG},
1379 #endif
1380 {"framerate",required_argument,NULL,'F'},
1381 {"aspect",required_argument,&flag,ASPECT_FLAG},
1382 {"preset",required_argument,NULL,'p'},
1383 {"nice",required_argument,NULL,'N'},
1384 {"croptop",required_argument,&flag,CROPTOP_FLAG},
1385 {"cropbottom",required_argument,&flag,CROPBOTTOM_FLAG},
1386 {"cropright",required_argument,&flag,CROPRIGHT_FLAG},
1387 {"cropleft",required_argument,&flag,CROPLEFT_FLAG},
1388 {"inputfps",required_argument,&flag,INPUTFPS_FLAG},
1389 {"audiostream",required_argument,&flag,AUDIOSTREAM_FLAG},
1390 {"subtitles",required_argument,&flag,SUBTITLES_FLAG},
1391 {"subtitles-encoding",required_argument,&flag,SUBTITLES_ENCODING_FLAG},
1392 {"subtitles-ignore-non-utf8",0,&flag,SUBTITLES_IGNORE_NON_UTF8_FLAG},
1393 {"subtitles-language",required_argument,&flag,SUBTITLES_LANGUAGE_FLAG},
1394 {"subtitles-category",required_argument,&flag,SUBTITLES_CATEGORY_FLAG},
1395 {"starttime",required_argument,NULL,'s'},
1396 {"endtime",required_argument,NULL,'e'},
1397 {"sync",0,&flag,SYNC_FLAG},
1398 {"optimize",0,&flag,OPTIMIZE_FLAG},
1399 {"speedlevel",required_argument,&flag,SPEEDLEVEL_FLAG},
1400 {"frontend",0,&flag,FRONTEND_FLAG},
1401 {"frontendfile",required_argument,&flag,FRONTENDFILE_FLAG},
1402
1403 {"artist",required_argument,&metadata_flag,10},
1404 {"title",required_argument,&metadata_flag,11},
1405 {"date",required_argument,&metadata_flag,12},
1406 {"location",required_argument,&metadata_flag,13},
1407 {"organization",required_argument,&metadata_flag,14},
1408 {"copyright",required_argument,&metadata_flag,15},
1409 {"license",required_argument,&metadata_flag,16},
1410 {"contact",required_argument,&metadata_flag,17},
1411 {"source-hash",required_argument,&metadata_flag,18},
1412
1413 {"help",0,NULL,'h'},
1414 {NULL,0,NULL,0}
1415 };
1416
1417 char pidfile_name[255] = { '\0' };
1418 FILE *fpid = NULL;
1419
1420 ff2theora convert = ff2theora_init ();
1421 avcodec_register_all();
1422 avdevice_register_all();
1423 av_register_all();
1424
1425 if (argc == 1){
1426 print_usage ();
1427 }
1428 // set some variables;
1429 init_info(&info);
1430 theora_comment_init (&info.tc);
1431
1432 while((c=getopt_long(argc,argv,optstring,options,&long_option_index))!=EOF){
1433 switch(c)
1434 {
1435 case 0:
1436 if (flag) {
1437 switch (flag)
1438 {
1439 case DEINTERLACE_FLAG:
1440 convert->deinterlace = 1;
1441 flag = -1;
1442 break;
1443 case PP_FLAG:
1444 if(!strcmp(optarg, "help")) {
1445 fprintf(stdout, "%s", pp_help);
1446 exit(1);
1447 }
1448 snprintf(convert->pp_mode,sizeof(convert->pp_mode),"%s",optarg);
1449 flag = -1;
1450 break;
1451 case VHOOK_FLAG:
1452 convert->vhook = 1;
1453 add_frame_hooker(optarg);
1454 flag = -1;
1455 break;
1456
1457 case SYNC_FLAG:
1458 convert->sync = 1;
1459 flag = -1;
1460 break;
1461 case NOAUDIO_FLAG:
1462 convert->disable_audio = 1;
1463 flag = -1;
1464 break;
1465 case NOVIDEO_FLAG:
1466 convert->disable_video = 1;
1467 flag = -1;
1468 break;
1469 case NOUPSCALING_FLAG:
1470 convert->no_upscaling = 1;
1471 flag = -1;
1472 break;
1473 case OPTIMIZE_FLAG:
1474 info.speed_level = 0;
1475 flag = -1;
1476 break;
1477 case SPEEDLEVEL_FLAG:
1478 info.speed_level = atoi(optarg);
1479 flag = -1;
1480 break;
1481 case FRONTEND_FLAG:
1482 info.frontend = stderr;
1483 flag = -1;
1484 break;
1485 case FRONTENDFILE_FLAG:
1486 info.frontend = fopen(optarg, "w");
1487 flag = -1;
1488 break;
1489 /* crop */
1490 case CROPTOP_FLAG:
1491 convert->frame_topBand = crop_check(convert,"top",optarg);
1492 flag = -1;
1493 break;
1494 case CROPBOTTOM_FLAG:
1495 convert->frame_bottomBand = crop_check(convert,"bottom",optarg);
1496 flag = -1;
1497 break;
1498 case CROPRIGHT_FLAG:
1499 convert->frame_rightBand = crop_check(convert,"right",optarg);
1500 flag = -1;
1501 break;
1502 case CROPLEFT_FLAG:
1503 convert->frame_leftBand = crop_check(convert,"left",optarg);
1504 flag = -1;
1505 break;
1506 case ASPECT_FLAG:
1507 convert->frame_aspect = aspect_check(optarg);
1508 flag = -1;
1509 break;
1510 case MAXSIZE_FLAG:
1511 convert->max_size = atoi(optarg);
1512 flag = -1;
1513 break;
1514 case INPUTFPS_FLAG:
1515 convert->force_input_fps = get_framerate(optarg);
1516 flag = -1;
1517 break;
1518 case AUDIOSTREAM_FLAG:
1519 convert->audiostream = atoi(optarg);
1520 flag = -1;
1521 break;
1522 case NOSKELETON:
1523 info.with_skeleton=0;
1524 break;
1525 #ifdef HAVE_KATE
1526 case SUBTITLES_FLAG:
1527 set_subtitles_file(convert,optarg);
1528 flag = -1;
1529 info.with_kate=1;
1530 break;
1531 case SUBTITLES_ENCODING_FLAG:
1532 if (!strcmp(optarg,"utf-8")) set_subtitles_encoding(convert,ENC_UTF8);
1533 if (!strcmp(optarg,"utf8")) set_subtitles_encoding(convert,ENC_UTF8);
1534 else if (!strcmp(optarg,"iso-8859-1")) set_subtitles_encoding(convert,ENC_ISO_8859_1);
1535 else if (!strcmp(optarg,"latin1")) set_subtitles_encoding(convert,ENC_ISO_8859_1);
1536 else report_unknown_subtitle_encoding(optarg);
1537 flag = -1;
1538 break;
1539 case SUBTITLES_IGNORE_NON_UTF8_FLAG:
1540 convert->ignore_non_utf8 = 1;
1541 flag = -1;
1542 break;
1543 case SUBTITLES_LANGUAGE_FLAG:
1544 if (strlen(optarg)>15) {
1545 fprintf(stderr, "WARNING - language is limited to 15 characters, and will be truncated\n");
1546 }
1547 set_subtitles_language(convert,optarg);
1548 flag = -1;
1549 break;
1550 case SUBTITLES_CATEGORY_FLAG:
1551 if (strlen(optarg)>15) {
1552 fprintf(stderr, "WARNING - category is limited to 15 characters, and will be truncated\n");
1553 }
1554 set_subtitles_category(convert,optarg);
1555 flag = -1;
1556 break;
1557 #else
1558 case SUBTITLES_FLAG:
1559 case SUBTITLES_ENCODING_FLAG:
1560 case SUBTITLES_IGNORE_NON_UTF8_FLAG:
1561 case SUBTITLES_LANGUAGE_FLAG:
1562 case SUBTITLES_CATEGORY_FLAG:
1563 fprintf(stderr, "WARNING - Kate support not compiled in, subtitles will not be output\n"
1564 " - install libkate and rebuild ffmpeg2theora for subtitle support\n");
1565 break;
1566 #endif
1567 }
1568 }
1569
1570 /* metadata */
1571 if (metadata_flag){
1572 switch(metadata_flag) {
1573 case 10:
1574 theora_comment_add_tag(&info.tc, "ARTIST", optarg);
1575 break;
1576 case 11:
1577 theora_comment_add_tag(&info.tc, "TITLE", optarg);
1578 break;
1579 case 12:
1580 theora_comment_add_tag(&info.tc, "DATE", optarg);
1581 break;
1582 case 13:
1583 theora_comment_add_tag(&info.tc, "LOCATION", optarg);
1584 break;
1585 case 14:
1586 theora_comment_add_tag(&info.tc, "ORGANIZATION", optarg);
1587 break;
1588 case 15:
1589 theora_comment_add_tag(&info.tc, "COPYRIGHT", optarg);
1590 break;
1591 case 16:
1592 theora_comment_add_tag(&info.tc, "LICENSE", optarg);
1593 break;
1594 case 17:
1595 theora_comment_add_tag(&info.tc, "CONTACT", optarg);
1596 break;
1597 case 18:
1598 theora_comment_add_tag(&info.tc, "SOURCE HASH", optarg);
1599 break;
1600 }
1601 metadata_flag=0;
1602 }
1603 break;
1604 case 'e':
1605 convert->end_time = atof(optarg);
1606 break;
1607 case 's':
1608 convert->start_time = atof(optarg);
1609 break;
1610 case 'o':
1611 snprintf(outputfile_name,sizeof(outputfile_name),"%s",optarg);
1612 outputfile_set=1;
1613 break;
1614 case 'k':
1615 info.with_skeleton=1;
1616 break;
1617 case 'P':
1618 snprintf(pidfile_name, sizeof(pidfile_name), "%s", optarg);
1619 pidfile_name[sizeof(pidfile_name)-1] = '\0';
1620 break;
1621 case 'f':
1622 input_fmt=av_find_input_format(optarg);
1623 break;
1624 case 'x':
1625 convert->picture_width=atoi(optarg);
1626 break;
1627 case 'y':
1628 convert->picture_height=atoi(optarg);
1629 break;
1630 case 'v':
1631 convert->video_quality = rint(atof(optarg)*6.3);
1632 if(convert->video_quality <0 || convert->video_quality >63){
1633 fprintf(stderr, "Only values from 0 to 10 are valid for video quality.\n");
1634 exit(1);
1635 }
1636 convert->video_bitrate=0;
1637 break;
1638 case 'V':
1639 convert->video_bitrate=rint(atof(optarg)*1000);
1640 if (convert->video_bitrate < 1) {
1641 fprintf(stderr, "Only values from 1 to 16000 are valid for video bitrate (in kb/s).\n");
1642 exit(1);
1643 }
1644 convert->video_quality=0;
1645 break;
1646 case 'a':
1647 convert->audio_quality=atof(optarg);
1648 if(convert->audio_quality<-2 || convert->audio_quality>10){
1649 fprintf(stderr, "Only values from -2 to 10 are valid for audio quality.\n");
1650 exit(1);
1651 }
1652 convert->audio_bitrate=0;
1653 break;
1654 case 'A':
1655 convert->audio_bitrate=atof(optarg)*1000;
1656 if(convert->audio_bitrate<0){
1657 fprintf(stderr, "Only values >0 are valid for audio bitrate.\n");
1658 exit(1);
1659 }
1660 convert->audio_quality = -990;
1661 break;
1662 case 'G':
1663 convert->video_gamma = atof(optarg);
1664 break;
1665 case 'C':
1666 convert->video_contr = atof(optarg);
1667 break;
1668 case 'Z':
1669 convert->video_satur = atof(optarg);
1670 break;
1671 case 'B':
1672 convert->video_bright = atof(optarg);
1673 break;
1674 case 'S':
1675 convert->sharpness = atoi(optarg);
1676 if (convert->sharpness < 0 || convert->sharpness > 2) {
1677 fprintf (stderr, "Only values from 0 to 2 are valid for sharpness.\n");
1678 exit(1);
1679 }
1680 break;
1681 case 'K':
1682 convert->keyint = atoi(optarg);
1683 if (convert->keyint < 1 || convert->keyint > 65536) {
1684 fprintf (stderr, "Only values from 1 to 65536 are valid for keyframe interval.\n");
1685 exit(1);
1686 }
1687 break;
1688 case 'H':
1689 convert->sample_rate=atoi(optarg);
1690 break;
1691 case 'F':
1692 convert->framerate_new = get_framerate(optarg);
1693 break;
1694 case 'c':
1695 convert->channels=atoi(optarg);
1696 if(convert->channels <= 0) {
1697 fprintf (stderr, "You can not have less than one audio channel.\n");
1698 exit(1);
1699 }
1700 break;
1701 case 'p':
1702 //v2v presets
1703 if(!strcmp(optarg, "info")){
1704 print_presets_info();
1705 exit(1);
1706 }
1707 else if(!strcmp(optarg, "pro")){
1708 //need a way to set resize here. and not later
1709 convert->preset=V2V_PRESET_PRO;
1710 convert->video_quality = rint(7*6.3);
1711 convert->audio_quality = 3.00;
1712 convert->sharpness = 0;
1713 info.speed_level = 0;
1714 }
1715 else if(!strcmp(optarg,"preview")){
1716 //need a way to set resize here. and not later
1717 convert->preset=V2V_PRESET_PREVIEW;
1718 convert->video_quality = rint(5*6.3);
1719 convert->audio_quality = 1.00;
1720 convert->sharpness = 2;
1721 info.speed_level = 0;
1722 }
1723 else if(!strcmp(optarg,"videobin")){
1724 convert->preset=V2V_PRESET_VIDEOBIN;
1725 convert->video_bitrate=rint(600*1000);
1726 convert->video_quality = 0;
1727 convert->audio_quality = 3.00;
1728 convert->sharpness = 2;
1729 info.speed_level = 0;
1730 }
1731 else if(!strcmp(optarg,"padma")){
1732 convert->preset=V2V_PRESET_PADMA;
1733 convert->video_quality = rint(5*6.3);
1734 convert->audio_quality = 3.00;
1735 convert->sharpness = 0;
1736 info.speed_level = 0;
1737 }
1738 else if(!strcmp(optarg,"padma-stream")){
1739 convert->preset=V2V_PRESET_PADMASTREAM;
1740 convert->video_bitrate=rint(180*1000);
1741 convert->video_quality = 0;
1742 convert->audio_quality = -1.00;
1743 convert->sample_rate=44100;
1744 convert->sharpness = 2;
1745 convert->keyint = 16;
1746 info.speed_level = 0;
1747 }
1748 else{
1749 fprintf(stderr, "\nUnknown preset.\n\n");
1750 print_presets_info();
1751 exit(1);
1752 }
1753 break;
1754 case 'N':
1755 n = atoi(optarg);
1756 if (n) {
1757 #ifndef _WIN32
1758 if (nice(n)<0) {
1759 fprintf(stderr, "Error setting `%d' for niceness.", n);
1760 }
1761 #endif
1762 }
1763 break;
1764 case 'h':
1765 print_usage ();
1766 exit(1);
1767 }
1768 }
1769
1770 while(optind<argc){
1771 /* assume that anything following the options must be a filename */
1772 snprintf(inputfile_name,sizeof(inputfile_name),"%s",argv[optind]);
1773 if(!strcmp(inputfile_name,"-")){
1774 snprintf(inputfile_name,sizeof(inputfile_name),"pipe:");
1775 }
1776 if(outputfile_set!=1){
1777 /* reserve 4 bytes in the buffer for the `.ogv' extension */
1778 snprintf(outputfile_name, sizeof(outputfile_name) - 4, "%s", argv[optind]);
1779 if((str_ptr = strrchr(outputfile_name, '.'))) {
1780 sprintf(str_ptr, ".ogv");
1781 if(!strcmp(inputfile_name, outputfile_name)){
1782 snprintf(outputfile_name, sizeof(outputfile_name), "%s.ogv", inputfile_name);
1783 }
1784 }
1785 else {
1786 snprintf(outputfile_name, sizeof(outputfile_name), "%s.ogv", outputfile_name);
1787 }
1788 outputfile_set=1;
1789 }
1790 optind++;
1791 }
1792
1793 //FIXME: is using_stdin still neded? is it needed as global variable?
1794 using_stdin |= !strcmp(inputfile_name, "pipe:" ) ||
1795 !strcmp( inputfile_name, "/dev/stdin" );
1796
1797 if(outputfile_set != 1){
1798 fprintf(stderr, "You have to specify an output file with -o output.ogv.\n");
1799 exit(1);
1800 }
1801
1802 if(convert->end_time>0 && convert->end_time <= convert->start_time){
1803 fprintf(stderr, "End time has to be bigger than start time.\n");
1804 exit(1);
1805 }
1806
1807 if (*pidfile_name)
1808 {
1809 fpid = fopen(pidfile_name, "w");
1810 if (fpid != NULL)
1811 {
1812 fprintf(fpid, "%i", getpid());
1813 fclose(fpid);
1814 }
1815 }
1816
1817 for (n=0; n<convert->n_kate_streams; ++n) {
1818 ff2theora_kate_stream *ks=convert->kate_streams+n;
1819 if (load_subtitles(ks,convert->ignore_non_utf8)>0) {
1820 printf("Muxing Kate stream %d from %s as %s %s\n",
1821 n,ks->filename,
1822 ks->subtitles_language[0]?ks->subtitles_language:"<unknown language>",
1823 ks->subtitles_category[0]?ks->subtitles_category:"SUB");
1824 }
1825 else {
1826 if (n!=convert->n_kate_streams) {
1827 memmove(convert->kate_streams+n,convert->kate_streams+n+1,(convert->n_kate_streams-n-1)*sizeof(ff2theora_kate_stream));
1828 --convert->n_kate_streams;
1829 --n;
1830 }
1831 }
1832 }
1833
1834 oggmux_setup_kate_streams(&info, convert->n_kate_streams);
1835
1836 //detect image sequences and set framerate if provided
1837 if(av_guess_image2_codec(inputfile_name) != CODEC_ID_NONE || \
1838 (input_fmt != NULL && strcmp(input_fmt->name, "video4linux") >= 0)) {
1839 formatParams = &params;
1840 memset(formatParams, 0, sizeof(*formatParams));
1841 if(input_fmt != NULL && strcmp(input_fmt->name, "video4linux") >= 0) {
1842 formatParams->channel = 0;
1843 formatParams->width = PAL_HALF_WIDTH;
1844 formatParams->height = PAL_HALF_HEIGHT;
1845 formatParams->time_base.den = 25;
1846 formatParams->time_base.num = 2;
1847 if(convert->picture_width)
1848 formatParams->width = convert->picture_width;
1849 if(convert->picture_height)
1850 formatParams->height = convert->picture_height;
1851 }
1852 if(convert->force_input_fps.num > 0) {
1853 formatParams->time_base.den = convert->force_input_fps.num;
1854 formatParams->time_base.num = convert->force_input_fps.den;
1855 } else if(convert->framerate_new.num > 0) {
1856 formatParams->time_base.den = convert->framerate_new.num;
1857 formatParams->time_base.num = convert->framerate_new.den;
1858 }
1859 formatParams->video_codec_id = av_guess_image2_codec(inputfile_name);
1860 }
1861 if (av_open_input_file(&convert->context, inputfile_name, input_fmt, 0, formatParams) >= 0){
1862 if (av_find_stream_info (convert->context) >= 0){
1863 #ifdef WIN32
1864 if(!strcmp(outputfile_name,"-") || !strcmp(outputfile_name,"/dev/stdout")){
1865 _setmode(_fileno(stdout), _O_BINARY);
1866 info.outfile = stdout;
1867 }
1868 else {
1869 info.outfile = fopen(outputfile_name,"wb");
1870 }
1871 #else
1872 if(!strcmp(outputfile_name,"-")){
1873 snprintf(outputfile_name,sizeof(outputfile_name),"/dev/stdout");
1874 }
1875 info.outfile = fopen(outputfile_name,"wb");
1876 #endif
1877 if(info.frontend) {
1878 fprintf(info.frontend, "\nf2t ;duration: %d;\n", (int)(convert->context->duration / AV_TIME_BASE));
1879 fflush(info.frontend);
1880
1881 }
1882 else {
1883 dump_format (convert->context, 0,inputfile_name, 0);
1884 }
1885 if(convert->disable_audio){
1886 fprintf(stderr, " [audio disabled].\n");
1887 }
1888 if(convert->disable_video){
1889 fprintf(stderr, " [video disabled].\n");
1890 }
1891 if(convert->sync){
1892 fprintf(stderr, " Use A/V Sync from input container.\n");
1893 }
1894
1895 convert->pts_offset =
1896 (double) convert->context->start_time / AV_TIME_BASE;
1897 if(!info.outfile) {
1898 if(info.frontend)
1899 fprintf(info.frontend, "\nf2t ;result: Unable to open output file.;\n");
1900 else
1901 fprintf (stderr,"\nUnable to open output file `%s'.\n", outputfile_name);
1902 return(1);
1903 }
1904 if (convert->context->duration != AV_NOPTS_VALUE) {
1905 info.duration = convert->context->duration / AV_TIME_BASE;
1906 }
1907 ff2theora_output (convert);
1908 convert->audio_index =convert->video_index = -1;
1909 }
1910 else{
1911 if(info.frontend)
1912 fprintf(info.frontend, "\nf2t ;result: input format not suported.;\n");
1913 else
1914 fprintf (stderr,"\nUnable to decode input.\n");
1915 return(1);
1916 }
1917 av_close_input_file (convert->context);
1918 }
1919 else{
1920 fprintf (stderr, "\nFile `%s' does not exist or has an unknown data format.\n", inputfile_name);
1921 return(1);
1922 }
1923 ff2theora_close (convert);
1924 fprintf(stderr, "\n");
1925
1926 if (*pidfile_name)
1927 unlink(pidfile_name);
1928
1929 if(info.frontend)
1930 fprintf(info.frontend, "\nf2t ;result: ok;\n");
1931 if(info.frontend && info.frontend != stderr)
1932 fclose(info.frontend);
1933 return(0);
1934 }
0 #ifndef _F2T_FFMPEG2THEORA_H_
1 #define _F2T_FFMPEG2THEORA_H_
2
3 #include "subtitles.h"
4
5 typedef enum {
6 ENC_UNSET,
7 ENC_UTF8,
8 ENC_ISO_8859_1,
9 } F2T_ENCODING;
10
11
12 typedef struct ff2theora_subtitle{
13 char *text;
14 size_t len;
15 double t0;
16 double t1;
17 } ff2theora_subtitle;
18
19 typedef struct ff2theora_kate_stream{
20 const char *filename;
21 size_t num_subtitles;
22 ff2theora_subtitle *subtitles;
23 size_t subtitles_count; /* total subtitles output so far */
24 F2T_ENCODING subtitles_encoding;
25 char subtitles_language[16];
26 char subtitles_category[16];
27 } ff2theora_kate_stream;
28
29 typedef struct ff2theora{
30 AVFormatContext *context;
31 int video_index;
32 int audio_index;
33
34 int deinterlace;
35 int vhook;
36 int disable_video;
37 int no_upscaling;
38
39 int audiostream;
40 int sample_rate;
41 int channels;
42 int disable_audio;
43 float audio_quality;
44 int audio_bitrate;
45 int preset;
46
47 int picture_width;
48 int picture_height;
49 double fps;
50 struct SwsContext *sws_colorspace_ctx; /* for image resampling/resizing */
51 struct SwsContext *sws_scale_ctx; /* for image resampling/resizing */
52 ReSampleContext *audio_resample_ctx;
53 ogg_int32_t aspect_numerator;
54 ogg_int32_t aspect_denominator;
55 double frame_aspect;
56 int max_size;
57
58 int pix_fmt;
59 int video_quality;
60 int video_bitrate;
61 int sharpness;
62 int keyint;
63 char pp_mode[255];
64
65 AVRational force_input_fps;
66 int sync;
67
68 /* cropping */
69 int frame_topBand;
70 int frame_bottomBand;
71 int frame_leftBand;
72 int frame_rightBand;
73
74 int frame_width;
75 int frame_height;
76 int frame_x_offset;
77 int frame_y_offset;
78
79 /* In seconds */
80 double start_time;
81 double end_time;
82
83 AVRational framerate_new;
84
85 double pts_offset; /* between given input pts and calculated output pts */
86 int64_t frame_count; /* total video frames output so far */
87 int64_t sample_count; /* total audio samples output so far */
88
89 size_t n_kate_streams;
90 ff2theora_kate_stream *kate_streams;
91
92 int ignore_non_utf8;
93 // ffmpeg2theora --nosound -f dv -H 32000 -S 0 -v 8 -x 384 -y 288 -G 1.5 input.dv
94 double video_gamma;
95 double video_bright;
96 double video_contr;
97 double video_satur;
98 int y_lut_used;
99 int uv_lut_used;
100 unsigned char y_lut[256];
101 unsigned char uv_lut[256];
102 }
103 *ff2theora;
104
105 #endif
0 /* -*- tab-width:4;c-file-style:"cc-mode"; -*- */
1 /*
2 * subtitles.c -- Kate Subtitles
3 * Copyright (C) 2007-2008 <j@v2v.cc>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software Foundation,
17 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 *
19 */
20
21 #include <stdio.h>
22 #include <stdlib.h>
23 #include <unistd.h>
24 #include <string.h>
25 #include <getopt.h>
26 #include <math.h>
27 #include <errno.h>
28
29 #include "libavformat/avformat.h"
30
31 #ifdef WIN32
32 #include "fcntl.h"
33 #endif
34
35 #include "theorautils.h"
36 #include "subtitles.h"
37
38
39 /**
40 * adds a new kate stream structure
41 */
42 void add_kate_stream(ff2theora this){
43 ff2theora_kate_stream *ks;
44 this->kate_streams=(ff2theora_kate_stream*)realloc(this->kate_streams,(this->n_kate_streams+1)*sizeof(ff2theora_kate_stream));
45 ks=&this->kate_streams[this->n_kate_streams++];
46 ks->filename = NULL;
47 ks->num_subtitles = 0;
48 ks->subtitles = 0;
49 ks->subtitles_count = 0; /* denotes not set yet */
50 ks->subtitles_encoding = ENC_UNSET;
51 strcpy(ks->subtitles_language, "");
52 strcpy(ks->subtitles_category, "");
53 }
54
55 /*
56 * sets the filename of the next subtitles file
57 */
58 void set_subtitles_file(ff2theora this,const char *filename){
59 size_t n;
60 for (n=0; n<this->n_kate_streams;++n) {
61 if (!this->kate_streams[n].filename) break;
62 }
63 if (n==this->n_kate_streams) add_kate_stream(this);
64 this->kate_streams[n].filename = filename;
65 }
66
67 /*
68 * sets the language of the next subtitles file
69 */
70 void set_subtitles_language(ff2theora this,const char *language){
71 size_t n;
72 for (n=0; n<this->n_kate_streams;++n) {
73 if (!this->kate_streams[n].subtitles_language[0]) break;
74 }
75 if (n==this->n_kate_streams) add_kate_stream(this);
76 strncpy(this->kate_streams[n].subtitles_language, language, 16);
77 this->kate_streams[n].subtitles_language[15] = 0;
78 }
79
80 /*
81 * sets the category of the next subtitles file
82 */
83 void set_subtitles_category(ff2theora this,const char *category){
84 size_t n;
85 for (n=0; n<this->n_kate_streams;++n) {
86 if (!this->kate_streams[n].subtitles_category[0]) break;
87 }
88 if (n==this->n_kate_streams) add_kate_stream(this);
89 strncpy(this->kate_streams[n].subtitles_category, category, 16);
90 this->kate_streams[n].subtitles_category[15] = 0;
91 }
92
93 /**
94 * sets the encoding of the next subtitles file
95 */
96 void set_subtitles_encoding(ff2theora this,F2T_ENCODING encoding){
97 size_t n;
98 for (n=0; n<this->n_kate_streams;++n) {
99 if (this->kate_streams[n].subtitles_encoding==ENC_UNSET) break;
100 }
101 if (n==this->n_kate_streams) add_kate_stream(this);
102 this->kate_streams[n].subtitles_encoding = encoding;
103 }
104
105
106 void report_unknown_subtitle_encoding(const char *name)
107 {
108 fprintf(stderr, "Unknown character encoding: %s\n",name);
109 fprintf(stderr, "Valid character encodings are:\n");
110 fprintf(stderr, " " SUPPORTED_ENCODINGS "\n");
111 }
112
113 #ifdef HAVE_KATE
114
115 static char *fgets2(char *s,size_t sz,FILE *f)
116 {
117 char *ret = fgets(s, sz, f);
118 /* fixup DOS newline character */
119 char *ptr=strchr(s, '\r');
120 if (ptr) {
121 *ptr='\n';
122 *(ptr+1)=0;
123 }
124 return ret;
125 }
126
127 static double hmsms2s(int h,int m,int s,int ms)
128 {
129 return h*3600+m*60+s+ms/1000.0;
130 }
131
132 /* very simple implementation when no iconv */
133 static char *convert_subtitle_to_utf8(F2T_ENCODING encoding,char *text,int ignore_non_utf8)
134 {
135 size_t nbytes;
136 char *ptr;
137 char *newtext = NULL;
138 int errors=0;
139
140 if (!text) return NULL;
141
142 switch (encoding) {
143 case ENC_UNSET:
144 /* we don't know what encoding this is, assume utf-8 and we'll yell if it ain't */
145 /* fall through */
146 case ENC_UTF8:
147 /* nothing to do, already in utf-8 */
148 if (ignore_non_utf8) {
149 /* actually, give the user the option of just ignoring non UTF8 characters */
150 char *wptr;
151 size_t wlen0;
152
153 nbytes = strlen(text)+1;
154 newtext=(char*)malloc(nbytes);
155 if (!newtext) {
156 fprintf(stderr, "WARNING - Memory allocation failed - cannot convert text\n");
157 return NULL;
158 }
159 ptr = text;
160 wptr = newtext;
161 wlen0 = nbytes;
162 while (nbytes>0) {
163 int ret=kate_text_get_character(kate_utf8, (const char ** const)&ptr, &nbytes);
164 if (ret>=0) {
165 /* valid character */
166 ret=kate_text_set_character(kate_utf8, ret, &wptr, &wlen0);
167 if (ret<0) {
168 fprintf(stderr, "WARNING - failed to filter utf8 text: %s\n", text);
169 free(newtext);
170 return NULL;
171 }
172 if (ret==0) break;
173 }
174 else {
175 /* skip offending byte - we can't skip the terminating zero as we do byte by byte */
176 ++errors;
177 ++ptr;
178 --nbytes;
179 }
180 }
181
182 if (errors) {
183 fprintf(stderr, "WARNING - Found non utf8 character(s) in string %s, scrubbed out\n", text);
184 }
185 }
186 else {
187 newtext = strdup(text);
188 }
189 break;
190 case ENC_ISO_8859_1:
191 /* simple, characters above 0x7f are broken in two,
192 and code points map to the iso-8859-1 8 bit codes */
193 nbytes=0;
194 for (ptr=text;*ptr;++ptr) {
195 nbytes++;
196 if (0x80&*(unsigned char*)ptr) nbytes++;
197 }
198 newtext=(char*)malloc(1+nbytes);
199 if (!newtext) {
200 fprintf(stderr, "WARNING - Memory allocation failed - cannot convert text\n");
201 return NULL;
202 }
203 nbytes=0;
204 for (ptr=text;*ptr;++ptr) {
205 if (0x80&*(unsigned char*)ptr) {
206 newtext[nbytes++]=0xc0|((*(unsigned char*)ptr)>>6);
207 newtext[nbytes++]=0x80|((*(unsigned char*)ptr)&0x3f);
208 }
209 else {
210 newtext[nbytes++]=*ptr;
211 }
212 }
213 newtext[nbytes++]=0;
214 break;
215 default:
216 fprintf(stderr, "ERROR: encoding %d not handled in conversion!\n", encoding);
217 newtext = strdup("");
218 break;
219 }
220 return newtext;
221 }
222
223 static void remove_last_newline(char *text)
224 {
225 if (*text) {
226 char *ptr = text+strlen(text)-1;
227 if (*ptr=='\n') *ptr=0;
228 }
229 }
230
231 #endif
232
233 int load_subtitles(ff2theora_kate_stream *this, int ignore_non_utf8)
234 {
235 #ifdef HAVE_KATE
236 enum { need_id, need_timing, need_text };
237 int need = need_id;
238 int last_seen_id=0;
239 int ret;
240 int id;
241 static char text[4096];
242 int h0,m0,s0,ms0,h1,m1,s1,ms1;
243 double t0=0.0;
244 double t1=0.0;
245 static char str[4096];
246 int warned=0;
247 FILE *f;
248 size_t len;
249 unsigned int line=0;
250 char *utf8;
251
252 this->subtitles = NULL;
253
254 if (!this->filename) {
255 fprintf(stderr,"WARNING - No subtitles file to load from\n");
256 return -1;
257 }
258
259 f = fopen(this->filename, "r");
260 if (!f) {
261 fprintf(stderr,"WARNING - Failed to open subtitles file %s (%s)\n", this->filename, strerror(errno));
262 return -1;
263 }
264
265 /* first, check for a BOM */
266 ret=fread(str,1,3,f);
267 if (ret<3 || memcmp(str,"\xef\xbb\xbf",3)) {
268 /* No BOM, rewind */
269 fseek(f,0,SEEK_SET);
270 }
271
272 fgets2(str,sizeof(str),f);
273 ++line;
274 while (!feof(f)) {
275 switch (need) {
276 case need_id:
277 if (!strcmp(str,"\n")) {
278 /* be nice and ignore extra empty lines between records */
279 }
280 else {
281 ret=sscanf(str,"%d\n",&id);
282 if (ret!=1 || id<0) {
283 fprintf(stderr,"WARNING - %s:%u: Syntax error: %s\n",this->filename,line,str);
284 fclose(f);
285 free(this->subtitles);
286 return -1;
287 }
288 if (id!=last_seen_id+1) {
289 fprintf(stderr,"WARNING - %s:%u: non consecutive ids: %s - pretending not to have noticed\n",this->filename,line,str);
290 }
291 last_seen_id=id;
292 need=need_timing;
293 strcpy(text,"");
294 }
295 break;
296 case need_timing:
297 ret=sscanf(str,"%d:%d:%d%*[.,]%d --> %d:%d:%d%*[.,]%d\n",&h0,&m0,&s0,&ms0,&h1,&m1,&s1,&ms1);
298 if (ret!=8 || (h0|m0|s0|ms0)<0 || (h1|m1|s1|ms1)<0) {
299 fprintf(stderr,"WARNING - %s:%u: Syntax error: %s\n",this->filename,line,str);
300 fclose(f);
301 free(this->subtitles);
302 return -1;
303 }
304 else {
305 t0=hmsms2s(h0,m0,s0,ms0);
306 t1=hmsms2s(h1,m1,s1,ms1);
307 }
308 need=need_text;
309 break;
310 case need_text:
311 if (str[0]=='\n') {
312 /* we have all the lines for that subtitle, remove the last \n */
313 remove_last_newline(text);
314
315 /* we want all text to be UTF8 */
316 utf8=convert_subtitle_to_utf8(this->subtitles_encoding,text,ignore_non_utf8);
317 if (!utf8) {
318 fclose(f);
319 free(this->subtitles);
320 return -1;
321 break;
322 }
323
324 len = strlen(utf8);
325 this->subtitles = (ff2theora_subtitle*)realloc(this->subtitles, (this->num_subtitles+1)*sizeof(ff2theora_subtitle));
326 if (!this->subtitles) {
327 free(utf8);
328 fprintf(stderr, "Out of memory\n");
329 fclose(f);
330 free(this->subtitles);
331 return -1;
332 }
333 ret=kate_text_validate(kate_utf8,utf8,len+1);
334 if (ret<0) {
335 if (!warned) {
336 fprintf(stderr,"WARNING - %s:%u: subtitle %s is not valid utf-8\n",this->filename,line,utf8);
337 fprintf(stderr," further invalid subtitles will NOT be flagged\n");
338 warned=1;
339 }
340 }
341 else {
342 /* kill off trailing \n characters */
343 while (len>0) {
344 if (utf8[len-1]=='\n') utf8[--len]=0; else break;
345 }
346 this->subtitles[this->num_subtitles].text = utf8;
347 this->subtitles[this->num_subtitles].len = len;
348 this->subtitles[this->num_subtitles].t0 = t0;
349 this->subtitles[this->num_subtitles].t1 = t1;
350 this->num_subtitles++;
351 }
352 need=need_id;
353 }
354 else {
355 /* in case of very long subtitles */
356 len=strlen(text);
357 if (len+strlen(str) >= sizeof(text)) {
358 fprintf(stderr,"WARNING - %s:%u: subtitle text is too long - truncated\n",this->filename,line);
359 }
360 strncpy(text+len,str,sizeof(text)-len);
361 text[sizeof(text)-1]=0;
362 }
363 break;
364 }
365 fgets2(str,sizeof(str),f);
366 ++line;
367 }
368
369 fclose(f);
370
371 if (need!=need_id) {
372 /* shouldn't be a problem though, but warn */
373 fprintf(stderr,"WARNING - %s:%u: missing data in %s - truncated file ?\n",this->filename,line,this->filename);
374 }
375
376 /* fprintf(stderr," %u subtitles loaded.\n", this->num_subtitles); */
377
378 return this->num_subtitles;
379 #else
380 return 0;
381 #endif
382 }
383
384 void free_subtitles(ff2theora this)
385 {
386 size_t i,n;
387 for (i=0; i<this->n_kate_streams; ++i) {
388 ff2theora_kate_stream *ks=this->kate_streams+i;
389 for (n=0; n<ks->num_subtitles; ++n) free(ks->subtitles[n].text);
390 free(ks->subtitles);
391 }
392 free(this->kate_streams);
393 }
394
0 #ifndef _F2T_SUBTITLES_H_
1 #define _F2T_SUBTITLES_H_
2
3 #ifdef HAVE_KATE
4 #include "kate/kate.h"
5 #endif
6 #include "ffmpeg2theora.h"
7
8 #ifndef __GNUC__
9 /* Windows doesn't have strcasecmp but stricmp (at least, DOS had)
10 (or was that strcmpi ? Might have been Borland C) */
11 #define strcasecmp(s1, s2) stricmp(s1, s2)
12 #endif
13
14
15 #define SUPPORTED_ENCODINGS "utf-8, utf8, iso-8859-1, latin1"
16
17 extern void add_kate_stream(ff2theora this);
18 extern int load_subtitles(ff2theora_kate_stream *this, int ignore_non_utf8);
19 extern void free_subtitles(ff2theora this);
20
21 extern void set_subtitles_file(ff2theora this,const char *filename);
22 extern void set_subtitles_language(ff2theora this,const char *language);
23 extern void set_subtitles_category(ff2theora this,const char *category);
24 extern void set_subtitles_encoding(ff2theora this,F2T_ENCODING encoding);
25 extern void report_unknown_subtitle_encoding(const char *name);
26
27 #endif
28
0 /* -*- tab-width:4;c-file-style:"cc-mode"; -*- */
1 /*
2 * theorautils.c - Ogg Theora/Ogg Vorbis Abstraction and Muxing
3 * Copyright (C) 2003-2008 <j@v2v.cc>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software Foundation,
17 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 *
19 */
20
21 #include <stdio.h>
22 #include <stdlib.h>
23 #include <unistd.h>
24 #include <string.h>
25 #include <time.h>
26
27 #include "theora/theora.h"
28 #include "vorbis/codec.h"
29 #include "vorbis/vorbisenc.h"
30 #ifdef HAVE_OGGKATE
31 #include "kate/oggkate.h"
32 #endif
33
34 #include "theorautils.h"
35
36
37 static double rint(double x)
38 {
39 if (x < 0.0)
40 return (double)(int)(x - 0.5);
41 else
42 return (double)(int)(x + 0.5);
43 }
44
45 void init_info(oggmux_info *info) {
46 info->with_skeleton = 1; /* skeleton is enabled by default */
47 info->frontend = NULL; /*frontend mode*/
48 info->videotime = 0;
49 info->audiotime = 0;
50 info->audio_bytesout = 0;
51 info->video_bytesout = 0;
52 info->kate_bytesout = 0;
53
54 info->videopage_valid = 0;
55 info->audiopage_valid = 0;
56 info->audiopage_buffer_length = 0;
57 info->videopage_buffer_length = 0;
58 info->audiopage = NULL;
59 info->videopage = NULL;
60 info->start_time = time(NULL);
61 info->duration = -1;
62 info->speed_level = -1;
63
64 info->v_pkg=0;
65 info->a_pkg=0;
66 info->k_pkg=0;
67 #ifdef OGGMUX_DEBUG
68 info->a_page=0;
69 info->v_page=0;
70 info->k_page=0;
71 #endif
72
73 info->with_kate = 0;
74 info->n_kate_streams = 0;
75 info->kate_streams = NULL;
76 }
77
78 void oggmux_setup_kate_streams(oggmux_info *info, int n_kate_streams)
79 {
80 int n;
81
82 info->n_kate_streams = n_kate_streams;
83 info->kate_streams = NULL;
84 if (n_kate_streams == 0) return;
85 info->kate_streams = (oggmux_kate_stream*)malloc(n_kate_streams*sizeof(oggmux_kate_stream));
86 for (n=0; n<n_kate_streams; ++n) {
87 oggmux_kate_stream *ks=info->kate_streams+n;
88 ks->katepage_valid = 0;
89 ks->katepage_buffer_length = 0;
90 ks->katepage = NULL;
91 ks->katetime = 0;
92 }
93 }
94
95 static void write16le(unsigned char *ptr,ogg_uint16_t v)
96 {
97 ptr[0]=v&0xff;
98 ptr[1]=(v>>8)&0xff;
99 }
100
101 static void write32le(unsigned char *ptr,ogg_uint32_t v)
102 {
103 ptr[0]=v&0xff;
104 ptr[1]=(v>>8)&0xff;
105 ptr[2]=(v>>16)&0xff;
106 ptr[3]=(v>>24)&0xff;
107 }
108
109 static void write64le(unsigned char *ptr,ogg_int64_t v)
110 {
111 ogg_uint32_t hi=v>>32;
112 ptr[0]=v&0xff;
113 ptr[1]=(v>>8)&0xff;
114 ptr[2]=(v>>16)&0xff;
115 ptr[3]=(v>>24)&0xff;
116 ptr[4]=hi&0xff;
117 ptr[5]=(hi>>8)&0xff;
118 ptr[6]=(hi>>16)&0xff;
119 ptr[7]=(hi>>24)&0xff;
120 }
121
122 void add_fishead_packet (oggmux_info *info) {
123 ogg_packet op;
124
125 memset (&op, 0, sizeof (op));
126
127 op.packet = _ogg_calloc (64, sizeof(unsigned char));
128 if (op.packet == NULL) return;
129
130 memset (op.packet, 0, 64);
131 memcpy (op.packet, FISHEAD_IDENTIFIER, 8); /* identifier */
132 write16le(op.packet+8, SKELETON_VERSION_MAJOR); /* version major */
133 write16le(op.packet+10, SKELETON_VERSION_MINOR); /* version minor */
134 write64le(op.packet+12, (ogg_int64_t)0); /* presentationtime numerator */
135 write64le(op.packet+20, (ogg_int64_t)1000); /* presentationtime denominator */
136 write64le(op.packet+28, (ogg_int64_t)0); /* basetime numerator */
137 write64le(op.packet+36, (ogg_int64_t)1000); /* basetime denominator */
138 /* both the numerator are zero hence handled by the memset */
139 write32le(op.packet+44, 0); /* UTC time, set to zero for now */
140
141 op.b_o_s = 1; /* its the first packet of the stream */
142 op.e_o_s = 0; /* its not the last packet of the stream */
143 op.bytes = 64; /* length of the packet in bytes */
144
145 ogg_stream_packetin (&info->so, &op); /* adding the packet to the skeleton stream */
146 _ogg_free (op.packet);
147 }
148
149 /*
150 * Adds the fishead packets in the skeleton output stream along with the e_o_s packet
151 */
152 void add_fisbone_packet (oggmux_info *info) {
153 ogg_packet op;
154 int n;
155
156 if (!info->audio_only) {
157 memset (&op, 0, sizeof (op));
158 op.packet = _ogg_calloc (80, sizeof(unsigned char));
159 if (op.packet == NULL) return;
160
161 memset (op.packet, 0, 80);
162 /* it will be the fisbone packet for the theora video */
163 memcpy (op.packet, FISBONE_IDENTIFIER, 8); /* identifier */
164 write32le(op.packet+8, FISBONE_MESSAGE_HEADER_OFFSET); /* offset of the message header fields */
165 write32le(op.packet+12, info->to.serialno); /* serialno of the theora stream */
166 write32le(op.packet+16, 3); /* number of header packets */
167 /* granulerate, temporal resolution of the bitstream in samples/microsecond */
168 write64le(op.packet+20, info->ti.fps_numerator); /* granulrate numerator */
169 write64le(op.packet+28, info->ti.fps_denominator); /* granulrate denominator */
170 write64le(op.packet+36, 0); /* start granule */
171 write32le(op.packet+44, 0); /* preroll, for theora its 0 */
172 *(op.packet+48) = theora_granule_shift (&info->ti); /* granule shift */
173 memcpy(op.packet+FISBONE_SIZE, "Content-Type: video/theora\r\n", 28); /* message header field, Content-Type */
174
175 op.b_o_s = 0;
176 op.e_o_s = 0;
177 op.bytes = 80; /* size of the packet in bytes */
178
179 ogg_stream_packetin (&info->so, &op);
180 _ogg_free (op.packet);
181 }
182
183 if (!info->video_only) {
184 memset (&op, 0, sizeof (op));
185 op.packet = _ogg_calloc (80, sizeof(unsigned char));
186 if (op.packet == NULL) return;
187
188 memset (op.packet, 0, 80);
189 /* it will be the fisbone packet for the vorbis audio */
190 memcpy (op.packet, FISBONE_IDENTIFIER, 8); /* identifier */
191 write32le(op.packet+8, FISBONE_MESSAGE_HEADER_OFFSET); /* offset of the message header fields */
192 write32le(op.packet+12, info->vo.serialno); /* serialno of the vorbis stream */
193 write32le(op.packet+16, 3); /* number of header packet */
194 /* granulerate, temporal resolution of the bitstream in Hz */
195 write64le(op.packet+20, info->sample_rate); /* granulerate numerator */
196 write64le(op.packet+28, (ogg_int64_t)1); /* granulerate denominator */
197 write64le(op.packet+36, 0); /* start granule */
198 write32le(op.packet+44, 2); /* preroll, for vorbis its 2 */
199 *(op.packet+48) = 0; /* granule shift, always 0 for vorbis */
200 memcpy (op.packet+FISBONE_SIZE, "Content-Type: audio/vorbis\r\n", 28);
201 /* Important: Check the case of Content-Type for correctness */
202
203 op.b_o_s = 0;
204 op.e_o_s = 0;
205 op.bytes = 80;
206
207 ogg_stream_packetin (&info->so, &op);
208 _ogg_free (op.packet);
209 }
210
211 #ifdef HAVE_KATE
212 if (info->with_kate) {
213 for (n=0; n<info->n_kate_streams; ++n) {
214 oggmux_kate_stream *ks=info->kate_streams+n;
215 memset (&op, 0, sizeof (op));
216 op.packet = _ogg_calloc (86, sizeof(unsigned char));
217 memset (op.packet, 0, 86);
218 /* it will be the fisbone packet for the kate stream */
219 memcpy (op.packet, FISBONE_IDENTIFIER, 8); /* identifier */
220 write32le(op.packet+8, FISBONE_MESSAGE_HEADER_OFFSET); /* offset of the message header fields */
221 write32le(op.packet+12, ks->ko.serialno); /* serialno of the vorbis stream */
222 write32le(op.packet+16, ks->ki.num_headers); /* number of header packet */
223 /* granulerate, temporal resolution of the bitstream in Hz */
224 write64le(op.packet+20, ks->ki.gps_numerator); /* granulerate numerator */
225 write64le(op.packet+28, ks->ki.gps_denominator); /* granulerate denominator */
226 write64le(op.packet+36, 0); /* start granule */
227 write32le(op.packet+44, 0); /* preroll, for kate it's 0 */
228 *(op.packet+48) = ks->ki.granule_shift; /* granule shift */
229 memcpy (op.packet+FISBONE_SIZE, "Content-Type: application/x-kate\r\n", 34);
230 /* Important: Check the case of Content-Type for correctness */
231
232 op.b_o_s = 0;
233 op.e_o_s = 0;
234 op.bytes = 86;
235
236 ogg_stream_packetin (&info->so, &op);
237 _ogg_free (op.packet);
238 }
239 }
240 #endif
241 }
242
243 void oggmux_init (oggmux_info *info){
244 ogg_page og;
245 ogg_packet op;
246
247 /* yayness. Set up Ogg output stream */
248 srand (time (NULL));
249 ogg_stream_init (&info->vo, rand ());
250
251 if(!info->audio_only){
252 ogg_stream_init (&info->to, rand ()); /* oops, add one ot the above */
253 theora_encode_init (&info->td, &info->ti);
254
255 if(info->speed_level >= 0) {
256 int max_speed_level;
257 theora_control(&info->td, TH_ENCCTL_GET_SPLEVEL_MAX, &max_speed_level, sizeof(int));
258 if(info->speed_level > max_speed_level)
259 info->speed_level = max_speed_level;
260 theora_control(&info->td, TH_ENCCTL_SET_SPLEVEL, &info->speed_level, sizeof(int));
261 }
262 }
263 /* init theora done */
264
265 /* initialize Vorbis too, if we have audio. */
266 if(!info->video_only){
267 int ret;
268 vorbis_info_init (&info->vi);
269 /* Encoding using a VBR quality mode. */
270 if(info->vorbis_quality>-99)
271 ret =vorbis_encode_init_vbr (&info->vi, info->channels,info->sample_rate,info->vorbis_quality);
272 else
273 ret=vorbis_encode_init(&info->vi,info->channels,info->sample_rate,-1,info->vorbis_bitrate,-1);
274
275 if (ret){
276 fprintf (stderr,
277 "The Vorbis encoder could not set up a mode according to\n"
278 "the requested quality or bitrate.\n\n");
279 exit (1);
280 }
281
282 vorbis_comment_init (&info->vc);
283 vorbis_comment_add_tag (&info->vc, "ENCODER",PACKAGE_STRING);
284 /* set up the analysis state and auxiliary encoding storage */
285 vorbis_analysis_init (&info->vd, &info->vi);
286 vorbis_block_init (&info->vd, &info->vb);
287
288 }
289 /* audio init done */
290
291 /* initialize kate if we have subtitles */
292 if (info->with_kate) {
293 int ret, n;
294 #ifdef HAVE_KATE
295 for (n=0; n<info->n_kate_streams; ++n) {
296 oggmux_kate_stream *ks=info->kate_streams+n;
297 ogg_stream_init (&ks->ko, rand ()); /* oops, add one ot the above */
298 ret = kate_encode_init (&ks->k, &ks->ki);
299 if (ret<0) {
300 fprintf(stderr, "kate_encode_init: %d\n",ret);
301 exit(1);
302 }
303 ret = kate_comment_init(&ks->kc);
304 if (ret<0) {
305 fprintf(stderr, "kate_comment_init: %d\n",ret);
306 exit(1);
307 }
308 kate_comment_add_tag (&ks->kc, "ENCODER",PACKAGE_STRING);
309 }
310 #endif
311 }
312 /* kate init done */
313
314 /* first packet should be skeleton fishead packet, if skeleton is used */
315
316 if (info->with_skeleton) {
317 ogg_stream_init (&info->so, rand());
318 add_fishead_packet (info);
319 if (ogg_stream_pageout (&info->so, &og) != 1){
320 fprintf (stderr, "Internal Ogg library error.\n");
321 exit (1);
322 }
323 fwrite (og.header, 1, og.header_len, info->outfile);
324 fwrite (og.body, 1, og.body_len, info->outfile);
325 }
326
327 /* write the bitstream header packets with proper page interleave */
328
329 /* first packet will get its own page automatically */
330 if(!info->audio_only){
331 theora_encode_header (&info->td, &op);
332 ogg_stream_packetin (&info->to, &op);
333 if (ogg_stream_pageout (&info->to, &og) != 1){
334 fprintf (stderr, "Internal Ogg library error.\n");
335 exit (1);
336 }
337 fwrite (og.header, 1, og.header_len, info->outfile);
338 fwrite (og.body, 1, og.body_len, info->outfile);
339
340 /* create the remaining theora headers */
341 /* theora_comment_init (&info->tc); is called in main() prior to parsing options */
342 theora_comment_add_tag (&info->tc, "ENCODER",PACKAGE_STRING);
343 theora_encode_comment (&info->tc, &op);
344 ogg_stream_packetin (&info->to, &op);
345 _ogg_free (op.packet);
346
347 theora_encode_tables (&info->td, &op);
348 ogg_stream_packetin (&info->to, &op);
349 }
350 if(!info->video_only){
351 ogg_packet header;
352 ogg_packet header_comm;
353 ogg_packet header_code;
354
355 vorbis_analysis_headerout (&info->vd, &info->vc, &header,
356 &header_comm, &header_code);
357 ogg_stream_packetin (&info->vo, &header); /* automatically placed in its own
358 * page */
359 if (ogg_stream_pageout (&info->vo, &og) != 1){
360 fprintf (stderr, "Internal Ogg library error.\n");
361 exit (1);
362 }
363 fwrite (og.header, 1, og.header_len, info->outfile);
364 fwrite (og.body, 1, og.body_len, info->outfile);
365
366 /* remaining vorbis header packets */
367 ogg_stream_packetin (&info->vo, &header_comm);
368 ogg_stream_packetin (&info->vo, &header_code);
369 }
370
371 #ifdef HAVE_KATE
372 if (info->with_kate) {
373 int n;
374 for (n=0; n<info->n_kate_streams; ++n) {
375 oggmux_kate_stream *ks=info->kate_streams+n;
376 int ret;
377 while (1) {
378 ret=kate_ogg_encode_headers(&ks->k,&ks->kc,&op);
379 if (ret==0) {
380 ogg_stream_packetin(&ks->ko,&op);
381 ogg_packet_clear(&op);
382 }
383 if (ret<0) fprintf(stderr, "kate_encode_headers: %d\n",ret);
384 if (ret>0) break;
385 }
386
387 /* first header is on a separate page - libogg will do it automatically */
388 ret=ogg_stream_pageout (&ks->ko, &og);
389 if (ret!=1) {
390 fprintf (stderr, "Internal Ogg library error.\n");
391 exit (1);
392 }
393 fwrite (og.header, 1, og.header_len, info->outfile);
394 fwrite (og.body, 1, og.body_len, info->outfile);
395 }
396 }
397 #endif
398
399 /* output the appropriate fisbone packets */
400 if (info->with_skeleton) {
401 add_fisbone_packet (info);
402 while (1) {
403 int result = ogg_stream_flush (&info->so, &og);
404 if (result < 0){
405 /* can't get here */
406 fprintf (stderr, "Internal Ogg library error.\n");
407 exit (1);
408 }
409 if (result == 0)
410 break;
411 fwrite (og.header, 1, og.header_len, info->outfile);
412 fwrite (og.body, 1, og.body_len, info->outfile);
413 }
414 }
415
416 if (!info->audio_only) {
417 theora_info_clear(&info->ti);
418 }
419
420 /* Flush the rest of our headers. This ensures
421 * the actual data in each stream will start
422 * on a new page, as per spec. */
423 while (1 && !info->audio_only){
424 int result = ogg_stream_flush (&info->to, &og);
425 if (result < 0){
426 /* can't get here */
427 fprintf (stderr, "Internal Ogg library error.\n");
428 exit (1);
429 }
430 if (result == 0)
431 break;
432 fwrite (og.header, 1, og.header_len, info->outfile);
433 fwrite (og.body, 1, og.body_len, info->outfile);
434 }
435 while (1 && !info->video_only){
436 int result = ogg_stream_flush (&info->vo, &og);
437 if (result < 0){
438 /* can't get here */
439 fprintf (stderr, "Internal Ogg library error.\n");
440 exit (1);
441 }
442 if (result == 0)
443 break;
444 fwrite (og.header, 1, og.header_len,info->outfile);
445 fwrite (og.body, 1, og.body_len, info->outfile);
446 }
447 if (info->with_kate) {
448 int n;
449 for (n=0; n<info->n_kate_streams; ++n) {
450 oggmux_kate_stream *ks=info->kate_streams+n;
451 while (1) {
452 int result = ogg_stream_flush (&ks->ko, &og);
453 if (result < 0){
454 /* can't get here */
455 fprintf (stderr, "Internal Ogg library error.\n");
456 exit (1);
457 }
458 if (result == 0)
459 break;
460 fwrite (og.header, 1, og.header_len,info->outfile);
461 fwrite (og.body, 1, og.body_len, info->outfile);
462 }
463 }
464 }
465
466 if (info->with_skeleton) {
467 int result;
468
469 /* build and add the e_o_s packet */
470 memset (&op, 0, sizeof (op));
471 op.b_o_s = 0;
472 op.e_o_s = 1; /* its the e_o_s packet */
473 op.granulepos = 0;
474 op.bytes = 0; /* e_o_s packet is an empty packet */
475 ogg_stream_packetin (&info->so, &op);
476
477 result = ogg_stream_flush (&info->so, &og);
478 if (result < 0){
479 /* can't get here */
480 fprintf (stderr, "Internal Ogg library error.\n");
481 exit (1);
482 }
483 fwrite (og.header, 1, og.header_len,info->outfile);
484 fwrite (og.body, 1, og.body_len, info->outfile);
485 }
486 }
487
488 /**
489 * adds a video frame to the encoding sink
490 * if e_o_s is 1 the end of the logical bitstream will be marked.
491 * @param this ff2theora struct
492 * @param info oggmux_info
493 * @param yuv_buffer
494 * @param e_o_s 1 indicates ond of stream
495 */
496 void oggmux_add_video (oggmux_info *info, yuv_buffer *yuv, int e_o_s){
497 ogg_packet op;
498 theora_encode_YUVin (&info->td, yuv);
499 while(theora_encode_packetout (&info->td, e_o_s, &op)) {
500 ogg_stream_packetin (&info->to, &op);
501 info->v_pkg++;
502 }
503 }
504
505 /**
506 * adds audio samples to encoding sink
507 * @param buffer pointer to buffer
508 * @param bytes bytes in buffer
509 * @param samples samples in buffer
510 * @param e_o_s 1 indicates end of stream.
511 */
512 void oggmux_add_audio (oggmux_info *info, int16_t * buffer, int bytes, int samples, int e_o_s){
513 ogg_packet op;
514
515 int i,j, count = 0;
516 float **vorbis_buffer;
517 if (bytes <= 0 && samples <= 0){
518 /* end of audio stream */
519 if(e_o_s)
520 vorbis_analysis_wrote (&info->vd, 0);
521 }
522 else{
523 vorbis_buffer = vorbis_analysis_buffer (&info->vd, samples);
524 /* uninterleave samples */
525 for (i = 0; i < samples; i++){
526 for(j=0;j<info->channels;j++){
527 vorbis_buffer[j][i] = buffer[count++] / 32768.f;
528 }
529 }
530 vorbis_analysis_wrote (&info->vd, samples);
531 }
532 while(vorbis_analysis_blockout (&info->vd, &info->vb) == 1){
533 /* analysis, assume we want to use bitrate management */
534 vorbis_analysis (&info->vb, NULL);
535 vorbis_bitrate_addblock (&info->vb);
536
537 /* weld packets into the bitstream */
538 while (vorbis_bitrate_flushpacket (&info->vd, &op)){
539 ogg_stream_packetin (&info->vo, &op);
540 info->a_pkg++;
541 }
542 }
543 }
544
545 /**
546 * adds a subtitles text to the encoding sink
547 * if e_o_s is 1 the end of the logical bitstream will be marked.
548 * @param info oggmux_info
549 * @param idx which kate stream to output to
550 * @param t0 the show time of the text
551 * @param t1 the hide time of the text
552 * @param text the utf-8 text
553 * @param len the number of bytes in the text
554 */
555 void oggmux_add_kate_text (oggmux_info *info, int idx, double t0, double t1, const char *text, size_t len){
556 #ifdef HAVE_KATE
557 ogg_packet op;
558 oggmux_kate_stream *ks=info->kate_streams+idx;
559 int ret;
560 ret = kate_ogg_encode_text(&ks->k, t0, t1, text, len, &op);
561 if (ret>=0) {
562 ogg_stream_packetin (&ks->ko, &op);
563 ogg_packet_clear (&op);
564 info->k_pkg++;
565 }
566 else {
567 fprintf(stderr, "Failed to encode kate data packet (%f --> %f, [%s]): %d",
568 t0, t1, text, ret);
569 }
570 #endif
571 }
572
573 /**
574 * adds a kate end packet to the encoding sink
575 * @param info oggmux_info
576 * @param idx which kate stream to output to
577 * @param t the time of the end packet
578 */
579 void oggmux_add_kate_end_packet (oggmux_info *info, int idx, double t){
580 #ifdef HAVE_KATE
581 ogg_packet op;
582 oggmux_kate_stream *ks=info->kate_streams+idx;
583 int ret;
584 ret = kate_ogg_encode_finish(&ks->k, t, &op);
585 if (ret>=0) {
586 ogg_stream_packetin (&ks->ko, &op);
587 ogg_packet_clear (&op);
588 info->k_pkg++;
589 }
590 else {
591 fprintf(stderr, "Failed to encode kate end packet: %d", ret);
592 }
593 #endif
594 }
595
596 static double get_remaining(oggmux_info *info, double timebase) {
597 double remaining = 0;
598 double to_encode, time_so_far;
599
600 if(info->duration != -1 && timebase > 0) {
601 time_so_far = time(NULL) - info->start_time;
602 to_encode = info->duration - timebase;
603 if(to_encode > 0) {
604 remaining = (time_so_far / timebase) * to_encode;
605 }
606 }
607 return remaining;
608 }
609
610 static void print_stats(oggmux_info *info, double timebase){
611 int hundredths = timebase * 100 - (long) timebase * 100;
612 int seconds = (long) timebase % 60;
613 int minutes = ((long) timebase / 60) % 60;
614 int hours = (long) timebase / 3600;
615 double remaining = get_remaining(info, timebase);
616 int remaining_seconds = (long) remaining % 60;
617 int remaining_minutes = ((long) remaining / 60) % 60;
618 int remaining_hours = (long) remaining / 3600;
619 if(info->frontend) {
620 fprintf (info->frontend,"\nf2t ;position: %.02lf;audio_kbps: %d;video_kbps: %d;remaining: %.02lf\n",
621 timebase,
622 info->akbps, info->vkbps,
623 remaining
624 );
625 fflush (info->frontend);
626 }
627 else {
628 if(!remaining) {
629 remaining = time(NULL) - info->start_time;
630 remaining_seconds = (long) remaining % 60;
631 remaining_minutes = ((long) remaining / 60) % 60;
632 remaining_hours = (long) remaining / 3600;
633 fprintf (stderr,"\r %d:%02d:%02d.%02d audio: %dkbps video: %dkbps, time elapsed: %02d:%02d:%02d ",
634 hours, minutes, seconds, hundredths,
635 info->akbps, info->vkbps,
636 remaining_hours, remaining_minutes, remaining_seconds
637 );
638 }
639 else {
640 fprintf (stderr,"\r %d:%02d:%02d.%02d audio: %dkbps video: %dkbps, time remaining: %02d:%02d:%02d ",
641 hours, minutes, seconds, hundredths,
642 info->akbps, info->vkbps,
643 remaining_hours, remaining_minutes, remaining_seconds
644 );
645 }
646 }
647 }
648
649 static void write_audio_page(oggmux_info *info)
650 {
651 int ret;
652
653 ret = fwrite(info->audiopage, 1, info->audiopage_len, info->outfile);
654 if(ret < info->audiopage_len) {
655 fprintf(stderr,"error writing audio page\n");
656 }
657 else {
658 info->audio_bytesout += ret;
659 }
660 info->audiopage_valid = 0;
661 info->a_pkg -=ogg_page_packets((ogg_page *)&info->audiopage);
662 #ifdef OGGMUX_DEBUG
663 info->a_page++;
664 info->v_page=0;
665 fprintf(stderr,"\naudio page %d (%d pkgs) | pkg remaining %d\n",info->a_page,ogg_page_packets((ogg_page *)&info->audiopage),info->a_pkg);
666 #endif
667
668 info->akbps = rint (info->audio_bytesout * 8. / info->audiotime * .001);
669 if(info->akbps<0)
670 info->akbps=0;
671 print_stats(info, info->audiotime);
672 }
673
674 static void write_video_page(oggmux_info *info)
675 {
676 int ret;
677
678 ret = fwrite(info->videopage, 1, info->videopage_len, info->outfile);
679 if(ret < info->videopage_len) {
680 fprintf(stderr,"error writing video page\n");
681 }
682 else {
683 info->video_bytesout += ret;
684 }
685 info->videopage_valid = 0;
686 info->v_pkg -= ogg_page_packets((ogg_page *)&info->videopage);
687 #ifdef OGGMUX_DEBUG
688 info->v_page++;
689 info->a_page=0;
690 fprintf(stderr,"\nvideo page %d (%d pkgs) | pkg remaining %d\n",info->v_page,ogg_page_packets((ogg_page *)&info->videopage),info->v_pkg);
691 #endif
692
693
694 info->vkbps = rint (info->video_bytesout * 8. / info->videotime * .001);
695 if(info->vkbps<0)
696 info->vkbps=0;
697 print_stats(info, info->videotime);
698 }
699
700 static void write_kate_page(oggmux_info *info, int idx)
701 {
702 int ret;
703 oggmux_kate_stream *ks=info->kate_streams+idx;
704
705 ret = fwrite(ks->katepage, 1, ks->katepage_len, info->outfile);
706 if(ret < ks->katepage_len) {
707 fprintf(stderr,"error writing kate page\n");
708 }
709 else {
710 info->kate_bytesout += ret;
711 }
712 ks->katepage_valid = 0;
713 info->k_pkg -= ogg_page_packets((ogg_page *)&ks->katepage);
714 #ifdef OGGMUX_DEBUG
715 ks->k_page++;
716 fprintf(stderr,"\nkate page %d (%d pkgs) | pkg remaining %d\n",ks->k_page,ogg_page_packets((ogg_page *)&info->katepage),info->k_pkg);
717 #endif
718
719
720 /*
721 info->kkbps = rint (info->kate_bytesout * 8. / info->katetime * .001);
722 if(info->kkbps<0)
723 info->kkbps=0;
724 print_stats(info, info->katetime);
725 */
726 }
727
728 static int find_best_valid_kate_page(oggmux_info *info)
729 {
730 int n;
731 double t=0.0;
732 int best=-1;
733 if (info->with_kate) for (n=0; n<info->n_kate_streams;++n) {
734 oggmux_kate_stream *ks=info->kate_streams+n;
735 if (ks->katepage_valid) {
736 if (best==-1 || ks->katetime<t) {
737 t=ks->katetime;
738 best=n;
739 }
740 }
741 }
742 return best;
743 }
744
745 void oggmux_flush (oggmux_info *info, int e_o_s)
746 {
747 int n,len;
748 ogg_page og;
749 int best;
750
751 /* flush out the ogg pages to info->outfile */
752 while(1) {
753 /* Get pages for both streams, if not already present, and if available.*/
754 if(!info->audio_only && !info->videopage_valid) {
755 // this way seeking is much better,
756 // not sure if 23 packets is a good value. it works though
757 int v_next=0;
758 if(info->v_pkg>22 && ogg_stream_flush(&info->to, &og) > 0) {
759 v_next=1;
760 }
761 else if(ogg_stream_pageout(&info->to, &og) > 0) {
762 v_next=1;
763 }
764 if(v_next) {
765 len = og.header_len + og.body_len;
766 if(info->videopage_buffer_length < len) {
767 info->videopage = realloc(info->videopage, len);
768 info->videopage_buffer_length = len;
769 }
770 info->videopage_len = len;
771 memcpy(info->videopage, og.header, og.header_len);
772 memcpy(info->videopage+og.header_len , og.body, og.body_len);
773
774 info->videopage_valid = 1;
775 if(ogg_page_granulepos(&og)>0) {
776 info->videotime = theora_granule_time (&info->td,
777 ogg_page_granulepos(&og));
778 }
779 }
780 }
781 if(!info->video_only && !info->audiopage_valid) {
782 // this way seeking is much better,
783 // not sure if 23 packets is a good value. it works though
784 int a_next=0;
785 if(info->a_pkg>22 && ogg_stream_flush(&info->vo, &og) > 0) {
786 a_next=1;
787 }
788 else if(ogg_stream_pageout(&info->vo, &og) > 0) {
789 a_next=1;
790 }
791 if(a_next) {
792 len = og.header_len + og.body_len;
793 if(info->audiopage_buffer_length < len) {
794 info->audiopage = realloc(info->audiopage, len);
795 info->audiopage_buffer_length = len;
796 }
797 info->audiopage_len = len;
798 memcpy(info->audiopage, og.header, og.header_len);
799 memcpy(info->audiopage+og.header_len , og.body, og.body_len);
800
801 info->audiopage_valid = 1;
802 if(ogg_page_granulepos(&og)>0) {
803 info->audiotime= vorbis_granule_time (&info->vd,
804 ogg_page_granulepos(&og));
805 }
806 }
807 }
808
809 #ifdef HAVE_KATE
810 if (info->with_kate) for (n=0; n<info->n_kate_streams; ++n) {
811 oggmux_kate_stream *ks=info->kate_streams+n;
812 if (!ks->katepage_valid) {
813 int k_next=0;
814 /* always flush kate stream */
815 if (ogg_stream_flush(&ks->ko, &og) > 0) {
816 k_next = 1;
817 }
818 if (k_next) {
819 len = og.header_len + og.body_len;
820 if(ks->katepage_buffer_length < len) {
821 ks->katepage = realloc(ks->katepage, len);
822 ks->katepage_buffer_length = len;
823 }
824 ks->katepage_len = len;
825 memcpy(ks->katepage, og.header, og.header_len);
826 memcpy(ks->katepage+og.header_len , og.body, og.body_len);
827
828 ks->katepage_valid = 1;
829 if(ogg_page_granulepos(&og)>0) {
830 ks->katetime= kate_granule_time (&ks->ki,
831 ogg_page_granulepos(&og));
832 }
833 }
834 }
835 }
836 #endif
837
838 #ifdef HAVE_KATE
839 #define CHECK_KATE_OUTPUT(which) \
840 if (best>=0 && info->kate_streams[best].katetime/*-1.0*/<=info->which##time) { \
841 write_kate_page(info, best); \
842 continue; \
843 }
844 #else
845 #define CHECK_KATE_OUTPUT(which) ((void)0)
846 #endif
847
848 best=find_best_valid_kate_page(info);
849
850 if(info->video_only && info->videopage_valid) {
851 CHECK_KATE_OUTPUT(video);
852 write_video_page(info);
853 }
854 else if(info->audio_only && info->audiopage_valid) {
855 CHECK_KATE_OUTPUT(audio);
856 write_audio_page(info);
857 }
858 /* We're using both. We can output only:
859 * a) If we have valid pages for both
860 * b) At EOS, for the remaining stream.
861 */
862 else if(info->videopage_valid && info->audiopage_valid) {
863 /* Make sure they're in the right order. */
864 if(info->videotime <= info->audiotime) {
865 CHECK_KATE_OUTPUT(video);
866 write_video_page(info);
867 }
868 else {
869 CHECK_KATE_OUTPUT(audio);
870 write_audio_page(info);
871 }
872 }
873 else if(e_o_s && best>=0) {
874 write_kate_page(info, best);
875 }
876 else if(e_o_s && info->videopage_valid) {
877 write_video_page(info);
878 }
879 else if(e_o_s && info->audiopage_valid) {
880 write_audio_page(info);
881 }
882 else {
883 break; /* Nothing more writable at the moment */
884 }
885 }
886 }
887
888 void oggmux_close (oggmux_info *info){
889 int n;
890
891 ogg_stream_clear (&info->vo);
892 vorbis_block_clear (&info->vb);
893 vorbis_dsp_clear (&info->vd);
894 vorbis_comment_clear (&info->vc);
895 vorbis_info_clear (&info->vi);
896
897 ogg_stream_clear (&info->to);
898 theora_comment_clear (&info->tc);
899 theora_clear (&info->td);
900
901 #ifdef HAVE_KATE
902 for (n=0; n<info->n_kate_streams; ++n) {
903 ogg_stream_clear (&info->kate_streams[n].ko);
904 kate_comment_clear (&info->kate_streams[n].kc);
905 kate_info_clear (&info->kate_streams[n].ki);
906 kate_clear (&info->kate_streams[n].k);
907 }
908 #endif
909
910 if (info->with_skeleton)
911 ogg_stream_clear (&info->so);
912
913 if (info->outfile && info->outfile != stdout)
914 fclose (info->outfile);
915
916 if(info->videopage)
917 free(info->videopage);
918 if(info->audiopage)
919 free(info->audiopage);
920
921 for (n=0; n<info->n_kate_streams; ++n) {
922 if(info->kate_streams[n].katepage)
923 free(info->kate_streams[n].katepage);
924 }
925 free(info->kate_streams);
926 }
0 /* -*- tab-width:4;c-file-style:"cc-mode"; -*- */
1 /*
2 * theorautils.h -- Ogg Theora/Ogg Vorbis Abstraction and Muxing
3 * Copyright (C) 2003-2005 <j@v2v.cc>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software Foundation,
17 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 */
19 #ifndef _F2T_THEORAUTILS_H_
20 #define _F2T_THEORAUTILS_H_
21
22 #include <stdint.h>
23 #include "theora/theora.h"
24 #include "vorbis/codec.h"
25 #include "vorbis/vorbisenc.h"
26 #ifdef HAVE_KATE
27 #include "kate/kate.h"
28 #endif
29 #include "ogg/ogg.h"
30
31 // #define OGGMUX_DEBUG
32
33 #define SKELETON_VERSION_MAJOR 3
34 #define SKELETON_VERSION_MINOR 0
35 #define FISHEAD_IDENTIFIER "fishead\0"
36 #define FISBONE_IDENTIFIER "fisbone\0"
37 #define FISBONE_SIZE 52
38 #define FISBONE_MESSAGE_HEADER_OFFSET 44
39
40 typedef struct
41 {
42 #ifdef HAVE_KATE
43 kate_state k;
44 kate_info ki;
45 kate_comment kc;
46 #endif
47 ogg_stream_state ko; /* take physical pages, weld into a logical
48 * stream of packets */
49 int katepage_valid;
50 unsigned char *katepage;
51 int katepage_len;
52 int katepage_buffer_length;
53 double katetime;
54 }
55 oggmux_kate_stream;
56
57 typedef struct
58 {
59 /* the file the mixed ogg stream is written to */
60 FILE *outfile;
61
62 int audio_only;
63 int video_only;
64 int with_skeleton;
65 FILE *frontend;
66 /* vorbis settings */
67 int sample_rate;
68 int channels;
69 double vorbis_quality;
70 int vorbis_bitrate;
71
72 vorbis_info vi; /* struct that stores all the static vorbis bitstream settings */
73 vorbis_comment vc; /* struct that stores all the user comments */
74
75 /* theora settings */
76 theora_info ti;
77 theora_comment tc;
78 int speed_level;
79
80 /* state info */
81 theora_state td;
82 vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
83 vorbis_block vb; /* local working space for packet->PCM decode */
84
85 int with_kate;
86
87 /* used for muxing */
88 ogg_stream_state to; /* take physical pages, weld into a logical
89 * stream of packets */
90 ogg_stream_state vo; /* take physical pages, weld into a logical
91 * stream of packets */
92 ogg_stream_state so; /* take physical pages, weld into a logical
93 * stream of packets, used for skeleton stream */
94
95 int audiopage_valid;
96 int videopage_valid;
97 unsigned char *audiopage;
98 unsigned char *videopage;
99 int videopage_len;
100 int audiopage_len;
101 int videopage_buffer_length;
102 int audiopage_buffer_length;
103
104 /* some stats */
105 double audiotime;
106 double videotime;
107 double duration;
108
109 int vkbps;
110 int akbps;
111 ogg_int64_t audio_bytesout;
112 ogg_int64_t video_bytesout;
113 ogg_int64_t kate_bytesout;
114 time_t start_time;
115
116 //to do some manual page flusing
117 int v_pkg;
118 int a_pkg;
119 int k_pkg;
120 #ifdef OGGMUX_DEBUG
121 int a_page;
122 int v_page;
123 int k_page;
124 #endif
125
126 int n_kate_streams;
127 oggmux_kate_stream *kate_streams;
128 }
129 oggmux_info;
130
131 void init_info(oggmux_info *info);
132 extern void oggmux_setup_kate_streams(oggmux_info *info, int n_kate_streams);
133 extern void oggmux_init (oggmux_info *info);
134 extern void oggmux_add_video (oggmux_info *info, yuv_buffer *yuv, int e_o_s);
135 extern void oggmux_add_audio (oggmux_info *info, int16_t * readbuffer, int bytesread, int samplesread,int e_o_s);
136 extern void oggmux_add_kate_text (oggmux_info *info, int idx, double t0, double t1, const char *text, size_t len);
137 extern void oggmux_add_kate_end_packet (oggmux_info *info, int idx, double t);
138 extern void oggmux_flush (oggmux_info *info, int e_o_s);
139 extern void oggmux_close (oggmux_info *info);
140
141
142 #endif
0 Subtitles can be embedded in an Ogg stream alongside a Theora video.
0 Text subtitles can be embedded in an Ogg stream alongside a Theora video.
11
22 * Overview
33 * Subtitles related options
44 * Converting non-utf-8 files to utf-8
55 * Examples
6 * Playing subtitles
67
78
89
1011
1112 Subtitles are read from SubRip (.srt) format files and converted to
1213 Kate streams. Those SubRip files must be encoded in utf-8 (7 bit ASCII
13 is a subset of utf-8 so are valid input as well). See below for more
14 is a subset of utf-8 so is valid input as well). See below for more
1415 information on converting SubRip files with other encodings to utf-8.
1516
1617 Subtitles support requires libkate, available from:
3940 a language tag according to RFC 3066 (usually a two letter language
4041 code, optionally followed by a dash (or underscore) and a region code.
4142 Examples include en, it, ja, en_GB, de_DE, etc.
42 If unspecified, the default is to not set a language.
43 If unspecified, the default is to not set a language. It is however
44 strongly encouraged to set the language.
4345
4446 --subtitles-category <category>
4547 Sets the category of the relevant subtitles stream. Category must be
5860 to convert the input file to utf-8. See below for more information on
5961 converting other encoding to utf-8.
6062 If unspecified, the default is utf-8.
63
64 --subtitles-ignore-non-utf8
65 Any invalid sequence in utf-8 text will be ignored. This may be useful
66 when using an utf-8 file with stray non utf-8 characters. This is not
67 a substitute for converting a non utf-8 file to utf-8, however, as the
68 non utf-8 sequence will be missing from the output stream.
6169
6270
6371
128136 input.avi
129137
130138
139 * Playing subtitles
140
141 At the moment, only VLC has playback support for Kate streams. However, the
142 libkate distribution includes patches for other players and media frameworks
143 (MPlayer, GStreamer).
144
+0
-924
theorautils.c less more
0 /* -*- tab-width:4;c-file-style:"cc-mode"; -*- */
1 /*
2 * theorautils.c - Ogg Theora/Ogg Vorbis Abstraction and Muxing
3 * Copyright (C) 2003-2005 <j@v2v.cc>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software Foundation,
17 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 *
19 */
20
21 #include <stdio.h>
22 #include <stdlib.h>
23 #include <unistd.h>
24 #include <string.h>
25 #include <time.h>
26
27 #include "theora/theora.h"
28 #include "vorbis/codec.h"
29 #include "vorbis/vorbisenc.h"
30 #ifdef HAVE_OGGKATE
31 #include "kate/oggkate.h"
32 #endif
33
34 #include "theorautils.h"
35
36
37
38 static double rint(double x)
39 {
40 if (x < 0.0)
41 return (double)(int)(x - 0.5);
42 else
43 return (double)(int)(x + 0.5);
44 }
45
46 void init_info(oggmux_info *info) {
47 info->with_skeleton = 1; /* skeleton is enabled by default */
48 info->frontend = 0; /*frontend mode*/
49 info->videotime = 0;
50 info->audiotime = 0;
51 info->audio_bytesout = 0;
52 info->video_bytesout = 0;
53 info->kate_bytesout = 0;
54
55 info->videopage_valid = 0;
56 info->audiopage_valid = 0;
57 info->audiopage_buffer_length = 0;
58 info->videopage_buffer_length = 0;
59 info->audiopage = NULL;
60 info->videopage = NULL;
61 info->start_time = time(NULL);
62 info->duration = -1;
63 info->speed_level = -1;
64
65 info->v_pkg=0;
66 info->a_pkg=0;
67 info->k_pkg=0;
68 #ifdef OGGMUX_DEBUG
69 info->a_page=0;
70 info->v_page=0;
71 info->k_page=0;
72 #endif
73
74 info->with_kate = 0;
75 info->n_kate_streams = 0;
76 }
77
78 void oggmux_setup_kate_streams(oggmux_info *info, int n_kate_streams)
79 {
80 int n;
81
82 info->n_kate_streams = n_kate_streams;
83 if (n_kate_streams == 0) return;
84 info->kate_streams = (oggmux_kate_stream*)malloc(n_kate_streams*sizeof(oggmux_kate_stream));
85 for (n=0; n<n_kate_streams; ++n) {
86 oggmux_kate_stream *ks=info->kate_streams+n;
87 ks->katepage_valid = 0;
88 ks->katepage_buffer_length = 0;
89 ks->katepage = NULL;
90 ks->katetime = 0;
91 }
92 }
93
94 static void write16le(unsigned char *ptr,ogg_uint16_t v)
95 {
96 ptr[0]=v&0xff;
97 ptr[1]=(v>>8)&0xff;
98 }
99
100 static void write32le(unsigned char *ptr,ogg_uint32_t v)
101 {
102 ptr[0]=v&0xff;
103 ptr[1]=(v>>8)&0xff;
104 ptr[2]=(v>>16)&0xff;
105 ptr[3]=(v>>24)&0xff;
106 }
107
108 static void write64le(unsigned char *ptr,ogg_int64_t v)
109 {
110 ogg_uint32_t hi=v>>32;
111 ptr[0]=v&0xff;
112 ptr[1]=(v>>8)&0xff;
113 ptr[2]=(v>>16)&0xff;
114 ptr[3]=(v>>24)&0xff;
115 ptr[4]=hi&0xff;
116 ptr[5]=(hi>>8)&0xff;
117 ptr[6]=(hi>>16)&0xff;
118 ptr[7]=(hi>>24)&0xff;
119 }
120
121 void add_fishead_packet (oggmux_info *info) {
122 ogg_packet op;
123
124 memset (&op, 0, sizeof (op));
125
126 op.packet = _ogg_calloc (64, sizeof(unsigned char));
127 if (op.packet == NULL) return;
128
129 memset (op.packet, 0, 64);
130 memcpy (op.packet, FISHEAD_IDENTIFIER, 8); /* identifier */
131 write16le(op.packet+8, SKELETON_VERSION_MAJOR); /* version major */
132 write16le(op.packet+10, SKELETON_VERSION_MINOR); /* version minor */
133 write64le(op.packet+12, (ogg_int64_t)0); /* presentationtime numerator */
134 write64le(op.packet+20, (ogg_int64_t)1000); /* presentationtime denominator */
135 write64le(op.packet+28, (ogg_int64_t)0); /* basetime numerator */
136 write64le(op.packet+36, (ogg_int64_t)1000); /* basetime denominator */
137 /* both the numerator are zero hence handled by the memset */
138 write32le(op.packet+44, 0); /* UTC time, set to zero for now */
139
140 op.b_o_s = 1; /* its the first packet of the stream */
141 op.e_o_s = 0; /* its not the last packet of the stream */
142 op.bytes = 64; /* length of the packet in bytes */
143
144 ogg_stream_packetin (&info->so, &op); /* adding the packet to the skeleton stream */
145 _ogg_free (op.packet);
146 }
147
148 /*
149 * Adds the fishead packets in the skeleton output stream along with the e_o_s packet
150 */
151 void add_fisbone_packet (oggmux_info *info) {
152 ogg_packet op;
153 int n;
154
155 if (!info->audio_only) {
156 memset (&op, 0, sizeof (op));
157 op.packet = _ogg_calloc (80, sizeof(unsigned char));
158 if (op.packet == NULL) return;
159
160 memset (op.packet, 0, 80);
161 /* it will be the fisbone packet for the theora video */
162 memcpy (op.packet, FISBONE_IDENTIFIER, 8); /* identifier */
163 write32le(op.packet+8, FISBONE_MESSAGE_HEADER_OFFSET); /* offset of the message header fields */
164 write32le(op.packet+12, info->to.serialno); /* serialno of the theora stream */
165 write32le(op.packet+16, 3); /* number of header packets */
166 /* granulerate, temporal resolution of the bitstream in samples/microsecond */
167 write64le(op.packet+20, info->ti.fps_numerator); /* granulrate numerator */
168 write64le(op.packet+28, info->ti.fps_denominator); /* granulrate denominator */
169 write64le(op.packet+36, 0); /* start granule */
170 write32le(op.packet+44, 0); /* preroll, for theora its 0 */
171 *(op.packet+48) = theora_granule_shift (&info->ti); /* granule shift */
172 memcpy(op.packet+FISBONE_SIZE, "Content-Type: video/theora\r\n", 28); /* message header field, Content-Type */
173
174 op.b_o_s = 0;
175 op.e_o_s = 0;
176 op.bytes = 80; /* size of the packet in bytes */
177
178 ogg_stream_packetin (&info->so, &op);
179 _ogg_free (op.packet);
180 }
181
182 if (!info->video_only) {
183 memset (&op, 0, sizeof (op));
184 op.packet = _ogg_calloc (80, sizeof(unsigned char));
185 if (op.packet == NULL) return;
186
187 memset (op.packet, 0, 80);
188 /* it will be the fisbone packet for the vorbis audio */
189 memcpy (op.packet, FISBONE_IDENTIFIER, 8); /* identifier */
190 write32le(op.packet+8, FISBONE_MESSAGE_HEADER_OFFSET); /* offset of the message header fields */
191 write32le(op.packet+12, info->vo.serialno); /* serialno of the vorbis stream */
192 write32le(op.packet+16, 3); /* number of header packet */
193 /* granulerate, temporal resolution of the bitstream in Hz */
194 write64le(op.packet+20, info->sample_rate); /* granulerate numerator */
195 write64le(op.packet+28, (ogg_int64_t)1); /* granulerate denominator */
196 write64le(op.packet+36, 0); /* start granule */
197 write32le(op.packet+44, 2); /* preroll, for vorbis its 2 */
198 *(op.packet+48) = 0; /* granule shift, always 0 for vorbis */
199 memcpy (op.packet+FISBONE_SIZE, "Content-Type: audio/vorbis\r\n", 28);
200 /* Important: Check the case of Content-Type for correctness */
201
202 op.b_o_s = 0;
203 op.e_o_s = 0;
204 op.bytes = 80;
205
206 ogg_stream_packetin (&info->so, &op);
207 _ogg_free (op.packet);
208 }
209
210 #ifdef HAVE_KATE
211 if (info->with_kate) {
212 for (n=0; n<info->n_kate_streams; ++n) {
213 oggmux_kate_stream *ks=info->kate_streams+n;
214 memset (&op, 0, sizeof (op));
215 op.packet = _ogg_calloc (86, sizeof(unsigned char));
216 memset (op.packet, 0, 86);
217 /* it will be the fisbone packet for the kate stream */
218 memcpy (op.packet, FISBONE_IDENTIFIER, 8); /* identifier */
219 write32le(op.packet+8, FISBONE_MESSAGE_HEADER_OFFSET); /* offset of the message header fields */
220 write32le(op.packet+12, ks->ko.serialno); /* serialno of the vorbis stream */
221 write32le(op.packet+16, ks->ki.num_headers); /* number of header packet */
222 /* granulerate, temporal resolution of the bitstream in Hz */
223 write64le(op.packet+20, ks->ki.gps_numerator); /* granulerate numerator */
224 write64le(op.packet+28, ks->ki.gps_denominator); /* granulerate denominator */
225 write64le(op.packet+36, 0); /* start granule */
226 write32le(op.packet+44, 0); /* preroll, for kate it's 0 */
227 *(op.packet+48) = ks->ki.granule_shift; /* granule shift */
228 memcpy (op.packet+FISBONE_SIZE, "Content-Type: application/x-kate\r\n", 34);
229 /* Important: Check the case of Content-Type for correctness */
230
231 op.b_o_s = 0;
232 op.e_o_s = 0;
233 op.bytes = 86;
234
235 ogg_stream_packetin (&info->so, &op);
236 _ogg_free (op.packet);
237 }
238 }
239 #endif
240 }
241
242 void oggmux_init (oggmux_info *info){
243 ogg_page og;
244 ogg_packet op;
245
246 /* yayness. Set up Ogg output stream */
247 srand (time (NULL));
248 ogg_stream_init (&info->vo, rand ());
249
250 if(!info->audio_only){
251 ogg_stream_init (&info->to, rand ()); /* oops, add one ot the above */
252 theora_encode_init (&info->td, &info->ti);
253
254 if(info->speed_level >= 0) {
255 int max_speed_level;
256 theora_control(&info->td, TH_ENCCTL_GET_SPLEVEL_MAX, &max_speed_level, sizeof(int));
257 if(info->speed_level > max_speed_level)
258 info->speed_level = max_speed_level;
259 theora_control(&info->td, TH_ENCCTL_SET_SPLEVEL, &info->speed_level, sizeof(int));
260 }
261 }
262 /* init theora done */
263
264 /* initialize Vorbis too, if we have audio. */
265 if(!info->video_only){
266 int ret;
267 vorbis_info_init (&info->vi);
268 /* Encoding using a VBR quality mode. */
269 if(info->vorbis_quality>-99)
270 ret =vorbis_encode_init_vbr (&info->vi, info->channels,info->sample_rate,info->vorbis_quality);
271 else
272 ret=vorbis_encode_init(&info->vi,info->channels,info->sample_rate,-1,info->vorbis_bitrate,-1);
273
274 if (ret){
275 fprintf (stderr,
276 "The Vorbis encoder could not set up a mode according to\n"
277 "the requested quality or bitrate.\n\n");
278 exit (1);
279 }
280
281 vorbis_comment_init (&info->vc);
282 vorbis_comment_add_tag (&info->vc, "ENCODER",PACKAGE_STRING);
283 /* set up the analysis state and auxiliary encoding storage */
284 vorbis_analysis_init (&info->vd, &info->vi);
285 vorbis_block_init (&info->vd, &info->vb);
286
287 }
288 /* audio init done */
289
290 /* initialize kate if we have subtitles */
291 if (info->with_kate) {
292 int ret, n;
293 #ifdef HAVE_KATE
294 for (n=0; n<info->n_kate_streams; ++n) {
295 oggmux_kate_stream *ks=info->kate_streams+n;
296 ogg_stream_init (&ks->ko, rand ()); /* oops, add one ot the above */
297 ret = kate_encode_init (&ks->k, &ks->ki);
298 if (ret<0) fprintf(stderr, "kate_encode_init: %d\n",ret);
299 ret = kate_comment_init(&ks->kc);
300 if (ret<0) fprintf(stderr, "kate_comment_init: %d\n",ret);
301 kate_comment_add_tag (&ks->kc, "ENCODER",PACKAGE_STRING);
302 }
303 #endif
304 }
305 /* kate init done */
306
307 /* first packet should be skeleton fishead packet, if skeleton is used */
308
309 if (info->with_skeleton) {
310 ogg_stream_init (&info->so, rand());
311 add_fishead_packet (info);
312 if (ogg_stream_pageout (&info->so, &og) != 1){
313 fprintf (stderr, "Internal Ogg library error.\n");
314 exit (1);
315 }
316 fwrite (og.header, 1, og.header_len, info->outfile);
317 fwrite (og.body, 1, og.body_len, info->outfile);
318 }
319
320 /* write the bitstream header packets with proper page interleave */
321
322 /* first packet will get its own page automatically */
323 if(!info->audio_only){
324 theora_encode_header (&info->td, &op);
325 ogg_stream_packetin (&info->to, &op);
326 if (ogg_stream_pageout (&info->to, &og) != 1){
327 fprintf (stderr, "Internal Ogg library error.\n");
328 exit (1);
329 }
330 fwrite (og.header, 1, og.header_len, info->outfile);
331 fwrite (og.body, 1, og.body_len, info->outfile);
332
333 /* create the remaining theora headers */
334 /* theora_comment_init (&info->tc); is called in main() prior to parsing options */
335 theora_comment_add_tag (&info->tc, "ENCODER",PACKAGE_STRING);
336 theora_encode_comment (&info->tc, &op);
337 ogg_stream_packetin (&info->to, &op);
338 _ogg_free (op.packet);
339
340 theora_encode_tables (&info->td, &op);
341 ogg_stream_packetin (&info->to, &op);
342 }
343 if(!info->video_only){
344 ogg_packet header;
345 ogg_packet header_comm;
346 ogg_packet header_code;
347
348 vorbis_analysis_headerout (&info->vd, &info->vc, &header,
349 &header_comm, &header_code);
350 ogg_stream_packetin (&info->vo, &header); /* automatically placed in its own
351 * page */
352 if (ogg_stream_pageout (&info->vo, &og) != 1){
353 fprintf (stderr, "Internal Ogg library error.\n");
354 exit (1);
355 }
356 fwrite (og.header, 1, og.header_len, info->outfile);
357 fwrite (og.body, 1, og.body_len, info->outfile);
358
359 /* remaining vorbis header packets */
360 ogg_stream_packetin (&info->vo, &header_comm);
361 ogg_stream_packetin (&info->vo, &header_code);
362 }
363
364 #ifdef HAVE_KATE
365 if (info->with_kate) {
366 int n;
367 for (n=0; n<info->n_kate_streams; ++n) {
368 oggmux_kate_stream *ks=info->kate_streams+n;
369 int ret;
370 while (1) {
371 ret=kate_ogg_encode_headers(&ks->k,&ks->kc,&op);
372 if (ret==0) {
373 ogg_stream_packetin(&ks->ko,&op);
374 ogg_packet_clear(&op);
375 }
376 if (ret<0) fprintf(stderr, "kate_encode_headers: %d\n",ret);
377 if (ret>0) break;
378 }
379
380 /* first header is on a separate page - libogg will do it automatically */
381 ret=ogg_stream_pageout (&ks->ko, &og);
382 if (ret!=1) {
383 fprintf (stderr, "Internal Ogg library error.\n");
384 exit (1);
385 }
386 fwrite (og.header, 1, og.header_len, info->outfile);
387 fwrite (og.body, 1, og.body_len, info->outfile);
388 }
389 }
390 #endif
391
392 /* output the appropriate fisbone packets */
393 if (info->with_skeleton) {
394 add_fisbone_packet (info);
395 while (1) {
396 int result = ogg_stream_flush (&info->so, &og);
397 if (result < 0){
398 /* can't get here */
399 fprintf (stderr, "Internal Ogg library error.\n");
400 exit (1);
401 }
402 if (result == 0)
403 break;
404 fwrite (og.header, 1, og.header_len, info->outfile);
405 fwrite (og.body, 1, og.body_len, info->outfile);
406 }
407 }
408
409 if (!info->audio_only) {
410 theora_info_clear(&info->ti);
411 }
412
413 /* Flush the rest of our headers. This ensures
414 * the actual data in each stream will start
415 * on a new page, as per spec. */
416 while (1 && !info->audio_only){
417 int result = ogg_stream_flush (&info->to, &og);
418 if (result < 0){
419 /* can't get here */
420 fprintf (stderr, "Internal Ogg library error.\n");
421 exit (1);
422 }
423 if (result == 0)
424 break;
425 fwrite (og.header, 1, og.header_len, info->outfile);
426 fwrite (og.body, 1, og.body_len, info->outfile);
427 }
428 while (1 && !info->video_only){
429 int result = ogg_stream_flush (&info->vo, &og);
430 if (result < 0){
431 /* can't get here */
432 fprintf (stderr, "Internal Ogg library error.\n");
433 exit (1);
434 }
435 if (result == 0)
436 break;
437 fwrite (og.header, 1, og.header_len,info->outfile);
438 fwrite (og.body, 1, og.body_len, info->outfile);
439 }
440 if (info->with_kate) {
441 int n;
442 for (n=0; n<info->n_kate_streams; ++n) {
443 oggmux_kate_stream *ks=info->kate_streams+n;
444 while (1) {
445 int result = ogg_stream_flush (&ks->ko, &og);
446 if (result < 0){
447 /* can't get here */
448 fprintf (stderr, "Internal Ogg library error.\n");
449 exit (1);
450 }
451 if (result == 0)
452 break;
453 fwrite (og.header, 1, og.header_len,info->outfile);
454 fwrite (og.body, 1, og.body_len, info->outfile);
455 }
456 }
457 }
458
459 if (info->with_skeleton) {
460 int result;
461
462 /* build and add the e_o_s packet */
463 memset (&op, 0, sizeof (op));
464 op.b_o_s = 0;
465 op.e_o_s = 1; /* its the e_o_s packet */
466 op.granulepos = 0;
467 op.bytes = 0; /* e_o_s packet is an empty packet */
468 ogg_stream_packetin (&info->so, &op);
469
470 result = ogg_stream_flush (&info->so, &og);
471 if (result < 0){
472 /* can't get here */
473 fprintf (stderr, "Internal Ogg library error.\n");
474 exit (1);
475 }
476 fwrite (og.header, 1, og.header_len,info->outfile);
477 fwrite (og.body, 1, og.body_len, info->outfile);
478 }
479 }
480
481 /**
482 * adds a video frame to the encoding sink
483 * if e_o_s is 1 the end of the logical bitstream will be marked.
484 * @param this ff2theora struct
485 * @param info oggmux_info
486 * @param yuv_buffer
487 * @param e_o_s 1 indicates ond of stream
488 */
489 void oggmux_add_video (oggmux_info *info, yuv_buffer *yuv, int e_o_s){
490 ogg_packet op;
491 theora_encode_YUVin (&info->td, yuv);
492 while(theora_encode_packetout (&info->td, e_o_s, &op)) {
493 ogg_stream_packetin (&info->to, &op);
494 info->v_pkg++;
495 }
496 }
497
498 /**
499 * adds audio samples to encoding sink
500 * @param buffer pointer to buffer
501 * @param bytes bytes in buffer
502 * @param samples samples in buffer
503 * @param e_o_s 1 indicates end of stream.
504 */
505 void oggmux_add_audio (oggmux_info *info, int16_t * buffer, int bytes, int samples, int e_o_s){
506 ogg_packet op;
507
508 int i,j, count = 0;
509 float **vorbis_buffer;
510 if (bytes <= 0 && samples <= 0){
511 /* end of audio stream */
512 if(e_o_s)
513 vorbis_analysis_wrote (&info->vd, 0);
514 }
515 else{
516 vorbis_buffer = vorbis_analysis_buffer (&info->vd, samples);
517 /* uninterleave samples */
518 for (i = 0; i < samples; i++){
519 for(j=0;j<info->channels;j++){
520 vorbis_buffer[j][i] = buffer[count++] / 32768.f;
521 }
522 }
523 vorbis_analysis_wrote (&info->vd, samples);
524 }
525 while(vorbis_analysis_blockout (&info->vd, &info->vb) == 1){
526 /* analysis, assume we want to use bitrate management */
527 vorbis_analysis (&info->vb, NULL);
528 vorbis_bitrate_addblock (&info->vb);
529
530 /* weld packets into the bitstream */
531 while (vorbis_bitrate_flushpacket (&info->vd, &op)){
532 ogg_stream_packetin (&info->vo, &op);
533 info->a_pkg++;
534 }
535 }
536 }
537
538 /**
539 * adds a subtitles text to the encoding sink
540 * if e_o_s is 1 the end of the logical bitstream will be marked.
541 * @param info oggmux_info
542 * @param idx which kate stream to output to
543 * @param t0 the show time of the text
544 * @param t1 the hide time of the text
545 * @param text the utf-8 text
546 * @param len the number of bytes in the text
547 * @param e_o_s 1 indicates end of stream
548 */
549 void oggmux_add_kate_text (oggmux_info *info, int idx, double t0, double t1, const char *text, size_t len, int e_o_s){
550 #ifdef HAVE_KATE
551 ogg_packet op;
552 oggmux_kate_stream *ks=info->kate_streams+idx;
553 int ret;
554 ret = kate_ogg_encode_text(&ks->k, t0, t1, text, len, &op);
555 if (ret>=0) {
556 ogg_stream_packetin (&ks->ko, &op);
557 info->k_pkg++;
558 }
559 else {
560 fprintf(stderr, "Failed to encode kate data packet (%f --> %f, [%s]): %d",
561 t0, t1, text, ret);
562 }
563 if(e_o_s) {
564 ret = kate_ogg_encode_finish(&ks->k, -1, &op);
565 if (ret>=0) {
566 ogg_stream_packetin (&ks->ko, &op);
567 info->k_pkg++;
568 }
569 else {
570 fprintf(stderr, "Failed to encode kate end packet: %d", ret);
571 }
572 }
573 #endif
574 }
575
576 /**
577 * adds a kate end packet to the encoding sink
578 * @param info oggmux_info
579 * @param idx which kate stream to output to
580 * @param t the time of the end packet
581 */
582 void oggmux_add_kate_end_packet (oggmux_info *info, int idx, double t){
583 #ifdef HAVE_KATE
584 ogg_packet op;
585 oggmux_kate_stream *ks=info->kate_streams+idx;
586 int ret;
587 ret = kate_ogg_encode_finish(&ks->k, t, &op);
588 if (ret>=0) {
589 ogg_stream_packetin (&ks->ko, &op);
590 info->k_pkg++;
591 }
592 else {
593 fprintf(stderr, "Failed to encode kate end packet: %d", ret);
594 }
595 #endif
596 }
597
598 static double get_remaining(oggmux_info *info, double timebase) {
599 double remaining = 0;
600 double to_encode, time_so_far;
601
602 if(info->duration != -1 && timebase > 0) {
603 time_so_far = time(NULL) - info->start_time;
604 to_encode = info->duration - timebase;
605 if(to_encode > 0) {
606 remaining = (time_so_far / timebase) * to_encode;
607 }
608 }
609 return remaining;
610 }
611
612 static void print_stats(oggmux_info *info, double timebase){
613 int hundredths = timebase * 100 - (long) timebase * 100;
614 int seconds = (long) timebase % 60;
615 int minutes = ((long) timebase / 60) % 60;
616 int hours = (long) timebase / 3600;
617 double remaining = get_remaining(info, timebase);
618 int remaining_seconds = (long) remaining % 60;
619 int remaining_minutes = ((long) remaining / 60) % 60;
620 int remaining_hours = (long) remaining / 3600;
621 if(info->frontend) {
622 fprintf (stderr,"\nf2t ;position: %.02lf;audio_kbps: %d;video_kbps: %d;remaining: %.02lf\n",
623 timebase,
624 info->akbps, info->vkbps,
625 remaining
626 );
627
628 }
629 else {
630 if(!remaining) {
631 remaining = time(NULL) - info->start_time;
632 remaining_seconds = (long) remaining % 60;
633 remaining_minutes = ((long) remaining / 60) % 60;
634 remaining_hours = (long) remaining / 3600;
635 fprintf (stderr,"\r %d:%02d:%02d.%02d audio: %dkbps video: %dkbps, time elapsed: %02d:%02d:%02d ",
636 hours, minutes, seconds, hundredths,
637 info->akbps, info->vkbps,
638 remaining_hours, remaining_minutes, remaining_seconds
639 );
640 }
641 else {
642 fprintf (stderr,"\r %d:%02d:%02d.%02d audio: %dkbps video: %dkbps, time remaining: %02d:%02d:%02d ",
643 hours, minutes, seconds, hundredths,
644 info->akbps, info->vkbps,
645 remaining_hours, remaining_minutes, remaining_seconds
646 );
647 }
648 }
649 }
650
651 static void write_audio_page(oggmux_info *info)
652 {
653 int ret;
654
655 ret = fwrite(info->audiopage, 1, info->audiopage_len, info->outfile);
656 if(ret < info->audiopage_len) {
657 fprintf(stderr,"error writing audio page\n");
658 }
659 else {
660 info->audio_bytesout += ret;
661 }
662 info->audiopage_valid = 0;
663 info->a_pkg -=ogg_page_packets((ogg_page *)&info->audiopage);
664 #ifdef OGGMUX_DEBUG
665 info->a_page++;
666 info->v_page=0;
667 fprintf(stderr,"\naudio page %d (%d pkgs) | pkg remaining %d\n",info->a_page,ogg_page_packets((ogg_page *)&info->audiopage),info->a_pkg);
668 #endif
669
670 info->akbps = rint (info->audio_bytesout * 8. / info->audiotime * .001);
671 if(info->akbps<0)
672 info->akbps=0;
673 print_stats(info, info->audiotime);
674 }
675
676 static void write_video_page(oggmux_info *info)
677 {
678 int ret;
679
680 ret = fwrite(info->videopage, 1, info->videopage_len, info->outfile);
681 if(ret < info->videopage_len) {
682 fprintf(stderr,"error writing video page\n");
683 }
684 else {
685 info->video_bytesout += ret;
686 }
687 info->videopage_valid = 0;
688 info->v_pkg -= ogg_page_packets((ogg_page *)&info->videopage);
689 #ifdef OGGMUX_DEBUG
690 info->v_page++;
691 info->a_page=0;
692 fprintf(stderr,"\nvideo page %d (%d pkgs) | pkg remaining %d\n",info->v_page,ogg_page_packets((ogg_page *)&info->videopage),info->v_pkg);
693 #endif
694
695
696 info->vkbps = rint (info->video_bytesout * 8. / info->videotime * .001);
697 if(info->vkbps<0)
698 info->vkbps=0;
699 print_stats(info, info->videotime);
700 }
701
702 static void write_kate_page(oggmux_info *info, int idx)
703 {
704 int ret;
705 oggmux_kate_stream *ks=info->kate_streams+idx;
706
707 ret = fwrite(ks->katepage, 1, ks->katepage_len, info->outfile);
708 if(ret < ks->katepage_len) {
709 fprintf(stderr,"error writing kate page\n");
710 }
711 else {
712 info->kate_bytesout += ret;
713 }
714 ks->katepage_valid = 0;
715 info->k_pkg -= ogg_page_packets((ogg_page *)&ks->katepage);
716 #ifdef OGGMUX_DEBUG
717 ks->k_page++;
718 fprintf(stderr,"\nkate page %d (%d pkgs) | pkg remaining %d\n",ks->k_page,ogg_page_packets((ogg_page *)&info->katepage),info->k_pkg);
719 #endif
720
721
722 /*
723 info->kkbps = rint (info->kate_bytesout * 8. / info->katetime * .001);
724 if(info->kkbps<0)
725 info->kkbps=0;
726 print_stats(info, info->katetime);
727 */
728 }
729
730 static int find_best_valid_kate_page(oggmux_info *info)
731 {
732 int n;
733 double t=0.0;
734 int best=-1;
735 if (info->with_kate) for (n=0; n<info->n_kate_streams;++n) {
736 oggmux_kate_stream *ks=info->kate_streams+n;
737 if (ks->katepage_valid) {
738 if (best==-1 || ks->katetime<t) {
739 t=ks->katetime;
740 best=n;
741 }
742 }
743 }
744 return best;
745 }
746
747 void oggmux_flush (oggmux_info *info, int e_o_s)
748 {
749 int n,len;
750 ogg_page og;
751 int best;
752
753 /* flush out the ogg pages to info->outfile */
754 while(1) {
755 /* Get pages for both streams, if not already present, and if available.*/
756 if(!info->audio_only && !info->videopage_valid) {
757 // this way seeking is much better,
758 // not sure if 23 packets is a good value. it works though
759 int v_next=0;
760 if(info->v_pkg>22 && ogg_stream_flush(&info->to, &og) > 0) {
761 v_next=1;
762 }
763 else if(ogg_stream_pageout(&info->to, &og) > 0) {
764 v_next=1;
765 }
766 if(v_next) {
767 len = og.header_len + og.body_len;
768 if(info->videopage_buffer_length < len) {
769 info->videopage = realloc(info->videopage, len);
770 info->videopage_buffer_length = len;
771 }
772 info->videopage_len = len;
773 memcpy(info->videopage, og.header, og.header_len);
774 memcpy(info->videopage+og.header_len , og.body, og.body_len);
775
776 info->videopage_valid = 1;
777 if(ogg_page_granulepos(&og)>0) {
778 info->videotime = theora_granule_time (&info->td,
779 ogg_page_granulepos(&og));
780 }
781 }
782 }
783 if(!info->video_only && !info->audiopage_valid) {
784 // this way seeking is much better,
785 // not sure if 23 packets is a good value. it works though
786 int a_next=0;
787 if(info->a_pkg>22 && ogg_stream_flush(&info->vo, &og) > 0) {
788 a_next=1;
789 }
790 else if(ogg_stream_pageout(&info->vo, &og) > 0) {
791 a_next=1;
792 }
793 if(a_next) {
794 len = og.header_len + og.body_len;
795 if(info->audiopage_buffer_length < len) {
796 info->audiopage = realloc(info->audiopage, len);
797 info->audiopage_buffer_length = len;
798 }
799 info->audiopage_len = len;
800 memcpy(info->audiopage, og.header, og.header_len);
801 memcpy(info->audiopage+og.header_len , og.body, og.body_len);
802
803 info->audiopage_valid = 1;
804 if(ogg_page_granulepos(&og)>0) {
805 info->audiotime= vorbis_granule_time (&info->vd,
806 ogg_page_granulepos(&og));
807 }
808 }
809 }
810
811 #ifdef HAVE_KATE
812 if (info->with_kate) for (n=0; n<info->n_kate_streams; ++n) {
813 oggmux_kate_stream *ks=info->kate_streams+n;
814 if (!ks->katepage_valid) {
815 int k_next=0;
816 /* always flush kate stream */
817 if (ogg_stream_flush(&ks->ko, &og) > 0) {
818 k_next = 1;
819 }
820 if (k_next) {
821 len = og.header_len + og.body_len;
822 if(ks->katepage_buffer_length < len) {
823 ks->katepage = realloc(ks->katepage, len);
824 ks->katepage_buffer_length = len;
825 }
826 ks->katepage_len = len;
827 memcpy(ks->katepage, og.header, og.header_len);
828 memcpy(ks->katepage+og.header_len , og.body, og.body_len);
829
830 ks->katepage_valid = 1;
831 if(ogg_page_granulepos(&og)>0) {
832 ks->katetime= kate_granule_time (&ks->ki,
833 ogg_page_granulepos(&og));
834 }
835 }
836 }
837 }
838 #endif
839
840 #ifdef HAVE_KATE
841 #define CHECK_KATE_OUTPUT(which) \
842 if (best>=0 && info->kate_streams[best].katetime/*-1.0*/<=info->which##time) { \
843 write_kate_page(info, best); \
844 continue; \
845 }
846 #else
847 #define CHECK_KATE_OUTPUT(which) ((void)0)
848 #endif
849
850 best=find_best_valid_kate_page(info);
851
852 if(info->video_only && info->videopage_valid) {
853 CHECK_KATE_OUTPUT(video);
854 write_video_page(info);
855 }
856 else if(info->audio_only && info->audiopage_valid) {
857 CHECK_KATE_OUTPUT(audio);
858 write_audio_page(info);
859 }
860 /* We're using both. We can output only:
861 * a) If we have valid pages for both
862 * b) At EOS, for the remaining stream.
863 */
864 else if(info->videopage_valid && info->audiopage_valid) {
865 /* Make sure they're in the right order. */
866 if(info->videotime <= info->audiotime) {
867 CHECK_KATE_OUTPUT(video);
868 write_video_page(info);
869 }
870 else {
871 CHECK_KATE_OUTPUT(audio);
872 write_audio_page(info);
873 }
874 }
875 else if(e_o_s && best>=0) {
876 write_kate_page(info, best);
877 }
878 else if(e_o_s && info->videopage_valid) {
879 write_video_page(info);
880 }
881 else if(e_o_s && info->audiopage_valid) {
882 write_audio_page(info);
883 }
884 else {
885 break; /* Nothing more writable at the moment */
886 }
887 }
888 }
889
890 void oggmux_close (oggmux_info *info){
891 int n;
892
893 ogg_stream_clear (&info->vo);
894 vorbis_block_clear (&info->vb);
895 vorbis_dsp_clear (&info->vd);
896 vorbis_comment_clear (&info->vc);
897 vorbis_info_clear (&info->vi);
898
899 ogg_stream_clear (&info->to);
900 theora_clear (&info->td);
901
902 #ifdef HAVE_KATE
903 for (n=0; n<info->n_kate_streams; ++n) {
904 ogg_stream_clear (&info->kate_streams[n].ko);
905 kate_comment_clear (&info->kate_streams[n].kc);
906 kate_info_clear (&info->kate_streams[n].ki);
907 kate_clear (&info->kate_streams[n].k);
908 }
909 #endif
910
911 if (info->outfile && info->outfile != stdout)
912 fclose (info->outfile);
913
914 if(info->videopage)
915 free(info->videopage);
916 if(info->audiopage)
917 free(info->audiopage);
918
919 for (n=0; n<info->n_kate_streams; ++n) {
920 if(info->kate_streams[n].katepage)
921 free(info->kate_streams[n].katepage);
922 }
923 }
+0
-138
theorautils.h less more
0 /* -*- tab-width:4;c-file-style:"cc-mode"; -*- */
1 /*
2 * theorautils.h -- Ogg Theora/Ogg Vorbis Abstraction and Muxing
3 * Copyright (C) 2003-2005 <j@v2v.cc>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software Foundation,
17 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 */
19
20 #include <stdint.h>
21 #include "theora/theora.h"
22 #include "vorbis/codec.h"
23 #include "vorbis/vorbisenc.h"
24 #ifdef HAVE_KATE
25 #include "kate/kate.h"
26 #endif
27 #include "ogg/ogg.h"
28
29 // #define OGGMUX_DEBUG
30
31 #define SKELETON_VERSION_MAJOR 3
32 #define SKELETON_VERSION_MINOR 0
33 #define FISHEAD_IDENTIFIER "fishead\0"
34 #define FISBONE_IDENTIFIER "fisbone\0"
35 #define FISBONE_SIZE 52
36 #define FISBONE_MESSAGE_HEADER_OFFSET 44
37
38 typedef struct
39 {
40 #ifdef HAVE_KATE
41 kate_state k;
42 kate_info ki;
43 kate_comment kc;
44 #endif
45 ogg_stream_state ko; /* take physical pages, weld into a logical
46 * stream of packets */
47 int katepage_valid;
48 unsigned char *katepage;
49 int katepage_len;
50 int katepage_buffer_length;
51 double katetime;
52 }
53 oggmux_kate_stream;
54
55 typedef struct
56 {
57 /* the file the mixed ogg stream is written to */
58 FILE *outfile;
59
60 int audio_only;
61 int video_only;
62 int with_skeleton;
63 int frontend;
64 /* vorbis settings */
65 int sample_rate;
66 int channels;
67 double vorbis_quality;
68 int vorbis_bitrate;
69
70 vorbis_info vi; /* struct that stores all the static vorbis bitstream settings */
71 vorbis_comment vc; /* struct that stores all the user comments */
72
73 /* theora settings */
74 theora_info ti;
75 theora_comment tc;
76 int speed_level;
77
78 /* state info */
79 theora_state td;
80 vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
81 vorbis_block vb; /* local working space for packet->PCM decode */
82
83 int with_kate;
84
85 /* used for muxing */
86 ogg_stream_state to; /* take physical pages, weld into a logical
87 * stream of packets */
88 ogg_stream_state vo; /* take physical pages, weld into a logical
89 * stream of packets */
90 ogg_stream_state so; /* take physical pages, weld into a logical
91 * stream of packets, used for skeleton stream */
92
93 int audiopage_valid;
94 int videopage_valid;
95 unsigned char *audiopage;
96 unsigned char *videopage;
97 int videopage_len;
98 int audiopage_len;
99 int videopage_buffer_length;
100 int audiopage_buffer_length;
101
102 /* some stats */
103 double audiotime;
104 double videotime;
105 double duration;
106
107 int vkbps;
108 int akbps;
109 ogg_int64_t audio_bytesout;
110 ogg_int64_t video_bytesout;
111 ogg_int64_t kate_bytesout;
112 time_t start_time;
113
114 //to do some manual page flusing
115 int v_pkg;
116 int a_pkg;
117 int k_pkg;
118 #ifdef OGGMUX_DEBUG
119 int a_page;
120 int v_page;
121 int k_page;
122 #endif
123
124 int n_kate_streams;
125 oggmux_kate_stream *kate_streams;
126 }
127 oggmux_info;
128
129 extern void init_info(oggmux_info *info);
130 extern void oggmux_setup_kate_streams(oggmux_info *info, int n_kate_streams);
131 extern void oggmux_init (oggmux_info *info);
132 extern void oggmux_add_video (oggmux_info *info, yuv_buffer *yuv, int e_o_s);
133 extern void oggmux_add_audio (oggmux_info *info, int16_t * readbuffer, int bytesread, int samplesread,int e_o_s);
134 extern void oggmux_add_kate_text (oggmux_info *info, int idx, double t0, double t1, const char *text, size_t len,int e_o_s);
135 extern void oggmux_add_kate_end_packet (oggmux_info *info, int idx, double t);
136 extern void oggmux_flush (oggmux_info *info, int e_o_s);
137 extern void oggmux_close (oggmux_info *info);