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