1 | dnl aclocal.m4 generated automatically by aclocal 1.4-p6 |
---|
2 | |
---|
3 | dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. |
---|
4 | dnl This file is free software; the Free Software Foundation |
---|
5 | dnl gives unlimited permission to copy and/or distribute it, |
---|
6 | dnl with or without modifications, as long as this notice is preserved. |
---|
7 | |
---|
8 | dnl This program is distributed in the hope that it will be useful, |
---|
9 | dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
---|
10 | dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
---|
11 | dnl PARTICULAR PURPOSE. |
---|
12 | |
---|
13 | # Like AC_CONFIG_HEADER, but automatically create stamp file. |
---|
14 | |
---|
15 | AC_DEFUN([AM_CONFIG_HEADER], |
---|
16 | [AC_PREREQ([2.12]) |
---|
17 | AC_CONFIG_HEADER([$1]) |
---|
18 | dnl When config.status generates a header, we must update the stamp-h file. |
---|
19 | dnl This file resides in the same directory as the config header |
---|
20 | dnl that is generated. We must strip everything past the first ":", |
---|
21 | dnl and everything past the last "/". |
---|
22 | AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl |
---|
23 | ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, |
---|
24 | <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, |
---|
25 | <<am_indx=1 |
---|
26 | for am_file in <<$1>>; do |
---|
27 | case " <<$>>CONFIG_HEADERS " in |
---|
28 | *" <<$>>am_file "*<<)>> |
---|
29 | echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx |
---|
30 | ;; |
---|
31 | esac |
---|
32 | am_indx=`expr "<<$>>am_indx" + 1` |
---|
33 | done<<>>dnl>>) |
---|
34 | changequote([,]))]) |
---|
35 | |
---|
36 | # Do all the work for Automake. This macro actually does too much -- |
---|
37 | # some checks are only needed if your package does certain things. |
---|
38 | # But this isn't really a big deal. |
---|
39 | |
---|
40 | # serial 1 |
---|
41 | |
---|
42 | dnl Usage: |
---|
43 | dnl AM_INIT_AUTOMAKE(package,version, [no-define]) |
---|
44 | |
---|
45 | AC_DEFUN([AM_INIT_AUTOMAKE], |
---|
46 | [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl |
---|
47 | AC_REQUIRE([AC_PROG_INSTALL]) |
---|
48 | PACKAGE=[$1] |
---|
49 | AC_SUBST(PACKAGE) |
---|
50 | VERSION=[$2] |
---|
51 | AC_SUBST(VERSION) |
---|
52 | dnl test to see if srcdir already configured |
---|
53 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then |
---|
54 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
---|
55 | fi |
---|
56 | ifelse([$3],, |
---|
57 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
---|
58 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) |
---|
59 | AC_REQUIRE([AM_SANITY_CHECK]) |
---|
60 | AC_REQUIRE([AC_ARG_PROGRAM]) |
---|
61 | dnl FIXME This is truly gross. |
---|
62 | missing_dir=`cd $ac_aux_dir && pwd` |
---|
63 | AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir) |
---|
64 | AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) |
---|
65 | AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir) |
---|
66 | AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) |
---|
67 | AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) |
---|
68 | AC_REQUIRE([AC_PROG_MAKE_SET])]) |
---|
69 | |
---|
70 | # Copyright 2002 Free Software Foundation, Inc. |
---|
71 | |
---|
72 | # This program is free software; you can redistribute it and/or modify |
---|
73 | # it under the terms of the GNU General Public License as published by |
---|
74 | # the Free Software Foundation; either version 2, or (at your option) |
---|
75 | # any later version. |
---|
76 | |
---|
77 | # This program is distributed in the hope that it will be useful, |
---|
78 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
79 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
80 | # GNU General Public License for more details. |
---|
81 | |
---|
82 | # You should have received a copy of the GNU General Public License |
---|
83 | # along with this program; if not, write to the Free Software |
---|
84 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
85 | |
---|
86 | # AM_AUTOMAKE_VERSION(VERSION) |
---|
87 | # ---------------------------- |
---|
88 | # Automake X.Y traces this macro to ensure aclocal.m4 has been |
---|
89 | # generated from the m4 files accompanying Automake X.Y. |
---|
90 | AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"]) |
---|
91 | |
---|
92 | # AM_SET_CURRENT_AUTOMAKE_VERSION |
---|
93 | # ------------------------------- |
---|
94 | # Call AM_AUTOMAKE_VERSION so it can be traced. |
---|
95 | # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. |
---|
96 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
---|
97 | [AM_AUTOMAKE_VERSION([1.4-p6])]) |
---|
98 | |
---|
99 | # |
---|
100 | # Check to make sure that the build environment is sane. |
---|
101 | # |
---|
102 | |
---|
103 | AC_DEFUN([AM_SANITY_CHECK], |
---|
104 | [AC_MSG_CHECKING([whether build environment is sane]) |
---|
105 | # Just in case |
---|
106 | sleep 1 |
---|
107 | echo timestamp > conftestfile |
---|
108 | # Do `set' in a subshell so we don't clobber the current shell's |
---|
109 | # arguments. Must try -L first in case configure is actually a |
---|
110 | # symlink; some systems play weird games with the mod time of symlinks |
---|
111 | # (eg FreeBSD returns the mod time of the symlink's containing |
---|
112 | # directory). |
---|
113 | if ( |
---|
114 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` |
---|
115 | if test "[$]*" = "X"; then |
---|
116 | # -L didn't work. |
---|
117 | set X `ls -t $srcdir/configure conftestfile` |
---|
118 | fi |
---|
119 | if test "[$]*" != "X $srcdir/configure conftestfile" \ |
---|
120 | && test "[$]*" != "X conftestfile $srcdir/configure"; then |
---|
121 | |
---|
122 | # If neither matched, then we have a broken ls. This can happen |
---|
123 | # if, for instance, CONFIG_SHELL is bash and it inherits a |
---|
124 | # broken ls alias from the environment. This has actually |
---|
125 | # happened. Such a system could not be considered "sane". |
---|
126 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
---|
127 | alias in your environment]) |
---|
128 | fi |
---|
129 | |
---|
130 | test "[$]2" = conftestfile |
---|
131 | ) |
---|
132 | then |
---|
133 | # Ok. |
---|
134 | : |
---|
135 | else |
---|
136 | AC_MSG_ERROR([newly created file is older than distributed files! |
---|
137 | Check your system clock]) |
---|
138 | fi |
---|
139 | rm -f conftest* |
---|
140 | AC_MSG_RESULT(yes)]) |
---|
141 | |
---|
142 | dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) |
---|
143 | dnl The program must properly implement --version. |
---|
144 | AC_DEFUN([AM_MISSING_PROG], |
---|
145 | [AC_MSG_CHECKING(for working $2) |
---|
146 | # Run test in a subshell; some versions of sh will print an error if |
---|
147 | # an executable is not found, even if stderr is redirected. |
---|
148 | # Redirect stdin to placate older versions of autoconf. Sigh. |
---|
149 | if ($2 --version) < /dev/null > /dev/null 2>&1; then |
---|
150 | $1=$2 |
---|
151 | AC_MSG_RESULT(found) |
---|
152 | else |
---|
153 | $1="$3/missing $2" |
---|
154 | AC_MSG_RESULT(missing) |
---|
155 | fi |
---|
156 | AC_SUBST($1)]) |
---|
157 | |
---|
158 | |
---|
159 | dnl AC_PROG_INTLTOOL([MINIMUM-VERSION]) |
---|
160 | # serial 1 AC_PROG_INTLTOOL |
---|
161 | AC_DEFUN(AC_PROG_INTLTOOL, |
---|
162 | [ |
---|
163 | |
---|
164 | if test -n "$1"; then |
---|
165 | AC_MSG_CHECKING(for intltool >= $1) |
---|
166 | |
---|
167 | INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ printf "%d", $[1] * 100 + $[2]; }'` |
---|
168 | INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $[2]; }' < ${srcdir}/intltool-update.in` |
---|
169 | changequote({{,}}) |
---|
170 | INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split(${{2}}, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < ${srcdir}/intltool-update.in` |
---|
171 | changequote([,]) |
---|
172 | |
---|
173 | if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then |
---|
174 | AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) |
---|
175 | else |
---|
176 | AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found. Your intltool is too old. You need intltool $1 or later.]) |
---|
177 | exit 1 |
---|
178 | fi |
---|
179 | fi |
---|
180 | |
---|
181 | INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
182 | INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
183 | INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -k -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
184 | INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
185 | INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -o -p' |
---|
186 | INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
187 | INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -o -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
188 | INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
189 | INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
190 | INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
191 | INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
192 | INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
193 | INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -s -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
194 | INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
195 | |
---|
196 | AC_SUBST(INTLTOOL_DESKTOP_RULE) |
---|
197 | AC_SUBST(INTLTOOL_DIRECTORY_RULE) |
---|
198 | AC_SUBST(INTLTOOL_KEYS_RULE) |
---|
199 | AC_SUBST(INTLTOOL_PROP_RULE) |
---|
200 | AC_SUBST(INTLTOOL_OAF_RULE) |
---|
201 | AC_SUBST(INTLTOOL_PONG_RULE) |
---|
202 | AC_SUBST(INTLTOOL_SERVER_RULE) |
---|
203 | AC_SUBST(INTLTOOL_SHEET_RULE) |
---|
204 | AC_SUBST(INTLTOOL_SOUNDLIST_RULE) |
---|
205 | AC_SUBST(INTLTOOL_UI_RULE) |
---|
206 | AC_SUBST(INTLTOOL_XML_RULE) |
---|
207 | AC_SUBST(INTLTOOL_CAVES_RULE) |
---|
208 | AC_SUBST(INTLTOOL_SCHEMAS_RULE) |
---|
209 | AC_SUBST(INTLTOOL_THEME_RULE) |
---|
210 | |
---|
211 | # Use the tools built into the package, not the ones that are installed. |
---|
212 | |
---|
213 | INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract' |
---|
214 | INTLTOOL_MERGE='$(top_builddir)/intltool-merge' |
---|
215 | INTLTOOL_UPDATE='$(top_builddir)/intltool-update' |
---|
216 | |
---|
217 | AC_SUBST(INTLTOOL_EXTRACT) |
---|
218 | AC_SUBST(INTLTOOL_MERGE) |
---|
219 | AC_SUBST(INTLTOOL_UPDATE) |
---|
220 | |
---|
221 | AC_PATH_PROG(INTLTOOL_PERL, perl) |
---|
222 | if test -z "$INTLTOOL_PERL"; then |
---|
223 | AC_MSG_ERROR([perl not found; required for intltool]) |
---|
224 | fi |
---|
225 | if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then |
---|
226 | AC_MSG_ERROR([perl 5.x required for intltool]) |
---|
227 | fi |
---|
228 | |
---|
229 | # Remove file type tags (using []) from po/POTFILES. |
---|
230 | |
---|
231 | ifdef([AC_DIVERSION_ICMDS],[ |
---|
232 | AC_DIVERT_PUSH(AC_DIVERSION_ICMDS) |
---|
233 | changequote(,) |
---|
234 | mv -f po/POTFILES po/POTFILES.tmp |
---|
235 | sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES |
---|
236 | rm -f po/POTFILES.tmp |
---|
237 | changequote([,]) |
---|
238 | AC_DIVERT_POP() |
---|
239 | ],[ |
---|
240 | ifdef([AC_CONFIG_COMMANDS_PRE],[ |
---|
241 | AC_CONFIG_COMMANDS_PRE([ |
---|
242 | changequote(,) |
---|
243 | mv -f po/POTFILES po/POTFILES.tmp |
---|
244 | sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES |
---|
245 | rm -f po/POTFILES.tmp |
---|
246 | changequote([,]) |
---|
247 | ]) |
---|
248 | ]) |
---|
249 | ]) |
---|
250 | |
---|
251 | # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT. |
---|
252 | |
---|
253 | AC_OUTPUT_COMMANDS([ |
---|
254 | |
---|
255 | sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out |
---|
256 | if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then |
---|
257 | rm -f intltool-extract.out |
---|
258 | else |
---|
259 | mv -f intltool-extract.out intltool-extract |
---|
260 | fi |
---|
261 | chmod ugo+x intltool-extract |
---|
262 | chmod u+w intltool-extract |
---|
263 | |
---|
264 | sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out |
---|
265 | if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then |
---|
266 | rm -f intltool-merge.out |
---|
267 | else |
---|
268 | mv -f intltool-merge.out intltool-merge |
---|
269 | fi |
---|
270 | chmod ugo+x intltool-merge |
---|
271 | chmod u+w intltool-merge |
---|
272 | |
---|
273 | sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out |
---|
274 | if cmp -s intltool-update intltool-update.out 2>/dev/null; then |
---|
275 | rm -f intltool-update.out |
---|
276 | else |
---|
277 | mv -f intltool-update.out intltool-update |
---|
278 | fi |
---|
279 | chmod ugo+x intltool-update |
---|
280 | chmod u+w intltool-update |
---|
281 | |
---|
282 | ], INTLTOOL_PERL=${INTLTOOL_PERL}) |
---|
283 | |
---|
284 | ]) |
---|
285 | |
---|
286 | # Add --enable-maintainer-mode option to configure. |
---|
287 | # From Jim Meyering |
---|
288 | |
---|
289 | # serial 1 |
---|
290 | |
---|
291 | AC_DEFUN([AM_MAINTAINER_MODE], |
---|
292 | [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) |
---|
293 | dnl maintainer-mode is disabled by default |
---|
294 | AC_ARG_ENABLE(maintainer-mode, |
---|
295 | [ --enable-maintainer-mode enable make rules and dependencies not useful |
---|
296 | (and sometimes confusing) to the casual installer], |
---|
297 | USE_MAINTAINER_MODE=$enableval, |
---|
298 | USE_MAINTAINER_MODE=no) |
---|
299 | AC_MSG_RESULT($USE_MAINTAINER_MODE) |
---|
300 | AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) |
---|
301 | MAINT=$MAINTAINER_MODE_TRUE |
---|
302 | AC_SUBST(MAINT)dnl |
---|
303 | ] |
---|
304 | ) |
---|
305 | |
---|
306 | # Define a conditional. |
---|
307 | |
---|
308 | AC_DEFUN([AM_CONDITIONAL], |
---|
309 | [AC_SUBST($1_TRUE) |
---|
310 | AC_SUBST($1_FALSE) |
---|
311 | if $2; then |
---|
312 | $1_TRUE= |
---|
313 | $1_FALSE='#' |
---|
314 | else |
---|
315 | $1_TRUE='#' |
---|
316 | $1_FALSE= |
---|
317 | fi]) |
---|
318 | |
---|
319 | # isc-posix.m4 serial 2 (gettext-0.11.2) |
---|
320 | dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. |
---|
321 | dnl This file is free software, distributed under the terms of the GNU |
---|
322 | dnl General Public License. As a special exception to the GNU General |
---|
323 | dnl Public License, this file may be distributed as part of a program |
---|
324 | dnl that contains a configuration script generated by Autoconf, under |
---|
325 | dnl the same distribution terms as the rest of that program. |
---|
326 | |
---|
327 | # This file is not needed with autoconf-2.53 and newer. Remove it in 2005. |
---|
328 | |
---|
329 | # This test replaces the one in autoconf. |
---|
330 | # Currently this macro should have the same name as the autoconf macro |
---|
331 | # because gettext's gettext.m4 (distributed in the automake package) |
---|
332 | # still uses it. Otherwise, the use in gettext.m4 makes autoheader |
---|
333 | # give these diagnostics: |
---|
334 | # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX |
---|
335 | # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX |
---|
336 | |
---|
337 | undefine([AC_ISC_POSIX]) |
---|
338 | |
---|
339 | AC_DEFUN([AC_ISC_POSIX], |
---|
340 | [ |
---|
341 | dnl This test replaces the obsolescent AC_ISC_POSIX kludge. |
---|
342 | AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) |
---|
343 | ] |
---|
344 | ) |
---|
345 | |
---|
346 | # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- |
---|
347 | |
---|
348 | # serial 46 AC_PROG_LIBTOOL |
---|
349 | |
---|
350 | AC_DEFUN([AC_PROG_LIBTOOL], |
---|
351 | [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl |
---|
352 | |
---|
353 | # This can be used to rebuild libtool when needed |
---|
354 | LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" |
---|
355 | |
---|
356 | # Always use our own libtool. |
---|
357 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' |
---|
358 | AC_SUBST(LIBTOOL)dnl |
---|
359 | |
---|
360 | # Prevent multiple expansion |
---|
361 | define([AC_PROG_LIBTOOL], []) |
---|
362 | ]) |
---|
363 | |
---|
364 | AC_DEFUN([AC_LIBTOOL_SETUP], |
---|
365 | [AC_PREREQ(2.13)dnl |
---|
366 | AC_REQUIRE([AC_ENABLE_SHARED])dnl |
---|
367 | AC_REQUIRE([AC_ENABLE_STATIC])dnl |
---|
368 | AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl |
---|
369 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
---|
370 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
---|
371 | AC_REQUIRE([AC_PROG_CC])dnl |
---|
372 | AC_REQUIRE([AC_PROG_LD])dnl |
---|
373 | AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl |
---|
374 | AC_REQUIRE([AC_PROG_NM])dnl |
---|
375 | AC_REQUIRE([LT_AC_PROG_SED])dnl |
---|
376 | |
---|
377 | AC_REQUIRE([AC_PROG_LN_S])dnl |
---|
378 | AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl |
---|
379 | AC_REQUIRE([AC_OBJEXT])dnl |
---|
380 | AC_REQUIRE([AC_EXEEXT])dnl |
---|
381 | dnl |
---|
382 | |
---|
383 | _LT_AC_PROG_ECHO_BACKSLASH |
---|
384 | # Only perform the check for file, if the check method requires it |
---|
385 | case $deplibs_check_method in |
---|
386 | file_magic*) |
---|
387 | if test "$file_magic_cmd" = '$MAGIC_CMD'; then |
---|
388 | AC_PATH_MAGIC |
---|
389 | fi |
---|
390 | ;; |
---|
391 | esac |
---|
392 | |
---|
393 | AC_CHECK_TOOL(RANLIB, ranlib, :) |
---|
394 | AC_CHECK_TOOL(STRIP, strip, :) |
---|
395 | |
---|
396 | ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) |
---|
397 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], |
---|
398 | enable_win32_dll=yes, enable_win32_dll=no) |
---|
399 | |
---|
400 | AC_ARG_ENABLE(libtool-lock, |
---|
401 | [ --disable-libtool-lock avoid locking (might break parallel builds)]) |
---|
402 | test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes |
---|
403 | |
---|
404 | # Some flags need to be propagated to the compiler or linker for good |
---|
405 | # libtool support. |
---|
406 | case $host in |
---|
407 | *-*-irix6*) |
---|
408 | # Find out which ABI we are using. |
---|
409 | echo '[#]line __oline__ "configure"' > conftest.$ac_ext |
---|
410 | if AC_TRY_EVAL(ac_compile); then |
---|
411 | case `/usr/bin/file conftest.$ac_objext` in |
---|
412 | *32-bit*) |
---|
413 | LD="${LD-ld} -32" |
---|
414 | ;; |
---|
415 | *N32*) |
---|
416 | LD="${LD-ld} -n32" |
---|
417 | ;; |
---|
418 | *64-bit*) |
---|
419 | LD="${LD-ld} -64" |
---|
420 | ;; |
---|
421 | esac |
---|
422 | fi |
---|
423 | rm -rf conftest* |
---|
424 | ;; |
---|
425 | |
---|
426 | *-*-sco3.2v5*) |
---|
427 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. |
---|
428 | SAVE_CFLAGS="$CFLAGS" |
---|
429 | CFLAGS="$CFLAGS -belf" |
---|
430 | AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, |
---|
431 | [AC_LANG_SAVE |
---|
432 | AC_LANG_C |
---|
433 | AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) |
---|
434 | AC_LANG_RESTORE]) |
---|
435 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then |
---|
436 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf |
---|
437 | CFLAGS="$SAVE_CFLAGS" |
---|
438 | fi |
---|
439 | ;; |
---|
440 | |
---|
441 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], |
---|
442 | [*-*-cygwin* | *-*-mingw* | *-*-pw32*) |
---|
443 | AC_CHECK_TOOL(DLLTOOL, dlltool, false) |
---|
444 | AC_CHECK_TOOL(AS, as, false) |
---|
445 | AC_CHECK_TOOL(OBJDUMP, objdump, false) |
---|
446 | |
---|
447 | # recent cygwin and mingw systems supply a stub DllMain which the user |
---|
448 | # can override, but on older systems we have to supply one |
---|
449 | AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, |
---|
450 | [AC_TRY_LINK([], |
---|
451 | [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); |
---|
452 | DllMain (0, 0, 0);], |
---|
453 | [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) |
---|
454 | |
---|
455 | case $host/$CC in |
---|
456 | *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) |
---|
457 | # old mingw systems require "-dll" to link a DLL, while more recent ones |
---|
458 | # require "-mdll" |
---|
459 | SAVE_CFLAGS="$CFLAGS" |
---|
460 | CFLAGS="$CFLAGS -mdll" |
---|
461 | AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, |
---|
462 | [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) |
---|
463 | CFLAGS="$SAVE_CFLAGS" ;; |
---|
464 | *-*-cygwin* | *-*-pw32*) |
---|
465 | # cygwin systems need to pass --dll to the linker, and not link |
---|
466 | # crt.o which will require a WinMain@16 definition. |
---|
467 | lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; |
---|
468 | esac |
---|
469 | ;; |
---|
470 | ]) |
---|
471 | esac |
---|
472 | |
---|
473 | _LT_AC_LTCONFIG_HACK |
---|
474 | |
---|
475 | ]) |
---|
476 | |
---|
477 | # AC_LIBTOOL_HEADER_ASSERT |
---|
478 | # ------------------------ |
---|
479 | AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT], |
---|
480 | [AC_CACHE_CHECK([whether $CC supports assert without backlinking], |
---|
481 | [lt_cv_func_assert_works], |
---|
482 | [case $host in |
---|
483 | *-*-solaris*) |
---|
484 | if test "$GCC" = yes && test "$with_gnu_ld" != yes; then |
---|
485 | case `$CC --version 2>/dev/null` in |
---|
486 | [[12]].*) lt_cv_func_assert_works=no ;; |
---|
487 | *) lt_cv_func_assert_works=yes ;; |
---|
488 | esac |
---|
489 | fi |
---|
490 | ;; |
---|
491 | esac]) |
---|
492 | |
---|
493 | if test "x$lt_cv_func_assert_works" = xyes; then |
---|
494 | AC_CHECK_HEADERS(assert.h) |
---|
495 | fi |
---|
496 | ])# AC_LIBTOOL_HEADER_ASSERT |
---|
497 | |
---|
498 | # _LT_AC_CHECK_DLFCN |
---|
499 | # -------------------- |
---|
500 | AC_DEFUN([_LT_AC_CHECK_DLFCN], |
---|
501 | [AC_CHECK_HEADERS(dlfcn.h) |
---|
502 | ])# _LT_AC_CHECK_DLFCN |
---|
503 | |
---|
504 | # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
---|
505 | # --------------------------------- |
---|
506 | AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], |
---|
507 | [AC_REQUIRE([AC_CANONICAL_HOST]) |
---|
508 | AC_REQUIRE([AC_PROG_NM]) |
---|
509 | AC_REQUIRE([AC_OBJEXT]) |
---|
510 | # Check for command to grab the raw symbol name followed by C symbol from nm. |
---|
511 | AC_MSG_CHECKING([command to parse $NM output]) |
---|
512 | AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl |
---|
513 | |
---|
514 | # These are sane defaults that work on at least a few old systems. |
---|
515 | # [They come from Ultrix. What could be older than Ultrix?!! ;)] |
---|
516 | |
---|
517 | # Character class describing NM global symbol codes. |
---|
518 | symcode='[[BCDEGRST]]' |
---|
519 | |
---|
520 | # Regexp to match symbols that can be accessed directly from C. |
---|
521 | sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' |
---|
522 | |
---|
523 | # Transform the above into a raw symbol and a C symbol. |
---|
524 | symxfrm='\1 \2\3 \3' |
---|
525 | |
---|
526 | # Transform an extracted symbol line into a proper C declaration |
---|
527 | lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" |
---|
528 | |
---|
529 | # Transform an extracted symbol line into symbol name and symbol address |
---|
530 | lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" |
---|
531 | |
---|
532 | # Define system-specific variables. |
---|
533 | case $host_os in |
---|
534 | aix*) |
---|
535 | symcode='[[BCDT]]' |
---|
536 | ;; |
---|
537 | cygwin* | mingw* | pw32*) |
---|
538 | symcode='[[ABCDGISTW]]' |
---|
539 | ;; |
---|
540 | hpux*) # Its linker distinguishes data from code symbols |
---|
541 | lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" |
---|
542 | lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" |
---|
543 | ;; |
---|
544 | irix* | nonstopux*) |
---|
545 | symcode='[[BCDEGRST]]' |
---|
546 | ;; |
---|
547 | osf*) |
---|
548 | symcode='[[BCDEGQRST]]' |
---|
549 | ;; |
---|
550 | solaris* | sysv5*) |
---|
551 | symcode='[[BDT]]' |
---|
552 | ;; |
---|
553 | sysv4) |
---|
554 | symcode='[[DFNSTU]]' |
---|
555 | ;; |
---|
556 | esac |
---|
557 | |
---|
558 | # Handle CRLF in mingw tool chain |
---|
559 | opt_cr= |
---|
560 | case $host_os in |
---|
561 | mingw*) |
---|
562 | opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp |
---|
563 | ;; |
---|
564 | esac |
---|
565 | |
---|
566 | # If we're using GNU nm, then use its standard symbol codes. |
---|
567 | if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then |
---|
568 | symcode='[[ABCDGISTW]]' |
---|
569 | fi |
---|
570 | |
---|
571 | # Try without a prefix undercore, then with it. |
---|
572 | for ac_symprfx in "" "_"; do |
---|
573 | |
---|
574 | # Write the raw and C identifiers. |
---|
575 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" |
---|
576 | |
---|
577 | # Check to see that the pipe works correctly. |
---|
578 | pipe_works=no |
---|
579 | rm -f conftest* |
---|
580 | cat > conftest.$ac_ext <<EOF |
---|
581 | #ifdef __cplusplus |
---|
582 | extern "C" { |
---|
583 | #endif |
---|
584 | char nm_test_var; |
---|
585 | void nm_test_func(){} |
---|
586 | #ifdef __cplusplus |
---|
587 | } |
---|
588 | #endif |
---|
589 | int main(){nm_test_var='a';nm_test_func();return(0);} |
---|
590 | EOF |
---|
591 | |
---|
592 | if AC_TRY_EVAL(ac_compile); then |
---|
593 | # Now try to grab the symbols. |
---|
594 | nlist=conftest.nm |
---|
595 | if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then |
---|
596 | # Try sorting and uniquifying the output. |
---|
597 | if sort "$nlist" | uniq > "$nlist"T; then |
---|
598 | mv -f "$nlist"T "$nlist" |
---|
599 | else |
---|
600 | rm -f "$nlist"T |
---|
601 | fi |
---|
602 | |
---|
603 | # Make sure that we snagged all the symbols we need. |
---|
604 | if egrep ' nm_test_var$' "$nlist" >/dev/null; then |
---|
605 | if egrep ' nm_test_func$' "$nlist" >/dev/null; then |
---|
606 | cat <<EOF > conftest.$ac_ext |
---|
607 | #ifdef __cplusplus |
---|
608 | extern "C" { |
---|
609 | #endif |
---|
610 | |
---|
611 | EOF |
---|
612 | # Now generate the symbol file. |
---|
613 | eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' |
---|
614 | |
---|
615 | cat <<EOF >> conftest.$ac_ext |
---|
616 | #if defined (__STDC__) && __STDC__ |
---|
617 | # define lt_ptr void * |
---|
618 | #else |
---|
619 | # define lt_ptr char * |
---|
620 | # define const |
---|
621 | #endif |
---|
622 | |
---|
623 | /* The mapping between symbol names and symbols. */ |
---|
624 | const struct { |
---|
625 | const char *name; |
---|
626 | lt_ptr address; |
---|
627 | } |
---|
628 | lt_preloaded_symbols[[]] = |
---|
629 | { |
---|
630 | EOF |
---|
631 | sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext |
---|
632 | cat <<\EOF >> conftest.$ac_ext |
---|
633 | {0, (lt_ptr) 0} |
---|
634 | }; |
---|
635 | |
---|
636 | #ifdef __cplusplus |
---|
637 | } |
---|
638 | #endif |
---|
639 | EOF |
---|
640 | # Now try linking the two files. |
---|
641 | mv conftest.$ac_objext conftstm.$ac_objext |
---|
642 | save_LIBS="$LIBS" |
---|
643 | save_CFLAGS="$CFLAGS" |
---|
644 | LIBS="conftstm.$ac_objext" |
---|
645 | CFLAGS="$CFLAGS$no_builtin_flag" |
---|
646 | if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then |
---|
647 | pipe_works=yes |
---|
648 | fi |
---|
649 | LIBS="$save_LIBS" |
---|
650 | CFLAGS="$save_CFLAGS" |
---|
651 | else |
---|
652 | echo "cannot find nm_test_func in $nlist" >&AC_FD_CC |
---|
653 | fi |
---|
654 | else |
---|
655 | echo "cannot find nm_test_var in $nlist" >&AC_FD_CC |
---|
656 | fi |
---|
657 | else |
---|
658 | echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC |
---|
659 | fi |
---|
660 | else |
---|
661 | echo "$progname: failed program was:" >&AC_FD_CC |
---|
662 | cat conftest.$ac_ext >&5 |
---|
663 | fi |
---|
664 | rm -f conftest* conftst* |
---|
665 | |
---|
666 | # Do not use the global_symbol_pipe unless it works. |
---|
667 | if test "$pipe_works" = yes; then |
---|
668 | break |
---|
669 | else |
---|
670 | lt_cv_sys_global_symbol_pipe= |
---|
671 | fi |
---|
672 | done |
---|
673 | ]) |
---|
674 | global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" |
---|
675 | if test -z "$lt_cv_sys_global_symbol_pipe"; then |
---|
676 | global_symbol_to_cdecl= |
---|
677 | global_symbol_to_c_name_address= |
---|
678 | else |
---|
679 | global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" |
---|
680 | global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" |
---|
681 | fi |
---|
682 | if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; |
---|
683 | then |
---|
684 | AC_MSG_RESULT(failed) |
---|
685 | else |
---|
686 | AC_MSG_RESULT(ok) |
---|
687 | fi |
---|
688 | ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
---|
689 | |
---|
690 | # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR |
---|
691 | # --------------------------------- |
---|
692 | AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], |
---|
693 | [# Find the correct PATH separator. Usually this is `:', but |
---|
694 | # DJGPP uses `;' like DOS. |
---|
695 | if test "X${PATH_SEPARATOR+set}" != Xset; then |
---|
696 | UNAME=${UNAME-`uname 2>/dev/null`} |
---|
697 | case X$UNAME in |
---|
698 | *-DOS) lt_cv_sys_path_separator=';' ;; |
---|
699 | *) lt_cv_sys_path_separator=':' ;; |
---|
700 | esac |
---|
701 | PATH_SEPARATOR=$lt_cv_sys_path_separator |
---|
702 | fi |
---|
703 | ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR |
---|
704 | |
---|
705 | # _LT_AC_PROG_ECHO_BACKSLASH |
---|
706 | # -------------------------- |
---|
707 | # Add some code to the start of the generated configure script which |
---|
708 | # will find an echo command which doesn't interpret backslashes. |
---|
709 | AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], |
---|
710 | [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], |
---|
711 | [AC_DIVERT_PUSH(NOTICE)]) |
---|
712 | _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR |
---|
713 | |
---|
714 | # Check that we are running under the correct shell. |
---|
715 | SHELL=${CONFIG_SHELL-/bin/sh} |
---|
716 | |
---|
717 | case X$ECHO in |
---|
718 | X*--fallback-echo) |
---|
719 | # Remove one level of quotation (which was required for Make). |
---|
720 | ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` |
---|
721 | ;; |
---|
722 | esac |
---|
723 | |
---|
724 | echo=${ECHO-echo} |
---|
725 | if test "X[$]1" = X--no-reexec; then |
---|
726 | # Discard the --no-reexec flag, and continue. |
---|
727 | shift |
---|
728 | elif test "X[$]1" = X--fallback-echo; then |
---|
729 | # Avoid inline document here, it may be left over |
---|
730 | : |
---|
731 | elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then |
---|
732 | # Yippee, $echo works! |
---|
733 | : |
---|
734 | else |
---|
735 | # Restart under the correct shell. |
---|
736 | exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} |
---|
737 | fi |
---|
738 | |
---|
739 | if test "X[$]1" = X--fallback-echo; then |
---|
740 | # used as fallback echo |
---|
741 | shift |
---|
742 | cat <<EOF |
---|
743 | $* |
---|
744 | EOF |
---|
745 | exit 0 |
---|
746 | fi |
---|
747 | |
---|
748 | # The HP-UX ksh and POSIX shell print the target directory to stdout |
---|
749 | # if CDPATH is set. |
---|
750 | if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
---|
751 | |
---|
752 | if test -z "$ECHO"; then |
---|
753 | if test "X${echo_test_string+set}" != Xset; then |
---|
754 | # find a string as large as possible, as long as the shell can cope with it |
---|
755 | for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do |
---|
756 | # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... |
---|
757 | if (echo_test_string="`eval $cmd`") 2>/dev/null && |
---|
758 | echo_test_string="`eval $cmd`" && |
---|
759 | (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null |
---|
760 | then |
---|
761 | break |
---|
762 | fi |
---|
763 | done |
---|
764 | fi |
---|
765 | |
---|
766 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && |
---|
767 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && |
---|
768 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
769 | : |
---|
770 | else |
---|
771 | # The Solaris, AIX, and Digital Unix default echo programs unquote |
---|
772 | # backslashes. This makes it impossible to quote backslashes using |
---|
773 | # echo "$something" | sed 's/\\/\\\\/g' |
---|
774 | # |
---|
775 | # So, first we look for a working echo in the user's PATH. |
---|
776 | |
---|
777 | IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
---|
778 | for dir in $PATH /usr/ucb; do |
---|
779 | if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && |
---|
780 | test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && |
---|
781 | echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && |
---|
782 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
783 | echo="$dir/echo" |
---|
784 | break |
---|
785 | fi |
---|
786 | done |
---|
787 | IFS="$save_ifs" |
---|
788 | |
---|
789 | if test "X$echo" = Xecho; then |
---|
790 | # We didn't find a better echo, so look for alternatives. |
---|
791 | if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && |
---|
792 | echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && |
---|
793 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
794 | # This shell has a builtin print -r that does the trick. |
---|
795 | echo='print -r' |
---|
796 | elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && |
---|
797 | test "X$CONFIG_SHELL" != X/bin/ksh; then |
---|
798 | # If we have ksh, try running configure again with it. |
---|
799 | ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} |
---|
800 | export ORIGINAL_CONFIG_SHELL |
---|
801 | CONFIG_SHELL=/bin/ksh |
---|
802 | export CONFIG_SHELL |
---|
803 | exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} |
---|
804 | else |
---|
805 | # Try using printf. |
---|
806 | echo='printf %s\n' |
---|
807 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && |
---|
808 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && |
---|
809 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
810 | # Cool, printf works |
---|
811 | : |
---|
812 | elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && |
---|
813 | test "X$echo_testing_string" = 'X\t' && |
---|
814 | echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && |
---|
815 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
816 | CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL |
---|
817 | export CONFIG_SHELL |
---|
818 | SHELL="$CONFIG_SHELL" |
---|
819 | export SHELL |
---|
820 | echo="$CONFIG_SHELL [$]0 --fallback-echo" |
---|
821 | elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && |
---|
822 | test "X$echo_testing_string" = 'X\t' && |
---|
823 | echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && |
---|
824 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
825 | echo="$CONFIG_SHELL [$]0 --fallback-echo" |
---|
826 | else |
---|
827 | # maybe with a smaller string... |
---|
828 | prev=: |
---|
829 | |
---|
830 | for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do |
---|
831 | if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null |
---|
832 | then |
---|
833 | break |
---|
834 | fi |
---|
835 | prev="$cmd" |
---|
836 | done |
---|
837 | |
---|
838 | if test "$prev" != 'sed 50q "[$]0"'; then |
---|
839 | echo_test_string=`eval $prev` |
---|
840 | export echo_test_string |
---|
841 | exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} |
---|
842 | else |
---|
843 | # Oops. We lost completely, so just stick with echo. |
---|
844 | echo=echo |
---|
845 | fi |
---|
846 | fi |
---|
847 | fi |
---|
848 | fi |
---|
849 | fi |
---|
850 | fi |
---|
851 | |
---|
852 | # Copy echo and quote the copy suitably for passing to libtool from |
---|
853 | # the Makefile, instead of quoting the original, which is used later. |
---|
854 | ECHO=$echo |
---|
855 | if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then |
---|
856 | ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" |
---|
857 | fi |
---|
858 | |
---|
859 | AC_SUBST(ECHO) |
---|
860 | AC_DIVERT_POP |
---|
861 | ])# _LT_AC_PROG_ECHO_BACKSLASH |
---|
862 | |
---|
863 | # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, |
---|
864 | # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) |
---|
865 | # ------------------------------------------------------------------ |
---|
866 | AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], |
---|
867 | [if test "$cross_compiling" = yes; then : |
---|
868 | [$4] |
---|
869 | else |
---|
870 | AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl |
---|
871 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
---|
872 | lt_status=$lt_dlunknown |
---|
873 | cat > conftest.$ac_ext <<EOF |
---|
874 | [#line __oline__ "configure" |
---|
875 | #include "confdefs.h" |
---|
876 | |
---|
877 | #if HAVE_DLFCN_H |
---|
878 | #include <dlfcn.h> |
---|
879 | #endif |
---|
880 | |
---|
881 | #include <stdio.h> |
---|
882 | |
---|
883 | #ifdef RTLD_GLOBAL |
---|
884 | # define LT_DLGLOBAL RTLD_GLOBAL |
---|
885 | #else |
---|
886 | # ifdef DL_GLOBAL |
---|
887 | # define LT_DLGLOBAL DL_GLOBAL |
---|
888 | # else |
---|
889 | # define LT_DLGLOBAL 0 |
---|
890 | # endif |
---|
891 | #endif |
---|
892 | |
---|
893 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we |
---|
894 | find out it does not work in some platform. */ |
---|
895 | #ifndef LT_DLLAZY_OR_NOW |
---|
896 | # ifdef RTLD_LAZY |
---|
897 | # define LT_DLLAZY_OR_NOW RTLD_LAZY |
---|
898 | # else |
---|
899 | # ifdef DL_LAZY |
---|
900 | # define LT_DLLAZY_OR_NOW DL_LAZY |
---|
901 | # else |
---|
902 | # ifdef RTLD_NOW |
---|
903 | # define LT_DLLAZY_OR_NOW RTLD_NOW |
---|
904 | # else |
---|
905 | # ifdef DL_NOW |
---|
906 | # define LT_DLLAZY_OR_NOW DL_NOW |
---|
907 | # else |
---|
908 | # define LT_DLLAZY_OR_NOW 0 |
---|
909 | # endif |
---|
910 | # endif |
---|
911 | # endif |
---|
912 | # endif |
---|
913 | #endif |
---|
914 | |
---|
915 | #ifdef __cplusplus |
---|
916 | extern "C" void exit (int); |
---|
917 | #endif |
---|
918 | |
---|
919 | void fnord() { int i=42;} |
---|
920 | int main () |
---|
921 | { |
---|
922 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); |
---|
923 | int status = $lt_dlunknown; |
---|
924 | |
---|
925 | if (self) |
---|
926 | { |
---|
927 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; |
---|
928 | else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; |
---|
929 | /* dlclose (self); */ |
---|
930 | } |
---|
931 | |
---|
932 | exit (status); |
---|
933 | }] |
---|
934 | EOF |
---|
935 | if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then |
---|
936 | (./conftest; exit; ) 2>/dev/null |
---|
937 | lt_status=$? |
---|
938 | case x$lt_status in |
---|
939 | x$lt_dlno_uscore) $1 ;; |
---|
940 | x$lt_dlneed_uscore) $2 ;; |
---|
941 | x$lt_unknown|x*) $3 ;; |
---|
942 | esac |
---|
943 | else : |
---|
944 | # compilation failed |
---|
945 | $3 |
---|
946 | fi |
---|
947 | fi |
---|
948 | rm -fr conftest* |
---|
949 | ])# _LT_AC_TRY_DLOPEN_SELF |
---|
950 | |
---|
951 | # AC_LIBTOOL_DLOPEN_SELF |
---|
952 | # ------------------- |
---|
953 | AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], |
---|
954 | [if test "x$enable_dlopen" != xyes; then |
---|
955 | enable_dlopen=unknown |
---|
956 | enable_dlopen_self=unknown |
---|
957 | enable_dlopen_self_static=unknown |
---|
958 | else |
---|
959 | lt_cv_dlopen=no |
---|
960 | lt_cv_dlopen_libs= |
---|
961 | |
---|
962 | case $host_os in |
---|
963 | beos*) |
---|
964 | lt_cv_dlopen="load_add_on" |
---|
965 | lt_cv_dlopen_libs= |
---|
966 | lt_cv_dlopen_self=yes |
---|
967 | ;; |
---|
968 | |
---|
969 | cygwin* | mingw* | pw32*) |
---|
970 | lt_cv_dlopen="LoadLibrary" |
---|
971 | lt_cv_dlopen_libs= |
---|
972 | ;; |
---|
973 | |
---|
974 | *) |
---|
975 | AC_CHECK_FUNC([shl_load], |
---|
976 | [lt_cv_dlopen="shl_load"], |
---|
977 | [AC_CHECK_LIB([dld], [shl_load], |
---|
978 | [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], |
---|
979 | [AC_CHECK_FUNC([dlopen], |
---|
980 | [lt_cv_dlopen="dlopen"], |
---|
981 | [AC_CHECK_LIB([dl], [dlopen], |
---|
982 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], |
---|
983 | [AC_CHECK_LIB([svld], [dlopen], |
---|
984 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], |
---|
985 | [AC_CHECK_LIB([dld], [dld_link], |
---|
986 | [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) |
---|
987 | ]) |
---|
988 | ]) |
---|
989 | ]) |
---|
990 | ]) |
---|
991 | ]) |
---|
992 | ;; |
---|
993 | esac |
---|
994 | |
---|
995 | if test "x$lt_cv_dlopen" != xno; then |
---|
996 | enable_dlopen=yes |
---|
997 | else |
---|
998 | enable_dlopen=no |
---|
999 | fi |
---|
1000 | |
---|
1001 | case $lt_cv_dlopen in |
---|
1002 | dlopen) |
---|
1003 | save_CPPFLAGS="$CPPFLAGS" |
---|
1004 | AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl |
---|
1005 | test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" |
---|
1006 | |
---|
1007 | save_LDFLAGS="$LDFLAGS" |
---|
1008 | eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" |
---|
1009 | |
---|
1010 | save_LIBS="$LIBS" |
---|
1011 | LIBS="$lt_cv_dlopen_libs $LIBS" |
---|
1012 | |
---|
1013 | AC_CACHE_CHECK([whether a program can dlopen itself], |
---|
1014 | lt_cv_dlopen_self, [dnl |
---|
1015 | _LT_AC_TRY_DLOPEN_SELF( |
---|
1016 | lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, |
---|
1017 | lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) |
---|
1018 | ]) |
---|
1019 | |
---|
1020 | if test "x$lt_cv_dlopen_self" = xyes; then |
---|
1021 | LDFLAGS="$LDFLAGS $link_static_flag" |
---|
1022 | AC_CACHE_CHECK([whether a statically linked program can dlopen itself], |
---|
1023 | lt_cv_dlopen_self_static, [dnl |
---|
1024 | _LT_AC_TRY_DLOPEN_SELF( |
---|
1025 | lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, |
---|
1026 | lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) |
---|
1027 | ]) |
---|
1028 | fi |
---|
1029 | |
---|
1030 | CPPFLAGS="$save_CPPFLAGS" |
---|
1031 | LDFLAGS="$save_LDFLAGS" |
---|
1032 | LIBS="$save_LIBS" |
---|
1033 | ;; |
---|
1034 | esac |
---|
1035 | |
---|
1036 | case $lt_cv_dlopen_self in |
---|
1037 | yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; |
---|
1038 | *) enable_dlopen_self=unknown ;; |
---|
1039 | esac |
---|
1040 | |
---|
1041 | case $lt_cv_dlopen_self_static in |
---|
1042 | yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; |
---|
1043 | *) enable_dlopen_self_static=unknown ;; |
---|
1044 | esac |
---|
1045 | fi |
---|
1046 | ])# AC_LIBTOOL_DLOPEN_SELF |
---|
1047 | |
---|
1048 | AC_DEFUN([_LT_AC_LTCONFIG_HACK], |
---|
1049 | [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl |
---|
1050 | # Sed substitution that helps us do robust quoting. It backslashifies |
---|
1051 | # metacharacters that are still active within double-quoted strings. |
---|
1052 | Xsed='sed -e s/^X//' |
---|
1053 | sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g' |
---|
1054 | |
---|
1055 | # Same as above, but do not quote variable references. |
---|
1056 | double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g' |
---|
1057 | |
---|
1058 | # Sed substitution to delay expansion of an escaped shell variable in a |
---|
1059 | # double_quote_subst'ed string. |
---|
1060 | delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' |
---|
1061 | |
---|
1062 | # Constants: |
---|
1063 | rm="rm -f" |
---|
1064 | |
---|
1065 | # Global variables: |
---|
1066 | default_ofile=libtool |
---|
1067 | can_build_shared=yes |
---|
1068 | |
---|
1069 | # All known linkers require a `.a' archive for static linking (except M$VC, |
---|
1070 | # which needs '.lib'). |
---|
1071 | libext=a |
---|
1072 | ltmain="$ac_aux_dir/ltmain.sh" |
---|
1073 | ofile="$default_ofile" |
---|
1074 | with_gnu_ld="$lt_cv_prog_gnu_ld" |
---|
1075 | need_locks="$enable_libtool_lock" |
---|
1076 | |
---|
1077 | old_CC="$CC" |
---|
1078 | old_CFLAGS="$CFLAGS" |
---|
1079 | |
---|
1080 | # Set sane defaults for various variables |
---|
1081 | test -z "$AR" && AR=ar |
---|
1082 | test -z "$AR_FLAGS" && AR_FLAGS=cru |
---|
1083 | test -z "$AS" && AS=as |
---|
1084 | test -z "$CC" && CC=cc |
---|
1085 | test -z "$DLLTOOL" && DLLTOOL=dlltool |
---|
1086 | test -z "$LD" && LD=ld |
---|
1087 | test -z "$LN_S" && LN_S="ln -s" |
---|
1088 | test -z "$MAGIC_CMD" && MAGIC_CMD=file |
---|
1089 | test -z "$NM" && NM=nm |
---|
1090 | test -z "$OBJDUMP" && OBJDUMP=objdump |
---|
1091 | test -z "$RANLIB" && RANLIB=: |
---|
1092 | test -z "$STRIP" && STRIP=: |
---|
1093 | test -z "$ac_objext" && ac_objext=o |
---|
1094 | |
---|
1095 | if test x"$host" != x"$build"; then |
---|
1096 | ac_tool_prefix=${host_alias}- |
---|
1097 | else |
---|
1098 | ac_tool_prefix= |
---|
1099 | fi |
---|
1100 | |
---|
1101 | # Transform linux* to *-*-linux-gnu*, to support old configure scripts. |
---|
1102 | case $host_os in |
---|
1103 | linux-gnu*) ;; |
---|
1104 | linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` |
---|
1105 | esac |
---|
1106 | |
---|
1107 | case $host_os in |
---|
1108 | aix3*) |
---|
1109 | # AIX sometimes has problems with the GCC collect2 program. For some |
---|
1110 | # reason, if we set the COLLECT_NAMES environment variable, the problems |
---|
1111 | # vanish in a puff of smoke. |
---|
1112 | if test "X${COLLECT_NAMES+set}" != Xset; then |
---|
1113 | COLLECT_NAMES= |
---|
1114 | export COLLECT_NAMES |
---|
1115 | fi |
---|
1116 | ;; |
---|
1117 | esac |
---|
1118 | |
---|
1119 | # Determine commands to create old-style static archives. |
---|
1120 | old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' |
---|
1121 | old_postinstall_cmds='chmod 644 $oldlib' |
---|
1122 | old_postuninstall_cmds= |
---|
1123 | |
---|
1124 | if test -n "$RANLIB"; then |
---|
1125 | case $host_os in |
---|
1126 | openbsd*) |
---|
1127 | old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" |
---|
1128 | ;; |
---|
1129 | *) |
---|
1130 | old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" |
---|
1131 | ;; |
---|
1132 | esac |
---|
1133 | old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" |
---|
1134 | fi |
---|
1135 | |
---|
1136 | # Allow CC to be a program name with arguments. |
---|
1137 | set dummy $CC |
---|
1138 | compiler="[$]2" |
---|
1139 | |
---|
1140 | AC_MSG_CHECKING([for objdir]) |
---|
1141 | rm -f .libs 2>/dev/null |
---|
1142 | mkdir .libs 2>/dev/null |
---|
1143 | if test -d .libs; then |
---|
1144 | objdir=.libs |
---|
1145 | else |
---|
1146 | # MS-DOS does not allow filenames that begin with a dot. |
---|
1147 | objdir=_libs |
---|
1148 | fi |
---|
1149 | rmdir .libs 2>/dev/null |
---|
1150 | AC_MSG_RESULT($objdir) |
---|
1151 | |
---|
1152 | |
---|
1153 | AC_ARG_WITH(pic, |
---|
1154 | [ --with-pic try to use only PIC/non-PIC objects [default=use both]], |
---|
1155 | pic_mode="$withval", pic_mode=default) |
---|
1156 | test -z "$pic_mode" && pic_mode=default |
---|
1157 | |
---|
1158 | # We assume here that the value for lt_cv_prog_cc_pic will not be cached |
---|
1159 | # in isolation, and that seeing it set (from the cache) indicates that |
---|
1160 | # the associated values are set (in the cache) correctly too. |
---|
1161 | AC_MSG_CHECKING([for $compiler option to produce PIC]) |
---|
1162 | AC_CACHE_VAL(lt_cv_prog_cc_pic, |
---|
1163 | [ lt_cv_prog_cc_pic= |
---|
1164 | lt_cv_prog_cc_shlib= |
---|
1165 | lt_cv_prog_cc_wl= |
---|
1166 | lt_cv_prog_cc_static= |
---|
1167 | lt_cv_prog_cc_no_builtin= |
---|
1168 | lt_cv_prog_cc_can_build_shared=$can_build_shared |
---|
1169 | |
---|
1170 | if test "$GCC" = yes; then |
---|
1171 | lt_cv_prog_cc_wl='-Wl,' |
---|
1172 | lt_cv_prog_cc_static='-static' |
---|
1173 | |
---|
1174 | case $host_os in |
---|
1175 | aix*) |
---|
1176 | # Below there is a dirty hack to force normal static linking with -ldl |
---|
1177 | # The problem is because libdl dynamically linked with both libc and |
---|
1178 | # libC (AIX C++ library), which obviously doesn't included in libraries |
---|
1179 | # list by gcc. This cause undefined symbols with -static flags. |
---|
1180 | # This hack allows C programs to be linked with "-static -ldl", but |
---|
1181 | # not sure about C++ programs. |
---|
1182 | lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" |
---|
1183 | ;; |
---|
1184 | amigaos*) |
---|
1185 | # FIXME: we need at least 68020 code to build shared libraries, but |
---|
1186 | # adding the `-m68020' flag to GCC prevents building anything better, |
---|
1187 | # like `-m68040'. |
---|
1188 | lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' |
---|
1189 | ;; |
---|
1190 | beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) |
---|
1191 | # PIC is the default for these OSes. |
---|
1192 | ;; |
---|
1193 | darwin* | rhapsody*) |
---|
1194 | # PIC is the default on this platform |
---|
1195 | # Common symbols not allowed in MH_DYLIB files |
---|
1196 | lt_cv_prog_cc_pic='-fno-common' |
---|
1197 | ;; |
---|
1198 | cygwin* | mingw* | pw32* | os2*) |
---|
1199 | # This hack is so that the source file can tell whether it is being |
---|
1200 | # built for inclusion in a dll (and should export symbols for example). |
---|
1201 | lt_cv_prog_cc_pic='-DDLL_EXPORT' |
---|
1202 | ;; |
---|
1203 | sysv4*MP*) |
---|
1204 | if test -d /usr/nec; then |
---|
1205 | lt_cv_prog_cc_pic=-Kconform_pic |
---|
1206 | fi |
---|
1207 | ;; |
---|
1208 | *) |
---|
1209 | lt_cv_prog_cc_pic='-fPIC' |
---|
1210 | ;; |
---|
1211 | esac |
---|
1212 | else |
---|
1213 | # PORTME Check for PIC flags for the system compiler. |
---|
1214 | case $host_os in |
---|
1215 | aix3* | aix4* | aix5*) |
---|
1216 | lt_cv_prog_cc_wl='-Wl,' |
---|
1217 | # All AIX code is PIC. |
---|
1218 | if test "$host_cpu" = ia64; then |
---|
1219 | # AIX 5 now supports IA64 processor |
---|
1220 | lt_cv_prog_cc_static='-Bstatic' |
---|
1221 | else |
---|
1222 | lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' |
---|
1223 | fi |
---|
1224 | ;; |
---|
1225 | |
---|
1226 | hpux9* | hpux10* | hpux11*) |
---|
1227 | # Is there a better lt_cv_prog_cc_static that works with the bundled CC? |
---|
1228 | lt_cv_prog_cc_wl='-Wl,' |
---|
1229 | lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" |
---|
1230 | lt_cv_prog_cc_pic='+Z' |
---|
1231 | ;; |
---|
1232 | |
---|
1233 | irix5* | irix6* | nonstopux*) |
---|
1234 | lt_cv_prog_cc_wl='-Wl,' |
---|
1235 | lt_cv_prog_cc_static='-non_shared' |
---|
1236 | # PIC (with -KPIC) is the default. |
---|
1237 | ;; |
---|
1238 | |
---|
1239 | cygwin* | mingw* | pw32* | os2*) |
---|
1240 | # This hack is so that the source file can tell whether it is being |
---|
1241 | # built for inclusion in a dll (and should export symbols for example). |
---|
1242 | lt_cv_prog_cc_pic='-DDLL_EXPORT' |
---|
1243 | ;; |
---|
1244 | |
---|
1245 | newsos6) |
---|
1246 | lt_cv_prog_cc_pic='-KPIC' |
---|
1247 | lt_cv_prog_cc_static='-Bstatic' |
---|
1248 | ;; |
---|
1249 | |
---|
1250 | osf3* | osf4* | osf5*) |
---|
1251 | # All OSF/1 code is PIC. |
---|
1252 | lt_cv_prog_cc_wl='-Wl,' |
---|
1253 | lt_cv_prog_cc_static='-non_shared' |
---|
1254 | ;; |
---|
1255 | |
---|
1256 | sco3.2v5*) |
---|
1257 | lt_cv_prog_cc_pic='-Kpic' |
---|
1258 | lt_cv_prog_cc_static='-dn' |
---|
1259 | lt_cv_prog_cc_shlib='-belf' |
---|
1260 | ;; |
---|
1261 | |
---|
1262 | solaris*) |
---|
1263 | lt_cv_prog_cc_pic='-KPIC' |
---|
1264 | lt_cv_prog_cc_static='-Bstatic' |
---|
1265 | lt_cv_prog_cc_wl='-Wl,' |
---|
1266 | ;; |
---|
1267 | |
---|
1268 | sunos4*) |
---|
1269 | lt_cv_prog_cc_pic='-PIC' |
---|
1270 | lt_cv_prog_cc_static='-Bstatic' |
---|
1271 | lt_cv_prog_cc_wl='-Qoption ld ' |
---|
1272 | ;; |
---|
1273 | |
---|
1274 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
---|
1275 | lt_cv_prog_cc_pic='-KPIC' |
---|
1276 | lt_cv_prog_cc_static='-Bstatic' |
---|
1277 | lt_cv_prog_cc_wl='-Wl,' |
---|
1278 | ;; |
---|
1279 | |
---|
1280 | uts4*) |
---|
1281 | lt_cv_prog_cc_pic='-pic' |
---|
1282 | lt_cv_prog_cc_static='-Bstatic' |
---|
1283 | ;; |
---|
1284 | |
---|
1285 | sysv4*MP*) |
---|
1286 | if test -d /usr/nec ;then |
---|
1287 | lt_cv_prog_cc_pic='-Kconform_pic' |
---|
1288 | lt_cv_prog_cc_static='-Bstatic' |
---|
1289 | fi |
---|
1290 | ;; |
---|
1291 | |
---|
1292 | *) |
---|
1293 | lt_cv_prog_cc_can_build_shared=no |
---|
1294 | ;; |
---|
1295 | esac |
---|
1296 | fi |
---|
1297 | ]) |
---|
1298 | if test -z "$lt_cv_prog_cc_pic"; then |
---|
1299 | AC_MSG_RESULT([none]) |
---|
1300 | else |
---|
1301 | AC_MSG_RESULT([$lt_cv_prog_cc_pic]) |
---|
1302 | |
---|
1303 | # Check to make sure the pic_flag actually works. |
---|
1304 | AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works]) |
---|
1305 | AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl |
---|
1306 | save_CFLAGS="$CFLAGS" |
---|
1307 | CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" |
---|
1308 | AC_TRY_COMPILE([], [], [dnl |
---|
1309 | case $host_os in |
---|
1310 | hpux9* | hpux10* | hpux11*) |
---|
1311 | # On HP-UX, both CC and GCC only warn that PIC is supported... then |
---|
1312 | # they create non-PIC objects. So, if there were any warnings, we |
---|
1313 | # assume that PIC is not supported. |
---|
1314 | if test -s conftest.err; then |
---|
1315 | lt_cv_prog_cc_pic_works=no |
---|
1316 | else |
---|
1317 | lt_cv_prog_cc_pic_works=yes |
---|
1318 | fi |
---|
1319 | ;; |
---|
1320 | *) |
---|
1321 | lt_cv_prog_cc_pic_works=yes |
---|
1322 | ;; |
---|
1323 | esac |
---|
1324 | ], [dnl |
---|
1325 | lt_cv_prog_cc_pic_works=no |
---|
1326 | ]) |
---|
1327 | CFLAGS="$save_CFLAGS" |
---|
1328 | ]) |
---|
1329 | |
---|
1330 | if test "X$lt_cv_prog_cc_pic_works" = Xno; then |
---|
1331 | lt_cv_prog_cc_pic= |
---|
1332 | lt_cv_prog_cc_can_build_shared=no |
---|
1333 | else |
---|
1334 | lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" |
---|
1335 | fi |
---|
1336 | |
---|
1337 | AC_MSG_RESULT([$lt_cv_prog_cc_pic_works]) |
---|
1338 | fi |
---|
1339 | |
---|
1340 | # Check for any special shared library compilation flags. |
---|
1341 | if test -n "$lt_cv_prog_cc_shlib"; then |
---|
1342 | AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries]) |
---|
1343 | if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then : |
---|
1344 | else |
---|
1345 | AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure]) |
---|
1346 | lt_cv_prog_cc_can_build_shared=no |
---|
1347 | fi |
---|
1348 | fi |
---|
1349 | |
---|
1350 | AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works]) |
---|
1351 | AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl |
---|
1352 | lt_cv_prog_cc_static_works=no |
---|
1353 | save_LDFLAGS="$LDFLAGS" |
---|
1354 | LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" |
---|
1355 | AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes]) |
---|
1356 | LDFLAGS="$save_LDFLAGS" |
---|
1357 | ]) |
---|
1358 | |
---|
1359 | # Belt *and* braces to stop my trousers falling down: |
---|
1360 | test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= |
---|
1361 | AC_MSG_RESULT([$lt_cv_prog_cc_static_works]) |
---|
1362 | |
---|
1363 | pic_flag="$lt_cv_prog_cc_pic" |
---|
1364 | special_shlib_compile_flags="$lt_cv_prog_cc_shlib" |
---|
1365 | wl="$lt_cv_prog_cc_wl" |
---|
1366 | link_static_flag="$lt_cv_prog_cc_static" |
---|
1367 | no_builtin_flag="$lt_cv_prog_cc_no_builtin" |
---|
1368 | can_build_shared="$lt_cv_prog_cc_can_build_shared" |
---|
1369 | |
---|
1370 | |
---|
1371 | # Check to see if options -o and -c are simultaneously supported by compiler |
---|
1372 | AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext]) |
---|
1373 | AC_CACHE_VAL([lt_cv_compiler_c_o], [ |
---|
1374 | $rm -r conftest 2>/dev/null |
---|
1375 | mkdir conftest |
---|
1376 | cd conftest |
---|
1377 | echo "int some_variable = 0;" > conftest.$ac_ext |
---|
1378 | mkdir out |
---|
1379 | # According to Tom Tromey, Ian Lance Taylor reported there are C compilers |
---|
1380 | # that will create temporary files in the current directory regardless of |
---|
1381 | # the output directory. Thus, making CWD read-only will cause this test |
---|
1382 | # to fail, enabling locking or at least warning the user not to do parallel |
---|
1383 | # builds. |
---|
1384 | chmod -w . |
---|
1385 | save_CFLAGS="$CFLAGS" |
---|
1386 | CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" |
---|
1387 | compiler_c_o=no |
---|
1388 | if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then |
---|
1389 | # The compiler can only warn and ignore the option if not recognized |
---|
1390 | # So say no if there are warnings |
---|
1391 | if test -s out/conftest.err; then |
---|
1392 | lt_cv_compiler_c_o=no |
---|
1393 | else |
---|
1394 | lt_cv_compiler_c_o=yes |
---|
1395 | fi |
---|
1396 | else |
---|
1397 | # Append any errors to the config.log. |
---|
1398 | cat out/conftest.err 1>&AC_FD_CC |
---|
1399 | lt_cv_compiler_c_o=no |
---|
1400 | fi |
---|
1401 | CFLAGS="$save_CFLAGS" |
---|
1402 | chmod u+w . |
---|
1403 | $rm conftest* out/* |
---|
1404 | rmdir out |
---|
1405 | cd .. |
---|
1406 | rmdir conftest |
---|
1407 | $rm -r conftest 2>/dev/null |
---|
1408 | ]) |
---|
1409 | compiler_c_o=$lt_cv_compiler_c_o |
---|
1410 | AC_MSG_RESULT([$compiler_c_o]) |
---|
1411 | |
---|
1412 | if test x"$compiler_c_o" = x"yes"; then |
---|
1413 | # Check to see if we can write to a .lo |
---|
1414 | AC_MSG_CHECKING([if $compiler supports -c -o file.lo]) |
---|
1415 | AC_CACHE_VAL([lt_cv_compiler_o_lo], [ |
---|
1416 | lt_cv_compiler_o_lo=no |
---|
1417 | save_CFLAGS="$CFLAGS" |
---|
1418 | CFLAGS="$CFLAGS -c -o conftest.lo" |
---|
1419 | save_objext="$ac_objext" |
---|
1420 | ac_objext=lo |
---|
1421 | AC_TRY_COMPILE([], [int some_variable = 0;], [dnl |
---|
1422 | # The compiler can only warn and ignore the option if not recognized |
---|
1423 | # So say no if there are warnings |
---|
1424 | if test -s conftest.err; then |
---|
1425 | lt_cv_compiler_o_lo=no |
---|
1426 | else |
---|
1427 | lt_cv_compiler_o_lo=yes |
---|
1428 | fi |
---|
1429 | ]) |
---|
1430 | ac_objext="$save_objext" |
---|
1431 | CFLAGS="$save_CFLAGS" |
---|
1432 | ]) |
---|
1433 | compiler_o_lo=$lt_cv_compiler_o_lo |
---|
1434 | AC_MSG_RESULT([$compiler_o_lo]) |
---|
1435 | else |
---|
1436 | compiler_o_lo=no |
---|
1437 | fi |
---|
1438 | |
---|
1439 | # Check to see if we can do hard links to lock some files if needed |
---|
1440 | hard_links="nottested" |
---|
1441 | if test "$compiler_c_o" = no && test "$need_locks" != no; then |
---|
1442 | # do not overwrite the value of need_locks provided by the user |
---|
1443 | AC_MSG_CHECKING([if we can lock with hard links]) |
---|
1444 | hard_links=yes |
---|
1445 | $rm conftest* |
---|
1446 | ln conftest.a conftest.b 2>/dev/null && hard_links=no |
---|
1447 | touch conftest.a |
---|
1448 | ln conftest.a conftest.b 2>&5 || hard_links=no |
---|
1449 | ln conftest.a conftest.b 2>/dev/null && hard_links=no |
---|
1450 | AC_MSG_RESULT([$hard_links]) |
---|
1451 | if test "$hard_links" = no; then |
---|
1452 | AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe]) |
---|
1453 | need_locks=warn |
---|
1454 | fi |
---|
1455 | else |
---|
1456 | need_locks=no |
---|
1457 | fi |
---|
1458 | |
---|
1459 | if test "$GCC" = yes; then |
---|
1460 | # Check to see if options -fno-rtti -fno-exceptions are supported by compiler |
---|
1461 | AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions]) |
---|
1462 | echo "int some_variable = 0;" > conftest.$ac_ext |
---|
1463 | save_CFLAGS="$CFLAGS" |
---|
1464 | CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" |
---|
1465 | compiler_rtti_exceptions=no |
---|
1466 | AC_TRY_COMPILE([], [int some_variable = 0;], [dnl |
---|
1467 | # The compiler can only warn and ignore the option if not recognized |
---|
1468 | # So say no if there are warnings |
---|
1469 | if test -s conftest.err; then |
---|
1470 | compiler_rtti_exceptions=no |
---|
1471 | else |
---|
1472 | compiler_rtti_exceptions=yes |
---|
1473 | fi |
---|
1474 | ]) |
---|
1475 | CFLAGS="$save_CFLAGS" |
---|
1476 | AC_MSG_RESULT([$compiler_rtti_exceptions]) |
---|
1477 | |
---|
1478 | if test "$compiler_rtti_exceptions" = "yes"; then |
---|
1479 | no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' |
---|
1480 | else |
---|
1481 | no_builtin_flag=' -fno-builtin' |
---|
1482 | fi |
---|
1483 | fi |
---|
1484 | |
---|
1485 | # See if the linker supports building shared libraries. |
---|
1486 | AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries]) |
---|
1487 | |
---|
1488 | allow_undefined_flag= |
---|
1489 | no_undefined_flag= |
---|
1490 | need_lib_prefix=unknown |
---|
1491 | need_version=unknown |
---|
1492 | # when you set need_version to no, make sure it does not cause -set_version |
---|
1493 | # flags to be left without arguments |
---|
1494 | archive_cmds= |
---|
1495 | archive_expsym_cmds= |
---|
1496 | old_archive_from_new_cmds= |
---|
1497 | old_archive_from_expsyms_cmds= |
---|
1498 | export_dynamic_flag_spec= |
---|
1499 | whole_archive_flag_spec= |
---|
1500 | thread_safe_flag_spec= |
---|
1501 | hardcode_into_libs=no |
---|
1502 | hardcode_libdir_flag_spec= |
---|
1503 | hardcode_libdir_separator= |
---|
1504 | hardcode_direct=no |
---|
1505 | hardcode_minus_L=no |
---|
1506 | hardcode_shlibpath_var=unsupported |
---|
1507 | runpath_var= |
---|
1508 | link_all_deplibs=unknown |
---|
1509 | always_export_symbols=no |
---|
1510 | export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' |
---|
1511 | # include_expsyms should be a list of space-separated symbols to be *always* |
---|
1512 | # included in the symbol list |
---|
1513 | include_expsyms= |
---|
1514 | # exclude_expsyms can be an egrep regular expression of symbols to exclude |
---|
1515 | # it will be wrapped by ` (' and `)$', so one must not match beginning or |
---|
1516 | # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', |
---|
1517 | # as well as any symbol that contains `d'. |
---|
1518 | exclude_expsyms="_GLOBAL_OFFSET_TABLE_" |
---|
1519 | # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out |
---|
1520 | # platforms (ab)use it in PIC code, but their linkers get confused if |
---|
1521 | # the symbol is explicitly referenced. Since portable code cannot |
---|
1522 | # rely on this symbol name, it's probably fine to never include it in |
---|
1523 | # preloaded symbol tables. |
---|
1524 | extract_expsyms_cmds= |
---|
1525 | |
---|
1526 | case $host_os in |
---|
1527 | cygwin* | mingw* | pw32*) |
---|
1528 | # FIXME: the MSVC++ port hasn't been tested in a loooong time |
---|
1529 | # When not using gcc, we currently assume that we are using |
---|
1530 | # Microsoft Visual C++. |
---|
1531 | if test "$GCC" != yes; then |
---|
1532 | with_gnu_ld=no |
---|
1533 | fi |
---|
1534 | ;; |
---|
1535 | openbsd*) |
---|
1536 | with_gnu_ld=no |
---|
1537 | ;; |
---|
1538 | esac |
---|
1539 | |
---|
1540 | ld_shlibs=yes |
---|
1541 | if test "$with_gnu_ld" = yes; then |
---|
1542 | # If archive_cmds runs LD, not CC, wlarc should be empty |
---|
1543 | wlarc='${wl}' |
---|
1544 | |
---|
1545 | # See if GNU ld supports shared libraries. |
---|
1546 | case $host_os in |
---|
1547 | aix3* | aix4* | aix5*) |
---|
1548 | # On AIX, the GNU linker is very broken |
---|
1549 | # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. |
---|
1550 | ld_shlibs=no |
---|
1551 | cat <<EOF 1>&2 |
---|
1552 | |
---|
1553 | *** Warning: the GNU linker, at least up to release 2.9.1, is reported |
---|
1554 | *** to be unable to reliably create shared libraries on AIX. |
---|
1555 | *** Therefore, libtool is disabling shared libraries support. If you |
---|
1556 | *** really care for shared libraries, you may want to modify your PATH |
---|
1557 | *** so that a non-GNU linker is found, and then restart. |
---|
1558 | |
---|
1559 | EOF |
---|
1560 | ;; |
---|
1561 | |
---|
1562 | amigaos*) |
---|
1563 | 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)' |
---|
1564 | hardcode_libdir_flag_spec='-L$libdir' |
---|
1565 | hardcode_minus_L=yes |
---|
1566 | |
---|
1567 | # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports |
---|
1568 | # that the semantics of dynamic libraries on AmigaOS, at least up |
---|
1569 | # to version 4, is to share data among multiple programs linked |
---|
1570 | # with the same dynamic library. Since this doesn't match the |
---|
1571 | # behavior of shared libraries on other platforms, we can use |
---|
1572 | # them. |
---|
1573 | ld_shlibs=no |
---|
1574 | ;; |
---|
1575 | |
---|
1576 | beos*) |
---|
1577 | if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
---|
1578 | allow_undefined_flag=unsupported |
---|
1579 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc |
---|
1580 | # support --undefined. This deserves some investigation. FIXME |
---|
1581 | archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
1582 | else |
---|
1583 | ld_shlibs=no |
---|
1584 | fi |
---|
1585 | ;; |
---|
1586 | |
---|
1587 | cygwin* | mingw* | pw32*) |
---|
1588 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
---|
1589 | # no search path for DLLs. |
---|
1590 | hardcode_libdir_flag_spec='-L$libdir' |
---|
1591 | allow_undefined_flag=unsupported |
---|
1592 | always_export_symbols=yes |
---|
1593 | |
---|
1594 | extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ |
---|
1595 | sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ |
---|
1596 | test -f $output_objdir/impgen.exe || (cd $output_objdir && \ |
---|
1597 | if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ |
---|
1598 | else $CC -o impgen impgen.c ; fi)~ |
---|
1599 | $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' |
---|
1600 | |
---|
1601 | old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' |
---|
1602 | |
---|
1603 | # cygwin and mingw dlls have different entry points and sets of symbols |
---|
1604 | # to exclude. |
---|
1605 | # FIXME: what about values for MSVC? |
---|
1606 | dll_entry=__cygwin_dll_entry@12 |
---|
1607 | dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ |
---|
1608 | case $host_os in |
---|
1609 | mingw*) |
---|
1610 | # mingw values |
---|
1611 | dll_entry=_DllMainCRTStartup@12 |
---|
1612 | dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ |
---|
1613 | ;; |
---|
1614 | esac |
---|
1615 | |
---|
1616 | # mingw and cygwin differ, and it's simplest to just exclude the union |
---|
1617 | # of the two symbol sets. |
---|
1618 | dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 |
---|
1619 | |
---|
1620 | # recent cygwin and mingw systems supply a stub DllMain which the user |
---|
1621 | # can override, but on older systems we have to supply one (in ltdll.c) |
---|
1622 | if test "x$lt_cv_need_dllmain" = "xyes"; then |
---|
1623 | ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " |
---|
1624 | ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ |
---|
1625 | test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' |
---|
1626 | else |
---|
1627 | ltdll_obj= |
---|
1628 | ltdll_cmds= |
---|
1629 | fi |
---|
1630 | |
---|
1631 | # Extract the symbol export list from an `--export-all' def file, |
---|
1632 | # then regenerate the def file from the symbol export list, so that |
---|
1633 | # the compiled dll only exports the symbol export list. |
---|
1634 | # Be careful not to strip the DATA tag left be newer dlltools. |
---|
1635 | export_symbols_cmds="$ltdll_cmds"' |
---|
1636 | $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ |
---|
1637 | sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' |
---|
1638 | |
---|
1639 | # If the export-symbols file already is a .def file (1st line |
---|
1640 | # is EXPORTS), use it as is. |
---|
1641 | # If DATA tags from a recent dlltool are present, honour them! |
---|
1642 | archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then |
---|
1643 | cp $export_symbols $output_objdir/$soname-def; |
---|
1644 | else |
---|
1645 | echo EXPORTS > $output_objdir/$soname-def; |
---|
1646 | _lt_hint=1; |
---|
1647 | cat $export_symbols | while read symbol; do |
---|
1648 | set dummy \$symbol; |
---|
1649 | case \[$]# in |
---|
1650 | 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; |
---|
1651 | 4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;; |
---|
1652 | *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; |
---|
1653 | esac; |
---|
1654 | _lt_hint=`expr 1 + \$_lt_hint`; |
---|
1655 | done; |
---|
1656 | fi~ |
---|
1657 | '"$ltdll_cmds"' |
---|
1658 | $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ |
---|
1659 | $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ |
---|
1660 | $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ |
---|
1661 | $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ |
---|
1662 | $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' |
---|
1663 | ;; |
---|
1664 | |
---|
1665 | netbsd*) |
---|
1666 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
---|
1667 | archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' |
---|
1668 | wlarc= |
---|
1669 | else |
---|
1670 | archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
1671 | archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
---|
1672 | fi |
---|
1673 | ;; |
---|
1674 | |
---|
1675 | solaris* | sysv5*) |
---|
1676 | if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then |
---|
1677 | ld_shlibs=no |
---|
1678 | cat <<EOF 1>&2 |
---|
1679 | |
---|
1680 | *** Warning: The releases 2.8.* of the GNU linker cannot reliably |
---|
1681 | *** create shared libraries on Solaris systems. Therefore, libtool |
---|
1682 | *** is disabling shared libraries support. We urge you to upgrade GNU |
---|
1683 | *** binutils to release 2.9.1 or newer. Another option is to modify |
---|
1684 | *** your PATH or compiler configuration so that the native linker is |
---|
1685 | *** used, and then restart. |
---|
1686 | |
---|
1687 | EOF |
---|
1688 | elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
---|
1689 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
1690 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
---|
1691 | else |
---|
1692 | ld_shlibs=no |
---|
1693 | fi |
---|
1694 | ;; |
---|
1695 | |
---|
1696 | sunos4*) |
---|
1697 | archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
---|
1698 | wlarc= |
---|
1699 | hardcode_direct=yes |
---|
1700 | hardcode_shlibpath_var=no |
---|
1701 | ;; |
---|
1702 | |
---|
1703 | linux*) |
---|
1704 | if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
---|
1705 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
1706 | supports_anon_versioning=no |
---|
1707 | case `$LD -v 2>/dev/null` in |
---|
1708 | *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 |
---|
1709 | *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... |
---|
1710 | *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... |
---|
1711 | *\ 2.11.*) ;; # other 2.11 versions |
---|
1712 | *) supports_anon_versioning=yes ;; |
---|
1713 | esac |
---|
1714 | if test $supports_anon_versioning = yes; then |
---|
1715 | archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ |
---|
1716 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ |
---|
1717 | $echo "local: *; };" >> $output_objdir/$libname.ver~ |
---|
1718 | $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' |
---|
1719 | else |
---|
1720 | $archive_expsym_cmds="$archive_cmds" |
---|
1721 | fi |
---|
1722 | else |
---|
1723 | ld_shlibs=no |
---|
1724 | fi |
---|
1725 | ;; |
---|
1726 | |
---|
1727 | *) |
---|
1728 | if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then |
---|
1729 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
1730 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
---|
1731 | else |
---|
1732 | ld_shlibs=no |
---|
1733 | fi |
---|
1734 | ;; |
---|
1735 | esac |
---|
1736 | |
---|
1737 | if test "$ld_shlibs" = yes; then |
---|
1738 | runpath_var=LD_RUN_PATH |
---|
1739 | hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' |
---|
1740 | export_dynamic_flag_spec='${wl}--export-dynamic' |
---|
1741 | case $host_os in |
---|
1742 | cygwin* | mingw* | pw32*) |
---|
1743 | # dlltool doesn't understand --whole-archive et. al. |
---|
1744 | whole_archive_flag_spec= |
---|
1745 | ;; |
---|
1746 | *) |
---|
1747 | # ancient GNU ld didn't support --whole-archive et. al. |
---|
1748 | if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then |
---|
1749 | whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' |
---|
1750 | else |
---|
1751 | whole_archive_flag_spec= |
---|
1752 | fi |
---|
1753 | ;; |
---|
1754 | esac |
---|
1755 | fi |
---|
1756 | else |
---|
1757 | # PORTME fill in a description of your system's linker (not GNU ld) |
---|
1758 | case $host_os in |
---|
1759 | aix3*) |
---|
1760 | allow_undefined_flag=unsupported |
---|
1761 | always_export_symbols=yes |
---|
1762 | 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' |
---|
1763 | # Note: this linker hardcodes the directories in LIBPATH if there |
---|
1764 | # are no directories specified by -L. |
---|
1765 | hardcode_minus_L=yes |
---|
1766 | if test "$GCC" = yes && test -z "$link_static_flag"; then |
---|
1767 | # Neither direct hardcoding nor static linking is supported with a |
---|
1768 | # broken collect2. |
---|
1769 | hardcode_direct=unsupported |
---|
1770 | fi |
---|
1771 | ;; |
---|
1772 | |
---|
1773 | aix4* | aix5*) |
---|
1774 | if test "$host_cpu" = ia64; then |
---|
1775 | # On IA64, the linker does run time linking by default, so we don't |
---|
1776 | # have to do anything special. |
---|
1777 | aix_use_runtimelinking=no |
---|
1778 | exp_sym_flag='-Bexport' |
---|
1779 | no_entry_flag="" |
---|
1780 | else |
---|
1781 | aix_use_runtimelinking=no |
---|
1782 | |
---|
1783 | # Test if we are trying to use run time linking or normal |
---|
1784 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we |
---|
1785 | # need to do runtime linking. |
---|
1786 | case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) |
---|
1787 | for ld_flag in $LDFLAGS; do |
---|
1788 | case $ld_flag in |
---|
1789 | *-brtl*) |
---|
1790 | aix_use_runtimelinking=yes |
---|
1791 | break |
---|
1792 | ;; |
---|
1793 | esac |
---|
1794 | done |
---|
1795 | esac |
---|
1796 | |
---|
1797 | exp_sym_flag='-bexport' |
---|
1798 | no_entry_flag='-bnoentry' |
---|
1799 | fi |
---|
1800 | |
---|
1801 | # When large executables or shared objects are built, AIX ld can |
---|
1802 | # have problems creating the table of contents. If linking a library |
---|
1803 | # or program results in "error TOC overflow" add -mminimal-toc to |
---|
1804 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
---|
1805 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
---|
1806 | |
---|
1807 | hardcode_direct=yes |
---|
1808 | archive_cmds='' |
---|
1809 | hardcode_libdir_separator=':' |
---|
1810 | if test "$GCC" = yes; then |
---|
1811 | case $host_os in aix4.[[012]]|aix4.[[012]].*) |
---|
1812 | collect2name=`${CC} -print-prog-name=collect2` |
---|
1813 | if test -f "$collect2name" && \ |
---|
1814 | strings "$collect2name" | grep resolve_lib_name >/dev/null |
---|
1815 | then |
---|
1816 | # We have reworked collect2 |
---|
1817 | hardcode_direct=yes |
---|
1818 | else |
---|
1819 | # We have old collect2 |
---|
1820 | hardcode_direct=unsupported |
---|
1821 | # It fails to find uninstalled libraries when the uninstalled |
---|
1822 | # path is not listed in the libpath. Setting hardcode_minus_L |
---|
1823 | # to unsupported forces relinking |
---|
1824 | hardcode_minus_L=yes |
---|
1825 | hardcode_libdir_flag_spec='-L$libdir' |
---|
1826 | hardcode_libdir_separator= |
---|
1827 | fi |
---|
1828 | esac |
---|
1829 | |
---|
1830 | shared_flag='-shared' |
---|
1831 | else |
---|
1832 | # not using gcc |
---|
1833 | if test "$host_cpu" = ia64; then |
---|
1834 | shared_flag='${wl}-G' |
---|
1835 | else |
---|
1836 | if test "$aix_use_runtimelinking" = yes; then |
---|
1837 | shared_flag='${wl}-G' |
---|
1838 | else |
---|
1839 | shared_flag='${wl}-bM:SRE' |
---|
1840 | fi |
---|
1841 | fi |
---|
1842 | fi |
---|
1843 | |
---|
1844 | # It seems that -bexpall can do strange things, so it is better to |
---|
1845 | # generate a list of symbols to export. |
---|
1846 | always_export_symbols=yes |
---|
1847 | if test "$aix_use_runtimelinking" = yes; then |
---|
1848 | # Warning - without using the other runtime loading flags (-brtl), |
---|
1849 | # -berok will link without error, but may produce a broken library. |
---|
1850 | allow_undefined_flag='-berok' |
---|
1851 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' |
---|
1852 | archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" |
---|
1853 | else |
---|
1854 | if test "$host_cpu" = ia64; then |
---|
1855 | hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' |
---|
1856 | allow_undefined_flag="-z nodefs" |
---|
1857 | archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" |
---|
1858 | else |
---|
1859 | hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' |
---|
1860 | # Warning - without using the other run time loading flags, |
---|
1861 | # -berok will link without error, but may produce a broken library. |
---|
1862 | allow_undefined_flag='${wl}-berok' |
---|
1863 | # This is a bit strange, but is similar to how AIX traditionally builds |
---|
1864 | # it's shared libraries. |
---|
1865 | archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname' |
---|
1866 | fi |
---|
1867 | fi |
---|
1868 | ;; |
---|
1869 | |
---|
1870 | amigaos*) |
---|
1871 | 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)' |
---|
1872 | hardcode_libdir_flag_spec='-L$libdir' |
---|
1873 | hardcode_minus_L=yes |
---|
1874 | # see comment about different semantics on the GNU ld section |
---|
1875 | ld_shlibs=no |
---|
1876 | ;; |
---|
1877 | |
---|
1878 | cygwin* | mingw* | pw32*) |
---|
1879 | # When not using gcc, we currently assume that we are using |
---|
1880 | # Microsoft Visual C++. |
---|
1881 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
---|
1882 | # no search path for DLLs. |
---|
1883 | hardcode_libdir_flag_spec=' ' |
---|
1884 | allow_undefined_flag=unsupported |
---|
1885 | # Tell ltmain to make .lib files, not .a files. |
---|
1886 | libext=lib |
---|
1887 | # FIXME: Setting linknames here is a bad hack. |
---|
1888 | archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' |
---|
1889 | # The linker will automatically build a .lib file if we build a DLL. |
---|
1890 | old_archive_from_new_cmds='true' |
---|
1891 | # FIXME: Should let the user specify the lib program. |
---|
1892 | old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' |
---|
1893 | fix_srcfile_path='`cygpath -w "$srcfile"`' |
---|
1894 | ;; |
---|
1895 | |
---|
1896 | darwin* | rhapsody*) |
---|
1897 | case "$host_os" in |
---|
1898 | rhapsody* | darwin1.[[012]]) |
---|
1899 | allow_undefined_flag='-undefined suppress' |
---|
1900 | ;; |
---|
1901 | *) # Darwin 1.3 on |
---|
1902 | allow_undefined_flag='-flat_namespace -undefined suppress' |
---|
1903 | ;; |
---|
1904 | esac |
---|
1905 | # FIXME: Relying on posixy $() will cause problems for |
---|
1906 | # cross-compilation, but unfortunately the echo tests do not |
---|
1907 | # yet detect zsh echo's removal of \ escapes. Also zsh mangles |
---|
1908 | # `"' quotes if we put them in here... so don't! |
---|
1909 | archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)' |
---|
1910 | # We need to add '_' to the symbols in $export_symbols first |
---|
1911 | #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' |
---|
1912 | hardcode_direct=yes |
---|
1913 | hardcode_shlibpath_var=no |
---|
1914 | whole_archive_flag_spec='-all_load $convenience' |
---|
1915 | ;; |
---|
1916 | |
---|
1917 | freebsd1*) |
---|
1918 | ld_shlibs=no |
---|
1919 | ;; |
---|
1920 | |
---|
1921 | # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor |
---|
1922 | # support. Future versions do this automatically, but an explicit c++rt0.o |
---|
1923 | # does not break anything, and helps significantly (at the cost of a little |
---|
1924 | # extra space). |
---|
1925 | freebsd2.2*) |
---|
1926 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' |
---|
1927 | hardcode_libdir_flag_spec='-R$libdir' |
---|
1928 | hardcode_direct=yes |
---|
1929 | hardcode_shlibpath_var=no |
---|
1930 | ;; |
---|
1931 | |
---|
1932 | # Unfortunately, older versions of FreeBSD 2 do not have this feature. |
---|
1933 | freebsd2*) |
---|
1934 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
---|
1935 | hardcode_direct=yes |
---|
1936 | hardcode_minus_L=yes |
---|
1937 | hardcode_shlibpath_var=no |
---|
1938 | ;; |
---|
1939 | |
---|
1940 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. |
---|
1941 | freebsd*) |
---|
1942 | archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' |
---|
1943 | hardcode_libdir_flag_spec='-R$libdir' |
---|
1944 | hardcode_direct=yes |
---|
1945 | hardcode_shlibpath_var=no |
---|
1946 | ;; |
---|
1947 | |
---|
1948 | hpux9* | hpux10* | hpux11*) |
---|
1949 | case $host_os in |
---|
1950 | hpux9*) 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' ;; |
---|
1951 | *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; |
---|
1952 | esac |
---|
1953 | hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' |
---|
1954 | hardcode_libdir_separator=: |
---|
1955 | hardcode_direct=yes |
---|
1956 | hardcode_minus_L=yes # Not in the search PATH, but as the default |
---|
1957 | # location of the library. |
---|
1958 | export_dynamic_flag_spec='${wl}-E' |
---|
1959 | ;; |
---|
1960 | |
---|
1961 | irix5* | irix6* | nonstopux*) |
---|
1962 | if test "$GCC" = yes; then |
---|
1963 | 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' |
---|
1964 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
---|
1965 | else |
---|
1966 | 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' |
---|
1967 | hardcode_libdir_flag_spec='-rpath $libdir' |
---|
1968 | fi |
---|
1969 | hardcode_libdir_separator=: |
---|
1970 | link_all_deplibs=yes |
---|
1971 | ;; |
---|
1972 | |
---|
1973 | netbsd*) |
---|
1974 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
---|
1975 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out |
---|
1976 | else |
---|
1977 | archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF |
---|
1978 | fi |
---|
1979 | hardcode_libdir_flag_spec='-R$libdir' |
---|
1980 | hardcode_direct=yes |
---|
1981 | hardcode_shlibpath_var=no |
---|
1982 | ;; |
---|
1983 | |
---|
1984 | newsos6) |
---|
1985 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
1986 | hardcode_direct=yes |
---|
1987 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
---|
1988 | hardcode_libdir_separator=: |
---|
1989 | hardcode_shlibpath_var=no |
---|
1990 | ;; |
---|
1991 | |
---|
1992 | openbsd*) |
---|
1993 | hardcode_direct=yes |
---|
1994 | hardcode_shlibpath_var=no |
---|
1995 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
---|
1996 | archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' |
---|
1997 | hardcode_libdir_flag_spec='${wl}-rpath,$libdir' |
---|
1998 | export_dynamic_flag_spec='${wl}-E' |
---|
1999 | else |
---|
2000 | case "$host_os" in |
---|
2001 | openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) |
---|
2002 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
---|
2003 | hardcode_libdir_flag_spec='-R$libdir' |
---|
2004 | ;; |
---|
2005 | *) |
---|
2006 | archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' |
---|
2007 | hardcode_libdir_flag_spec='${wl}-rpath,$libdir' |
---|
2008 | ;; |
---|
2009 | esac |
---|
2010 | fi |
---|
2011 | ;; |
---|
2012 | |
---|
2013 | os2*) |
---|
2014 | hardcode_libdir_flag_spec='-L$libdir' |
---|
2015 | hardcode_minus_L=yes |
---|
2016 | allow_undefined_flag=unsupported |
---|
2017 | 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' |
---|
2018 | old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' |
---|
2019 | ;; |
---|
2020 | |
---|
2021 | osf3*) |
---|
2022 | if test "$GCC" = yes; then |
---|
2023 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' |
---|
2024 | 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' |
---|
2025 | else |
---|
2026 | allow_undefined_flag=' -expect_unresolved \*' |
---|
2027 | 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' |
---|
2028 | fi |
---|
2029 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
---|
2030 | hardcode_libdir_separator=: |
---|
2031 | ;; |
---|
2032 | |
---|
2033 | osf4* | osf5*) # as osf3* with the addition of -msym flag |
---|
2034 | if test "$GCC" = yes; then |
---|
2035 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' |
---|
2036 | 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' |
---|
2037 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' |
---|
2038 | else |
---|
2039 | allow_undefined_flag=' -expect_unresolved \*' |
---|
2040 | 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' |
---|
2041 | archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ |
---|
2042 | $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' |
---|
2043 | |
---|
2044 | #Both c and cxx compiler support -rpath directly |
---|
2045 | hardcode_libdir_flag_spec='-rpath $libdir' |
---|
2046 | fi |
---|
2047 | hardcode_libdir_separator=: |
---|
2048 | ;; |
---|
2049 | |
---|
2050 | sco3.2v5*) |
---|
2051 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2052 | hardcode_shlibpath_var=no |
---|
2053 | runpath_var=LD_RUN_PATH |
---|
2054 | hardcode_runpath_var=yes |
---|
2055 | export_dynamic_flag_spec='${wl}-Bexport' |
---|
2056 | ;; |
---|
2057 | |
---|
2058 | solaris*) |
---|
2059 | # gcc --version < 3.0 without binutils cannot create self contained |
---|
2060 | # shared libraries reliably, requiring libgcc.a to resolve some of |
---|
2061 | # the object symbols generated in some cases. Libraries that use |
---|
2062 | # assert need libgcc.a to resolve __eprintf, for example. Linking |
---|
2063 | # a copy of libgcc.a into every shared library to guarantee resolving |
---|
2064 | # such symbols causes other problems: According to Tim Van Holder |
---|
2065 | # <tim.van.holder@pandora.be>, C++ libraries end up with a separate |
---|
2066 | # (to the application) exception stack for one thing. |
---|
2067 | no_undefined_flag=' -z defs' |
---|
2068 | if test "$GCC" = yes; then |
---|
2069 | case `$CC --version 2>/dev/null` in |
---|
2070 | [[12]].*) |
---|
2071 | cat <<EOF 1>&2 |
---|
2072 | |
---|
2073 | *** Warning: Releases of GCC earlier than version 3.0 cannot reliably |
---|
2074 | *** create self contained shared libraries on Solaris systems, without |
---|
2075 | *** introducing a dependency on libgcc.a. Therefore, libtool is disabling |
---|
2076 | *** -no-undefined support, which will at least allow you to build shared |
---|
2077 | *** libraries. However, you may find that when you link such libraries |
---|
2078 | *** into an application without using GCC, you have to manually add |
---|
2079 | *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to |
---|
2080 | *** upgrade to a newer version of GCC. Another option is to rebuild your |
---|
2081 | *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. |
---|
2082 | |
---|
2083 | EOF |
---|
2084 | no_undefined_flag= |
---|
2085 | ;; |
---|
2086 | esac |
---|
2087 | fi |
---|
2088 | # $CC -shared without GNU ld will not create a library from C++ |
---|
2089 | # object files and a static libstdc++, better avoid it by now |
---|
2090 | archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2091 | archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
---|
2092 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
---|
2093 | hardcode_libdir_flag_spec='-R$libdir' |
---|
2094 | hardcode_shlibpath_var=no |
---|
2095 | case $host_os in |
---|
2096 | solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; |
---|
2097 | *) # Supported since Solaris 2.6 (maybe 2.5.1?) |
---|
2098 | whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; |
---|
2099 | esac |
---|
2100 | link_all_deplibs=yes |
---|
2101 | ;; |
---|
2102 | |
---|
2103 | sunos4*) |
---|
2104 | if test "x$host_vendor" = xsequent; then |
---|
2105 | # Use $CC to link under sequent, because it throws in some extra .o |
---|
2106 | # files that make .init and .fini sections work. |
---|
2107 | archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' |
---|
2108 | else |
---|
2109 | archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' |
---|
2110 | fi |
---|
2111 | hardcode_libdir_flag_spec='-L$libdir' |
---|
2112 | hardcode_direct=yes |
---|
2113 | hardcode_minus_L=yes |
---|
2114 | hardcode_shlibpath_var=no |
---|
2115 | ;; |
---|
2116 | |
---|
2117 | sysv4) |
---|
2118 | case $host_vendor in |
---|
2119 | sni) |
---|
2120 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2121 | hardcode_direct=yes # is this really true??? |
---|
2122 | ;; |
---|
2123 | siemens) |
---|
2124 | ## LD is ld it makes a PLAMLIB |
---|
2125 | ## CC just makes a GrossModule. |
---|
2126 | archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' |
---|
2127 | reload_cmds='$CC -r -o $output$reload_objs' |
---|
2128 | hardcode_direct=no |
---|
2129 | ;; |
---|
2130 | motorola) |
---|
2131 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2132 | hardcode_direct=no #Motorola manual says yes, but my tests say they lie |
---|
2133 | ;; |
---|
2134 | esac |
---|
2135 | runpath_var='LD_RUN_PATH' |
---|
2136 | hardcode_shlibpath_var=no |
---|
2137 | ;; |
---|
2138 | |
---|
2139 | sysv4.3*) |
---|
2140 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2141 | hardcode_shlibpath_var=no |
---|
2142 | export_dynamic_flag_spec='-Bexport' |
---|
2143 | ;; |
---|
2144 | |
---|
2145 | sysv5*) |
---|
2146 | no_undefined_flag=' -z text' |
---|
2147 | # $CC -shared without GNU ld will not create a library from C++ |
---|
2148 | # object files and a static libstdc++, better avoid it by now |
---|
2149 | archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2150 | archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
---|
2151 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
---|
2152 | hardcode_libdir_flag_spec= |
---|
2153 | hardcode_shlibpath_var=no |
---|
2154 | runpath_var='LD_RUN_PATH' |
---|
2155 | ;; |
---|
2156 | |
---|
2157 | uts4*) |
---|
2158 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2159 | hardcode_libdir_flag_spec='-L$libdir' |
---|
2160 | hardcode_shlibpath_var=no |
---|
2161 | ;; |
---|
2162 | |
---|
2163 | dgux*) |
---|
2164 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2165 | hardcode_libdir_flag_spec='-L$libdir' |
---|
2166 | hardcode_shlibpath_var=no |
---|
2167 | ;; |
---|
2168 | |
---|
2169 | sysv4*MP*) |
---|
2170 | if test -d /usr/nec; then |
---|
2171 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
2172 | hardcode_shlibpath_var=no |
---|
2173 | runpath_var=LD_RUN_PATH |
---|
2174 | hardcode_runpath_var=yes |
---|
2175 | ld_shlibs=yes |
---|
2176 | fi |
---|
2177 | ;; |
---|
2178 | |
---|
2179 | sysv4.2uw2*) |
---|
2180 | archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' |
---|
2181 | hardcode_direct=yes |
---|
2182 | hardcode_minus_L=no |
---|
2183 | hardcode_shlibpath_var=no |
---|
2184 | hardcode_runpath_var=yes |
---|
2185 | runpath_var=LD_RUN_PATH |
---|
2186 | ;; |
---|
2187 | |
---|
2188 | sysv5uw7* | unixware7*) |
---|
2189 | no_undefined_flag='${wl}-z ${wl}text' |
---|
2190 | if test "$GCC" = yes; then |
---|
2191 | archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
---|
2192 | else |
---|
2193 | archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
---|
2194 | fi |
---|
2195 | runpath_var='LD_RUN_PATH' |
---|
2196 | hardcode_shlibpath_var=no |
---|
2197 | ;; |
---|
2198 | |
---|
2199 | *) |
---|
2200 | ld_shlibs=no |
---|
2201 | ;; |
---|
2202 | esac |
---|
2203 | fi |
---|
2204 | AC_MSG_RESULT([$ld_shlibs]) |
---|
2205 | test "$ld_shlibs" = no && can_build_shared=no |
---|
2206 | |
---|
2207 | # Check hardcoding attributes. |
---|
2208 | AC_MSG_CHECKING([how to hardcode library paths into programs]) |
---|
2209 | hardcode_action= |
---|
2210 | if test -n "$hardcode_libdir_flag_spec" || \ |
---|
2211 | test -n "$runpath_var"; then |
---|
2212 | |
---|
2213 | # We can hardcode non-existant directories. |
---|
2214 | if test "$hardcode_direct" != no && |
---|
2215 | # If the only mechanism to avoid hardcoding is shlibpath_var, we |
---|
2216 | # have to relink, otherwise we might link with an installed library |
---|
2217 | # when we should be linking with a yet-to-be-installed one |
---|
2218 | ## test "$hardcode_shlibpath_var" != no && |
---|
2219 | test "$hardcode_minus_L" != no; then |
---|
2220 | # Linking always hardcodes the temporary library directory. |
---|
2221 | hardcode_action=relink |
---|
2222 | else |
---|
2223 | # We can link without hardcoding, and we can hardcode nonexisting dirs. |
---|
2224 | hardcode_action=immediate |
---|
2225 | fi |
---|
2226 | else |
---|
2227 | # We cannot hardcode anything, or else we can only hardcode existing |
---|
2228 | # directories. |
---|
2229 | hardcode_action=unsupported |
---|
2230 | fi |
---|
2231 | AC_MSG_RESULT([$hardcode_action]) |
---|
2232 | |
---|
2233 | striplib= |
---|
2234 | old_striplib= |
---|
2235 | AC_MSG_CHECKING([whether stripping libraries is possible]) |
---|
2236 | if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then |
---|
2237 | test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" |
---|
2238 | test -z "$striplib" && striplib="$STRIP --strip-unneeded" |
---|
2239 | AC_MSG_RESULT([yes]) |
---|
2240 | else |
---|
2241 | AC_MSG_RESULT([no]) |
---|
2242 | fi |
---|
2243 | |
---|
2244 | reload_cmds='$LD$reload_flag -o $output$reload_objs' |
---|
2245 | test -z "$deplibs_check_method" && deplibs_check_method=unknown |
---|
2246 | |
---|
2247 | # PORTME Fill in your ld.so characteristics |
---|
2248 | AC_MSG_CHECKING([dynamic linker characteristics]) |
---|
2249 | library_names_spec= |
---|
2250 | libname_spec='lib$name' |
---|
2251 | soname_spec= |
---|
2252 | postinstall_cmds= |
---|
2253 | postuninstall_cmds= |
---|
2254 | finish_cmds= |
---|
2255 | finish_eval= |
---|
2256 | shlibpath_var= |
---|
2257 | shlibpath_overrides_runpath=unknown |
---|
2258 | version_type=none |
---|
2259 | dynamic_linker="$host_os ld.so" |
---|
2260 | sys_lib_dlsearch_path_spec="/lib /usr/lib" |
---|
2261 | sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" |
---|
2262 | |
---|
2263 | case $host_os in |
---|
2264 | aix3*) |
---|
2265 | version_type=linux |
---|
2266 | library_names_spec='${libname}${release}.so$versuffix $libname.a' |
---|
2267 | shlibpath_var=LIBPATH |
---|
2268 | |
---|
2269 | # AIX has no versioning support, so we append a major version to the name. |
---|
2270 | soname_spec='${libname}${release}.so$major' |
---|
2271 | ;; |
---|
2272 | |
---|
2273 | aix4* | aix5*) |
---|
2274 | version_type=linux |
---|
2275 | need_lib_prefix=no |
---|
2276 | need_version=no |
---|
2277 | hardcode_into_libs=yes |
---|
2278 | if test "$host_cpu" = ia64; then |
---|
2279 | # AIX 5 supports IA64 |
---|
2280 | library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' |
---|
2281 | shlibpath_var=LD_LIBRARY_PATH |
---|
2282 | else |
---|
2283 | # With GCC up to 2.95.x, collect2 would create an import file |
---|
2284 | # for dependence libraries. The import file would start with |
---|
2285 | # the line `#! .'. This would cause the generated library to |
---|
2286 | # depend on `.', always an invalid library. This was fixed in |
---|
2287 | # development snapshots of GCC prior to 3.0. |
---|
2288 | case $host_os in |
---|
2289 | aix4 | aix4.[[01]] | aix4.[[01]].*) |
---|
2290 | if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' |
---|
2291 | echo ' yes ' |
---|
2292 | echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then |
---|
2293 | : |
---|
2294 | else |
---|
2295 | can_build_shared=no |
---|
2296 | fi |
---|
2297 | ;; |
---|
2298 | esac |
---|
2299 | # AIX (on Power*) has no versioning support, so currently we can |
---|
2300 | # not hardcode correct soname into executable. Probably we can |
---|
2301 | # add versioning support to collect2, so additional links can |
---|
2302 | # be useful in future. |
---|
2303 | if test "$aix_use_runtimelinking" = yes; then |
---|
2304 | # If using run time linking (on AIX 4.2 or later) use lib<name>.so |
---|
2305 | # instead of lib<name>.a to let people know that these are not |
---|
2306 | # typical AIX shared libraries. |
---|
2307 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2308 | else |
---|
2309 | # We preserve .a as extension for shared libraries through AIX4.2 |
---|
2310 | # and later when we are not doing run time linking. |
---|
2311 | library_names_spec='${libname}${release}.a $libname.a' |
---|
2312 | soname_spec='${libname}${release}.so$major' |
---|
2313 | fi |
---|
2314 | shlibpath_var=LIBPATH |
---|
2315 | fi |
---|
2316 | hardcode_into_libs=yes |
---|
2317 | ;; |
---|
2318 | |
---|
2319 | amigaos*) |
---|
2320 | library_names_spec='$libname.ixlibrary $libname.a' |
---|
2321 | # Create ${libname}_ixlibrary.a entries in /sys/libs. |
---|
2322 | 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' |
---|
2323 | ;; |
---|
2324 | |
---|
2325 | beos*) |
---|
2326 | library_names_spec='${libname}.so' |
---|
2327 | dynamic_linker="$host_os ld.so" |
---|
2328 | shlibpath_var=LIBRARY_PATH |
---|
2329 | ;; |
---|
2330 | |
---|
2331 | bsdi4*) |
---|
2332 | version_type=linux |
---|
2333 | need_version=no |
---|
2334 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2335 | soname_spec='${libname}${release}.so$major' |
---|
2336 | finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' |
---|
2337 | shlibpath_var=LD_LIBRARY_PATH |
---|
2338 | sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" |
---|
2339 | sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" |
---|
2340 | export_dynamic_flag_spec=-rdynamic |
---|
2341 | # the default ld.so.conf also contains /usr/contrib/lib and |
---|
2342 | # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow |
---|
2343 | # libtool to hard-code these into programs |
---|
2344 | ;; |
---|
2345 | |
---|
2346 | cygwin* | mingw* | pw32*) |
---|
2347 | version_type=windows |
---|
2348 | need_version=no |
---|
2349 | need_lib_prefix=no |
---|
2350 | case $GCC,$host_os in |
---|
2351 | yes,cygwin*) |
---|
2352 | library_names_spec='$libname.dll.a' |
---|
2353 | soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' |
---|
2354 | postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ |
---|
2355 | dldir=$destdir/`dirname \$dlpath`~ |
---|
2356 | test -d \$dldir || mkdir -p \$dldir~ |
---|
2357 | $install_prog .libs/$dlname \$dldir/$dlname' |
---|
2358 | postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ |
---|
2359 | dlpath=$dir/\$dldll~ |
---|
2360 | $rm \$dlpath' |
---|
2361 | ;; |
---|
2362 | yes,mingw*) |
---|
2363 | library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' |
---|
2364 | sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"` |
---|
2365 | ;; |
---|
2366 | yes,pw32*) |
---|
2367 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' |
---|
2368 | ;; |
---|
2369 | *) |
---|
2370 | library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib' |
---|
2371 | ;; |
---|
2372 | esac |
---|
2373 | dynamic_linker='Win32 ld.exe' |
---|
2374 | # FIXME: first we should search . and the directory the executable is in |
---|
2375 | shlibpath_var=PATH |
---|
2376 | ;; |
---|
2377 | |
---|
2378 | darwin* | rhapsody*) |
---|
2379 | dynamic_linker="$host_os dyld" |
---|
2380 | version_type=darwin |
---|
2381 | need_lib_prefix=no |
---|
2382 | need_version=no |
---|
2383 | # FIXME: Relying on posixy $() will cause problems for |
---|
2384 | # cross-compilation, but unfortunately the echo tests do not |
---|
2385 | # yet detect zsh echo's removal of \ escapes. |
---|
2386 | library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' |
---|
2387 | soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' |
---|
2388 | shlibpath_overrides_runpath=yes |
---|
2389 | shlibpath_var=DYLD_LIBRARY_PATH |
---|
2390 | ;; |
---|
2391 | |
---|
2392 | freebsd1*) |
---|
2393 | dynamic_linker=no |
---|
2394 | ;; |
---|
2395 | |
---|
2396 | freebsd*) |
---|
2397 | objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` |
---|
2398 | version_type=freebsd-$objformat |
---|
2399 | case $version_type in |
---|
2400 | freebsd-elf*) |
---|
2401 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' |
---|
2402 | need_version=no |
---|
2403 | need_lib_prefix=no |
---|
2404 | ;; |
---|
2405 | freebsd-*) |
---|
2406 | library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' |
---|
2407 | need_version=yes |
---|
2408 | ;; |
---|
2409 | esac |
---|
2410 | shlibpath_var=LD_LIBRARY_PATH |
---|
2411 | case $host_os in |
---|
2412 | freebsd2*) |
---|
2413 | shlibpath_overrides_runpath=yes |
---|
2414 | ;; |
---|
2415 | *) |
---|
2416 | shlibpath_overrides_runpath=no |
---|
2417 | hardcode_into_libs=yes |
---|
2418 | ;; |
---|
2419 | esac |
---|
2420 | ;; |
---|
2421 | |
---|
2422 | gnu*) |
---|
2423 | version_type=linux |
---|
2424 | need_lib_prefix=no |
---|
2425 | need_version=no |
---|
2426 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' |
---|
2427 | soname_spec='${libname}${release}.so$major' |
---|
2428 | shlibpath_var=LD_LIBRARY_PATH |
---|
2429 | hardcode_into_libs=yes |
---|
2430 | ;; |
---|
2431 | |
---|
2432 | hpux9* | hpux10* | hpux11*) |
---|
2433 | # Give a soname corresponding to the major version so that dld.sl refuses to |
---|
2434 | # link against other versions. |
---|
2435 | dynamic_linker="$host_os dld.sl" |
---|
2436 | version_type=sunos |
---|
2437 | need_lib_prefix=no |
---|
2438 | need_version=no |
---|
2439 | shlibpath_var=SHLIB_PATH |
---|
2440 | shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH |
---|
2441 | library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' |
---|
2442 | soname_spec='${libname}${release}.sl$major' |
---|
2443 | # HP-UX runs *really* slowly unless shared libraries are mode 555. |
---|
2444 | postinstall_cmds='chmod 555 $lib' |
---|
2445 | ;; |
---|
2446 | |
---|
2447 | irix5* | irix6* | nonstopux*) |
---|
2448 | case $host_os in |
---|
2449 | nonstopux*) version_type=nonstopux ;; |
---|
2450 | *) version_type=irix ;; |
---|
2451 | esac |
---|
2452 | need_lib_prefix=no |
---|
2453 | need_version=no |
---|
2454 | soname_spec='${libname}${release}.so$major' |
---|
2455 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' |
---|
2456 | case $host_os in |
---|
2457 | irix5* | nonstopux*) |
---|
2458 | libsuff= shlibsuff= |
---|
2459 | ;; |
---|
2460 | *) |
---|
2461 | case $LD in # libtool.m4 will add one of these switches to LD |
---|
2462 | *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; |
---|
2463 | *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; |
---|
2464 | *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; |
---|
2465 | *) libsuff= shlibsuff= libmagic=never-match;; |
---|
2466 | esac |
---|
2467 | ;; |
---|
2468 | esac |
---|
2469 | shlibpath_var=LD_LIBRARY${shlibsuff}_PATH |
---|
2470 | shlibpath_overrides_runpath=no |
---|
2471 | sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" |
---|
2472 | sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" |
---|
2473 | ;; |
---|
2474 | |
---|
2475 | # No shared lib support for Linux oldld, aout, or coff. |
---|
2476 | linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) |
---|
2477 | dynamic_linker=no |
---|
2478 | ;; |
---|
2479 | |
---|
2480 | # This must be Linux ELF. |
---|
2481 | linux-gnu*) |
---|
2482 | version_type=linux |
---|
2483 | need_lib_prefix=no |
---|
2484 | need_version=no |
---|
2485 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2486 | soname_spec='${libname}${release}.so$major' |
---|
2487 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' |
---|
2488 | shlibpath_var=LD_LIBRARY_PATH |
---|
2489 | shlibpath_overrides_runpath=no |
---|
2490 | # This implies no fast_install, which is unacceptable. |
---|
2491 | # Some rework will be needed to allow for fast_install |
---|
2492 | # before this can be enabled. |
---|
2493 | hardcode_into_libs=yes |
---|
2494 | |
---|
2495 | # We used to test for /lib/ld.so.1 and disable shared libraries on |
---|
2496 | # powerpc, because MkLinux only supported shared libraries with the |
---|
2497 | # GNU dynamic linker. Since this was broken with cross compilers, |
---|
2498 | # most powerpc-linux boxes support dynamic linking these days and |
---|
2499 | # people can always --disable-shared, the test was removed, and we |
---|
2500 | # assume the GNU/Linux dynamic linker is in use. |
---|
2501 | dynamic_linker='GNU/Linux ld.so' |
---|
2502 | ;; |
---|
2503 | |
---|
2504 | netbsd*) |
---|
2505 | version_type=sunos |
---|
2506 | need_lib_prefix=no |
---|
2507 | need_version=no |
---|
2508 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
---|
2509 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
---|
2510 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
---|
2511 | dynamic_linker='NetBSD (a.out) ld.so' |
---|
2512 | else |
---|
2513 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' |
---|
2514 | soname_spec='${libname}${release}.so$major' |
---|
2515 | dynamic_linker='NetBSD ld.elf_so' |
---|
2516 | fi |
---|
2517 | shlibpath_var=LD_LIBRARY_PATH |
---|
2518 | shlibpath_overrides_runpath=yes |
---|
2519 | hardcode_into_libs=yes |
---|
2520 | ;; |
---|
2521 | |
---|
2522 | newsos6) |
---|
2523 | version_type=linux |
---|
2524 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2525 | shlibpath_var=LD_LIBRARY_PATH |
---|
2526 | shlibpath_overrides_runpath=yes |
---|
2527 | ;; |
---|
2528 | |
---|
2529 | openbsd*) |
---|
2530 | version_type=sunos |
---|
2531 | need_lib_prefix=no |
---|
2532 | need_version=no |
---|
2533 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
---|
2534 | case "$host_os" in |
---|
2535 | openbsd2.[[89]] | openbsd2.[[89]].*) |
---|
2536 | shlibpath_overrides_runpath=no |
---|
2537 | ;; |
---|
2538 | *) |
---|
2539 | shlibpath_overrides_runpath=yes |
---|
2540 | ;; |
---|
2541 | esac |
---|
2542 | else |
---|
2543 | shlibpath_overrides_runpath=yes |
---|
2544 | fi |
---|
2545 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
---|
2546 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
---|
2547 | shlibpath_var=LD_LIBRARY_PATH |
---|
2548 | ;; |
---|
2549 | |
---|
2550 | os2*) |
---|
2551 | libname_spec='$name' |
---|
2552 | need_lib_prefix=no |
---|
2553 | library_names_spec='$libname.dll $libname.a' |
---|
2554 | dynamic_linker='OS/2 ld.exe' |
---|
2555 | shlibpath_var=LIBPATH |
---|
2556 | ;; |
---|
2557 | |
---|
2558 | osf3* | osf4* | osf5*) |
---|
2559 | version_type=osf |
---|
2560 | need_version=no |
---|
2561 | soname_spec='${libname}${release}.so$major' |
---|
2562 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2563 | shlibpath_var=LD_LIBRARY_PATH |
---|
2564 | sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" |
---|
2565 | sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" |
---|
2566 | hardcode_into_libs=yes |
---|
2567 | ;; |
---|
2568 | |
---|
2569 | sco3.2v5*) |
---|
2570 | version_type=osf |
---|
2571 | soname_spec='${libname}${release}.so$major' |
---|
2572 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2573 | shlibpath_var=LD_LIBRARY_PATH |
---|
2574 | ;; |
---|
2575 | |
---|
2576 | solaris*) |
---|
2577 | version_type=linux |
---|
2578 | need_lib_prefix=no |
---|
2579 | need_version=no |
---|
2580 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2581 | soname_spec='${libname}${release}.so$major' |
---|
2582 | shlibpath_var=LD_LIBRARY_PATH |
---|
2583 | shlibpath_overrides_runpath=yes |
---|
2584 | hardcode_into_libs=yes |
---|
2585 | # ldd complains unless libraries are executable |
---|
2586 | postinstall_cmds='chmod +x $lib' |
---|
2587 | ;; |
---|
2588 | |
---|
2589 | sunos4*) |
---|
2590 | version_type=sunos |
---|
2591 | library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' |
---|
2592 | finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' |
---|
2593 | shlibpath_var=LD_LIBRARY_PATH |
---|
2594 | shlibpath_overrides_runpath=yes |
---|
2595 | if test "$with_gnu_ld" = yes; then |
---|
2596 | need_lib_prefix=no |
---|
2597 | fi |
---|
2598 | need_version=yes |
---|
2599 | ;; |
---|
2600 | |
---|
2601 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
---|
2602 | version_type=linux |
---|
2603 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2604 | soname_spec='${libname}${release}.so$major' |
---|
2605 | shlibpath_var=LD_LIBRARY_PATH |
---|
2606 | case $host_vendor in |
---|
2607 | sni) |
---|
2608 | shlibpath_overrides_runpath=no |
---|
2609 | need_lib_prefix=no |
---|
2610 | export_dynamic_flag_spec='${wl}-Blargedynsym' |
---|
2611 | runpath_var=LD_RUN_PATH |
---|
2612 | ;; |
---|
2613 | siemens) |
---|
2614 | need_lib_prefix=no |
---|
2615 | ;; |
---|
2616 | motorola) |
---|
2617 | need_lib_prefix=no |
---|
2618 | need_version=no |
---|
2619 | shlibpath_overrides_runpath=no |
---|
2620 | sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' |
---|
2621 | ;; |
---|
2622 | esac |
---|
2623 | ;; |
---|
2624 | |
---|
2625 | uts4*) |
---|
2626 | version_type=linux |
---|
2627 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2628 | soname_spec='${libname}${release}.so$major' |
---|
2629 | shlibpath_var=LD_LIBRARY_PATH |
---|
2630 | ;; |
---|
2631 | |
---|
2632 | dgux*) |
---|
2633 | version_type=linux |
---|
2634 | need_lib_prefix=no |
---|
2635 | need_version=no |
---|
2636 | library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' |
---|
2637 | soname_spec='${libname}${release}.so$major' |
---|
2638 | shlibpath_var=LD_LIBRARY_PATH |
---|
2639 | ;; |
---|
2640 | |
---|
2641 | sysv4*MP*) |
---|
2642 | if test -d /usr/nec ;then |
---|
2643 | version_type=linux |
---|
2644 | library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' |
---|
2645 | soname_spec='$libname.so.$major' |
---|
2646 | shlibpath_var=LD_LIBRARY_PATH |
---|
2647 | fi |
---|
2648 | ;; |
---|
2649 | |
---|
2650 | *) |
---|
2651 | dynamic_linker=no |
---|
2652 | ;; |
---|
2653 | esac |
---|
2654 | AC_MSG_RESULT([$dynamic_linker]) |
---|
2655 | test "$dynamic_linker" = no && can_build_shared=no |
---|
2656 | |
---|
2657 | # Report the final consequences. |
---|
2658 | AC_MSG_CHECKING([if libtool supports shared libraries]) |
---|
2659 | AC_MSG_RESULT([$can_build_shared]) |
---|
2660 | |
---|
2661 | AC_MSG_CHECKING([whether to build shared libraries]) |
---|
2662 | test "$can_build_shared" = "no" && enable_shared=no |
---|
2663 | |
---|
2664 | # On AIX, shared libraries and static libraries use the same namespace, and |
---|
2665 | # are all built from PIC. |
---|
2666 | case "$host_os" in |
---|
2667 | aix3*) |
---|
2668 | test "$enable_shared" = yes && enable_static=no |
---|
2669 | if test -n "$RANLIB"; then |
---|
2670 | archive_cmds="$archive_cmds~\$RANLIB \$lib" |
---|
2671 | postinstall_cmds='$RANLIB $lib' |
---|
2672 | fi |
---|
2673 | ;; |
---|
2674 | |
---|
2675 | aix4*) |
---|
2676 | if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then |
---|
2677 | test "$enable_shared" = yes && enable_static=no |
---|
2678 | fi |
---|
2679 | ;; |
---|
2680 | esac |
---|
2681 | AC_MSG_RESULT([$enable_shared]) |
---|
2682 | |
---|
2683 | AC_MSG_CHECKING([whether to build static libraries]) |
---|
2684 | # Make sure either enable_shared or enable_static is yes. |
---|
2685 | test "$enable_shared" = yes || enable_static=yes |
---|
2686 | AC_MSG_RESULT([$enable_static]) |
---|
2687 | |
---|
2688 | if test "$hardcode_action" = relink; then |
---|
2689 | # Fast installation is not supported |
---|
2690 | enable_fast_install=no |
---|
2691 | elif test "$shlibpath_overrides_runpath" = yes || |
---|
2692 | test "$enable_shared" = no; then |
---|
2693 | # Fast installation is not necessary |
---|
2694 | enable_fast_install=needless |
---|
2695 | fi |
---|
2696 | |
---|
2697 | variables_saved_for_relink="PATH $shlibpath_var $runpath_var" |
---|
2698 | if test "$GCC" = yes; then |
---|
2699 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" |
---|
2700 | fi |
---|
2701 | |
---|
2702 | AC_LIBTOOL_DLOPEN_SELF |
---|
2703 | |
---|
2704 | if test "$enable_shared" = yes && test "$GCC" = yes; then |
---|
2705 | case $archive_cmds in |
---|
2706 | *'~'*) |
---|
2707 | # FIXME: we may have to deal with multi-command sequences. |
---|
2708 | ;; |
---|
2709 | '$CC '*) |
---|
2710 | # Test whether the compiler implicitly links with -lc since on some |
---|
2711 | # systems, -lgcc has to come before -lc. If gcc already passes -lc |
---|
2712 | # to ld, don't add -lc before -lgcc. |
---|
2713 | AC_MSG_CHECKING([whether -lc should be explicitly linked in]) |
---|
2714 | AC_CACHE_VAL([lt_cv_archive_cmds_need_lc], |
---|
2715 | [$rm conftest* |
---|
2716 | echo 'static int dummy;' > conftest.$ac_ext |
---|
2717 | |
---|
2718 | if AC_TRY_EVAL(ac_compile); then |
---|
2719 | soname=conftest |
---|
2720 | lib=conftest |
---|
2721 | libobjs=conftest.$ac_objext |
---|
2722 | deplibs= |
---|
2723 | wl=$lt_cv_prog_cc_wl |
---|
2724 | compiler_flags=-v |
---|
2725 | linker_flags=-v |
---|
2726 | verstring= |
---|
2727 | output_objdir=. |
---|
2728 | libname=conftest |
---|
2729 | save_allow_undefined_flag=$allow_undefined_flag |
---|
2730 | allow_undefined_flag= |
---|
2731 | if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) |
---|
2732 | then |
---|
2733 | lt_cv_archive_cmds_need_lc=no |
---|
2734 | else |
---|
2735 | lt_cv_archive_cmds_need_lc=yes |
---|
2736 | fi |
---|
2737 | allow_undefined_flag=$save_allow_undefined_flag |
---|
2738 | else |
---|
2739 | cat conftest.err 1>&5 |
---|
2740 | fi]) |
---|
2741 | AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc]) |
---|
2742 | ;; |
---|
2743 | esac |
---|
2744 | fi |
---|
2745 | need_lc=${lt_cv_archive_cmds_need_lc-yes} |
---|
2746 | |
---|
2747 | # The second clause should only fire when bootstrapping the |
---|
2748 | # libtool distribution, otherwise you forgot to ship ltmain.sh |
---|
2749 | # with your package, and you will get complaints that there are |
---|
2750 | # no rules to generate ltmain.sh. |
---|
2751 | if test -f "$ltmain"; then |
---|
2752 | : |
---|
2753 | else |
---|
2754 | # If there is no Makefile yet, we rely on a make rule to execute |
---|
2755 | # `config.status --recheck' to rerun these tests and create the |
---|
2756 | # libtool script then. |
---|
2757 | test -f Makefile && make "$ltmain" |
---|
2758 | fi |
---|
2759 | |
---|
2760 | if test -f "$ltmain"; then |
---|
2761 | trap "$rm \"${ofile}T\"; exit 1" 1 2 15 |
---|
2762 | $rm -f "${ofile}T" |
---|
2763 | |
---|
2764 | echo creating $ofile |
---|
2765 | |
---|
2766 | # Now quote all the things that may contain metacharacters while being |
---|
2767 | # careful not to overquote the AC_SUBSTed values. We take copies of the |
---|
2768 | # variables and quote the copies for generation of the libtool script. |
---|
2769 | for var in echo old_CC old_CFLAGS SED \ |
---|
2770 | AR AR_FLAGS CC LD LN_S NM SHELL \ |
---|
2771 | reload_flag reload_cmds wl \ |
---|
2772 | pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ |
---|
2773 | thread_safe_flag_spec whole_archive_flag_spec libname_spec \ |
---|
2774 | library_names_spec soname_spec \ |
---|
2775 | RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ |
---|
2776 | old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ |
---|
2777 | postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ |
---|
2778 | old_striplib striplib file_magic_cmd export_symbols_cmds \ |
---|
2779 | deplibs_check_method allow_undefined_flag no_undefined_flag \ |
---|
2780 | finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ |
---|
2781 | global_symbol_to_c_name_address \ |
---|
2782 | hardcode_libdir_flag_spec hardcode_libdir_separator \ |
---|
2783 | sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ |
---|
2784 | compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do |
---|
2785 | |
---|
2786 | case $var in |
---|
2787 | reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ |
---|
2788 | old_postinstall_cmds | old_postuninstall_cmds | \ |
---|
2789 | export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ |
---|
2790 | extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ |
---|
2791 | postinstall_cmds | postuninstall_cmds | \ |
---|
2792 | finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) |
---|
2793 | # Double-quote double-evaled strings. |
---|
2794 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" |
---|
2795 | ;; |
---|
2796 | *) |
---|
2797 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" |
---|
2798 | ;; |
---|
2799 | esac |
---|
2800 | done |
---|
2801 | |
---|
2802 | cat <<__EOF__ > "${ofile}T" |
---|
2803 | #! $SHELL |
---|
2804 | |
---|
2805 | # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. |
---|
2806 | # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) |
---|
2807 | # NOTE: Changes made to this file will be lost: look at ltmain.sh. |
---|
2808 | # |
---|
2809 | # Copyright (C) 1996-2000 Free Software Foundation, Inc. |
---|
2810 | # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
---|
2811 | # |
---|
2812 | # This program is free software; you can redistribute it and/or modify |
---|
2813 | # it under the terms of the GNU General Public License as published by |
---|
2814 | # the Free Software Foundation; either version 2 of the License, or |
---|
2815 | # (at your option) any later version. |
---|
2816 | # |
---|
2817 | # This program is distributed in the hope that it will be useful, but |
---|
2818 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
2819 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
2820 | # General Public License for more details. |
---|
2821 | # |
---|
2822 | # You should have received a copy of the GNU General Public License |
---|
2823 | # along with this program; if not, write to the Free Software |
---|
2824 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
2825 | # |
---|
2826 | # As a special exception to the GNU General Public License, if you |
---|
2827 | # distribute this file as part of a program that contains a |
---|
2828 | # configuration script generated by Autoconf, you may include it under |
---|
2829 | # the same distribution terms that you use for the rest of that program. |
---|
2830 | |
---|
2831 | # A sed that does not truncate output. |
---|
2832 | SED=$lt_SED |
---|
2833 | |
---|
2834 | # Sed that helps us avoid accidentally triggering echo(1) options like -n. |
---|
2835 | Xsed="${SED} -e s/^X//" |
---|
2836 | |
---|
2837 | # The HP-UX ksh and POSIX shell print the target directory to stdout |
---|
2838 | # if CDPATH is set. |
---|
2839 | if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
---|
2840 | |
---|
2841 | # ### BEGIN LIBTOOL CONFIG |
---|
2842 | |
---|
2843 | # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
---|
2844 | |
---|
2845 | # Shell to use when invoking shell scripts. |
---|
2846 | SHELL=$lt_SHELL |
---|
2847 | |
---|
2848 | # Whether or not to build shared libraries. |
---|
2849 | build_libtool_libs=$enable_shared |
---|
2850 | |
---|
2851 | # Whether or not to build static libraries. |
---|
2852 | build_old_libs=$enable_static |
---|
2853 | |
---|
2854 | # Whether or not to add -lc for building shared libraries. |
---|
2855 | build_libtool_need_lc=$need_lc |
---|
2856 | |
---|
2857 | # Whether or not to optimize for fast installation. |
---|
2858 | fast_install=$enable_fast_install |
---|
2859 | |
---|
2860 | # The host system. |
---|
2861 | host_alias=$host_alias |
---|
2862 | host=$host |
---|
2863 | |
---|
2864 | # An echo program that does not interpret backslashes. |
---|
2865 | echo=$lt_echo |
---|
2866 | |
---|
2867 | # The archiver. |
---|
2868 | AR=$lt_AR |
---|
2869 | AR_FLAGS=$lt_AR_FLAGS |
---|
2870 | |
---|
2871 | # The default C compiler. |
---|
2872 | CC=$lt_CC |
---|
2873 | |
---|
2874 | # Is the compiler the GNU C compiler? |
---|
2875 | with_gcc=$GCC |
---|
2876 | |
---|
2877 | # The linker used to build libraries. |
---|
2878 | LD=$lt_LD |
---|
2879 | |
---|
2880 | # Whether we need hard or soft links. |
---|
2881 | LN_S=$lt_LN_S |
---|
2882 | |
---|
2883 | # A BSD-compatible nm program. |
---|
2884 | NM=$lt_NM |
---|
2885 | |
---|
2886 | # A symbol stripping program |
---|
2887 | STRIP=$STRIP |
---|
2888 | |
---|
2889 | # Used to examine libraries when file_magic_cmd begins "file" |
---|
2890 | MAGIC_CMD=$MAGIC_CMD |
---|
2891 | |
---|
2892 | # Used on cygwin: DLL creation program. |
---|
2893 | DLLTOOL="$DLLTOOL" |
---|
2894 | |
---|
2895 | # Used on cygwin: object dumper. |
---|
2896 | OBJDUMP="$OBJDUMP" |
---|
2897 | |
---|
2898 | # Used on cygwin: assembler. |
---|
2899 | AS="$AS" |
---|
2900 | |
---|
2901 | # The name of the directory that contains temporary libtool files. |
---|
2902 | objdir=$objdir |
---|
2903 | |
---|
2904 | # How to create reloadable object files. |
---|
2905 | reload_flag=$lt_reload_flag |
---|
2906 | reload_cmds=$lt_reload_cmds |
---|
2907 | |
---|
2908 | # How to pass a linker flag through the compiler. |
---|
2909 | wl=$lt_wl |
---|
2910 | |
---|
2911 | # Object file suffix (normally "o"). |
---|
2912 | objext="$ac_objext" |
---|
2913 | |
---|
2914 | # Old archive suffix (normally "a"). |
---|
2915 | libext="$libext" |
---|
2916 | |
---|
2917 | # Executable file suffix (normally ""). |
---|
2918 | exeext="$exeext" |
---|
2919 | |
---|
2920 | # Additional compiler flags for building library objects. |
---|
2921 | pic_flag=$lt_pic_flag |
---|
2922 | pic_mode=$pic_mode |
---|
2923 | |
---|
2924 | # Does compiler simultaneously support -c and -o options? |
---|
2925 | compiler_c_o=$lt_compiler_c_o |
---|
2926 | |
---|
2927 | # Can we write directly to a .lo ? |
---|
2928 | compiler_o_lo=$lt_compiler_o_lo |
---|
2929 | |
---|
2930 | # Must we lock files when doing compilation ? |
---|
2931 | need_locks=$lt_need_locks |
---|
2932 | |
---|
2933 | # Do we need the lib prefix for modules? |
---|
2934 | need_lib_prefix=$need_lib_prefix |
---|
2935 | |
---|
2936 | # Do we need a version for libraries? |
---|
2937 | need_version=$need_version |
---|
2938 | |
---|
2939 | # Whether dlopen is supported. |
---|
2940 | dlopen_support=$enable_dlopen |
---|
2941 | |
---|
2942 | # Whether dlopen of programs is supported. |
---|
2943 | dlopen_self=$enable_dlopen_self |
---|
2944 | |
---|
2945 | # Whether dlopen of statically linked programs is supported. |
---|
2946 | dlopen_self_static=$enable_dlopen_self_static |
---|
2947 | |
---|
2948 | # Compiler flag to prevent dynamic linking. |
---|
2949 | link_static_flag=$lt_link_static_flag |
---|
2950 | |
---|
2951 | # Compiler flag to turn off builtin functions. |
---|
2952 | no_builtin_flag=$lt_no_builtin_flag |
---|
2953 | |
---|
2954 | # Compiler flag to allow reflexive dlopens. |
---|
2955 | export_dynamic_flag_spec=$lt_export_dynamic_flag_spec |
---|
2956 | |
---|
2957 | # Compiler flag to generate shared objects directly from archives. |
---|
2958 | whole_archive_flag_spec=$lt_whole_archive_flag_spec |
---|
2959 | |
---|
2960 | # Compiler flag to generate thread-safe objects. |
---|
2961 | thread_safe_flag_spec=$lt_thread_safe_flag_spec |
---|
2962 | |
---|
2963 | # Library versioning type. |
---|
2964 | version_type=$version_type |
---|
2965 | |
---|
2966 | # Format of library name prefix. |
---|
2967 | libname_spec=$lt_libname_spec |
---|
2968 | |
---|
2969 | # List of archive names. First name is the real one, the rest are links. |
---|
2970 | # The last name is the one that the linker finds with -lNAME. |
---|
2971 | library_names_spec=$lt_library_names_spec |
---|
2972 | |
---|
2973 | # The coded name of the library, if different from the real name. |
---|
2974 | soname_spec=$lt_soname_spec |
---|
2975 | |
---|
2976 | # Commands used to build and install an old-style archive. |
---|
2977 | RANLIB=$lt_RANLIB |
---|
2978 | old_archive_cmds=$lt_old_archive_cmds |
---|
2979 | old_postinstall_cmds=$lt_old_postinstall_cmds |
---|
2980 | old_postuninstall_cmds=$lt_old_postuninstall_cmds |
---|
2981 | |
---|
2982 | # Create an old-style archive from a shared archive. |
---|
2983 | old_archive_from_new_cmds=$lt_old_archive_from_new_cmds |
---|
2984 | |
---|
2985 | # Create a temporary old-style archive to link instead of a shared archive. |
---|
2986 | old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds |
---|
2987 | |
---|
2988 | # Commands used to build and install a shared archive. |
---|
2989 | archive_cmds=$lt_archive_cmds |
---|
2990 | archive_expsym_cmds=$lt_archive_expsym_cmds |
---|
2991 | postinstall_cmds=$lt_postinstall_cmds |
---|
2992 | postuninstall_cmds=$lt_postuninstall_cmds |
---|
2993 | |
---|
2994 | # Commands to strip libraries. |
---|
2995 | old_striplib=$lt_old_striplib |
---|
2996 | striplib=$lt_striplib |
---|
2997 | |
---|
2998 | # Method to check whether dependent libraries are shared objects. |
---|
2999 | deplibs_check_method=$lt_deplibs_check_method |
---|
3000 | |
---|
3001 | # Command to use when deplibs_check_method == file_magic. |
---|
3002 | file_magic_cmd=$lt_file_magic_cmd |
---|
3003 | |
---|
3004 | # Flag that allows shared libraries with undefined symbols to be built. |
---|
3005 | allow_undefined_flag=$lt_allow_undefined_flag |
---|
3006 | |
---|
3007 | # Flag that forces no undefined symbols. |
---|
3008 | no_undefined_flag=$lt_no_undefined_flag |
---|
3009 | |
---|
3010 | # Commands used to finish a libtool library installation in a directory. |
---|
3011 | finish_cmds=$lt_finish_cmds |
---|
3012 | |
---|
3013 | # Same as above, but a single script fragment to be evaled but not shown. |
---|
3014 | finish_eval=$lt_finish_eval |
---|
3015 | |
---|
3016 | # Take the output of nm and produce a listing of raw symbols and C names. |
---|
3017 | global_symbol_pipe=$lt_global_symbol_pipe |
---|
3018 | |
---|
3019 | # Transform the output of nm in a proper C declaration |
---|
3020 | global_symbol_to_cdecl=$lt_global_symbol_to_cdecl |
---|
3021 | |
---|
3022 | # Transform the output of nm in a C name address pair |
---|
3023 | global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address |
---|
3024 | |
---|
3025 | # This is the shared library runtime path variable. |
---|
3026 | runpath_var=$runpath_var |
---|
3027 | |
---|
3028 | # This is the shared library path variable. |
---|
3029 | shlibpath_var=$shlibpath_var |
---|
3030 | |
---|
3031 | # Is shlibpath searched before the hard-coded library search path? |
---|
3032 | shlibpath_overrides_runpath=$shlibpath_overrides_runpath |
---|
3033 | |
---|
3034 | # How to hardcode a shared library path into an executable. |
---|
3035 | hardcode_action=$hardcode_action |
---|
3036 | |
---|
3037 | # Whether we should hardcode library paths into libraries. |
---|
3038 | hardcode_into_libs=$hardcode_into_libs |
---|
3039 | |
---|
3040 | # Flag to hardcode \$libdir into a binary during linking. |
---|
3041 | # This must work even if \$libdir does not exist. |
---|
3042 | hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec |
---|
3043 | |
---|
3044 | # Whether we need a single -rpath flag with a separated argument. |
---|
3045 | hardcode_libdir_separator=$lt_hardcode_libdir_separator |
---|
3046 | |
---|
3047 | # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the |
---|
3048 | # resulting binary. |
---|
3049 | hardcode_direct=$hardcode_direct |
---|
3050 | |
---|
3051 | # Set to yes if using the -LDIR flag during linking hardcodes DIR into the |
---|
3052 | # resulting binary. |
---|
3053 | hardcode_minus_L=$hardcode_minus_L |
---|
3054 | |
---|
3055 | # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into |
---|
3056 | # the resulting binary. |
---|
3057 | hardcode_shlibpath_var=$hardcode_shlibpath_var |
---|
3058 | |
---|
3059 | # Variables whose values should be saved in libtool wrapper scripts and |
---|
3060 | # restored at relink time. |
---|
3061 | variables_saved_for_relink="$variables_saved_for_relink" |
---|
3062 | |
---|
3063 | # Whether libtool must link a program against all its dependency libraries. |
---|
3064 | link_all_deplibs=$link_all_deplibs |
---|
3065 | |
---|
3066 | # Compile-time system search path for libraries |
---|
3067 | sys_lib_search_path_spec=$lt_sys_lib_search_path_spec |
---|
3068 | |
---|
3069 | # Run-time system search path for libraries |
---|
3070 | sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec |
---|
3071 | |
---|
3072 | # Fix the shell variable \$srcfile for the compiler. |
---|
3073 | fix_srcfile_path="$fix_srcfile_path" |
---|
3074 | |
---|
3075 | # Set to yes if exported symbols are required. |
---|
3076 | always_export_symbols=$always_export_symbols |
---|
3077 | |
---|
3078 | # The commands to list exported symbols. |
---|
3079 | export_symbols_cmds=$lt_export_symbols_cmds |
---|
3080 | |
---|
3081 | # The commands to extract the exported symbol list from a shared archive. |
---|
3082 | extract_expsyms_cmds=$lt_extract_expsyms_cmds |
---|
3083 | |
---|
3084 | # Symbols that should not be listed in the preloaded symbols. |
---|
3085 | exclude_expsyms=$lt_exclude_expsyms |
---|
3086 | |
---|
3087 | # Symbols that must always be exported. |
---|
3088 | include_expsyms=$lt_include_expsyms |
---|
3089 | |
---|
3090 | # ### END LIBTOOL CONFIG |
---|
3091 | |
---|
3092 | __EOF__ |
---|
3093 | |
---|
3094 | case $host_os in |
---|
3095 | aix3*) |
---|
3096 | cat <<\EOF >> "${ofile}T" |
---|
3097 | |
---|
3098 | # AIX sometimes has problems with the GCC collect2 program. For some |
---|
3099 | # reason, if we set the COLLECT_NAMES environment variable, the problems |
---|
3100 | # vanish in a puff of smoke. |
---|
3101 | if test "X${COLLECT_NAMES+set}" != Xset; then |
---|
3102 | COLLECT_NAMES= |
---|
3103 | export COLLECT_NAMES |
---|
3104 | fi |
---|
3105 | EOF |
---|
3106 | ;; |
---|
3107 | esac |
---|
3108 | |
---|
3109 | case $host_os in |
---|
3110 | cygwin* | mingw* | pw32* | os2*) |
---|
3111 | cat <<'EOF' >> "${ofile}T" |
---|
3112 | # This is a source program that is used to create dlls on Windows |
---|
3113 | # Don't remove nor modify the starting and closing comments |
---|
3114 | # /* ltdll.c starts here */ |
---|
3115 | # #define WIN32_LEAN_AND_MEAN |
---|
3116 | # #include <windows.h> |
---|
3117 | # #undef WIN32_LEAN_AND_MEAN |
---|
3118 | # #include <stdio.h> |
---|
3119 | # |
---|
3120 | # #ifndef __CYGWIN__ |
---|
3121 | # # ifdef __CYGWIN32__ |
---|
3122 | # # define __CYGWIN__ __CYGWIN32__ |
---|
3123 | # # endif |
---|
3124 | # #endif |
---|
3125 | # |
---|
3126 | # #ifdef __cplusplus |
---|
3127 | # extern "C" { |
---|
3128 | # #endif |
---|
3129 | # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); |
---|
3130 | # #ifdef __cplusplus |
---|
3131 | # } |
---|
3132 | # #endif |
---|
3133 | # |
---|
3134 | # #ifdef __CYGWIN__ |
---|
3135 | # #include <cygwin/cygwin_dll.h> |
---|
3136 | # DECLARE_CYGWIN_DLL( DllMain ); |
---|
3137 | # #endif |
---|
3138 | # HINSTANCE __hDllInstance_base; |
---|
3139 | # |
---|
3140 | # BOOL APIENTRY |
---|
3141 | # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) |
---|
3142 | # { |
---|
3143 | # __hDllInstance_base = hInst; |
---|
3144 | # return TRUE; |
---|
3145 | # } |
---|
3146 | # /* ltdll.c ends here */ |
---|
3147 | # This is a source program that is used to create import libraries |
---|
3148 | # on Windows for dlls which lack them. Don't remove nor modify the |
---|
3149 | # starting and closing comments |
---|
3150 | # /* impgen.c starts here */ |
---|
3151 | # /* Copyright (C) 1999-2000 Free Software Foundation, Inc. |
---|
3152 | # |
---|
3153 | # This file is part of GNU libtool. |
---|
3154 | # |
---|
3155 | # This program is free software; you can redistribute it and/or modify |
---|
3156 | # it under the terms of the GNU General Public License as published by |
---|
3157 | # the Free Software Foundation; either version 2 of the License, or |
---|
3158 | # (at your option) any later version. |
---|
3159 | # |
---|
3160 | # This program is distributed in the hope that it will be useful, |
---|
3161 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
3162 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
3163 | # GNU General Public License for more details. |
---|
3164 | # |
---|
3165 | # You should have received a copy of the GNU General Public License |
---|
3166 | # along with this program; if not, write to the Free Software |
---|
3167 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
3168 | # */ |
---|
3169 | # |
---|
3170 | # #include <stdio.h> /* for printf() */ |
---|
3171 | # #include <unistd.h> /* for open(), lseek(), read() */ |
---|
3172 | # #include <fcntl.h> /* for O_RDONLY, O_BINARY */ |
---|
3173 | # #include <string.h> /* for strdup() */ |
---|
3174 | # |
---|
3175 | # /* O_BINARY isn't required (or even defined sometimes) under Unix */ |
---|
3176 | # #ifndef O_BINARY |
---|
3177 | # #define O_BINARY 0 |
---|
3178 | # #endif |
---|
3179 | # |
---|
3180 | # static unsigned int |
---|
3181 | # pe_get16 (fd, offset) |
---|
3182 | # int fd; |
---|
3183 | # int offset; |
---|
3184 | # { |
---|
3185 | # unsigned char b[2]; |
---|
3186 | # lseek (fd, offset, SEEK_SET); |
---|
3187 | # read (fd, b, 2); |
---|
3188 | # return b[0] + (b[1]<<8); |
---|
3189 | # } |
---|
3190 | # |
---|
3191 | # static unsigned int |
---|
3192 | # pe_get32 (fd, offset) |
---|
3193 | # int fd; |
---|
3194 | # int offset; |
---|
3195 | # { |
---|
3196 | # unsigned char b[4]; |
---|
3197 | # lseek (fd, offset, SEEK_SET); |
---|
3198 | # read (fd, b, 4); |
---|
3199 | # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); |
---|
3200 | # } |
---|
3201 | # |
---|
3202 | # static unsigned int |
---|
3203 | # pe_as32 (ptr) |
---|
3204 | # void *ptr; |
---|
3205 | # { |
---|
3206 | # unsigned char *b = ptr; |
---|
3207 | # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); |
---|
3208 | # } |
---|
3209 | # |
---|
3210 | # int |
---|
3211 | # main (argc, argv) |
---|
3212 | # int argc; |
---|
3213 | # char *argv[]; |
---|
3214 | # { |
---|
3215 | # int dll; |
---|
3216 | # unsigned long pe_header_offset, opthdr_ofs, num_entries, i; |
---|
3217 | # unsigned long export_rva, export_size, nsections, secptr, expptr; |
---|
3218 | # unsigned long name_rvas, nexp; |
---|
3219 | # unsigned char *expdata, *erva; |
---|
3220 | # char *filename, *dll_name; |
---|
3221 | # |
---|
3222 | # filename = argv[1]; |
---|
3223 | # |
---|
3224 | # dll = open(filename, O_RDONLY|O_BINARY); |
---|
3225 | # if (dll < 1) |
---|
3226 | # return 1; |
---|
3227 | # |
---|
3228 | # dll_name = filename; |
---|
3229 | # |
---|
3230 | # for (i=0; filename[i]; i++) |
---|
3231 | # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') |
---|
3232 | # dll_name = filename + i +1; |
---|
3233 | # |
---|
3234 | # pe_header_offset = pe_get32 (dll, 0x3c); |
---|
3235 | # opthdr_ofs = pe_header_offset + 4 + 20; |
---|
3236 | # num_entries = pe_get32 (dll, opthdr_ofs + 92); |
---|
3237 | # |
---|
3238 | # if (num_entries < 1) /* no exports */ |
---|
3239 | # return 1; |
---|
3240 | # |
---|
3241 | # export_rva = pe_get32 (dll, opthdr_ofs + 96); |
---|
3242 | # export_size = pe_get32 (dll, opthdr_ofs + 100); |
---|
3243 | # nsections = pe_get16 (dll, pe_header_offset + 4 +2); |
---|
3244 | # secptr = (pe_header_offset + 4 + 20 + |
---|
3245 | # pe_get16 (dll, pe_header_offset + 4 + 16)); |
---|
3246 | # |
---|
3247 | # expptr = 0; |
---|
3248 | # for (i = 0; i < nsections; i++) |
---|
3249 | # { |
---|
3250 | # char sname[8]; |
---|
3251 | # unsigned long secptr1 = secptr + 40 * i; |
---|
3252 | # unsigned long vaddr = pe_get32 (dll, secptr1 + 12); |
---|
3253 | # unsigned long vsize = pe_get32 (dll, secptr1 + 16); |
---|
3254 | # unsigned long fptr = pe_get32 (dll, secptr1 + 20); |
---|
3255 | # lseek(dll, secptr1, SEEK_SET); |
---|
3256 | # read(dll, sname, 8); |
---|
3257 | # if (vaddr <= export_rva && vaddr+vsize > export_rva) |
---|
3258 | # { |
---|
3259 | # expptr = fptr + (export_rva - vaddr); |
---|
3260 | # if (export_rva + export_size > vaddr + vsize) |
---|
3261 | # export_size = vsize - (export_rva - vaddr); |
---|
3262 | # break; |
---|
3263 | # } |
---|
3264 | # } |
---|
3265 | # |
---|
3266 | # expdata = (unsigned char*)malloc(export_size); |
---|
3267 | # lseek (dll, expptr, SEEK_SET); |
---|
3268 | # read (dll, expdata, export_size); |
---|
3269 | # erva = expdata - export_rva; |
---|
3270 | # |
---|
3271 | # nexp = pe_as32 (expdata+24); |
---|
3272 | # name_rvas = pe_as32 (expdata+32); |
---|
3273 | # |
---|
3274 | # printf ("EXPORTS\n"); |
---|
3275 | # for (i = 0; i<nexp; i++) |
---|
3276 | # { |
---|
3277 | # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4); |
---|
3278 | # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i); |
---|
3279 | # } |
---|
3280 | # |
---|
3281 | # return 0; |
---|
3282 | # } |
---|
3283 | # /* impgen.c ends here */ |
---|
3284 | |
---|
3285 | EOF |
---|
3286 | ;; |
---|
3287 | esac |
---|
3288 | |
---|
3289 | # We use sed instead of cat because bash on DJGPP gets confused if |
---|
3290 | # if finds mixed CR/LF and LF-only lines. Since sed operates in |
---|
3291 | # text mode, it properly converts lines to CR/LF. This bash problem |
---|
3292 | # is reportedly fixed, but why not run on old versions too? |
---|
3293 | sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1) |
---|
3294 | |
---|
3295 | mv -f "${ofile}T" "$ofile" || \ |
---|
3296 | (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") |
---|
3297 | chmod +x "$ofile" |
---|
3298 | fi |
---|
3299 | |
---|
3300 | ])# _LT_AC_LTCONFIG_HACK |
---|
3301 | |
---|
3302 | # AC_LIBTOOL_DLOPEN - enable checks for dlopen support |
---|
3303 | AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) |
---|
3304 | |
---|
3305 | # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's |
---|
3306 | AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) |
---|
3307 | |
---|
3308 | # AC_ENABLE_SHARED - implement the --enable-shared flag |
---|
3309 | # Usage: AC_ENABLE_SHARED[(DEFAULT)] |
---|
3310 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
---|
3311 | # `yes'. |
---|
3312 | AC_DEFUN([AC_ENABLE_SHARED], |
---|
3313 | [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl |
---|
3314 | AC_ARG_ENABLE(shared, |
---|
3315 | changequote(<<, >>)dnl |
---|
3316 | << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], |
---|
3317 | changequote([, ])dnl |
---|
3318 | [p=${PACKAGE-default} |
---|
3319 | case $enableval in |
---|
3320 | yes) enable_shared=yes ;; |
---|
3321 | no) enable_shared=no ;; |
---|
3322 | *) |
---|
3323 | enable_shared=no |
---|
3324 | # Look at the argument we got. We use all the common list separators. |
---|
3325 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
---|
3326 | for pkg in $enableval; do |
---|
3327 | if test "X$pkg" = "X$p"; then |
---|
3328 | enable_shared=yes |
---|
3329 | fi |
---|
3330 | done |
---|
3331 | IFS="$ac_save_ifs" |
---|
3332 | ;; |
---|
3333 | esac], |
---|
3334 | enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl |
---|
3335 | ]) |
---|
3336 | |
---|
3337 | # AC_DISABLE_SHARED - set the default shared flag to --disable-shared |
---|
3338 | AC_DEFUN([AC_DISABLE_SHARED], |
---|
3339 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
3340 | AC_ENABLE_SHARED(no)]) |
---|
3341 | |
---|
3342 | # AC_ENABLE_STATIC - implement the --enable-static flag |
---|
3343 | # Usage: AC_ENABLE_STATIC[(DEFAULT)] |
---|
3344 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
---|
3345 | # `yes'. |
---|
3346 | AC_DEFUN([AC_ENABLE_STATIC], |
---|
3347 | [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl |
---|
3348 | AC_ARG_ENABLE(static, |
---|
3349 | changequote(<<, >>)dnl |
---|
3350 | << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], |
---|
3351 | changequote([, ])dnl |
---|
3352 | [p=${PACKAGE-default} |
---|
3353 | case $enableval in |
---|
3354 | yes) enable_static=yes ;; |
---|
3355 | no) enable_static=no ;; |
---|
3356 | *) |
---|
3357 | enable_static=no |
---|
3358 | # Look at the argument we got. We use all the common list separators. |
---|
3359 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
---|
3360 | for pkg in $enableval; do |
---|
3361 | if test "X$pkg" = "X$p"; then |
---|
3362 | enable_static=yes |
---|
3363 | fi |
---|
3364 | done |
---|
3365 | IFS="$ac_save_ifs" |
---|
3366 | ;; |
---|
3367 | esac], |
---|
3368 | enable_static=AC_ENABLE_STATIC_DEFAULT)dnl |
---|
3369 | ]) |
---|
3370 | |
---|
3371 | # AC_DISABLE_STATIC - set the default static flag to --disable-static |
---|
3372 | AC_DEFUN([AC_DISABLE_STATIC], |
---|
3373 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
3374 | AC_ENABLE_STATIC(no)]) |
---|
3375 | |
---|
3376 | |
---|
3377 | # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag |
---|
3378 | # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] |
---|
3379 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
---|
3380 | # `yes'. |
---|
3381 | AC_DEFUN([AC_ENABLE_FAST_INSTALL], |
---|
3382 | [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl |
---|
3383 | AC_ARG_ENABLE(fast-install, |
---|
3384 | changequote(<<, >>)dnl |
---|
3385 | << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], |
---|
3386 | changequote([, ])dnl |
---|
3387 | [p=${PACKAGE-default} |
---|
3388 | case $enableval in |
---|
3389 | yes) enable_fast_install=yes ;; |
---|
3390 | no) enable_fast_install=no ;; |
---|
3391 | *) |
---|
3392 | enable_fast_install=no |
---|
3393 | # Look at the argument we got. We use all the common list separators. |
---|
3394 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
---|
3395 | for pkg in $enableval; do |
---|
3396 | if test "X$pkg" = "X$p"; then |
---|
3397 | enable_fast_install=yes |
---|
3398 | fi |
---|
3399 | done |
---|
3400 | IFS="$ac_save_ifs" |
---|
3401 | ;; |
---|
3402 | esac], |
---|
3403 | enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl |
---|
3404 | ]) |
---|
3405 | |
---|
3406 | # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install |
---|
3407 | AC_DEFUN([AC_DISABLE_FAST_INSTALL], |
---|
3408 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
3409 | AC_ENABLE_FAST_INSTALL(no)]) |
---|
3410 | |
---|
3411 | # AC_LIBTOOL_PICMODE - implement the --with-pic flag |
---|
3412 | # Usage: AC_LIBTOOL_PICMODE[(MODE)] |
---|
3413 | # Where MODE is either `yes' or `no'. If omitted, it defaults to |
---|
3414 | # `both'. |
---|
3415 | AC_DEFUN([AC_LIBTOOL_PICMODE], |
---|
3416 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
3417 | pic_mode=ifelse($#,1,$1,default)]) |
---|
3418 | |
---|
3419 | |
---|
3420 | # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library |
---|
3421 | AC_DEFUN([AC_PATH_TOOL_PREFIX], |
---|
3422 | [AC_MSG_CHECKING([for $1]) |
---|
3423 | AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, |
---|
3424 | [case $MAGIC_CMD in |
---|
3425 | /*) |
---|
3426 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. |
---|
3427 | ;; |
---|
3428 | ?:/*) |
---|
3429 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. |
---|
3430 | ;; |
---|
3431 | *) |
---|
3432 | ac_save_MAGIC_CMD="$MAGIC_CMD" |
---|
3433 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
---|
3434 | dnl $ac_dummy forces splitting on constant user-supplied paths. |
---|
3435 | dnl POSIX.2 word splitting is done only on the output of word expansions, |
---|
3436 | dnl not every word. This closes a longstanding sh security hole. |
---|
3437 | ac_dummy="ifelse([$2], , $PATH, [$2])" |
---|
3438 | for ac_dir in $ac_dummy; do |
---|
3439 | test -z "$ac_dir" && ac_dir=. |
---|
3440 | if test -f $ac_dir/$1; then |
---|
3441 | lt_cv_path_MAGIC_CMD="$ac_dir/$1" |
---|
3442 | if test -n "$file_magic_test_file"; then |
---|
3443 | case $deplibs_check_method in |
---|
3444 | "file_magic "*) |
---|
3445 | file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" |
---|
3446 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
---|
3447 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | |
---|
3448 | egrep "$file_magic_regex" > /dev/null; then |
---|
3449 | : |
---|
3450 | else |
---|
3451 | cat <<EOF 1>&2 |
---|
3452 | |
---|
3453 | *** Warning: the command libtool uses to detect shared libraries, |
---|
3454 | *** $file_magic_cmd, produces output that libtool cannot recognize. |
---|
3455 | *** The result is that libtool may fail to recognize shared libraries |
---|
3456 | *** as such. This will affect the creation of libtool libraries that |
---|
3457 | *** depend on shared libraries, but programs linked with such libtool |
---|
3458 | *** libraries will work regardless of this problem. Nevertheless, you |
---|
3459 | *** may want to report the problem to your system manager and/or to |
---|
3460 | *** bug-libtool@gnu.org |
---|
3461 | |
---|
3462 | EOF |
---|
3463 | fi ;; |
---|
3464 | esac |
---|
3465 | fi |
---|
3466 | break |
---|
3467 | fi |
---|
3468 | done |
---|
3469 | IFS="$ac_save_ifs" |
---|
3470 | MAGIC_CMD="$ac_save_MAGIC_CMD" |
---|
3471 | ;; |
---|
3472 | esac]) |
---|
3473 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
---|
3474 | if test -n "$MAGIC_CMD"; then |
---|
3475 | AC_MSG_RESULT($MAGIC_CMD) |
---|
3476 | else |
---|
3477 | AC_MSG_RESULT(no) |
---|
3478 | fi |
---|
3479 | ]) |
---|
3480 | |
---|
3481 | |
---|
3482 | # AC_PATH_MAGIC - find a file program which can recognise a shared library |
---|
3483 | AC_DEFUN([AC_PATH_MAGIC], |
---|
3484 | [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl |
---|
3485 | AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH) |
---|
3486 | if test -z "$lt_cv_path_MAGIC_CMD"; then |
---|
3487 | if test -n "$ac_tool_prefix"; then |
---|
3488 | AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH) |
---|
3489 | else |
---|
3490 | MAGIC_CMD=: |
---|
3491 | fi |
---|
3492 | fi |
---|
3493 | ]) |
---|
3494 | |
---|
3495 | |
---|
3496 | # AC_PROG_LD - find the path to the GNU or non-GNU linker |
---|
3497 | AC_DEFUN([AC_PROG_LD], |
---|
3498 | [AC_ARG_WITH(gnu-ld, |
---|
3499 | [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], |
---|
3500 | test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) |
---|
3501 | AC_REQUIRE([AC_PROG_CC])dnl |
---|
3502 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
---|
3503 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
---|
3504 | AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl |
---|
3505 | ac_prog=ld |
---|
3506 | if test "$GCC" = yes; then |
---|
3507 | # Check if gcc -print-prog-name=ld gives a path. |
---|
3508 | AC_MSG_CHECKING([for ld used by GCC]) |
---|
3509 | case $host in |
---|
3510 | *-*-mingw*) |
---|
3511 | # gcc leaves a trailing carriage return which upsets mingw |
---|
3512 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; |
---|
3513 | *) |
---|
3514 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; |
---|
3515 | esac |
---|
3516 | case $ac_prog in |
---|
3517 | # Accept absolute paths. |
---|
3518 | [[\\/]]* | [[A-Za-z]]:[[\\/]]*) |
---|
3519 | re_direlt='/[[^/]][[^/]]*/\.\./' |
---|
3520 | # Canonicalize the path of ld |
---|
3521 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` |
---|
3522 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
---|
3523 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` |
---|
3524 | done |
---|
3525 | test -z "$LD" && LD="$ac_prog" |
---|
3526 | ;; |
---|
3527 | "") |
---|
3528 | # If it fails, then pretend we aren't using GCC. |
---|
3529 | ac_prog=ld |
---|
3530 | ;; |
---|
3531 | *) |
---|
3532 | # If it is relative, then search for the first ld in PATH. |
---|
3533 | with_gnu_ld=unknown |
---|
3534 | ;; |
---|
3535 | esac |
---|
3536 | elif test "$with_gnu_ld" = yes; then |
---|
3537 | AC_MSG_CHECKING([for GNU ld]) |
---|
3538 | else |
---|
3539 | AC_MSG_CHECKING([for non-GNU ld]) |
---|
3540 | fi |
---|
3541 | AC_CACHE_VAL(lt_cv_path_LD, |
---|
3542 | [if test -z "$LD"; then |
---|
3543 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
---|
3544 | for ac_dir in $PATH; do |
---|
3545 | test -z "$ac_dir" && ac_dir=. |
---|
3546 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
---|
3547 | lt_cv_path_LD="$ac_dir/$ac_prog" |
---|
3548 | # Check to see if the program is GNU ld. I'd rather use --version, |
---|
3549 | # but apparently some GNU ld's only accept -v. |
---|
3550 | # Break only if it was the GNU/non-GNU ld that we prefer. |
---|
3551 | if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
---|
3552 | test "$with_gnu_ld" != no && break |
---|
3553 | else |
---|
3554 | test "$with_gnu_ld" != yes && break |
---|
3555 | fi |
---|
3556 | fi |
---|
3557 | done |
---|
3558 | IFS="$ac_save_ifs" |
---|
3559 | else |
---|
3560 | lt_cv_path_LD="$LD" # Let the user override the test with a path. |
---|
3561 | fi]) |
---|
3562 | LD="$lt_cv_path_LD" |
---|
3563 | if test -n "$LD"; then |
---|
3564 | AC_MSG_RESULT($LD) |
---|
3565 | else |
---|
3566 | AC_MSG_RESULT(no) |
---|
3567 | fi |
---|
3568 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
---|
3569 | AC_PROG_LD_GNU |
---|
3570 | ]) |
---|
3571 | |
---|
3572 | # AC_PROG_LD_GNU - |
---|
3573 | AC_DEFUN([AC_PROG_LD_GNU], |
---|
3574 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, |
---|
3575 | [# I'd rather use --version here, but apparently some GNU ld's only accept -v. |
---|
3576 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
---|
3577 | lt_cv_prog_gnu_ld=yes |
---|
3578 | else |
---|
3579 | lt_cv_prog_gnu_ld=no |
---|
3580 | fi]) |
---|
3581 | with_gnu_ld=$lt_cv_prog_gnu_ld |
---|
3582 | ]) |
---|
3583 | |
---|
3584 | # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker |
---|
3585 | # -- PORTME Some linkers may need a different reload flag. |
---|
3586 | AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], |
---|
3587 | [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag, |
---|
3588 | [lt_cv_ld_reload_flag='-r']) |
---|
3589 | reload_flag=$lt_cv_ld_reload_flag |
---|
3590 | test -n "$reload_flag" && reload_flag=" $reload_flag" |
---|
3591 | ]) |
---|
3592 | |
---|
3593 | # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies |
---|
3594 | # -- PORTME fill in with the dynamic library characteristics |
---|
3595 | AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], |
---|
3596 | [AC_CACHE_CHECK([how to recognise dependent libraries], |
---|
3597 | lt_cv_deplibs_check_method, |
---|
3598 | [lt_cv_file_magic_cmd='$MAGIC_CMD' |
---|
3599 | lt_cv_file_magic_test_file= |
---|
3600 | lt_cv_deplibs_check_method='unknown' |
---|
3601 | # Need to set the preceding variable on all platforms that support |
---|
3602 | # interlibrary dependencies. |
---|
3603 | # 'none' -- dependencies not supported. |
---|
3604 | # `unknown' -- same as none, but documents that we really don't know. |
---|
3605 | # 'pass_all' -- all dependencies passed with no checks. |
---|
3606 | # 'test_compile' -- check by making test program. |
---|
3607 | # 'file_magic [[regex]]' -- check by looking for files in library path |
---|
3608 | # which responds to the $file_magic_cmd with a given egrep regex. |
---|
3609 | # If you have `file' or equivalent on your system and you're not sure |
---|
3610 | # whether `pass_all' will *always* work, you probably want this one. |
---|
3611 | |
---|
3612 | case $host_os in |
---|
3613 | aix4* | aix5*) |
---|
3614 | lt_cv_deplibs_check_method=pass_all |
---|
3615 | ;; |
---|
3616 | |
---|
3617 | beos*) |
---|
3618 | lt_cv_deplibs_check_method=pass_all |
---|
3619 | ;; |
---|
3620 | |
---|
3621 | bsdi4*) |
---|
3622 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' |
---|
3623 | lt_cv_file_magic_cmd='/usr/bin/file -L' |
---|
3624 | lt_cv_file_magic_test_file=/shlib/libc.so |
---|
3625 | ;; |
---|
3626 | |
---|
3627 | cygwin* | mingw* | pw32*) |
---|
3628 | lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' |
---|
3629 | lt_cv_file_magic_cmd='$OBJDUMP -f' |
---|
3630 | ;; |
---|
3631 | |
---|
3632 | darwin* | rhapsody*) |
---|
3633 | lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' |
---|
3634 | lt_cv_file_magic_cmd='/usr/bin/file -L' |
---|
3635 | case "$host_os" in |
---|
3636 | rhapsody* | darwin1.[[012]]) |
---|
3637 | lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` |
---|
3638 | ;; |
---|
3639 | *) # Darwin 1.3 on |
---|
3640 | lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' |
---|
3641 | ;; |
---|
3642 | esac |
---|
3643 | ;; |
---|
3644 | |
---|
3645 | freebsd*) |
---|
3646 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
---|
3647 | case $host_cpu in |
---|
3648 | i*86 ) |
---|
3649 | # Not sure whether the presence of OpenBSD here was a mistake. |
---|
3650 | # Let's accept both of them until this is cleared up. |
---|
3651 | lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' |
---|
3652 | lt_cv_file_magic_cmd=/usr/bin/file |
---|
3653 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
---|
3654 | ;; |
---|
3655 | esac |
---|
3656 | else |
---|
3657 | lt_cv_deplibs_check_method=pass_all |
---|
3658 | fi |
---|
3659 | ;; |
---|
3660 | |
---|
3661 | gnu*) |
---|
3662 | lt_cv_deplibs_check_method=pass_all |
---|
3663 | ;; |
---|
3664 | |
---|
3665 | hpux10.20*|hpux11*) |
---|
3666 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' |
---|
3667 | lt_cv_file_magic_cmd=/usr/bin/file |
---|
3668 | lt_cv_file_magic_test_file=/usr/lib/libc.sl |
---|
3669 | ;; |
---|
3670 | |
---|
3671 | irix5* | irix6* | nonstopux*) |
---|
3672 | case $host_os in |
---|
3673 | irix5* | nonstopux*) |
---|
3674 | # this will be overridden with pass_all, but let us keep it just in case |
---|
3675 | lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" |
---|
3676 | ;; |
---|
3677 | *) |
---|
3678 | case $LD in |
---|
3679 | *-32|*"-32 ") libmagic=32-bit;; |
---|
3680 | *-n32|*"-n32 ") libmagic=N32;; |
---|
3681 | *-64|*"-64 ") libmagic=64-bit;; |
---|
3682 | *) libmagic=never-match;; |
---|
3683 | esac |
---|
3684 | # this will be overridden with pass_all, but let us keep it just in case |
---|
3685 | lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1" |
---|
3686 | ;; |
---|
3687 | esac |
---|
3688 | lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` |
---|
3689 | lt_cv_deplibs_check_method=pass_all |
---|
3690 | ;; |
---|
3691 | |
---|
3692 | # This must be Linux ELF. |
---|
3693 | linux-gnu*) |
---|
3694 | case $host_cpu in |
---|
3695 | alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*) |
---|
3696 | lt_cv_deplibs_check_method=pass_all ;; |
---|
3697 | *) |
---|
3698 | # glibc up to 2.1.1 does not perform some relocations on ARM |
---|
3699 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; |
---|
3700 | esac |
---|
3701 | lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` |
---|
3702 | ;; |
---|
3703 | |
---|
3704 | netbsd*) |
---|
3705 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
---|
3706 | lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$' |
---|
3707 | else |
---|
3708 | lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$' |
---|
3709 | fi |
---|
3710 | ;; |
---|
3711 | |
---|
3712 | newos6*) |
---|
3713 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' |
---|
3714 | lt_cv_file_magic_cmd=/usr/bin/file |
---|
3715 | lt_cv_file_magic_test_file=/usr/lib/libnls.so |
---|
3716 | ;; |
---|
3717 | |
---|
3718 | openbsd*) |
---|
3719 | lt_cv_file_magic_cmd=/usr/bin/file |
---|
3720 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
---|
3721 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
---|
3722 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' |
---|
3723 | else |
---|
3724 | lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' |
---|
3725 | fi |
---|
3726 | ;; |
---|
3727 | |
---|
3728 | osf3* | osf4* | osf5*) |
---|
3729 | # this will be overridden with pass_all, but let us keep it just in case |
---|
3730 | lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' |
---|
3731 | lt_cv_file_magic_test_file=/shlib/libc.so |
---|
3732 | lt_cv_deplibs_check_method=pass_all |
---|
3733 | ;; |
---|
3734 | |
---|
3735 | sco3.2v5*) |
---|
3736 | lt_cv_deplibs_check_method=pass_all |
---|
3737 | ;; |
---|
3738 | |
---|
3739 | solaris*) |
---|
3740 | lt_cv_deplibs_check_method=pass_all |
---|
3741 | lt_cv_file_magic_test_file=/lib/libc.so |
---|
3742 | ;; |
---|
3743 | |
---|
3744 | sysv5uw[[78]]* | sysv4*uw2*) |
---|
3745 | lt_cv_deplibs_check_method=pass_all |
---|
3746 | ;; |
---|
3747 | |
---|
3748 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
---|
3749 | case $host_vendor in |
---|
3750 | motorola) |
---|
3751 | 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]]' |
---|
3752 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` |
---|
3753 | ;; |
---|
3754 | ncr) |
---|
3755 | lt_cv_deplibs_check_method=pass_all |
---|
3756 | ;; |
---|
3757 | sequent) |
---|
3758 | lt_cv_file_magic_cmd='/bin/file' |
---|
3759 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' |
---|
3760 | ;; |
---|
3761 | sni) |
---|
3762 | lt_cv_file_magic_cmd='/bin/file' |
---|
3763 | lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" |
---|
3764 | lt_cv_file_magic_test_file=/lib/libc.so |
---|
3765 | ;; |
---|
3766 | siemens) |
---|
3767 | lt_cv_deplibs_check_method=pass_all |
---|
3768 | ;; |
---|
3769 | esac |
---|
3770 | ;; |
---|
3771 | esac |
---|
3772 | ]) |
---|
3773 | file_magic_cmd=$lt_cv_file_magic_cmd |
---|
3774 | deplibs_check_method=$lt_cv_deplibs_check_method |
---|
3775 | ]) |
---|
3776 | |
---|
3777 | |
---|
3778 | # AC_PROG_NM - find the path to a BSD-compatible name lister |
---|
3779 | AC_DEFUN([AC_PROG_NM], |
---|
3780 | [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl |
---|
3781 | AC_MSG_CHECKING([for BSD-compatible nm]) |
---|
3782 | AC_CACHE_VAL(lt_cv_path_NM, |
---|
3783 | [if test -n "$NM"; then |
---|
3784 | # Let the user override the test. |
---|
3785 | lt_cv_path_NM="$NM" |
---|
3786 | else |
---|
3787 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
---|
3788 | for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do |
---|
3789 | test -z "$ac_dir" && ac_dir=. |
---|
3790 | tmp_nm=$ac_dir/${ac_tool_prefix}nm |
---|
3791 | if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then |
---|
3792 | # Check to see if the nm accepts a BSD-compat flag. |
---|
3793 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: |
---|
3794 | # nm: unknown option "B" ignored |
---|
3795 | # Tru64's nm complains that /dev/null is an invalid object file |
---|
3796 | if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then |
---|
3797 | lt_cv_path_NM="$tmp_nm -B" |
---|
3798 | break |
---|
3799 | elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
---|
3800 | lt_cv_path_NM="$tmp_nm -p" |
---|
3801 | break |
---|
3802 | else |
---|
3803 | lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but |
---|
3804 | continue # so that we can try to find one that supports BSD flags |
---|
3805 | fi |
---|
3806 | fi |
---|
3807 | done |
---|
3808 | IFS="$ac_save_ifs" |
---|
3809 | test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm |
---|
3810 | fi]) |
---|
3811 | NM="$lt_cv_path_NM" |
---|
3812 | AC_MSG_RESULT([$NM]) |
---|
3813 | ]) |
---|
3814 | |
---|
3815 | # AC_CHECK_LIBM - check for math library |
---|
3816 | AC_DEFUN([AC_CHECK_LIBM], |
---|
3817 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl |
---|
3818 | LIBM= |
---|
3819 | case $host in |
---|
3820 | *-*-beos* | *-*-cygwin* | *-*-pw32*) |
---|
3821 | # These system don't have libm |
---|
3822 | ;; |
---|
3823 | *-ncr-sysv4.3*) |
---|
3824 | AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") |
---|
3825 | AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") |
---|
3826 | ;; |
---|
3827 | *) |
---|
3828 | AC_CHECK_LIB(m, main, LIBM="-lm") |
---|
3829 | ;; |
---|
3830 | esac |
---|
3831 | ]) |
---|
3832 | |
---|
3833 | # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for |
---|
3834 | # the libltdl convenience library and LTDLINCL to the include flags for |
---|
3835 | # the libltdl header and adds --enable-ltdl-convenience to the |
---|
3836 | # configure arguments. Note that LIBLTDL and LTDLINCL are not |
---|
3837 | # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not |
---|
3838 | # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed |
---|
3839 | # with '${top_builddir}/' and LTDLINCL will be prefixed with |
---|
3840 | # '${top_srcdir}/' (note the single quotes!). If your package is not |
---|
3841 | # flat and you're not using automake, define top_builddir and |
---|
3842 | # top_srcdir appropriately in the Makefiles. |
---|
3843 | AC_DEFUN([AC_LIBLTDL_CONVENIENCE], |
---|
3844 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
3845 | case $enable_ltdl_convenience in |
---|
3846 | no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; |
---|
3847 | "") enable_ltdl_convenience=yes |
---|
3848 | ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; |
---|
3849 | esac |
---|
3850 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la |
---|
3851 | LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
---|
3852 | # For backwards non-gettext consistent compatibility... |
---|
3853 | INCLTDL="$LTDLINCL" |
---|
3854 | ]) |
---|
3855 | |
---|
3856 | # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for |
---|
3857 | # the libltdl installable library and LTDLINCL to the include flags for |
---|
3858 | # the libltdl header and adds --enable-ltdl-install to the configure |
---|
3859 | # arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is |
---|
3860 | # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed |
---|
3861 | # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will |
---|
3862 | # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed |
---|
3863 | # with '${top_srcdir}/' (note the single quotes!). If your package is |
---|
3864 | # not flat and you're not using automake, define top_builddir and |
---|
3865 | # top_srcdir appropriately in the Makefiles. |
---|
3866 | # In the future, this macro may have to be called after AC_PROG_LIBTOOL. |
---|
3867 | AC_DEFUN([AC_LIBLTDL_INSTALLABLE], |
---|
3868 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
3869 | AC_CHECK_LIB(ltdl, main, |
---|
3870 | [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], |
---|
3871 | [if test x"$enable_ltdl_install" = xno; then |
---|
3872 | AC_MSG_WARN([libltdl not installed, but installation disabled]) |
---|
3873 | else |
---|
3874 | enable_ltdl_install=yes |
---|
3875 | fi |
---|
3876 | ]) |
---|
3877 | if test x"$enable_ltdl_install" = x"yes"; then |
---|
3878 | ac_configure_args="$ac_configure_args --enable-ltdl-install" |
---|
3879 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la |
---|
3880 | LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
---|
3881 | else |
---|
3882 | ac_configure_args="$ac_configure_args --enable-ltdl-install=no" |
---|
3883 | LIBLTDL="-lltdl" |
---|
3884 | LTDLINCL= |
---|
3885 | fi |
---|
3886 | # For backwards non-gettext consistent compatibility... |
---|
3887 | INCLTDL="$LTDLINCL" |
---|
3888 | ]) |
---|
3889 | |
---|
3890 | # old names |
---|
3891 | AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) |
---|
3892 | AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) |
---|
3893 | AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) |
---|
3894 | AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) |
---|
3895 | AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) |
---|
3896 | AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) |
---|
3897 | AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) |
---|
3898 | |
---|
3899 | # This is just to silence aclocal about the macro not being used |
---|
3900 | ifelse([AC_DISABLE_FAST_INSTALL]) |
---|
3901 | |
---|
3902 | # NOTE: This macro has been submitted for inclusion into # |
---|
3903 | # GNU Autoconf as AC_PROG_SED. When it is available in # |
---|
3904 | # a released version of Autoconf we should remove this # |
---|
3905 | # macro and use it instead. # |
---|
3906 | # LT_AC_PROG_SED |
---|
3907 | # -------------- |
---|
3908 | # Check for a fully-functional sed program, that truncates |
---|
3909 | # as few characters as possible. Prefer GNU sed if found. |
---|
3910 | AC_DEFUN([LT_AC_PROG_SED], |
---|
3911 | [AC_MSG_CHECKING([for a sed that does not truncate output]) |
---|
3912 | AC_CACHE_VAL(lt_cv_path_SED, |
---|
3913 | [# Loop through the user's path and test for sed and gsed. |
---|
3914 | # Then use that list of sed's as ones to test for truncation. |
---|
3915 | as_executable_p="test -f" |
---|
3916 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
---|
3917 | for as_dir in $PATH |
---|
3918 | do |
---|
3919 | IFS=$as_save_IFS |
---|
3920 | test -z "$as_dir" && as_dir=. |
---|
3921 | for ac_prog in sed gsed; do |
---|
3922 | for ac_exec_ext in '' $ac_executable_extensions; do |
---|
3923 | if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then |
---|
3924 | _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext" |
---|
3925 | fi |
---|
3926 | done |
---|
3927 | done |
---|
3928 | done |
---|
3929 | |
---|
3930 | # Create a temporary directory, and hook for its removal unless debugging. |
---|
3931 | $debug || |
---|
3932 | { |
---|
3933 | trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 |
---|
3934 | trap '{ (exit 1); exit 1; }' 1 2 13 15 |
---|
3935 | } |
---|
3936 | |
---|
3937 | # Create a (secure) tmp directory for tmp files. |
---|
3938 | : ${TMPDIR=/tmp} |
---|
3939 | { |
---|
3940 | tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` && |
---|
3941 | test -n "$tmp" && test -d "$tmp" |
---|
3942 | } || |
---|
3943 | { |
---|
3944 | tmp=$TMPDIR/sed$$-$RANDOM |
---|
3945 | (umask 077 && mkdir $tmp) |
---|
3946 | } || |
---|
3947 | { |
---|
3948 | echo "$me: cannot create a temporary directory in $TMPDIR" >&2 |
---|
3949 | { (exit 1); exit 1; } |
---|
3950 | } |
---|
3951 | _max=0 |
---|
3952 | _count=0 |
---|
3953 | # Add /usr/xpg4/bin/sed as it is typically found on Solaris |
---|
3954 | # along with /bin/sed that truncates output. |
---|
3955 | for _sed in $_sed_list /usr/xpg4/bin/sed; do |
---|
3956 | test ! -f ${_sed} && break |
---|
3957 | cat /dev/null > "$tmp/sed.in" |
---|
3958 | _count=0 |
---|
3959 | echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in" |
---|
3960 | # Check for GNU sed and select it if it is found. |
---|
3961 | if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then |
---|
3962 | lt_cv_path_SED=${_sed} |
---|
3963 | break |
---|
3964 | fi |
---|
3965 | while true; do |
---|
3966 | cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp" |
---|
3967 | mv "$tmp/sed.tmp" "$tmp/sed.in" |
---|
3968 | cp "$tmp/sed.in" "$tmp/sed.nl" |
---|
3969 | echo >>"$tmp/sed.nl" |
---|
3970 | ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break |
---|
3971 | cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break |
---|
3972 | # 40000 chars as input seems more than enough |
---|
3973 | test $_count -gt 10 && break |
---|
3974 | _count=`expr $_count + 1` |
---|
3975 | if test $_count -gt $_max; then |
---|
3976 | _max=$_count |
---|
3977 | lt_cv_path_SED=$_sed |
---|
3978 | fi |
---|
3979 | done |
---|
3980 | done |
---|
3981 | rm -rf "$tmp" |
---|
3982 | ]) |
---|
3983 | if test "X$SED" != "X"; then |
---|
3984 | lt_cv_path_SED=$SED |
---|
3985 | else |
---|
3986 | SED=$lt_cv_path_SED |
---|
3987 | fi |
---|
3988 | AC_MSG_RESULT([$SED]) |
---|
3989 | ]) |
---|
3990 | |
---|
3991 | dnl AM_PATH_ORBIT2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) |
---|
3992 | dnl Test for ORBit2, and define ORBIT_CFLAGS and ORBIT_LIBS |
---|
3993 | dnl |
---|
3994 | AC_DEFUN(AM_PATH_ORBIT2, |
---|
3995 | [dnl |
---|
3996 | dnl Get the cflags and libraries from the orbit2-config script |
---|
3997 | dnl |
---|
3998 | AC_ARG_WITH(orbit-prefix,[ --with-orbit-prefix=PFX Prefix where ORBIT is installed (optional)], |
---|
3999 | orbit_config_prefix="$withval", orbit_config_prefix="") |
---|
4000 | AC_ARG_WITH(orbit-exec-prefix,[ --with-orbit-exec-prefix=PFX Exec prefix where ORBIT is installed (optional)], |
---|
4001 | orbit_config_exec_prefix="$withval", orbit_config_exec_prefix="") |
---|
4002 | AC_ARG_ENABLE(orbittest, [ --disable-orbittest Do not try to compile and run a test ORBIT program], |
---|
4003 | , enable_orbittest=yes) |
---|
4004 | |
---|
4005 | for module in . $4 |
---|
4006 | do |
---|
4007 | case "$module" in |
---|
4008 | server) |
---|
4009 | orbit_config_args="$orbit_config_args server" |
---|
4010 | ;; |
---|
4011 | client) |
---|
4012 | orbit_config_args="$orbit_config_args client" |
---|
4013 | ;; |
---|
4014 | esac |
---|
4015 | done |
---|
4016 | if test x$orbit_config_args = x ; then |
---|
4017 | orbit_config_args=server |
---|
4018 | fi |
---|
4019 | |
---|
4020 | if test x$orbit_config_exec_prefix != x ; then |
---|
4021 | orbit_config_args="$orbit_config_args --exec-prefix=$orbit_config_exec_prefix" |
---|
4022 | if test x${ORBIT_CONFIG+set} != xset ; then |
---|
4023 | ORBIT_CONFIG=$orbit_config_exec_prefix/bin/orbit2-config |
---|
4024 | fi |
---|
4025 | fi |
---|
4026 | if test x$orbit_config_prefix != x ; then |
---|
4027 | orbit_config_args="$orbit_config_args --prefix=$orbit_config_prefix" |
---|
4028 | if test x${ORBIT_CONFIG+set} != xset ; then |
---|
4029 | ORBIT_CONFIG=$orbit_config_prefix/bin/orbit2-config |
---|
4030 | fi |
---|
4031 | fi |
---|
4032 | |
---|
4033 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
---|
4034 | AC_PATH_PROG(ORBIT_CONFIG, orbit2-config, no) |
---|
4035 | min_orbit_version=ifelse([$1], , 2.3.0, $1) |
---|
4036 | AC_MSG_CHECKING(for ORBit - version >= $min_orbit_version) |
---|
4037 | no_orbit="" |
---|
4038 | if test "$ORBIT_CONFIG" = "no" ; then |
---|
4039 | no_orbit=yes |
---|
4040 | else |
---|
4041 | ORBIT_CFLAGS=`$ORBIT_CONFIG $orbit_config_args --cflags` |
---|
4042 | ORBIT_LIBS=`$ORBIT_CONFIG $orbit_config_args --libs` |
---|
4043 | ORBIT_VERSION=`$PKG_CONFIG --modversion ORBit-2.0` |
---|
4044 | orbit_config_major_version=`echo $ORBIT_VERSION | \ |
---|
4045 | sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` |
---|
4046 | orbit_config_minor_version=`echo $ORBIT_VERSION | \ |
---|
4047 | sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` |
---|
4048 | orbit_config_micro_version=`echo $ORBIT_VERSION | \ |
---|
4049 | sed -e 's,[[^0-9.]],,g' -e 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` |
---|
4050 | if test "x$enable_orbittest" = "xyes" ; then |
---|
4051 | ac_save_CFLAGS="$CFLAGS" |
---|
4052 | ac_save_LIBS="$LIBS" |
---|
4053 | CFLAGS="$CFLAGS $ORBIT_CFLAGS" |
---|
4054 | LIBS="$ORBIT_LIBS $LIBS" |
---|
4055 | dnl |
---|
4056 | dnl Now check if the installed ORBIT is sufficiently new. (Also sanity |
---|
4057 | dnl checks the results of orbit2-config to some extent |
---|
4058 | dnl |
---|
4059 | rm -f conf.orbittest |
---|
4060 | AC_TRY_RUN([ |
---|
4061 | #include <orbit/orbit.h> |
---|
4062 | #include <stdio.h> |
---|
4063 | #include <stdlib.h> |
---|
4064 | |
---|
4065 | int |
---|
4066 | main () |
---|
4067 | { |
---|
4068 | int major, minor, micro; |
---|
4069 | char *tmp_version; |
---|
4070 | |
---|
4071 | system ("touch conf.orbittest"); |
---|
4072 | |
---|
4073 | /* HP/UX 9 (%@#!) writes to sscanf strings */ |
---|
4074 | tmp_version = g_strdup("$min_orbit_version"); |
---|
4075 | if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { |
---|
4076 | printf("%s, bad version string\n", "$min_orbit_version"); |
---|
4077 | exit(1); |
---|
4078 | } |
---|
4079 | |
---|
4080 | if ((orbit_major_version != $orbit_config_major_version) || |
---|
4081 | (orbit_minor_version != $orbit_config_minor_version) || |
---|
4082 | (orbit_micro_version != $orbit_config_micro_version)) |
---|
4083 | { |
---|
4084 | printf("\n*** 'pkg-config --version ORBit-2.0' returned %d.%d.%d, but ORBit (%d.%d.%d)\n", |
---|
4085 | $orbit_config_major_version, $orbit_config_minor_version, $orbit_config_micro_version, |
---|
4086 | orbit_major_version, orbit_minor_version, orbit_micro_version); |
---|
4087 | printf ("*** was found! If orbit2-config was correct, then it is best\n"); |
---|
4088 | printf ("*** to remove the old version of ORBit. You may also be able to fix the error\n"); |
---|
4089 | printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); |
---|
4090 | printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); |
---|
4091 | printf("*** required on your system.\n"); |
---|
4092 | printf("*** If orbit2-config was wrong, set the environment variable ORBIT_CONFIG\n"); |
---|
4093 | printf("*** to point to the correct copy of orbit2-config, and remove the file config.cache\n"); |
---|
4094 | printf("*** before re-running configure\n"); |
---|
4095 | } |
---|
4096 | #if defined (ORBIT_MAJOR_VERSION) && defined (ORBIT_MINOR_VERSION) && defined (ORBIT_MICRO_VERSION) |
---|
4097 | else if ((orbit_major_version != ORBIT_MAJOR_VERSION) || |
---|
4098 | (orbit_minor_version != ORBIT_MINOR_VERSION) || |
---|
4099 | (orbit_micro_version != ORBIT_MICRO_VERSION)) |
---|
4100 | { |
---|
4101 | printf("*** ORBit header files (version %d.%d.%d) do not match\n", |
---|
4102 | ORBIT_MAJOR_VERSION, ORBIT_MINOR_VERSION, ORBIT_MICRO_VERSION); |
---|
4103 | printf("*** library (version %d.%d.%d)\n", |
---|
4104 | orbit_major_version, orbit_minor_version, orbit_micro_version); |
---|
4105 | } |
---|
4106 | #endif /* defined (ORBIT_MAJOR_VERSION) ... */ |
---|
4107 | else |
---|
4108 | { |
---|
4109 | if ((orbit_major_version > major) || |
---|
4110 | ((orbit_major_version == major) && (orbit_minor_version > minor)) || |
---|
4111 | ((orbit_major_version == major) && (orbit_minor_version == minor) && (orbit_micro_version >= micro))) |
---|
4112 | { |
---|
4113 | return 0; |
---|
4114 | } |
---|
4115 | else |
---|
4116 | { |
---|
4117 | printf("\n*** An old version of ORBit (%d.%d.%d) was found.\n", |
---|
4118 | orbit_major_version, orbit_minor_version, orbit_micro_version); |
---|
4119 | printf("*** You need a version of ORBit newer than %d.%d.%d. The latest version of\n", |
---|
4120 | major, minor, micro); |
---|
4121 | printf("*** ORBit is always available from ftp://ftp.orbit.org.\n"); |
---|
4122 | printf("***\n"); |
---|
4123 | printf("*** If you have already installed a sufficiently new version, this error\n"); |
---|
4124 | printf("*** probably means that the wrong copy of the orbit2-config shell script is\n"); |
---|
4125 | printf("*** being found. The easiest way to fix this is to remove the old version\n"); |
---|
4126 | printf("*** of ORBit, but you can also set the ORBIT_CONFIG environment to point to the\n"); |
---|
4127 | printf("*** correct copy of orbit2-config. (In this case, you will have to\n"); |
---|
4128 | printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); |
---|
4129 | printf("*** so that the correct libraries are found at run-time))\n"); |
---|
4130 | } |
---|
4131 | } |
---|
4132 | return 1; |
---|
4133 | } |
---|
4134 | ],, no_orbit=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) |
---|
4135 | CFLAGS="$ac_save_CFLAGS" |
---|
4136 | LIBS="$ac_save_LIBS" |
---|
4137 | fi |
---|
4138 | fi |
---|
4139 | if test "x$no_orbit" = x ; then |
---|
4140 | AC_MSG_RESULT(yes) |
---|
4141 | ifelse([$2], , :, [$2]) |
---|
4142 | else |
---|
4143 | AC_MSG_RESULT(no) |
---|
4144 | if test "$ORBIT_CONFIG" = "no" ; then |
---|
4145 | echo "*** The orbit2-config script installed by ORBIT could not be found" |
---|
4146 | echo "*** If ORBit was installed in PREFIX, make sure PREFIX/bin is in" |
---|
4147 | echo "*** your path, or set the ORBIT_CONFIG environment variable to the" |
---|
4148 | echo "*** full path to orbit2-config." |
---|
4149 | else |
---|
4150 | if test -f conf.orbittest ; then |
---|
4151 | : |
---|
4152 | else |
---|
4153 | echo "*** Could not run ORBIT test program, checking why..." |
---|
4154 | CFLAGS="$CFLAGS $ORBIT_CFLAGS" |
---|
4155 | LIBS="$LIBS $ORBIT_LIBS" |
---|
4156 | AC_TRY_LINK([ |
---|
4157 | #include <orbit/orbit.h> |
---|
4158 | #include <stdio.h> |
---|
4159 | ], [ return ((orbit_major_version) || (orbit_minor_version) || (orbit_micro_version)); ], |
---|
4160 | [ echo "*** The test program compiled, but did not run. This usually means" |
---|
4161 | echo "*** that the run-time linker is not finding ORBit or finding the wrong" |
---|
4162 | echo "*** version of ORBit. If it is not finding ORBit, you'll need to set your" |
---|
4163 | echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" |
---|
4164 | echo "*** to the installed location Also, make sure you have run ldconfig if that" |
---|
4165 | echo "*** is required on your system" |
---|
4166 | echo "***" |
---|
4167 | echo "*** If you have an old version installed, it is best to remove it, although" |
---|
4168 | echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" |
---|
4169 | echo "***" |
---|
4170 | echo "*** If you have a RedHat 5.0 system, you should remove the ORBit package that" |
---|
4171 | echo "*** came with the system with the command" |
---|
4172 | echo "***" |
---|
4173 | echo "*** rpm --erase --nodeps orbit orbit-devel" ], |
---|
4174 | [ echo "*** The test program failed to compile or link. See the file config.log for the" |
---|
4175 | echo "*** exact error that occured. This usually means ORBIT was incorrectly installed" |
---|
4176 | echo "*** or that you have moved ORBit since it was installed. In the latter case, you" |
---|
4177 | echo "*** may want to edit the orbit2-config script: $ORBIT_CONFIG" ]) |
---|
4178 | CFLAGS="$ac_save_CFLAGS" |
---|
4179 | LIBS="$ac_save_LIBS" |
---|
4180 | fi |
---|
4181 | fi |
---|
4182 | ORBIT_CFLAGS="" |
---|
4183 | ORBIT_LIBS="" |
---|
4184 | ifelse([$3], , :, [$3]) |
---|
4185 | fi |
---|
4186 | |
---|
4187 | AC_PATH_PROG(ORBIT_IDL, orbit-idl-2, ifelse([$3], , :, [$3])) |
---|
4188 | AC_SUBST(ORBIT_CFLAGS) |
---|
4189 | AC_SUBST(ORBIT_LIBS) |
---|
4190 | AC_SUBST(ORBIT_IDL) |
---|
4191 | rm -f conf.orbittest |
---|
4192 | ]) |
---|
4193 | |
---|
4194 | # Configure paths for GLIB |
---|
4195 | # Owen Taylor 1997-2001 |
---|
4196 | |
---|
4197 | dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) |
---|
4198 | dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject or |
---|
4199 | dnl gthread is specified in MODULES, pass to pkg-config |
---|
4200 | dnl |
---|
4201 | AC_DEFUN(AM_PATH_GLIB_2_0, |
---|
4202 | [dnl |
---|
4203 | dnl Get the cflags and libraries from pkg-config |
---|
4204 | dnl |
---|
4205 | AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program], |
---|
4206 | , enable_glibtest=yes) |
---|
4207 | |
---|
4208 | pkg_config_args=glib-2.0 |
---|
4209 | for module in . $4 |
---|
4210 | do |
---|
4211 | case "$module" in |
---|
4212 | gmodule) |
---|
4213 | pkg_config_args="$pkg_config_args gmodule-2.0" |
---|
4214 | ;; |
---|
4215 | gobject) |
---|
4216 | pkg_config_args="$pkg_config_args gobject-2.0" |
---|
4217 | ;; |
---|
4218 | gthread) |
---|
4219 | pkg_config_args="$pkg_config_args gthread-2.0" |
---|
4220 | ;; |
---|
4221 | esac |
---|
4222 | done |
---|
4223 | |
---|
4224 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
---|
4225 | |
---|
4226 | no_glib="" |
---|
4227 | |
---|
4228 | if test x$PKG_CONFIG != xno ; then |
---|
4229 | if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then |
---|
4230 | : |
---|
4231 | else |
---|
4232 | echo *** pkg-config too old; version 0.7 or better required. |
---|
4233 | no_glib=yes |
---|
4234 | PKG_CONFIG=no |
---|
4235 | fi |
---|
4236 | else |
---|
4237 | no_glib=yes |
---|
4238 | fi |
---|
4239 | |
---|
4240 | min_glib_version=ifelse([$1], ,2.0.0,$1) |
---|
4241 | AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) |
---|
4242 | |
---|
4243 | if test x$PKG_CONFIG != xno ; then |
---|
4244 | ## don't try to run the test against uninstalled libtool libs |
---|
4245 | if $PKG_CONFIG --uninstalled $pkg_config_args; then |
---|
4246 | echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH" |
---|
4247 | enable_glibtest=no |
---|
4248 | fi |
---|
4249 | |
---|
4250 | if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then |
---|
4251 | : |
---|
4252 | else |
---|
4253 | no_glib=yes |
---|
4254 | fi |
---|
4255 | fi |
---|
4256 | |
---|
4257 | if test x"$no_glib" = x ; then |
---|
4258 | GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` |
---|
4259 | GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0` |
---|
4260 | GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` |
---|
4261 | |
---|
4262 | GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args` |
---|
4263 | GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args` |
---|
4264 | glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \ |
---|
4265 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` |
---|
4266 | glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \ |
---|
4267 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` |
---|
4268 | glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \ |
---|
4269 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` |
---|
4270 | if test "x$enable_glibtest" = "xyes" ; then |
---|
4271 | ac_save_CFLAGS="$CFLAGS" |
---|
4272 | ac_save_LIBS="$LIBS" |
---|
4273 | CFLAGS="$CFLAGS $GLIB_CFLAGS" |
---|
4274 | LIBS="$GLIB_LIBS $LIBS" |
---|
4275 | dnl |
---|
4276 | dnl Now check if the installed GLIB is sufficiently new. (Also sanity |
---|
4277 | dnl checks the results of pkg-config to some extent) |
---|
4278 | dnl |
---|
4279 | rm -f conf.glibtest |
---|
4280 | AC_TRY_RUN([ |
---|
4281 | #include <glib.h> |
---|
4282 | #include <stdio.h> |
---|
4283 | #include <stdlib.h> |
---|
4284 | |
---|
4285 | int |
---|
4286 | main () |
---|
4287 | { |
---|
4288 | int major, minor, micro; |
---|
4289 | char *tmp_version; |
---|
4290 | |
---|
4291 | system ("touch conf.glibtest"); |
---|
4292 | |
---|
4293 | /* HP/UX 9 (%@#!) writes to sscanf strings */ |
---|
4294 | tmp_version = g_strdup("$min_glib_version"); |
---|
4295 | if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { |
---|
4296 | printf("%s, bad version string\n", "$min_glib_version"); |
---|
4297 | exit(1); |
---|
4298 | } |
---|
4299 | |
---|
4300 | if ((glib_major_version != $glib_config_major_version) || |
---|
4301 | (glib_minor_version != $glib_config_minor_version) || |
---|
4302 | (glib_micro_version != $glib_config_micro_version)) |
---|
4303 | { |
---|
4304 | printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", |
---|
4305 | $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, |
---|
4306 | glib_major_version, glib_minor_version, glib_micro_version); |
---|
4307 | printf ("*** was found! If pkg-config was correct, then it is best\n"); |
---|
4308 | printf ("*** to remove the old version of GLib. You may also be able to fix the error\n"); |
---|
4309 | printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); |
---|
4310 | printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); |
---|
4311 | printf("*** required on your system.\n"); |
---|
4312 | printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); |
---|
4313 | printf("*** to point to the correct configuration files\n"); |
---|
4314 | } |
---|
4315 | else if ((glib_major_version != GLIB_MAJOR_VERSION) || |
---|
4316 | (glib_minor_version != GLIB_MINOR_VERSION) || |
---|
4317 | (glib_micro_version != GLIB_MICRO_VERSION)) |
---|
4318 | { |
---|
4319 | printf("*** GLIB header files (version %d.%d.%d) do not match\n", |
---|
4320 | GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); |
---|
4321 | printf("*** library (version %d.%d.%d)\n", |
---|
4322 | glib_major_version, glib_minor_version, glib_micro_version); |
---|
4323 | } |
---|
4324 | else |
---|
4325 | { |
---|
4326 | if ((glib_major_version > major) || |
---|
4327 | ((glib_major_version == major) && (glib_minor_version > minor)) || |
---|
4328 | ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) |
---|
4329 | { |
---|
4330 | return 0; |
---|
4331 | } |
---|
4332 | else |
---|
4333 | { |
---|
4334 | printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", |
---|
4335 | glib_major_version, glib_minor_version, glib_micro_version); |
---|
4336 | printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", |
---|
4337 | major, minor, micro); |
---|
4338 | printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); |
---|
4339 | printf("***\n"); |
---|
4340 | printf("*** If you have already installed a sufficiently new version, this error\n"); |
---|
4341 | printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); |
---|
4342 | printf("*** being found. The easiest way to fix this is to remove the old version\n"); |
---|
4343 | printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n"); |
---|
4344 | printf("*** correct copy of pkg-config. (In this case, you will have to\n"); |
---|
4345 | printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); |
---|
4346 | printf("*** so that the correct libraries are found at run-time))\n"); |
---|
4347 | } |
---|
4348 | } |
---|
4349 | return 1; |
---|
4350 | } |
---|
4351 | ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) |
---|
4352 | CFLAGS="$ac_save_CFLAGS" |
---|
4353 | LIBS="$ac_save_LIBS" |
---|
4354 | fi |
---|
4355 | fi |
---|
4356 | if test "x$no_glib" = x ; then |
---|
4357 | AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)) |
---|
4358 | ifelse([$2], , :, [$2]) |
---|
4359 | else |
---|
4360 | AC_MSG_RESULT(no) |
---|
4361 | if test "$PKG_CONFIG" = "no" ; then |
---|
4362 | echo "*** A new enough version of pkg-config was not found." |
---|
4363 | echo "*** See http://www.freedesktop.org/software/pkgconfig/" |
---|
4364 | else |
---|
4365 | if test -f conf.glibtest ; then |
---|
4366 | : |
---|
4367 | else |
---|
4368 | echo "*** Could not run GLIB test program, checking why..." |
---|
4369 | ac_save_CFLAGS="$CFLAGS" |
---|
4370 | ac_save_LIBS="$LIBS" |
---|
4371 | CFLAGS="$CFLAGS $GLIB_CFLAGS" |
---|
4372 | LIBS="$LIBS $GLIB_LIBS" |
---|
4373 | AC_TRY_LINK([ |
---|
4374 | #include <glib.h> |
---|
4375 | #include <stdio.h> |
---|
4376 | ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], |
---|
4377 | [ echo "*** The test program compiled, but did not run. This usually means" |
---|
4378 | echo "*** that the run-time linker is not finding GLIB or finding the wrong" |
---|
4379 | echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" |
---|
4380 | echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" |
---|
4381 | echo "*** to the installed location Also, make sure you have run ldconfig if that" |
---|
4382 | echo "*** is required on your system" |
---|
4383 | echo "***" |
---|
4384 | echo "*** If you have an old version installed, it is best to remove it, although" |
---|
4385 | echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], |
---|
4386 | [ echo "*** The test program failed to compile or link. See the file config.log for the" |
---|
4387 | echo "*** exact error that occured. This usually means GLIB is incorrectly installed."]) |
---|
4388 | CFLAGS="$ac_save_CFLAGS" |
---|
4389 | LIBS="$ac_save_LIBS" |
---|
4390 | fi |
---|
4391 | fi |
---|
4392 | GLIB_CFLAGS="" |
---|
4393 | GLIB_LIBS="" |
---|
4394 | GLIB_GENMARSHAL="" |
---|
4395 | GOBJECT_QUERY="" |
---|
4396 | GLIB_MKENUMS="" |
---|
4397 | ifelse([$3], , :, [$3]) |
---|
4398 | fi |
---|
4399 | AC_SUBST(GLIB_CFLAGS) |
---|
4400 | AC_SUBST(GLIB_LIBS) |
---|
4401 | AC_SUBST(GLIB_GENMARSHAL) |
---|
4402 | AC_SUBST(GOBJECT_QUERY) |
---|
4403 | AC_SUBST(GLIB_MKENUMS) |
---|
4404 | rm -f conf.glibtest |
---|
4405 | ]) |
---|
4406 | |
---|
4407 | # Macro to add for using GNU gettext. |
---|
4408 | # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996 |
---|
4409 | # |
---|
4410 | # Modified to never use included libintl. |
---|
4411 | # Owen Taylor <otaylor@redhat.com>, 12/15/1998 |
---|
4412 | # |
---|
4413 | # Major rework to remove unused code |
---|
4414 | # Owen Taylor <otaylor@redhat.com>, 12/11/2002 |
---|
4415 | # |
---|
4416 | # This file can be copied and used freely without restrictions. It can |
---|
4417 | # be used in projects which are not available under the GNU Public License |
---|
4418 | # but which still want to provide support for the GNU gettext functionality. |
---|
4419 | # |
---|
4420 | |
---|
4421 | # |
---|
4422 | # We need this here as well, since someone might use autoconf-2.5x |
---|
4423 | # to configure GLib then an older version to configure a package |
---|
4424 | # using AM_GLIB_GNU_GETTEXT |
---|
4425 | AC_PREREQ(2.53) |
---|
4426 | |
---|
4427 | dnl |
---|
4428 | dnl We go to great lengths to make sure that aclocal won't |
---|
4429 | dnl try to pull in the installed version of these macros |
---|
4430 | dnl when running aclocal in the glib directory. |
---|
4431 | dnl |
---|
4432 | m4_copy([AC_DEFUN],[glib_DEFUN]) |
---|
4433 | m4_copy([AC_REQUIRE],[glib_REQUIRE]) |
---|
4434 | dnl |
---|
4435 | dnl At the end, if we're not within glib, we'll define the public |
---|
4436 | dnl definitions in terms of our private definitions. |
---|
4437 | dnl |
---|
4438 | |
---|
4439 | # GLIB_LC_MESSAGES |
---|
4440 | #-------------------- |
---|
4441 | glib_DEFUN([GLIB_LC_MESSAGES], |
---|
4442 | [AC_CHECK_HEADERS([locale.h]) |
---|
4443 | if test $ac_cv_header_locale_h = yes; then |
---|
4444 | AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, |
---|
4445 | [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], |
---|
4446 | am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) |
---|
4447 | if test $am_cv_val_LC_MESSAGES = yes; then |
---|
4448 | AC_DEFINE(HAVE_LC_MESSAGES, 1, |
---|
4449 | [Define if your <locale.h> file defines LC_MESSAGES.]) |
---|
4450 | fi |
---|
4451 | fi]) |
---|
4452 | |
---|
4453 | # GLIB_PATH_PROG_WITH_TEST |
---|
4454 | #---------------------------- |
---|
4455 | dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, |
---|
4456 | dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) |
---|
4457 | glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], |
---|
4458 | [# Extract the first word of "$2", so it can be a program name with args. |
---|
4459 | set dummy $2; ac_word=[$]2 |
---|
4460 | AC_MSG_CHECKING([for $ac_word]) |
---|
4461 | AC_CACHE_VAL(ac_cv_path_$1, |
---|
4462 | [case "[$]$1" in |
---|
4463 | /*) |
---|
4464 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path. |
---|
4465 | ;; |
---|
4466 | *) |
---|
4467 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
---|
4468 | for ac_dir in ifelse([$5], , $PATH, [$5]); do |
---|
4469 | test -z "$ac_dir" && ac_dir=. |
---|
4470 | if test -f $ac_dir/$ac_word; then |
---|
4471 | if [$3]; then |
---|
4472 | ac_cv_path_$1="$ac_dir/$ac_word" |
---|
4473 | break |
---|
4474 | fi |
---|
4475 | fi |
---|
4476 | done |
---|
4477 | IFS="$ac_save_ifs" |
---|
4478 | dnl If no 4th arg is given, leave the cache variable unset, |
---|
4479 | dnl so AC_PATH_PROGS will keep looking. |
---|
4480 | ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" |
---|
4481 | ])dnl |
---|
4482 | ;; |
---|
4483 | esac])dnl |
---|
4484 | $1="$ac_cv_path_$1" |
---|
4485 | if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then |
---|
4486 | AC_MSG_RESULT([$]$1) |
---|
4487 | else |
---|
4488 | AC_MSG_RESULT(no) |
---|
4489 | fi |
---|
4490 | AC_SUBST($1)dnl |
---|
4491 | ]) |
---|
4492 | |
---|
4493 | # GLIB_WITH_NLS |
---|
4494 | #----------------- |
---|
4495 | glib_DEFUN([GLIB_WITH_NLS], |
---|
4496 | dnl NLS is obligatory |
---|
4497 | [USE_NLS=yes |
---|
4498 | AC_SUBST(USE_NLS) |
---|
4499 | |
---|
4500 | gt_cv_have_gettext=no |
---|
4501 | |
---|
4502 | CATOBJEXT=NONE |
---|
4503 | XGETTEXT=: |
---|
4504 | INTLLIBS= |
---|
4505 | |
---|
4506 | AC_CHECK_HEADER(libintl.h, |
---|
4507 | [gt_cv_func_dgettext_libintl="no" |
---|
4508 | libintl_extra_libs="" |
---|
4509 | |
---|
4510 | # |
---|
4511 | # First check in libc |
---|
4512 | # |
---|
4513 | AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, |
---|
4514 | [AC_TRY_LINK([ |
---|
4515 | #include <libintl.h> |
---|
4516 | ], |
---|
4517 | [return (int) dgettext ("","")], |
---|
4518 | gt_cv_func_dgettext_libc=yes, |
---|
4519 | gt_cv_func_dgettext_libc=no) |
---|
4520 | ]) |
---|
4521 | |
---|
4522 | if test "$gt_cv_func_dgettext_libc" = "yes" ; then |
---|
4523 | AC_CHECK_FUNCS(bind_textdomain_codeset) |
---|
4524 | fi |
---|
4525 | |
---|
4526 | # |
---|
4527 | # If we don't have everything we want, check in libintl |
---|
4528 | # |
---|
4529 | if test "$gt_cv_func_dgettext_libc" != "yes" \ |
---|
4530 | || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then |
---|
4531 | |
---|
4532 | AC_CHECK_LIB(intl, bindtextdomain, |
---|
4533 | [AC_CHECK_LIB(intl, dgettext, |
---|
4534 | gt_cv_func_dgettext_libintl=yes)]) |
---|
4535 | |
---|
4536 | if test "$gt_cv_func_dgettext_libintl" != "yes" ; then |
---|
4537 | AC_MSG_CHECKING([if -liconv is needed to use gettext]) |
---|
4538 | AC_MSG_RESULT([]) |
---|
4539 | AC_CHECK_LIB(intl, dcgettext, |
---|
4540 | [gt_cv_func_dgettext_libintl=yes |
---|
4541 | libintl_extra_libs=-liconv], |
---|
4542 | :,-liconv) |
---|
4543 | fi |
---|
4544 | |
---|
4545 | # |
---|
4546 | # If we found libintl, then check in it for bind_textdomain_codeset(); |
---|
4547 | # we'll prefer libc if neither have bind_textdomain_codeset(), |
---|
4548 | # and both have dgettext |
---|
4549 | # |
---|
4550 | if test "$gt_cv_func_dgettext_libintl" = "yes" ; then |
---|
4551 | glib_save_LIBS="$LIBS" |
---|
4552 | LIBS="$LIBS -lintl $libintl_extra_libs" |
---|
4553 | unset ac_cv_func_bind_textdomain_codeset |
---|
4554 | AC_CHECK_FUNCS(bind_textdomain_codeset) |
---|
4555 | LIBS="$glib_save_LIBS" |
---|
4556 | |
---|
4557 | if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then |
---|
4558 | gt_cv_func_dgettext_libc=no |
---|
4559 | else |
---|
4560 | if test "$gt_cv_func_dgettext_libc" = "yes"; then |
---|
4561 | gt_cv_func_dgettext_libintl=no |
---|
4562 | fi |
---|
4563 | fi |
---|
4564 | fi |
---|
4565 | fi |
---|
4566 | |
---|
4567 | if test "$gt_cv_func_dgettext_libc" = "yes" \ |
---|
4568 | || test "$gt_cv_func_dgettext_libintl" = "yes"; then |
---|
4569 | gt_cv_have_gettext=yes |
---|
4570 | fi |
---|
4571 | |
---|
4572 | if test "$gt_cv_func_dgettext_libintl" = "yes"; then |
---|
4573 | INTLLIBS="-lintl $libintl_extra_libs" |
---|
4574 | fi |
---|
4575 | |
---|
4576 | if test "$gt_cv_have_gettext" = "yes"; then |
---|
4577 | AC_DEFINE(HAVE_GETTEXT,1, |
---|
4578 | [Define if the GNU gettext() function is already present or preinstalled.]) |
---|
4579 | GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, |
---|
4580 | [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl |
---|
4581 | if test "$MSGFMT" != "no"; then |
---|
4582 | AC_CHECK_FUNCS(dcgettext) |
---|
4583 | AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) |
---|
4584 | GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, |
---|
4585 | [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) |
---|
4586 | AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; |
---|
4587 | return _nl_msg_cat_cntr], |
---|
4588 | [CATOBJEXT=.gmo |
---|
4589 | DATADIRNAME=share], |
---|
4590 | [CATOBJEXT=.mo |
---|
4591 | DATADIRNAME=lib]) |
---|
4592 | INSTOBJEXT=.mo |
---|
4593 | fi |
---|
4594 | fi |
---|
4595 | ]) |
---|
4596 | |
---|
4597 | if test "$gt_cv_have_gettext" = "yes" ; then |
---|
4598 | AC_DEFINE(ENABLE_NLS, 1, |
---|
4599 | [always defined to indicate that i18n is enabled]) |
---|
4600 | fi |
---|
4601 | |
---|
4602 | dnl Test whether we really found GNU xgettext. |
---|
4603 | if test "$XGETTEXT" != ":"; then |
---|
4604 | dnl If it is not GNU xgettext we define it as : so that the |
---|
4605 | dnl Makefiles still can work. |
---|
4606 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then |
---|
4607 | : ; |
---|
4608 | else |
---|
4609 | AC_MSG_RESULT( |
---|
4610 | [found xgettext program is not GNU xgettext; ignore it]) |
---|
4611 | XGETTEXT=":" |
---|
4612 | fi |
---|
4613 | fi |
---|
4614 | |
---|
4615 | # We need to process the po/ directory. |
---|
4616 | POSUB=po |
---|
4617 | |
---|
4618 | AC_OUTPUT_COMMANDS( |
---|
4619 | [case "$CONFIG_FILES" in *po/Makefile.in*) |
---|
4620 | sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile |
---|
4621 | esac]) |
---|
4622 | |
---|
4623 | dnl These rules are solely for the distribution goal. While doing this |
---|
4624 | dnl we only have to keep exactly one list of the available catalogs |
---|
4625 | dnl in configure.in. |
---|
4626 | for lang in $ALL_LINGUAS; do |
---|
4627 | GMOFILES="$GMOFILES $lang.gmo" |
---|
4628 | POFILES="$POFILES $lang.po" |
---|
4629 | done |
---|
4630 | |
---|
4631 | dnl Make all variables we use known to autoconf. |
---|
4632 | AC_SUBST(CATALOGS) |
---|
4633 | AC_SUBST(CATOBJEXT) |
---|
4634 | AC_SUBST(DATADIRNAME) |
---|
4635 | AC_SUBST(GMOFILES) |
---|
4636 | AC_SUBST(INSTOBJEXT) |
---|
4637 | AC_SUBST(INTLLIBS) |
---|
4638 | AC_SUBST(PO_IN_DATADIR_TRUE) |
---|
4639 | AC_SUBST(PO_IN_DATADIR_FALSE) |
---|
4640 | AC_SUBST(POFILES) |
---|
4641 | AC_SUBST(POSUB) |
---|
4642 | ]) |
---|
4643 | |
---|
4644 | # AM_GLIB_GNU_GETTEXT |
---|
4645 | # ------------------- |
---|
4646 | # Do checks necessary for use of gettext. If a suitable implementation |
---|
4647 | # of gettext is found in either in libintl or in the C library, |
---|
4648 | # it will set INTLLIBS to the libraries needed for use of gettext |
---|
4649 | # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable |
---|
4650 | # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() |
---|
4651 | # on various variables needed by the Makefile.in.in installed by |
---|
4652 | # glib-gettextize. |
---|
4653 | dnl |
---|
4654 | glib_DEFUN(GLIB_GNU_GETTEXT, |
---|
4655 | [AC_REQUIRE([AC_PROG_CC])dnl |
---|
4656 | AC_REQUIRE([AC_HEADER_STDC])dnl |
---|
4657 | |
---|
4658 | GLIB_LC_MESSAGES |
---|
4659 | GLIB_WITH_NLS |
---|
4660 | |
---|
4661 | if test "$gt_cv_have_gettext" = "yes"; then |
---|
4662 | if test "x$ALL_LINGUAS" = "x"; then |
---|
4663 | LINGUAS= |
---|
4664 | else |
---|
4665 | AC_MSG_CHECKING(for catalogs to be installed) |
---|
4666 | NEW_LINGUAS= |
---|
4667 | for lang in ${LINGUAS=$ALL_LINGUAS}; do |
---|
4668 | case "$ALL_LINGUAS" in |
---|
4669 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; |
---|
4670 | esac |
---|
4671 | done |
---|
4672 | LINGUAS=$NEW_LINGUAS |
---|
4673 | AC_MSG_RESULT($LINGUAS) |
---|
4674 | fi |
---|
4675 | |
---|
4676 | dnl Construct list of names of catalog files to be constructed. |
---|
4677 | if test -n "$LINGUAS"; then |
---|
4678 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done |
---|
4679 | fi |
---|
4680 | fi |
---|
4681 | |
---|
4682 | dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly |
---|
4683 | dnl find the mkinstalldirs script in another subdir but ($top_srcdir). |
---|
4684 | dnl Try to locate is. |
---|
4685 | MKINSTALLDIRS= |
---|
4686 | if test -n "$ac_aux_dir"; then |
---|
4687 | MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" |
---|
4688 | fi |
---|
4689 | if test -z "$MKINSTALLDIRS"; then |
---|
4690 | MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" |
---|
4691 | fi |
---|
4692 | AC_SUBST(MKINSTALLDIRS) |
---|
4693 | |
---|
4694 | dnl Generate list of files to be processed by xgettext which will |
---|
4695 | dnl be included in po/Makefile. |
---|
4696 | test -d po || mkdir po |
---|
4697 | if test "x$srcdir" != "x."; then |
---|
4698 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then |
---|
4699 | posrcprefix="$srcdir/" |
---|
4700 | else |
---|
4701 | posrcprefix="../$srcdir/" |
---|
4702 | fi |
---|
4703 | else |
---|
4704 | posrcprefix="../" |
---|
4705 | fi |
---|
4706 | rm -f po/POTFILES |
---|
4707 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ |
---|
4708 | < $srcdir/po/POTFILES.in > po/POTFILES |
---|
4709 | ]) |
---|
4710 | |
---|
4711 | # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) |
---|
4712 | # ------------------------------- |
---|
4713 | # Define VARIABLE to the location where catalog files will |
---|
4714 | # be installed by po/Makefile. |
---|
4715 | glib_DEFUN(GLIB_DEFINE_LOCALEDIR, |
---|
4716 | [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl |
---|
4717 | glib_save_prefix="$prefix" |
---|
4718 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
---|
4719 | if test "x$CATOBJEXT" = "x.mo" ; then |
---|
4720 | localedir=`eval echo "${libdir}/locale"` |
---|
4721 | else |
---|
4722 | localedir=`eval echo "${datadir}/locale"` |
---|
4723 | fi |
---|
4724 | prefix="$glib_save_prefix" |
---|
4725 | AC_DEFINE_UNQUOTED($1, "$localedir", |
---|
4726 | [Define the location where the catalogs will be installed]) |
---|
4727 | ]) |
---|
4728 | |
---|
4729 | dnl |
---|
4730 | dnl Now the definitions that aclocal will find |
---|
4731 | dnl |
---|
4732 | ifdef(glib_configure_in,[],[ |
---|
4733 | AC_DEFUN(AM_GLIB_GNU_GETTEXT,[GLIB_GNU_GETTEXT($@)]) |
---|
4734 | AC_DEFUN(AM_GLIB_DEFINE_LOCALEDIR,[GLIB_DEFINE_LOCALEDIR($@)]) |
---|
4735 | ])dnl |
---|
4736 | |
---|
4737 | |
---|
4738 | dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) |
---|
4739 | dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page |
---|
4740 | dnl also defines GSTUFF_PKG_ERRORS on error |
---|
4741 | AC_DEFUN(PKG_CHECK_MODULES, [ |
---|
4742 | succeeded=no |
---|
4743 | |
---|
4744 | if test -z "$PKG_CONFIG"; then |
---|
4745 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
---|
4746 | fi |
---|
4747 | |
---|
4748 | if test "$PKG_CONFIG" = "no" ; then |
---|
4749 | echo "*** The pkg-config script could not be found. Make sure it is" |
---|
4750 | echo "*** in your path, or set the PKG_CONFIG environment variable" |
---|
4751 | echo "*** to the full path to pkg-config." |
---|
4752 | echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." |
---|
4753 | else |
---|
4754 | PKG_CONFIG_MIN_VERSION=0.9.0 |
---|
4755 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
---|
4756 | AC_MSG_CHECKING(for $2) |
---|
4757 | |
---|
4758 | if $PKG_CONFIG --exists "$2" ; then |
---|
4759 | AC_MSG_RESULT(yes) |
---|
4760 | succeeded=yes |
---|
4761 | |
---|
4762 | AC_MSG_CHECKING($1_CFLAGS) |
---|
4763 | $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` |
---|
4764 | AC_MSG_RESULT($$1_CFLAGS) |
---|
4765 | |
---|
4766 | AC_MSG_CHECKING($1_LIBS) |
---|
4767 | $1_LIBS=`$PKG_CONFIG --libs "$2"` |
---|
4768 | AC_MSG_RESULT($$1_LIBS) |
---|
4769 | else |
---|
4770 | $1_CFLAGS="" |
---|
4771 | $1_LIBS="" |
---|
4772 | ## If we have a custom action on failure, don't print errors, but |
---|
4773 | ## do set a variable so people can do so. |
---|
4774 | $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` |
---|
4775 | ifelse([$4], ,echo $$1_PKG_ERRORS,) |
---|
4776 | fi |
---|
4777 | |
---|
4778 | AC_SUBST($1_CFLAGS) |
---|
4779 | AC_SUBST($1_LIBS) |
---|
4780 | else |
---|
4781 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." |
---|
4782 | echo "*** See http://www.freedesktop.org/software/pkgconfig" |
---|
4783 | fi |
---|
4784 | fi |
---|
4785 | |
---|
4786 | if test $succeeded = yes; then |
---|
4787 | ifelse([$3], , :, [$3]) |
---|
4788 | else |
---|
4789 | ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) |
---|
4790 | fi |
---|
4791 | ]) |
---|
4792 | |
---|
4793 | |
---|
4794 | |
---|