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