1 | # generated automatically by aclocal 1.7.2 -*- Autoconf -*- |
---|
2 | |
---|
3 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 |
---|
4 | # Free Software Foundation, Inc. |
---|
5 | # This file is free software; the Free Software Foundation |
---|
6 | # gives unlimited permission to copy and/or distribute it, |
---|
7 | # with or without modifications, as long as this notice is preserved. |
---|
8 | |
---|
9 | # This program is distributed in the hope that it will be useful, |
---|
10 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
---|
11 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
---|
12 | # PARTICULAR PURPOSE. |
---|
13 | |
---|
14 | # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- |
---|
15 | |
---|
16 | # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. |
---|
17 | |
---|
18 | # This program is free software; you can redistribute it and/or modify |
---|
19 | # it under the terms of the GNU General Public License as published by |
---|
20 | # the Free Software Foundation; either version 2, or (at your option) |
---|
21 | # any later version. |
---|
22 | |
---|
23 | # This program is distributed in the hope that it will be useful, |
---|
24 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
25 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
26 | # GNU General Public License for more details. |
---|
27 | |
---|
28 | # You should have received a copy of the GNU General Public License |
---|
29 | # along with this program; if not, write to the Free Software |
---|
30 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
31 | # 02111-1307, USA. |
---|
32 | |
---|
33 | AC_PREREQ([2.52]) |
---|
34 | |
---|
35 | # serial 6 |
---|
36 | |
---|
37 | # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. |
---|
38 | AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) |
---|
39 | |
---|
40 | # Do all the work for Automake. -*- Autoconf -*- |
---|
41 | |
---|
42 | # This macro actually does too much some checks are only needed if |
---|
43 | # your package does certain things. But this isn't really a big deal. |
---|
44 | |
---|
45 | # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 |
---|
46 | # Free Software Foundation, Inc. |
---|
47 | |
---|
48 | # This program is free software; you can redistribute it and/or modify |
---|
49 | # it under the terms of the GNU General Public License as published by |
---|
50 | # the Free Software Foundation; either version 2, or (at your option) |
---|
51 | # any later version. |
---|
52 | |
---|
53 | # This program is distributed in the hope that it will be useful, |
---|
54 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
55 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
56 | # GNU General Public License for more details. |
---|
57 | |
---|
58 | # You should have received a copy of the GNU General Public License |
---|
59 | # along with this program; if not, write to the Free Software |
---|
60 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
61 | # 02111-1307, USA. |
---|
62 | |
---|
63 | # serial 8 |
---|
64 | |
---|
65 | # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be |
---|
66 | # written in clear, in which case automake, when reading aclocal.m4, |
---|
67 | # will think it sees a *use*, and therefore will trigger all it's |
---|
68 | # C support machinery. Also note that it means that autoscan, seeing |
---|
69 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use... |
---|
70 | |
---|
71 | |
---|
72 | AC_PREREQ([2.54]) |
---|
73 | |
---|
74 | # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow |
---|
75 | # the ones we care about. |
---|
76 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl |
---|
77 | |
---|
78 | # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) |
---|
79 | # AM_INIT_AUTOMAKE([OPTIONS]) |
---|
80 | # ----------------------------------------------- |
---|
81 | # The call with PACKAGE and VERSION arguments is the old style |
---|
82 | # call (pre autoconf-2.50), which is being phased out. PACKAGE |
---|
83 | # and VERSION should now be passed to AC_INIT and removed from |
---|
84 | # the call to AM_INIT_AUTOMAKE. |
---|
85 | # We support both call styles for the transition. After |
---|
86 | # the next Automake release, Autoconf can make the AC_INIT |
---|
87 | # arguments mandatory, and then we can depend on a new Autoconf |
---|
88 | # release and drop the old call support. |
---|
89 | AC_DEFUN([AM_INIT_AUTOMAKE], |
---|
90 | [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl |
---|
91 | AC_REQUIRE([AC_PROG_INSTALL])dnl |
---|
92 | # test to see if srcdir already configured |
---|
93 | if test "`cd $srcdir && pwd`" != "`pwd`" && |
---|
94 | test -f $srcdir/config.status; then |
---|
95 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
---|
96 | fi |
---|
97 | |
---|
98 | # test whether we have cygpath |
---|
99 | if test -z "$CYGPATH_W"; then |
---|
100 | if (cygpath --version) >/dev/null 2>/dev/null; then |
---|
101 | CYGPATH_W='cygpath -w' |
---|
102 | else |
---|
103 | CYGPATH_W=echo |
---|
104 | fi |
---|
105 | fi |
---|
106 | AC_SUBST([CYGPATH_W]) |
---|
107 | |
---|
108 | # Define the identity of the package. |
---|
109 | dnl Distinguish between old-style and new-style calls. |
---|
110 | m4_ifval([$2], |
---|
111 | [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl |
---|
112 | AC_SUBST([PACKAGE], [$1])dnl |
---|
113 | AC_SUBST([VERSION], [$2])], |
---|
114 | [_AM_SET_OPTIONS([$1])dnl |
---|
115 | AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl |
---|
116 | AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl |
---|
117 | |
---|
118 | _AM_IF_OPTION([no-define],, |
---|
119 | [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
---|
120 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl |
---|
121 | |
---|
122 | # Some tools Automake needs. |
---|
123 | AC_REQUIRE([AM_SANITY_CHECK])dnl |
---|
124 | AC_REQUIRE([AC_ARG_PROGRAM])dnl |
---|
125 | AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) |
---|
126 | AM_MISSING_PROG(AUTOCONF, autoconf) |
---|
127 | AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) |
---|
128 | AM_MISSING_PROG(AUTOHEADER, autoheader) |
---|
129 | AM_MISSING_PROG(MAKEINFO, makeinfo) |
---|
130 | AM_MISSING_PROG(AMTAR, tar) |
---|
131 | AM_PROG_INSTALL_SH |
---|
132 | AM_PROG_INSTALL_STRIP |
---|
133 | # We need awk for the "check" target. The system "awk" is bad on |
---|
134 | # some platforms. |
---|
135 | AC_REQUIRE([AC_PROG_AWK])dnl |
---|
136 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl |
---|
137 | |
---|
138 | _AM_IF_OPTION([no-dependencies],, |
---|
139 | [AC_PROVIDE_IFELSE([AC_PROG_CC], |
---|
140 | [_AM_DEPENDENCIES(CC)], |
---|
141 | [define([AC_PROG_CC], |
---|
142 | defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl |
---|
143 | AC_PROVIDE_IFELSE([AC_PROG_CXX], |
---|
144 | [_AM_DEPENDENCIES(CXX)], |
---|
145 | [define([AC_PROG_CXX], |
---|
146 | defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl |
---|
147 | ]) |
---|
148 | ]) |
---|
149 | |
---|
150 | |
---|
151 | # When config.status generates a header, we must update the stamp-h file. |
---|
152 | # This file resides in the same directory as the config header |
---|
153 | # that is generated. The stamp files are numbered to have different names. |
---|
154 | |
---|
155 | # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the |
---|
156 | # loop where config.status creates the headers, so we can generate |
---|
157 | # our stamp files there. |
---|
158 | AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], |
---|
159 | [_am_stamp_count=`expr ${_am_stamp_count-0} + 1` |
---|
160 | echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) |
---|
161 | |
---|
162 | # Copyright 2002 Free Software Foundation, Inc. |
---|
163 | |
---|
164 | # This program is free software; you can redistribute it and/or modify |
---|
165 | # it under the terms of the GNU General Public License as published by |
---|
166 | # the Free Software Foundation; either version 2, or (at your option) |
---|
167 | # any later version. |
---|
168 | |
---|
169 | # This program is distributed in the hope that it will be useful, |
---|
170 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
171 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
172 | # GNU General Public License for more details. |
---|
173 | |
---|
174 | # You should have received a copy of the GNU General Public License |
---|
175 | # along with this program; if not, write to the Free Software |
---|
176 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
177 | |
---|
178 | # AM_AUTOMAKE_VERSION(VERSION) |
---|
179 | # ---------------------------- |
---|
180 | # Automake X.Y traces this macro to ensure aclocal.m4 has been |
---|
181 | # generated from the m4 files accompanying Automake X.Y. |
---|
182 | AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) |
---|
183 | |
---|
184 | # AM_SET_CURRENT_AUTOMAKE_VERSION |
---|
185 | # ------------------------------- |
---|
186 | # Call AM_AUTOMAKE_VERSION so it can be traced. |
---|
187 | # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. |
---|
188 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
---|
189 | [AM_AUTOMAKE_VERSION([1.7.2])]) |
---|
190 | |
---|
191 | # Helper functions for option handling. -*- Autoconf -*- |
---|
192 | |
---|
193 | # Copyright 2001, 2002 Free Software Foundation, Inc. |
---|
194 | |
---|
195 | # This program is free software; you can redistribute it and/or modify |
---|
196 | # it under the terms of the GNU General Public License as published by |
---|
197 | # the Free Software Foundation; either version 2, or (at your option) |
---|
198 | # any later version. |
---|
199 | |
---|
200 | # This program is distributed in the hope that it will be useful, |
---|
201 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
202 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
203 | # GNU General Public License for more details. |
---|
204 | |
---|
205 | # You should have received a copy of the GNU General Public License |
---|
206 | # along with this program; if not, write to the Free Software |
---|
207 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
208 | # 02111-1307, USA. |
---|
209 | |
---|
210 | # serial 2 |
---|
211 | |
---|
212 | # _AM_MANGLE_OPTION(NAME) |
---|
213 | # ----------------------- |
---|
214 | AC_DEFUN([_AM_MANGLE_OPTION], |
---|
215 | [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) |
---|
216 | |
---|
217 | # _AM_SET_OPTION(NAME) |
---|
218 | # ------------------------------ |
---|
219 | # Set option NAME. Presently that only means defining a flag for this option. |
---|
220 | AC_DEFUN([_AM_SET_OPTION], |
---|
221 | [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) |
---|
222 | |
---|
223 | # _AM_SET_OPTIONS(OPTIONS) |
---|
224 | # ---------------------------------- |
---|
225 | # OPTIONS is a space-separated list of Automake options. |
---|
226 | AC_DEFUN([_AM_SET_OPTIONS], |
---|
227 | [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) |
---|
228 | |
---|
229 | # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) |
---|
230 | # ------------------------------------------- |
---|
231 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. |
---|
232 | AC_DEFUN([_AM_IF_OPTION], |
---|
233 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
---|
234 | |
---|
235 | # |
---|
236 | # Check to make sure that the build environment is sane. |
---|
237 | # |
---|
238 | |
---|
239 | # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. |
---|
240 | |
---|
241 | # This program is free software; you can redistribute it and/or modify |
---|
242 | # it under the terms of the GNU General Public License as published by |
---|
243 | # the Free Software Foundation; either version 2, or (at your option) |
---|
244 | # any later version. |
---|
245 | |
---|
246 | # This program is distributed in the hope that it will be useful, |
---|
247 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
248 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
249 | # GNU General Public License for more details. |
---|
250 | |
---|
251 | # You should have received a copy of the GNU General Public License |
---|
252 | # along with this program; if not, write to the Free Software |
---|
253 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
254 | # 02111-1307, USA. |
---|
255 | |
---|
256 | # serial 3 |
---|
257 | |
---|
258 | # AM_SANITY_CHECK |
---|
259 | # --------------- |
---|
260 | AC_DEFUN([AM_SANITY_CHECK], |
---|
261 | [AC_MSG_CHECKING([whether build environment is sane]) |
---|
262 | # Just in case |
---|
263 | sleep 1 |
---|
264 | echo timestamp > conftest.file |
---|
265 | # Do `set' in a subshell so we don't clobber the current shell's |
---|
266 | # arguments. Must try -L first in case configure is actually a |
---|
267 | # symlink; some systems play weird games with the mod time of symlinks |
---|
268 | # (eg FreeBSD returns the mod time of the symlink's containing |
---|
269 | # directory). |
---|
270 | if ( |
---|
271 | set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` |
---|
272 | if test "$[*]" = "X"; then |
---|
273 | # -L didn't work. |
---|
274 | set X `ls -t $srcdir/configure conftest.file` |
---|
275 | fi |
---|
276 | rm -f conftest.file |
---|
277 | if test "$[*]" != "X $srcdir/configure conftest.file" \ |
---|
278 | && test "$[*]" != "X conftest.file $srcdir/configure"; then |
---|
279 | |
---|
280 | # If neither matched, then we have a broken ls. This can happen |
---|
281 | # if, for instance, CONFIG_SHELL is bash and it inherits a |
---|
282 | # broken ls alias from the environment. This has actually |
---|
283 | # happened. Such a system could not be considered "sane". |
---|
284 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
---|
285 | alias in your environment]) |
---|
286 | fi |
---|
287 | |
---|
288 | test "$[2]" = conftest.file |
---|
289 | ) |
---|
290 | then |
---|
291 | # Ok. |
---|
292 | : |
---|
293 | else |
---|
294 | AC_MSG_ERROR([newly created file is older than distributed files! |
---|
295 | Check your system clock]) |
---|
296 | fi |
---|
297 | AC_MSG_RESULT(yes)]) |
---|
298 | |
---|
299 | # -*- Autoconf -*- |
---|
300 | |
---|
301 | |
---|
302 | # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. |
---|
303 | |
---|
304 | # This program is free software; you can redistribute it and/or modify |
---|
305 | # it under the terms of the GNU General Public License as published by |
---|
306 | # the Free Software Foundation; either version 2, or (at your option) |
---|
307 | # any later version. |
---|
308 | |
---|
309 | # This program is distributed in the hope that it will be useful, |
---|
310 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
311 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
312 | # GNU General Public License for more details. |
---|
313 | |
---|
314 | # You should have received a copy of the GNU General Public License |
---|
315 | # along with this program; if not, write to the Free Software |
---|
316 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
317 | # 02111-1307, USA. |
---|
318 | |
---|
319 | # serial 3 |
---|
320 | |
---|
321 | # AM_MISSING_PROG(NAME, PROGRAM) |
---|
322 | # ------------------------------ |
---|
323 | AC_DEFUN([AM_MISSING_PROG], |
---|
324 | [AC_REQUIRE([AM_MISSING_HAS_RUN]) |
---|
325 | $1=${$1-"${am_missing_run}$2"} |
---|
326 | AC_SUBST($1)]) |
---|
327 | |
---|
328 | |
---|
329 | # AM_MISSING_HAS_RUN |
---|
330 | # ------------------ |
---|
331 | # Define MISSING if not defined so far and test if it supports --run. |
---|
332 | # If it does, set am_missing_run to use it, otherwise, to nothing. |
---|
333 | AC_DEFUN([AM_MISSING_HAS_RUN], |
---|
334 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
---|
335 | test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" |
---|
336 | # Use eval to expand $SHELL |
---|
337 | if eval "$MISSING --run true"; then |
---|
338 | am_missing_run="$MISSING --run " |
---|
339 | else |
---|
340 | am_missing_run= |
---|
341 | AC_MSG_WARN([`missing' script is too old or missing]) |
---|
342 | fi |
---|
343 | ]) |
---|
344 | |
---|
345 | # AM_AUX_DIR_EXPAND |
---|
346 | |
---|
347 | # Copyright 2001 Free Software Foundation, Inc. |
---|
348 | |
---|
349 | # This program is free software; you can redistribute it and/or modify |
---|
350 | # it under the terms of the GNU General Public License as published by |
---|
351 | # the Free Software Foundation; either version 2, or (at your option) |
---|
352 | # any later version. |
---|
353 | |
---|
354 | # This program is distributed in the hope that it will be useful, |
---|
355 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
356 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
357 | # GNU General Public License for more details. |
---|
358 | |
---|
359 | # You should have received a copy of the GNU General Public License |
---|
360 | # along with this program; if not, write to the Free Software |
---|
361 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
362 | # 02111-1307, USA. |
---|
363 | |
---|
364 | # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets |
---|
365 | # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to |
---|
366 | # `$srcdir', `$srcdir/..', or `$srcdir/../..'. |
---|
367 | # |
---|
368 | # Of course, Automake must honor this variable whenever it calls a |
---|
369 | # tool from the auxiliary directory. The problem is that $srcdir (and |
---|
370 | # therefore $ac_aux_dir as well) can be either absolute or relative, |
---|
371 | # depending on how configure is run. This is pretty annoying, since |
---|
372 | # it makes $ac_aux_dir quite unusable in subdirectories: in the top |
---|
373 | # source directory, any form will work fine, but in subdirectories a |
---|
374 | # relative path needs to be adjusted first. |
---|
375 | # |
---|
376 | # $ac_aux_dir/missing |
---|
377 | # fails when called from a subdirectory if $ac_aux_dir is relative |
---|
378 | # $top_srcdir/$ac_aux_dir/missing |
---|
379 | # fails if $ac_aux_dir is absolute, |
---|
380 | # fails when called from a subdirectory in a VPATH build with |
---|
381 | # a relative $ac_aux_dir |
---|
382 | # |
---|
383 | # The reason of the latter failure is that $top_srcdir and $ac_aux_dir |
---|
384 | # are both prefixed by $srcdir. In an in-source build this is usually |
---|
385 | # harmless because $srcdir is `.', but things will broke when you |
---|
386 | # start a VPATH build or use an absolute $srcdir. |
---|
387 | # |
---|
388 | # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, |
---|
389 | # iff we strip the leading $srcdir from $ac_aux_dir. That would be: |
---|
390 | # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` |
---|
391 | # and then we would define $MISSING as |
---|
392 | # MISSING="\${SHELL} $am_aux_dir/missing" |
---|
393 | # This will work as long as MISSING is not called from configure, because |
---|
394 | # unfortunately $(top_srcdir) has no meaning in configure. |
---|
395 | # However there are other variables, like CC, which are often used in |
---|
396 | # configure, and could therefore not use this "fixed" $ac_aux_dir. |
---|
397 | # |
---|
398 | # Another solution, used here, is to always expand $ac_aux_dir to an |
---|
399 | # absolute PATH. The drawback is that using absolute paths prevent a |
---|
400 | # configured tree to be moved without reconfiguration. |
---|
401 | |
---|
402 | # Rely on autoconf to set up CDPATH properly. |
---|
403 | AC_PREREQ([2.50]) |
---|
404 | |
---|
405 | AC_DEFUN([AM_AUX_DIR_EXPAND], [ |
---|
406 | # expand $ac_aux_dir to an absolute path |
---|
407 | am_aux_dir=`cd $ac_aux_dir && pwd` |
---|
408 | ]) |
---|
409 | |
---|
410 | # AM_PROG_INSTALL_SH |
---|
411 | # ------------------ |
---|
412 | # Define $install_sh. |
---|
413 | |
---|
414 | # Copyright 2001 Free Software Foundation, Inc. |
---|
415 | |
---|
416 | # This program is free software; you can redistribute it and/or modify |
---|
417 | # it under the terms of the GNU General Public License as published by |
---|
418 | # the Free Software Foundation; either version 2, or (at your option) |
---|
419 | # any later version. |
---|
420 | |
---|
421 | # This program is distributed in the hope that it will be useful, |
---|
422 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
423 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
424 | # GNU General Public License for more details. |
---|
425 | |
---|
426 | # You should have received a copy of the GNU General Public License |
---|
427 | # along with this program; if not, write to the Free Software |
---|
428 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
429 | # 02111-1307, USA. |
---|
430 | |
---|
431 | AC_DEFUN([AM_PROG_INSTALL_SH], |
---|
432 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
---|
433 | install_sh=${install_sh-"$am_aux_dir/install-sh"} |
---|
434 | AC_SUBST(install_sh)]) |
---|
435 | |
---|
436 | # AM_PROG_INSTALL_STRIP |
---|
437 | |
---|
438 | # Copyright 2001 Free Software Foundation, Inc. |
---|
439 | |
---|
440 | # This program is free software; you can redistribute it and/or modify |
---|
441 | # it under the terms of the GNU General Public License as published by |
---|
442 | # the Free Software Foundation; either version 2, or (at your option) |
---|
443 | # any later version. |
---|
444 | |
---|
445 | # This program is distributed in the hope that it will be useful, |
---|
446 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
447 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
448 | # GNU General Public License for more details. |
---|
449 | |
---|
450 | # You should have received a copy of the GNU General Public License |
---|
451 | # along with this program; if not, write to the Free Software |
---|
452 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
453 | # 02111-1307, USA. |
---|
454 | |
---|
455 | # One issue with vendor `install' (even GNU) is that you can't |
---|
456 | # specify the program used to strip binaries. This is especially |
---|
457 | # annoying in cross-compiling environments, where the build's strip |
---|
458 | # is unlikely to handle the host's binaries. |
---|
459 | # Fortunately install-sh will honor a STRIPPROG variable, so we |
---|
460 | # always use install-sh in `make install-strip', and initialize |
---|
461 | # STRIPPROG with the value of the STRIP variable (set by the user). |
---|
462 | AC_DEFUN([AM_PROG_INSTALL_STRIP], |
---|
463 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl |
---|
464 | # Installed binaries are usually stripped using `strip' when the user |
---|
465 | # run `make install-strip'. However `strip' might not be the right |
---|
466 | # tool to use in cross-compilation environments, therefore Automake |
---|
467 | # will honor the `STRIP' environment variable to overrule this program. |
---|
468 | dnl Don't test for $cross_compiling = yes, because it might be `maybe'. |
---|
469 | if test "$cross_compiling" != no; then |
---|
470 | AC_CHECK_TOOL([STRIP], [strip], :) |
---|
471 | fi |
---|
472 | INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" |
---|
473 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
---|
474 | |
---|
475 | # serial 4 -*- Autoconf -*- |
---|
476 | |
---|
477 | # Copyright 1999, 2000, 2001 Free Software Foundation, Inc. |
---|
478 | |
---|
479 | # This program is free software; you can redistribute it and/or modify |
---|
480 | # it under the terms of the GNU General Public License as published by |
---|
481 | # the Free Software Foundation; either version 2, or (at your option) |
---|
482 | # any later version. |
---|
483 | |
---|
484 | # This program is distributed in the hope that it will be useful, |
---|
485 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
486 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
487 | # GNU General Public License for more details. |
---|
488 | |
---|
489 | # You should have received a copy of the GNU General Public License |
---|
490 | # along with this program; if not, write to the Free Software |
---|
491 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
492 | # 02111-1307, USA. |
---|
493 | |
---|
494 | |
---|
495 | # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be |
---|
496 | # written in clear, in which case automake, when reading aclocal.m4, |
---|
497 | # will think it sees a *use*, and therefore will trigger all it's |
---|
498 | # C support machinery. Also note that it means that autoscan, seeing |
---|
499 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use... |
---|
500 | |
---|
501 | |
---|
502 | |
---|
503 | # _AM_DEPENDENCIES(NAME) |
---|
504 | # ---------------------- |
---|
505 | # See how the compiler implements dependency checking. |
---|
506 | # NAME is "CC", "CXX", "GCJ", or "OBJC". |
---|
507 | # We try a few techniques and use that to set a single cache variable. |
---|
508 | # |
---|
509 | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was |
---|
510 | # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular |
---|
511 | # dependency, and given that the user is not expected to run this macro, |
---|
512 | # just rely on AC_PROG_CC. |
---|
513 | AC_DEFUN([_AM_DEPENDENCIES], |
---|
514 | [AC_REQUIRE([AM_SET_DEPDIR])dnl |
---|
515 | AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl |
---|
516 | AC_REQUIRE([AM_MAKE_INCLUDE])dnl |
---|
517 | AC_REQUIRE([AM_DEP_TRACK])dnl |
---|
518 | |
---|
519 | ifelse([$1], CC, [depcc="$CC" am_compiler_list=], |
---|
520 | [$1], CXX, [depcc="$CXX" am_compiler_list=], |
---|
521 | [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], |
---|
522 | [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], |
---|
523 | [depcc="$$1" am_compiler_list=]) |
---|
524 | |
---|
525 | AC_CACHE_CHECK([dependency style of $depcc], |
---|
526 | [am_cv_$1_dependencies_compiler_type], |
---|
527 | [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then |
---|
528 | # We make a subdir and do the tests there. Otherwise we can end up |
---|
529 | # making bogus files that we don't know about and never remove. For |
---|
530 | # instance it was reported that on HP-UX the gcc test will end up |
---|
531 | # making a dummy file named `D' -- because `-MD' means `put the output |
---|
532 | # in D'. |
---|
533 | mkdir conftest.dir |
---|
534 | # Copy depcomp to subdir because otherwise we won't find it if we're |
---|
535 | # using a relative directory. |
---|
536 | cp "$am_depcomp" conftest.dir |
---|
537 | cd conftest.dir |
---|
538 | |
---|
539 | am_cv_$1_dependencies_compiler_type=none |
---|
540 | if test "$am_compiler_list" = ""; then |
---|
541 | am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` |
---|
542 | fi |
---|
543 | for depmode in $am_compiler_list; do |
---|
544 | # We need to recreate these files for each test, as the compiler may |
---|
545 | # overwrite some of them when testing with obscure command lines. |
---|
546 | # This happens at least with the AIX C compiler. |
---|
547 | echo '#include "conftest.h"' > conftest.c |
---|
548 | echo 'int i;' > conftest.h |
---|
549 | echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf |
---|
550 | |
---|
551 | case $depmode in |
---|
552 | nosideeffect) |
---|
553 | # after this tag, mechanisms are not by side-effect, so they'll |
---|
554 | # only be used when explicitly requested |
---|
555 | if test "x$enable_dependency_tracking" = xyes; then |
---|
556 | continue |
---|
557 | else |
---|
558 | break |
---|
559 | fi |
---|
560 | ;; |
---|
561 | none) break ;; |
---|
562 | esac |
---|
563 | # We check with `-c' and `-o' for the sake of the "dashmstdout" |
---|
564 | # mode. It turns out that the SunPro C++ compiler does not properly |
---|
565 | # handle `-M -o', and we need to detect this. |
---|
566 | if depmode=$depmode \ |
---|
567 | source=conftest.c object=conftest.o \ |
---|
568 | depfile=conftest.Po tmpdepfile=conftest.TPo \ |
---|
569 | $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 && |
---|
570 | grep conftest.h conftest.Po > /dev/null 2>&1 && |
---|
571 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then |
---|
572 | am_cv_$1_dependencies_compiler_type=$depmode |
---|
573 | break |
---|
574 | fi |
---|
575 | done |
---|
576 | |
---|
577 | cd .. |
---|
578 | rm -rf conftest.dir |
---|
579 | else |
---|
580 | am_cv_$1_dependencies_compiler_type=none |
---|
581 | fi |
---|
582 | ]) |
---|
583 | AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) |
---|
584 | AM_CONDITIONAL([am__fastdep$1], [ |
---|
585 | test "x$enable_dependency_tracking" != xno \ |
---|
586 | && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) |
---|
587 | ]) |
---|
588 | |
---|
589 | |
---|
590 | # AM_SET_DEPDIR |
---|
591 | # ------------- |
---|
592 | # Choose a directory name for dependency files. |
---|
593 | # This macro is AC_REQUIREd in _AM_DEPENDENCIES |
---|
594 | AC_DEFUN([AM_SET_DEPDIR], |
---|
595 | [rm -f .deps 2>/dev/null |
---|
596 | mkdir .deps 2>/dev/null |
---|
597 | if test -d .deps; then |
---|
598 | DEPDIR=.deps |
---|
599 | else |
---|
600 | # MS-DOS does not allow filenames that begin with a dot. |
---|
601 | DEPDIR=_deps |
---|
602 | fi |
---|
603 | rmdir .deps 2>/dev/null |
---|
604 | AC_SUBST([DEPDIR]) |
---|
605 | ]) |
---|
606 | |
---|
607 | |
---|
608 | # AM_DEP_TRACK |
---|
609 | # ------------ |
---|
610 | AC_DEFUN([AM_DEP_TRACK], |
---|
611 | [AC_ARG_ENABLE(dependency-tracking, |
---|
612 | [ --disable-dependency-tracking Speeds up one-time builds |
---|
613 | --enable-dependency-tracking Do not reject slow dependency extractors]) |
---|
614 | if test "x$enable_dependency_tracking" != xno; then |
---|
615 | am_depcomp="$ac_aux_dir/depcomp" |
---|
616 | AMDEPBACKSLASH='\' |
---|
617 | fi |
---|
618 | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) |
---|
619 | AC_SUBST([AMDEPBACKSLASH]) |
---|
620 | ]) |
---|
621 | |
---|
622 | # Generate code to set up dependency tracking. -*- Autoconf -*- |
---|
623 | |
---|
624 | # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. |
---|
625 | |
---|
626 | # This program is free software; you can redistribute it and/or modify |
---|
627 | # it under the terms of the GNU General Public License as published by |
---|
628 | # the Free Software Foundation; either version 2, or (at your option) |
---|
629 | # any later version. |
---|
630 | |
---|
631 | # This program is distributed in the hope that it will be useful, |
---|
632 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
633 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
634 | # GNU General Public License for more details. |
---|
635 | |
---|
636 | # You should have received a copy of the GNU General Public License |
---|
637 | # along with this program; if not, write to the Free Software |
---|
638 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
639 | # 02111-1307, USA. |
---|
640 | |
---|
641 | #serial 2 |
---|
642 | |
---|
643 | # _AM_OUTPUT_DEPENDENCY_COMMANDS |
---|
644 | # ------------------------------ |
---|
645 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], |
---|
646 | [for mf in $CONFIG_FILES; do |
---|
647 | # Strip MF so we end up with the name of the file. |
---|
648 | mf=`echo "$mf" | sed -e 's/:.*$//'` |
---|
649 | # Check whether this is an Automake generated Makefile or not. |
---|
650 | # We used to match only the files named `Makefile.in', but |
---|
651 | # some people rename them; so instead we look at the file content. |
---|
652 | # Grep'ing the first line is not enough: some people post-process |
---|
653 | # each Makefile.in and add a new line on top of each file to say so. |
---|
654 | # So let's grep whole file. |
---|
655 | if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then |
---|
656 | dirpart=`AS_DIRNAME("$mf")` |
---|
657 | else |
---|
658 | continue |
---|
659 | fi |
---|
660 | grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue |
---|
661 | # Extract the definition of DEP_FILES from the Makefile without |
---|
662 | # running `make'. |
---|
663 | DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` |
---|
664 | test -z "$DEPDIR" && continue |
---|
665 | # When using ansi2knr, U may be empty or an underscore; expand it |
---|
666 | U=`sed -n -e '/^U = / s///p' < "$mf"` |
---|
667 | test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" |
---|
668 | # We invoke sed twice because it is the simplest approach to |
---|
669 | # changing $(DEPDIR) to its actual value in the expansion. |
---|
670 | for file in `sed -n -e ' |
---|
671 | /^DEP_FILES = .*\\\\$/ { |
---|
672 | s/^DEP_FILES = // |
---|
673 | :loop |
---|
674 | s/\\\\$// |
---|
675 | p |
---|
676 | n |
---|
677 | /\\\\$/ b loop |
---|
678 | p |
---|
679 | } |
---|
680 | /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ |
---|
681 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do |
---|
682 | # Make sure the directory exists. |
---|
683 | test -f "$dirpart/$file" && continue |
---|
684 | fdir=`AS_DIRNAME(["$file"])` |
---|
685 | AS_MKDIR_P([$dirpart/$fdir]) |
---|
686 | # echo "creating $dirpart/$file" |
---|
687 | echo '# dummy' > "$dirpart/$file" |
---|
688 | done |
---|
689 | done |
---|
690 | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS |
---|
691 | |
---|
692 | |
---|
693 | # AM_OUTPUT_DEPENDENCY_COMMANDS |
---|
694 | # ----------------------------- |
---|
695 | # This macro should only be invoked once -- use via AC_REQUIRE. |
---|
696 | # |
---|
697 | # This code is only required when automatic dependency tracking |
---|
698 | # is enabled. FIXME. This creates each `.P' file that we will |
---|
699 | # need in order to bootstrap the dependency handling code. |
---|
700 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], |
---|
701 | [AC_CONFIG_COMMANDS([depfiles], |
---|
702 | [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], |
---|
703 | [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) |
---|
704 | ]) |
---|
705 | |
---|
706 | # Check to see how 'make' treats includes. -*- Autoconf -*- |
---|
707 | |
---|
708 | # Copyright (C) 2001, 2002 Free Software Foundation, Inc. |
---|
709 | |
---|
710 | # This program is free software; you can redistribute it and/or modify |
---|
711 | # it under the terms of the GNU General Public License as published by |
---|
712 | # the Free Software Foundation; either version 2, or (at your option) |
---|
713 | # any later version. |
---|
714 | |
---|
715 | # This program is distributed in the hope that it will be useful, |
---|
716 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
717 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
718 | # GNU General Public License for more details. |
---|
719 | |
---|
720 | # You should have received a copy of the GNU General Public License |
---|
721 | # along with this program; if not, write to the Free Software |
---|
722 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
723 | # 02111-1307, USA. |
---|
724 | |
---|
725 | # serial 2 |
---|
726 | |
---|
727 | # AM_MAKE_INCLUDE() |
---|
728 | # ----------------- |
---|
729 | # Check to see how make treats includes. |
---|
730 | AC_DEFUN([AM_MAKE_INCLUDE], |
---|
731 | [am_make=${MAKE-make} |
---|
732 | cat > confinc << 'END' |
---|
733 | doit: |
---|
734 | @echo done |
---|
735 | END |
---|
736 | # If we don't find an include directive, just comment out the code. |
---|
737 | AC_MSG_CHECKING([for style of include used by $am_make]) |
---|
738 | am__include="#" |
---|
739 | am__quote= |
---|
740 | _am_result=none |
---|
741 | # First try GNU make style include. |
---|
742 | echo "include confinc" > confmf |
---|
743 | # We grep out `Entering directory' and `Leaving directory' |
---|
744 | # messages which can occur if `w' ends up in MAKEFLAGS. |
---|
745 | # In particular we don't look at `^make:' because GNU make might |
---|
746 | # be invoked under some other name (usually "gmake"), in which |
---|
747 | # case it prints its new name instead of `make'. |
---|
748 | if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then |
---|
749 | am__include=include |
---|
750 | am__quote= |
---|
751 | _am_result=GNU |
---|
752 | fi |
---|
753 | # Now try BSD make style include. |
---|
754 | if test "$am__include" = "#"; then |
---|
755 | echo '.include "confinc"' > confmf |
---|
756 | if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then |
---|
757 | am__include=.include |
---|
758 | am__quote="\"" |
---|
759 | _am_result=BSD |
---|
760 | fi |
---|
761 | fi |
---|
762 | AC_SUBST(am__include) |
---|
763 | AC_SUBST(am__quote) |
---|
764 | AC_MSG_RESULT($_am_result) |
---|
765 | rm -f confinc confmf |
---|
766 | ]) |
---|
767 | |
---|
768 | # AM_CONDITIONAL -*- Autoconf -*- |
---|
769 | |
---|
770 | # Copyright 1997, 2000, 2001 Free Software Foundation, Inc. |
---|
771 | |
---|
772 | # This program is free software; you can redistribute it and/or modify |
---|
773 | # it under the terms of the GNU General Public License as published by |
---|
774 | # the Free Software Foundation; either version 2, or (at your option) |
---|
775 | # any later version. |
---|
776 | |
---|
777 | # This program is distributed in the hope that it will be useful, |
---|
778 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
779 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
780 | # GNU General Public License for more details. |
---|
781 | |
---|
782 | # You should have received a copy of the GNU General Public License |
---|
783 | # along with this program; if not, write to the Free Software |
---|
784 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
785 | # 02111-1307, USA. |
---|
786 | |
---|
787 | # serial 5 |
---|
788 | |
---|
789 | AC_PREREQ(2.52) |
---|
790 | |
---|
791 | # AM_CONDITIONAL(NAME, SHELL-CONDITION) |
---|
792 | # ------------------------------------- |
---|
793 | # Define a conditional. |
---|
794 | AC_DEFUN([AM_CONDITIONAL], |
---|
795 | [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], |
---|
796 | [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl |
---|
797 | AC_SUBST([$1_TRUE]) |
---|
798 | AC_SUBST([$1_FALSE]) |
---|
799 | if $2; then |
---|
800 | $1_TRUE= |
---|
801 | $1_FALSE='#' |
---|
802 | else |
---|
803 | $1_TRUE='#' |
---|
804 | $1_FALSE= |
---|
805 | fi |
---|
806 | AC_CONFIG_COMMANDS_PRE( |
---|
807 | [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then |
---|
808 | AC_MSG_ERROR([conditional "$1" was never defined. |
---|
809 | Usually this means the macro was only invoked conditionally.]) |
---|
810 | fi])]) |
---|
811 | |
---|
812 | # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- |
---|
813 | |
---|
814 | # serial 47 AC_PROG_LIBTOOL |
---|
815 | |
---|
816 | |
---|
817 | # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) |
---|
818 | # ----------------------------------------------------------- |
---|
819 | # If this macro is not defined by Autoconf, define it here. |
---|
820 | m4_ifdef([AC_PROVIDE_IFELSE], |
---|
821 | [], |
---|
822 | [m4_define([AC_PROVIDE_IFELSE], |
---|
823 | [m4_ifdef([AC_PROVIDE_$1], |
---|
824 | [$2], [$3])])]) |
---|
825 | |
---|
826 | |
---|
827 | # AC_PROG_LIBTOOL |
---|
828 | # --------------- |
---|
829 | AC_DEFUN([AC_PROG_LIBTOOL], |
---|
830 | [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl |
---|
831 | dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX |
---|
832 | dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. |
---|
833 | AC_PROVIDE_IFELSE([AC_PROG_CXX], |
---|
834 | [AC_LIBTOOL_CXX], |
---|
835 | [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX |
---|
836 | ])]) |
---|
837 | dnl And a similar setup for Fortran 77 support |
---|
838 | AC_PROVIDE_IFELSE([AC_PROG_F77], |
---|
839 | [AC_LIBTOOL_F77], |
---|
840 | [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 |
---|
841 | ])]) |
---|
842 | |
---|
843 | dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. |
---|
844 | dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run |
---|
845 | dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. |
---|
846 | AC_PROVIDE_IFELSE([AC_PROG_GCJ], |
---|
847 | [AC_LIBTOOL_GCJ], |
---|
848 | [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], |
---|
849 | [AC_LIBTOOL_GCJ], |
---|
850 | [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], |
---|
851 | [AC_LIBTOOL_GCJ], |
---|
852 | [ifdef([AC_PROG_GCJ], |
---|
853 | [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) |
---|
854 | ifdef([A][M_PROG_GCJ], |
---|
855 | [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) |
---|
856 | ifdef([LT_AC_PROG_GCJ], |
---|
857 | [define([LT_AC_PROG_GCJ], |
---|
858 | defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) |
---|
859 | ])])# AC_PROG_LIBTOOL |
---|
860 | |
---|
861 | |
---|
862 | # _AC_PROG_LIBTOOL |
---|
863 | # ---------------- |
---|
864 | AC_DEFUN([_AC_PROG_LIBTOOL], |
---|
865 | [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl |
---|
866 | AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl |
---|
867 | AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl |
---|
868 | AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl |
---|
869 | |
---|
870 | # This can be used to rebuild libtool when needed |
---|
871 | LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" |
---|
872 | |
---|
873 | # Always use our own libtool. |
---|
874 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' |
---|
875 | AC_SUBST(LIBTOOL)dnl |
---|
876 | |
---|
877 | # Prevent multiple expansion |
---|
878 | define([AC_PROG_LIBTOOL], []) |
---|
879 | ])# _AC_PROG_LIBTOOL |
---|
880 | |
---|
881 | |
---|
882 | # AC_LIBTOOL_SETUP |
---|
883 | # ---------------- |
---|
884 | AC_DEFUN([AC_LIBTOOL_SETUP], |
---|
885 | [AC_PREREQ(2.50)dnl |
---|
886 | AC_REQUIRE([AC_ENABLE_SHARED])dnl |
---|
887 | AC_REQUIRE([AC_ENABLE_STATIC])dnl |
---|
888 | AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl |
---|
889 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
---|
890 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
---|
891 | AC_REQUIRE([AC_PROG_CC])dnl |
---|
892 | AC_REQUIRE([AC_PROG_LD])dnl |
---|
893 | AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl |
---|
894 | AC_REQUIRE([AC_PROG_NM])dnl |
---|
895 | |
---|
896 | AC_REQUIRE([AC_PROG_LN_S])dnl |
---|
897 | AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl |
---|
898 | # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! |
---|
899 | AC_REQUIRE([AC_OBJEXT])dnl |
---|
900 | AC_REQUIRE([AC_EXEEXT])dnl |
---|
901 | dnl |
---|
902 | |
---|
903 | AC_LIBTOOL_SYS_MAX_CMD_LEN |
---|
904 | AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
---|
905 | AC_LIBTOOL_OBJDIR |
---|
906 | |
---|
907 | AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl |
---|
908 | _LT_AC_PROG_ECHO_BACKSLASH |
---|
909 | |
---|
910 | case $host_os in |
---|
911 | aix3*) |
---|
912 | # AIX sometimes has problems with the GCC collect2 program. For some |
---|
913 | # reason, if we set the COLLECT_NAMES environment variable, the problems |
---|
914 | # vanish in a puff of smoke. |
---|
915 | if test "X${COLLECT_NAMES+set}" != Xset; then |
---|
916 | COLLECT_NAMES= |
---|
917 | export COLLECT_NAMES |
---|
918 | fi |
---|
919 | ;; |
---|
920 | esac |
---|
921 | |
---|
922 | # Sed substitution that helps us do robust quoting. It backslashifies |
---|
923 | # metacharacters that are still active within double-quoted strings. |
---|
924 | Xsed='sed -e s/^X//' |
---|
925 | [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] |
---|
926 | |
---|
927 | # Same as above, but do not quote variable references. |
---|
928 | [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] |
---|
929 | |
---|
930 | # Sed substitution to delay expansion of an escaped shell variable in a |
---|
931 | # double_quote_subst'ed string. |
---|
932 | delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' |
---|
933 | |
---|
934 | # Sed substitution to avoid accidental globbing in evaled expressions |
---|
935 | no_glob_subst='s/\*/\\\*/g' |
---|
936 | |
---|
937 | # Constants: |
---|
938 | rm="rm -f" |
---|
939 | |
---|
940 | # Global variables: |
---|
941 | default_ofile=libtool |
---|
942 | can_build_shared=yes |
---|
943 | |
---|
944 | # All known linkers require a `.a' archive for static linking (except M$VC, |
---|
945 | # which needs '.lib'). |
---|
946 | libext=a |
---|
947 | ltmain="$ac_aux_dir/ltmain.sh" |
---|
948 | ofile="$default_ofile" |
---|
949 | with_gnu_ld="$lt_cv_prog_gnu_ld" |
---|
950 | |
---|
951 | AC_CHECK_TOOL(AR, ar, false) |
---|
952 | AC_CHECK_TOOL(RANLIB, ranlib, :) |
---|
953 | AC_CHECK_TOOL(STRIP, strip, :) |
---|
954 | |
---|
955 | old_CC="$CC" |
---|
956 | old_CFLAGS="$CFLAGS" |
---|
957 | |
---|
958 | # Set sane defaults for various variables |
---|
959 | test -z "$AR" && AR=ar |
---|
960 | test -z "$AR_FLAGS" && AR_FLAGS=cru |
---|
961 | test -z "$AS" && AS=as |
---|
962 | test -z "$CC" && CC=cc |
---|
963 | test -z "$LTCC" && LTCC=$CC |
---|
964 | test -z "$DLLTOOL" && DLLTOOL=dlltool |
---|
965 | test -z "$LD" && LD=ld |
---|
966 | test -z "$LN_S" && LN_S="ln -s" |
---|
967 | test -z "$MAGIC_CMD" && MAGIC_CMD=file |
---|
968 | test -z "$NM" && NM=nm |
---|
969 | test -z "$SED" && SED=sed |
---|
970 | test -z "$OBJDUMP" && OBJDUMP=objdump |
---|
971 | test -z "$RANLIB" && RANLIB=: |
---|
972 | test -z "$STRIP" && STRIP=: |
---|
973 | test -z "$ac_objext" && ac_objext=o |
---|
974 | |
---|
975 | # Determine commands to create old-style static archives. |
---|
976 | old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' |
---|
977 | old_postinstall_cmds='chmod 644 $oldlib' |
---|
978 | old_postuninstall_cmds= |
---|
979 | |
---|
980 | if test -n "$RANLIB"; then |
---|
981 | case $host_os in |
---|
982 | openbsd*) |
---|
983 | old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" |
---|
984 | ;; |
---|
985 | *) |
---|
986 | old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" |
---|
987 | ;; |
---|
988 | esac |
---|
989 | old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" |
---|
990 | fi |
---|
991 | |
---|
992 | # Only perform the check for file, if the check method requires it |
---|
993 | case $deplibs_check_method in |
---|
994 | file_magic*) |
---|
995 | if test "$file_magic_cmd" = '$MAGIC_CMD'; then |
---|
996 | AC_PATH_MAGIC |
---|
997 | fi |
---|
998 | ;; |
---|
999 | esac |
---|
1000 | |
---|
1001 | AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) |
---|
1002 | AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], |
---|
1003 | enable_win32_dll=yes, enable_win32_dll=no) |
---|
1004 | |
---|
1005 | AC_ARG_ENABLE([libtool-lock], |
---|
1006 | [AC_HELP_STRING([--disable-libtool-lock], |
---|
1007 | [avoid locking (might break parallel builds)])]) |
---|
1008 | test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes |
---|
1009 | |
---|
1010 | AC_ARG_WITH([pic], |
---|
1011 | [AC_HELP_STRING([--with-pic], |
---|
1012 | [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], |
---|
1013 | [pic_mode="$withval"], |
---|
1014 | [pic_mode=default]) |
---|
1015 | test -z "$pic_mode" && pic_mode=default |
---|
1016 | |
---|
1017 | # Use C for the default configuration in the libtool script |
---|
1018 | tagname= |
---|
1019 | AC_LIBTOOL_LANG_C_CONFIG |
---|
1020 | _LT_AC_TAGCONFIG |
---|
1021 | ])# AC_LIBTOOL_SETUP |
---|
1022 | |
---|
1023 | |
---|
1024 | # _LT_AC_SYS_COMPILER |
---|
1025 | # ------------------- |
---|
1026 | AC_DEFUN([_LT_AC_SYS_COMPILER], |
---|
1027 | [AC_REQUIRE([AC_PROG_CC])dnl |
---|
1028 | |
---|
1029 | # If no C compiler was specified, use CC. |
---|
1030 | LTCC=${LTCC-"$CC"} |
---|
1031 | |
---|
1032 | # Allow CC to be a program name with arguments. |
---|
1033 | compiler=$CC |
---|
1034 | ])# _LT_AC_SYS_COMPILER |
---|
1035 | |
---|
1036 | |
---|
1037 | # _LT_AC_SYS_LIBPATH_AIX |
---|
1038 | # ---------------------- |
---|
1039 | # Links a minimal program and checks the executable |
---|
1040 | # for the system default hardcoded library path. In most cases, |
---|
1041 | # this is /usr/lib:/lib, but when the MPI compilers are used |
---|
1042 | # the location of the communication and MPI libs are included too. |
---|
1043 | # If we don't find anything, use the default library path according |
---|
1044 | # to the aix ld manual. |
---|
1045 | AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], |
---|
1046 | [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ |
---|
1047 | aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } |
---|
1048 | }'` |
---|
1049 | # Check for a 64-bit object if we didn't find anything. |
---|
1050 | if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } |
---|
1051 | }'`; fi],[]) |
---|
1052 | if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi |
---|
1053 | ])# _LT_AC_SYS_LIBPATH_AIX |
---|
1054 | |
---|
1055 | |
---|
1056 | # _LT_AC_SHELL_INIT(ARG) |
---|
1057 | # ---------------------- |
---|
1058 | AC_DEFUN([_LT_AC_SHELL_INIT], |
---|
1059 | [ifdef([AC_DIVERSION_NOTICE], |
---|
1060 | [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], |
---|
1061 | [AC_DIVERT_PUSH(NOTICE)]) |
---|
1062 | $1 |
---|
1063 | AC_DIVERT_POP |
---|
1064 | ])# _LT_AC_SHELL_INIT |
---|
1065 | |
---|
1066 | |
---|
1067 | # _LT_AC_PROG_ECHO_BACKSLASH |
---|
1068 | # -------------------------- |
---|
1069 | # Add some code to the start of the generated configure script which |
---|
1070 | # will find an echo command which doesn't interpret backslashes. |
---|
1071 | AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], |
---|
1072 | [_LT_AC_SHELL_INIT([ |
---|
1073 | # Check that we are running under the correct shell. |
---|
1074 | SHELL=${CONFIG_SHELL-/bin/sh} |
---|
1075 | |
---|
1076 | case X$ECHO in |
---|
1077 | X*--fallback-echo) |
---|
1078 | # Remove one level of quotation (which was required for Make). |
---|
1079 | ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` |
---|
1080 | ;; |
---|
1081 | esac |
---|
1082 | |
---|
1083 | echo=${ECHO-echo} |
---|
1084 | if test "X[$]1" = X--no-reexec; then |
---|
1085 | # Discard the --no-reexec flag, and continue. |
---|
1086 | shift |
---|
1087 | elif test "X[$]1" = X--fallback-echo; then |
---|
1088 | # Avoid inline document here, it may be left over |
---|
1089 | : |
---|
1090 | elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then |
---|
1091 | # Yippee, $echo works! |
---|
1092 | : |
---|
1093 | else |
---|
1094 | # Restart under the correct shell. |
---|
1095 | exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} |
---|
1096 | fi |
---|
1097 | |
---|
1098 | if test "X[$]1" = X--fallback-echo; then |
---|
1099 | # used as fallback echo |
---|
1100 | shift |
---|
1101 | cat <<EOF |
---|
1102 | [$]* |
---|
1103 | EOF |
---|
1104 | exit 0 |
---|
1105 | fi |
---|
1106 | |
---|
1107 | # The HP-UX ksh and POSIX shell print the target directory to stdout |
---|
1108 | # if CDPATH is set. |
---|
1109 | if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
---|
1110 | |
---|
1111 | if test -z "$ECHO"; then |
---|
1112 | if test "X${echo_test_string+set}" != Xset; then |
---|
1113 | # find a string as large as possible, as long as the shell can cope with it |
---|
1114 | for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do |
---|
1115 | # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... |
---|
1116 | if (echo_test_string="`eval $cmd`") 2>/dev/null && |
---|
1117 | echo_test_string="`eval $cmd`" && |
---|
1118 | (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null |
---|
1119 | then |
---|
1120 | break |
---|
1121 | fi |
---|
1122 | done |
---|
1123 | fi |
---|
1124 | |
---|
1125 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && |
---|
1126 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && |
---|
1127 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
1128 | : |
---|
1129 | else |
---|
1130 | # The Solaris, AIX, and Digital Unix default echo programs unquote |
---|
1131 | # backslashes. This makes it impossible to quote backslashes using |
---|
1132 | # echo "$something" | sed 's/\\/\\\\/g' |
---|
1133 | # |
---|
1134 | # So, first we look for a working echo in the user's PATH. |
---|
1135 | |
---|
1136 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
---|
1137 | for dir in $PATH /usr/ucb; do |
---|
1138 | IFS="$lt_save_ifs" |
---|
1139 | if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && |
---|
1140 | test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && |
---|
1141 | echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && |
---|
1142 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
1143 | echo="$dir/echo" |
---|
1144 | break |
---|
1145 | fi |
---|
1146 | done |
---|
1147 | IFS="$lt_save_ifs" |
---|
1148 | |
---|
1149 | if test "X$echo" = Xecho; then |
---|
1150 | # We didn't find a better echo, so look for alternatives. |
---|
1151 | if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && |
---|
1152 | echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && |
---|
1153 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
1154 | # This shell has a builtin print -r that does the trick. |
---|
1155 | echo='print -r' |
---|
1156 | elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && |
---|
1157 | test "X$CONFIG_SHELL" != X/bin/ksh; then |
---|
1158 | # If we have ksh, try running configure again with it. |
---|
1159 | ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} |
---|
1160 | export ORIGINAL_CONFIG_SHELL |
---|
1161 | CONFIG_SHELL=/bin/ksh |
---|
1162 | export CONFIG_SHELL |
---|
1163 | exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} |
---|
1164 | else |
---|
1165 | # Try using printf. |
---|
1166 | echo='printf %s\n' |
---|
1167 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && |
---|
1168 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && |
---|
1169 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
1170 | # Cool, printf works |
---|
1171 | : |
---|
1172 | elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && |
---|
1173 | test "X$echo_testing_string" = 'X\t' && |
---|
1174 | echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && |
---|
1175 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
1176 | CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL |
---|
1177 | export CONFIG_SHELL |
---|
1178 | SHELL="$CONFIG_SHELL" |
---|
1179 | export SHELL |
---|
1180 | echo="$CONFIG_SHELL [$]0 --fallback-echo" |
---|
1181 | elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && |
---|
1182 | test "X$echo_testing_string" = 'X\t' && |
---|
1183 | echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && |
---|
1184 | test "X$echo_testing_string" = "X$echo_test_string"; then |
---|
1185 | echo="$CONFIG_SHELL [$]0 --fallback-echo" |
---|
1186 | else |
---|
1187 | # maybe with a smaller string... |
---|
1188 | prev=: |
---|
1189 | |
---|
1190 | for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do |
---|
1191 | if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null |
---|
1192 | then |
---|
1193 | break |
---|
1194 | fi |
---|
1195 | prev="$cmd" |
---|
1196 | done |
---|
1197 | |
---|
1198 | if test "$prev" != 'sed 50q "[$]0"'; then |
---|
1199 | echo_test_string=`eval $prev` |
---|
1200 | export echo_test_string |
---|
1201 | exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} |
---|
1202 | else |
---|
1203 | # Oops. We lost completely, so just stick with echo. |
---|
1204 | echo=echo |
---|
1205 | fi |
---|
1206 | fi |
---|
1207 | fi |
---|
1208 | fi |
---|
1209 | fi |
---|
1210 | fi |
---|
1211 | |
---|
1212 | # Copy echo and quote the copy suitably for passing to libtool from |
---|
1213 | # the Makefile, instead of quoting the original, which is used later. |
---|
1214 | ECHO=$echo |
---|
1215 | if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then |
---|
1216 | ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" |
---|
1217 | fi |
---|
1218 | |
---|
1219 | AC_SUBST(ECHO) |
---|
1220 | ])])# _LT_AC_PROG_ECHO_BACKSLASH |
---|
1221 | |
---|
1222 | |
---|
1223 | # _LT_AC_LOCK |
---|
1224 | # ----------- |
---|
1225 | AC_DEFUN([_LT_AC_LOCK], |
---|
1226 | [AC_ARG_ENABLE([libtool-lock], |
---|
1227 | [AC_HELP_STRING([--disable-libtool-lock], |
---|
1228 | [avoid locking (might break parallel builds)])]) |
---|
1229 | test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes |
---|
1230 | |
---|
1231 | # Some flags need to be propagated to the compiler or linker for good |
---|
1232 | # libtool support. |
---|
1233 | case $host in |
---|
1234 | ia64-*-hpux*) |
---|
1235 | # Find out which ABI we are using. |
---|
1236 | echo 'int i;' > conftest.$ac_ext |
---|
1237 | if AC_TRY_EVAL(ac_compile); then |
---|
1238 | case `/usr/bin/file conftest.$ac_objext` in |
---|
1239 | *ELF-32*) |
---|
1240 | HPUX_IA64_MODE="32" |
---|
1241 | ;; |
---|
1242 | *ELF-64*) |
---|
1243 | HPUX_IA64_MODE="64" |
---|
1244 | ;; |
---|
1245 | esac |
---|
1246 | fi |
---|
1247 | rm -rf conftest* |
---|
1248 | ;; |
---|
1249 | *-*-irix6*) |
---|
1250 | # Find out which ABI we are using. |
---|
1251 | echo '[#]line __oline__ "configure"' > conftest.$ac_ext |
---|
1252 | if AC_TRY_EVAL(ac_compile); then |
---|
1253 | if test "$lt_cv_prog_gnu_ld" = yes; then |
---|
1254 | case `/usr/bin/file conftest.$ac_objext` in |
---|
1255 | *32-bit*) |
---|
1256 | LD="${LD-ld} -melf32bsmip" |
---|
1257 | ;; |
---|
1258 | *N32*) |
---|
1259 | LD="${LD-ld} -melf32bmipn32" |
---|
1260 | ;; |
---|
1261 | *64-bit*) |
---|
1262 | LD="${LD-ld} -melf64bmip" |
---|
1263 | ;; |
---|
1264 | esac |
---|
1265 | else |
---|
1266 | case `/usr/bin/file conftest.$ac_objext` in |
---|
1267 | *32-bit*) |
---|
1268 | LD="${LD-ld} -32" |
---|
1269 | ;; |
---|
1270 | *N32*) |
---|
1271 | LD="${LD-ld} -n32" |
---|
1272 | ;; |
---|
1273 | *64-bit*) |
---|
1274 | LD="${LD-ld} -64" |
---|
1275 | ;; |
---|
1276 | esac |
---|
1277 | fi |
---|
1278 | fi |
---|
1279 | rm -rf conftest* |
---|
1280 | ;; |
---|
1281 | |
---|
1282 | x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) |
---|
1283 | # Find out which ABI we are using. |
---|
1284 | echo 'int i;' > conftest.$ac_ext |
---|
1285 | if AC_TRY_EVAL(ac_compile); then |
---|
1286 | case "`/usr/bin/file conftest.o`" in |
---|
1287 | *32-bit*) |
---|
1288 | case $host in |
---|
1289 | x86_64-*linux*) |
---|
1290 | LD="${LD-ld} -m elf_i386" |
---|
1291 | ;; |
---|
1292 | ppc64-*linux*) |
---|
1293 | LD="${LD-ld} -m elf32ppclinux" |
---|
1294 | ;; |
---|
1295 | s390x-*linux*) |
---|
1296 | LD="${LD-ld} -m elf_s390" |
---|
1297 | ;; |
---|
1298 | sparc64-*linux*) |
---|
1299 | LD="${LD-ld} -m elf32_sparc" |
---|
1300 | ;; |
---|
1301 | esac |
---|
1302 | ;; |
---|
1303 | *64-bit*) |
---|
1304 | case $host in |
---|
1305 | x86_64-*linux*) |
---|
1306 | LD="${LD-ld} -m elf_x86_64" |
---|
1307 | ;; |
---|
1308 | ppc*-*linux*|powerpc*-*linux*) |
---|
1309 | LD="${LD-ld} -m elf64ppc" |
---|
1310 | ;; |
---|
1311 | s390*-*linux*) |
---|
1312 | LD="${LD-ld} -m elf64_s390" |
---|
1313 | ;; |
---|
1314 | sparc*-*linux*) |
---|
1315 | LD="${LD-ld} -m elf64_sparc" |
---|
1316 | ;; |
---|
1317 | esac |
---|
1318 | ;; |
---|
1319 | esac |
---|
1320 | fi |
---|
1321 | rm -rf conftest* |
---|
1322 | ;; |
---|
1323 | |
---|
1324 | *-*-sco3.2v5*) |
---|
1325 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. |
---|
1326 | SAVE_CFLAGS="$CFLAGS" |
---|
1327 | CFLAGS="$CFLAGS -belf" |
---|
1328 | AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, |
---|
1329 | [AC_LANG_PUSH(C) |
---|
1330 | AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) |
---|
1331 | AC_LANG_POP]) |
---|
1332 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then |
---|
1333 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf |
---|
1334 | CFLAGS="$SAVE_CFLAGS" |
---|
1335 | fi |
---|
1336 | ;; |
---|
1337 | AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], |
---|
1338 | [*-*-cygwin* | *-*-mingw* | *-*-pw32*) |
---|
1339 | AC_CHECK_TOOL(DLLTOOL, dlltool, false) |
---|
1340 | AC_CHECK_TOOL(AS, as, false) |
---|
1341 | AC_CHECK_TOOL(OBJDUMP, objdump, false) |
---|
1342 | ;; |
---|
1343 | ]) |
---|
1344 | esac |
---|
1345 | |
---|
1346 | need_locks="$enable_libtool_lock" |
---|
1347 | |
---|
1348 | ])# _LT_AC_LOCK |
---|
1349 | |
---|
1350 | |
---|
1351 | # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, |
---|
1352 | # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) |
---|
1353 | # ---------------------------------------------------------------- |
---|
1354 | # Check whether the given compiler option works |
---|
1355 | AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], |
---|
1356 | [AC_CACHE_CHECK([$1], [$2], |
---|
1357 | [$2=no |
---|
1358 | ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) |
---|
1359 | printf "$lt_simple_compile_test_code" > conftest.$ac_ext |
---|
1360 | lt_compiler_flag="$3" |
---|
1361 | # Insert the option either (1) after the last *FLAGS variable, or |
---|
1362 | # (2) before a word containing "conftest.", or (3) at the end. |
---|
1363 | # Note that $ac_compile itself does not contain backslashes and begins |
---|
1364 | # with a dollar sign (not a hyphen), so the echo should work correctly. |
---|
1365 | # The option is referenced via a variable to avoid confusing sed. |
---|
1366 | lt_compile=`echo "$ac_compile" | $SED \ |
---|
1367 | -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ |
---|
1368 | -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ |
---|
1369 | -e 's:$: $lt_compiler_flag:'` |
---|
1370 | (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) |
---|
1371 | (eval "$lt_compile" 2>conftest.err) |
---|
1372 | ac_status=$? |
---|
1373 | cat conftest.err >&AS_MESSAGE_LOG_FD |
---|
1374 | echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD |
---|
1375 | if (exit $ac_status) && test -s "$ac_outfile"; then |
---|
1376 | # The compiler can only warn and ignore the option if not recognized |
---|
1377 | # So say no if there are warnings |
---|
1378 | if test ! -s conftest.err; then |
---|
1379 | $2=yes |
---|
1380 | fi |
---|
1381 | fi |
---|
1382 | $rm conftest* |
---|
1383 | ]) |
---|
1384 | |
---|
1385 | if test x"[$]$2" = xyes; then |
---|
1386 | ifelse([$5], , :, [$5]) |
---|
1387 | else |
---|
1388 | ifelse([$6], , :, [$6]) |
---|
1389 | fi |
---|
1390 | ])# AC_LIBTOOL_COMPILER_OPTION |
---|
1391 | |
---|
1392 | |
---|
1393 | # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, |
---|
1394 | # [ACTION-SUCCESS], [ACTION-FAILURE]) |
---|
1395 | # ------------------------------------------------------------ |
---|
1396 | # Check whether the given compiler option works |
---|
1397 | AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], |
---|
1398 | [AC_CACHE_CHECK([$1], [$2], |
---|
1399 | [$2=no |
---|
1400 | save_LDFLAGS="$LDFLAGS" |
---|
1401 | LDFLAGS="$LDFLAGS $3" |
---|
1402 | printf "$lt_simple_link_test_code" > conftest.$ac_ext |
---|
1403 | if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then |
---|
1404 | # The compiler can only warn and ignore the option if not recognized |
---|
1405 | # So say no if there are warnings |
---|
1406 | if test -s conftest.err; then |
---|
1407 | # Append any errors to the config.log. |
---|
1408 | cat conftest.err 1>&AS_MESSAGE_LOG_FD |
---|
1409 | else |
---|
1410 | $2=yes |
---|
1411 | fi |
---|
1412 | fi |
---|
1413 | $rm conftest* |
---|
1414 | LDFLAGS="$save_LDFLAGS" |
---|
1415 | ]) |
---|
1416 | |
---|
1417 | if test x"[$]$2" = xyes; then |
---|
1418 | ifelse([$4], , :, [$4]) |
---|
1419 | else |
---|
1420 | ifelse([$5], , :, [$5]) |
---|
1421 | fi |
---|
1422 | ])# AC_LIBTOOL_LINKER_OPTION |
---|
1423 | |
---|
1424 | |
---|
1425 | # AC_LIBTOOL_SYS_MAX_CMD_LEN |
---|
1426 | # -------------------------- |
---|
1427 | AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], |
---|
1428 | [# find the maximum length of command line arguments |
---|
1429 | AC_MSG_CHECKING([the maximum length of command line arguments]) |
---|
1430 | AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl |
---|
1431 | i=0 |
---|
1432 | testring="ABCD" |
---|
1433 | |
---|
1434 | case $build_os in |
---|
1435 | msdosdjgpp*) |
---|
1436 | # On DJGPP, this test can blow up pretty badly due to problems in libc |
---|
1437 | # (any single argument exceeding 2000 bytes causes a buffer overrun |
---|
1438 | # during glob expansion). Even if it were fixed, the result of this |
---|
1439 | # check would be larger than it should be. |
---|
1440 | lt_cv_sys_max_cmd_len=12288; # 12K is about right |
---|
1441 | ;; |
---|
1442 | |
---|
1443 | gnu*) |
---|
1444 | # Under GNU Hurd, this test is not required because there is |
---|
1445 | # no limit to the length of command line arguments. |
---|
1446 | # Libtool will interpret -1 as no limit whatsoever |
---|
1447 | lt_cv_sys_max_cmd_len=-1; |
---|
1448 | ;; |
---|
1449 | |
---|
1450 | cygwin* | mingw*) |
---|
1451 | # On Win9x/ME, this test blows up -- it succeeds, but takes |
---|
1452 | # about 5 minutes as the teststring grows exponentially. |
---|
1453 | # Worse, since 9x/ME are not pre-emptively multitasking, |
---|
1454 | # you end up with a "frozen" computer, even though with patience |
---|
1455 | # the test eventually succeeds (with a max line length of 256k). |
---|
1456 | # Instead, let's just punt: use the minimum linelength reported by |
---|
1457 | # all of the supported platforms: 8192 (on NT/2K/XP). |
---|
1458 | lt_cv_sys_max_cmd_len=8192; |
---|
1459 | ;; |
---|
1460 | |
---|
1461 | *) |
---|
1462 | # If test is not a shell built-in, we'll probably end up computing a |
---|
1463 | # maximum length that is only half of the actual maximum length, but |
---|
1464 | # we can't tell. |
---|
1465 | while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \ |
---|
1466 | = "XX$testring") >/dev/null 2>&1 && |
---|
1467 | new_result=`expr "X$testring" : ".*" 2>&1` && |
---|
1468 | lt_cv_sys_max_cmd_len=$new_result && |
---|
1469 | test $i != 17 # 1/2 MB should be enough |
---|
1470 | do |
---|
1471 | i=`expr $i + 1` |
---|
1472 | testring=$testring$testring |
---|
1473 | done |
---|
1474 | testring= |
---|
1475 | # Add a significant safety factor because C++ compilers can tack on massive |
---|
1476 | # amounts of additional arguments before passing them to the linker. |
---|
1477 | # It appears as though 1/2 is a usable value. |
---|
1478 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` |
---|
1479 | ;; |
---|
1480 | esac |
---|
1481 | ]) |
---|
1482 | if test -n $lt_cv_sys_max_cmd_len ; then |
---|
1483 | AC_MSG_RESULT($lt_cv_sys_max_cmd_len) |
---|
1484 | else |
---|
1485 | AC_MSG_RESULT(none) |
---|
1486 | fi |
---|
1487 | ])# AC_LIBTOOL_SYS_MAX_CMD_LEN |
---|
1488 | |
---|
1489 | |
---|
1490 | # _LT_AC_CHECK_DLFCN |
---|
1491 | # -------------------- |
---|
1492 | AC_DEFUN([_LT_AC_CHECK_DLFCN], |
---|
1493 | [AC_CHECK_HEADERS(dlfcn.h)dnl |
---|
1494 | ])# _LT_AC_CHECK_DLFCN |
---|
1495 | |
---|
1496 | |
---|
1497 | # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, |
---|
1498 | # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) |
---|
1499 | # ------------------------------------------------------------------ |
---|
1500 | AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], |
---|
1501 | [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl |
---|
1502 | if test "$cross_compiling" = yes; then : |
---|
1503 | [$4] |
---|
1504 | else |
---|
1505 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
---|
1506 | lt_status=$lt_dlunknown |
---|
1507 | cat > conftest.$ac_ext <<EOF |
---|
1508 | [#line __oline__ "configure" |
---|
1509 | #include "confdefs.h" |
---|
1510 | |
---|
1511 | #if HAVE_DLFCN_H |
---|
1512 | #include <dlfcn.h> |
---|
1513 | #endif |
---|
1514 | |
---|
1515 | #include <stdio.h> |
---|
1516 | |
---|
1517 | #ifdef RTLD_GLOBAL |
---|
1518 | # define LT_DLGLOBAL RTLD_GLOBAL |
---|
1519 | #else |
---|
1520 | # ifdef DL_GLOBAL |
---|
1521 | # define LT_DLGLOBAL DL_GLOBAL |
---|
1522 | # else |
---|
1523 | # define LT_DLGLOBAL 0 |
---|
1524 | # endif |
---|
1525 | #endif |
---|
1526 | |
---|
1527 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we |
---|
1528 | find out it does not work in some platform. */ |
---|
1529 | #ifndef LT_DLLAZY_OR_NOW |
---|
1530 | # ifdef RTLD_LAZY |
---|
1531 | # define LT_DLLAZY_OR_NOW RTLD_LAZY |
---|
1532 | # else |
---|
1533 | # ifdef DL_LAZY |
---|
1534 | # define LT_DLLAZY_OR_NOW DL_LAZY |
---|
1535 | # else |
---|
1536 | # ifdef RTLD_NOW |
---|
1537 | # define LT_DLLAZY_OR_NOW RTLD_NOW |
---|
1538 | # else |
---|
1539 | # ifdef DL_NOW |
---|
1540 | # define LT_DLLAZY_OR_NOW DL_NOW |
---|
1541 | # else |
---|
1542 | # define LT_DLLAZY_OR_NOW 0 |
---|
1543 | # endif |
---|
1544 | # endif |
---|
1545 | # endif |
---|
1546 | # endif |
---|
1547 | #endif |
---|
1548 | |
---|
1549 | #ifdef __cplusplus |
---|
1550 | extern "C" void exit (int); |
---|
1551 | #endif |
---|
1552 | |
---|
1553 | void fnord() { int i=42;} |
---|
1554 | int main () |
---|
1555 | { |
---|
1556 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); |
---|
1557 | int status = $lt_dlunknown; |
---|
1558 | |
---|
1559 | if (self) |
---|
1560 | { |
---|
1561 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; |
---|
1562 | else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; |
---|
1563 | /* dlclose (self); */ |
---|
1564 | } |
---|
1565 | |
---|
1566 | exit (status); |
---|
1567 | }] |
---|
1568 | EOF |
---|
1569 | if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then |
---|
1570 | (./conftest; exit; ) 2>/dev/null |
---|
1571 | lt_status=$? |
---|
1572 | case x$lt_status in |
---|
1573 | x$lt_dlno_uscore) $1 ;; |
---|
1574 | x$lt_dlneed_uscore) $2 ;; |
---|
1575 | x$lt_unknown|x*) $3 ;; |
---|
1576 | esac |
---|
1577 | else : |
---|
1578 | # compilation failed |
---|
1579 | $3 |
---|
1580 | fi |
---|
1581 | fi |
---|
1582 | rm -fr conftest* |
---|
1583 | ])# _LT_AC_TRY_DLOPEN_SELF |
---|
1584 | |
---|
1585 | |
---|
1586 | # AC_LIBTOOL_DLOPEN_SELF |
---|
1587 | # ------------------- |
---|
1588 | AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], |
---|
1589 | [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl |
---|
1590 | if test "x$enable_dlopen" != xyes; then |
---|
1591 | enable_dlopen=unknown |
---|
1592 | enable_dlopen_self=unknown |
---|
1593 | enable_dlopen_self_static=unknown |
---|
1594 | else |
---|
1595 | lt_cv_dlopen=no |
---|
1596 | lt_cv_dlopen_libs= |
---|
1597 | |
---|
1598 | case $host_os in |
---|
1599 | beos*) |
---|
1600 | lt_cv_dlopen="load_add_on" |
---|
1601 | lt_cv_dlopen_libs= |
---|
1602 | lt_cv_dlopen_self=yes |
---|
1603 | ;; |
---|
1604 | |
---|
1605 | mingw* | pw32*) |
---|
1606 | lt_cv_dlopen="LoadLibrary" |
---|
1607 | lt_cv_dlopen_libs= |
---|
1608 | ;; |
---|
1609 | |
---|
1610 | cygwin*) |
---|
1611 | lt_cv_dlopen="dlopen" |
---|
1612 | lt_cv_dlopen_libs= |
---|
1613 | ;; |
---|
1614 | |
---|
1615 | darwin*) |
---|
1616 | # if libdl is installed we need to link against it |
---|
1617 | AC_CHECK_LIB([dl], [dlopen], |
---|
1618 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ |
---|
1619 | lt_cv_dlopen="dyld" |
---|
1620 | lt_cv_dlopen_libs= |
---|
1621 | lt_cv_dlopen_self=yes |
---|
1622 | ]) |
---|
1623 | ;; |
---|
1624 | |
---|
1625 | *) |
---|
1626 | AC_CHECK_FUNC([shl_load], |
---|
1627 | [lt_cv_dlopen="shl_load"], |
---|
1628 | [AC_CHECK_LIB([dld], [shl_load], |
---|
1629 | [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], |
---|
1630 | [AC_CHECK_FUNC([dlopen], |
---|
1631 | [lt_cv_dlopen="dlopen"], |
---|
1632 | [AC_CHECK_LIB([dl], [dlopen], |
---|
1633 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], |
---|
1634 | [AC_CHECK_LIB([svld], [dlopen], |
---|
1635 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], |
---|
1636 | [AC_CHECK_LIB([dld], [dld_link], |
---|
1637 | [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) |
---|
1638 | ]) |
---|
1639 | ]) |
---|
1640 | ]) |
---|
1641 | ]) |
---|
1642 | ]) |
---|
1643 | ;; |
---|
1644 | esac |
---|
1645 | |
---|
1646 | if test "x$lt_cv_dlopen" != xno; then |
---|
1647 | enable_dlopen=yes |
---|
1648 | else |
---|
1649 | enable_dlopen=no |
---|
1650 | fi |
---|
1651 | |
---|
1652 | case $lt_cv_dlopen in |
---|
1653 | dlopen) |
---|
1654 | save_CPPFLAGS="$CPPFLAGS" |
---|
1655 | test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" |
---|
1656 | |
---|
1657 | save_LDFLAGS="$LDFLAGS" |
---|
1658 | eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" |
---|
1659 | |
---|
1660 | save_LIBS="$LIBS" |
---|
1661 | LIBS="$lt_cv_dlopen_libs $LIBS" |
---|
1662 | |
---|
1663 | AC_CACHE_CHECK([whether a program can dlopen itself], |
---|
1664 | lt_cv_dlopen_self, [dnl |
---|
1665 | _LT_AC_TRY_DLOPEN_SELF( |
---|
1666 | lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, |
---|
1667 | lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) |
---|
1668 | ]) |
---|
1669 | |
---|
1670 | if test "x$lt_cv_dlopen_self" = xyes; then |
---|
1671 | LDFLAGS="$LDFLAGS $link_static_flag" |
---|
1672 | AC_CACHE_CHECK([whether a statically linked program can dlopen itself], |
---|
1673 | lt_cv_dlopen_self_static, [dnl |
---|
1674 | _LT_AC_TRY_DLOPEN_SELF( |
---|
1675 | lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, |
---|
1676 | lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) |
---|
1677 | ]) |
---|
1678 | fi |
---|
1679 | |
---|
1680 | CPPFLAGS="$save_CPPFLAGS" |
---|
1681 | LDFLAGS="$save_LDFLAGS" |
---|
1682 | LIBS="$save_LIBS" |
---|
1683 | ;; |
---|
1684 | esac |
---|
1685 | |
---|
1686 | case $lt_cv_dlopen_self in |
---|
1687 | yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; |
---|
1688 | *) enable_dlopen_self=unknown ;; |
---|
1689 | esac |
---|
1690 | |
---|
1691 | case $lt_cv_dlopen_self_static in |
---|
1692 | yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; |
---|
1693 | *) enable_dlopen_self_static=unknown ;; |
---|
1694 | esac |
---|
1695 | fi |
---|
1696 | ])# AC_LIBTOOL_DLOPEN_SELF |
---|
1697 | |
---|
1698 | |
---|
1699 | # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) |
---|
1700 | # --------------------------------- |
---|
1701 | # Check to see if options -c and -o are simultaneously supported by compiler |
---|
1702 | AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], |
---|
1703 | [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl |
---|
1704 | AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], |
---|
1705 | [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], |
---|
1706 | [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no |
---|
1707 | $rm -r conftest 2>/dev/null |
---|
1708 | mkdir conftest |
---|
1709 | cd conftest |
---|
1710 | mkdir out |
---|
1711 | printf "$lt_simple_compile_test_code" > conftest.$ac_ext |
---|
1712 | |
---|
1713 | # According to Tom Tromey, Ian Lance Taylor reported there are C compilers |
---|
1714 | # that will create temporary files in the current directory regardless of |
---|
1715 | # the output directory. Thus, making CWD read-only will cause this test |
---|
1716 | # to fail, enabling locking or at least warning the user not to do parallel |
---|
1717 | # builds. |
---|
1718 | chmod -w . |
---|
1719 | |
---|
1720 | lt_compiler_flag="-o out/conftest2.$ac_objext" |
---|
1721 | # Insert the option either (1) after the last *FLAGS variable, or |
---|
1722 | # (2) before a word containing "conftest.", or (3) at the end. |
---|
1723 | # Note that $ac_compile itself does not contain backslashes and begins |
---|
1724 | # with a dollar sign (not a hyphen), so the echo should work correctly. |
---|
1725 | lt_compile=`echo "$ac_compile" | $SED \ |
---|
1726 | -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ |
---|
1727 | -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ |
---|
1728 | -e 's:$: $lt_compiler_flag:'` |
---|
1729 | (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) |
---|
1730 | (eval "$lt_compile" 2>out/conftest.err) |
---|
1731 | ac_status=$? |
---|
1732 | cat out/conftest.err >&AS_MESSAGE_LOG_FD |
---|
1733 | echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD |
---|
1734 | if (exit $ac_status) && test -s out/conftest2.$ac_objext |
---|
1735 | then |
---|
1736 | # The compiler can only warn and ignore the option if not recognized |
---|
1737 | # So say no if there are warnings |
---|
1738 | if test ! -s out/conftest.err; then |
---|
1739 | _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes |
---|
1740 | fi |
---|
1741 | fi |
---|
1742 | chmod u+w . |
---|
1743 | $rm conftest* out/* |
---|
1744 | rmdir out |
---|
1745 | cd .. |
---|
1746 | rmdir conftest |
---|
1747 | $rm conftest* |
---|
1748 | ]) |
---|
1749 | ])# AC_LIBTOOL_PROG_CC_C_O |
---|
1750 | |
---|
1751 | |
---|
1752 | # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) |
---|
1753 | # ----------------------------------------- |
---|
1754 | # Check to see if we can do hard links to lock some files if needed |
---|
1755 | AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], |
---|
1756 | [AC_REQUIRE([_LT_AC_LOCK])dnl |
---|
1757 | |
---|
1758 | hard_links="nottested" |
---|
1759 | if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then |
---|
1760 | # do not overwrite the value of need_locks provided by the user |
---|
1761 | AC_MSG_CHECKING([if we can lock with hard links]) |
---|
1762 | hard_links=yes |
---|
1763 | $rm conftest* |
---|
1764 | ln conftest.a conftest.b 2>/dev/null && hard_links=no |
---|
1765 | touch conftest.a |
---|
1766 | ln conftest.a conftest.b 2>&5 || hard_links=no |
---|
1767 | ln conftest.a conftest.b 2>/dev/null && hard_links=no |
---|
1768 | AC_MSG_RESULT([$hard_links]) |
---|
1769 | if test "$hard_links" = no; then |
---|
1770 | AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) |
---|
1771 | need_locks=warn |
---|
1772 | fi |
---|
1773 | else |
---|
1774 | need_locks=no |
---|
1775 | fi |
---|
1776 | ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS |
---|
1777 | |
---|
1778 | |
---|
1779 | # AC_LIBTOOL_OBJDIR |
---|
1780 | # ----------------- |
---|
1781 | AC_DEFUN([AC_LIBTOOL_OBJDIR], |
---|
1782 | [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], |
---|
1783 | [rm -f .libs 2>/dev/null |
---|
1784 | mkdir .libs 2>/dev/null |
---|
1785 | if test -d .libs; then |
---|
1786 | lt_cv_objdir=.libs |
---|
1787 | else |
---|
1788 | # MS-DOS does not allow filenames that begin with a dot. |
---|
1789 | lt_cv_objdir=_libs |
---|
1790 | fi |
---|
1791 | rmdir .libs 2>/dev/null]) |
---|
1792 | objdir=$lt_cv_objdir |
---|
1793 | ])# AC_LIBTOOL_OBJDIR |
---|
1794 | |
---|
1795 | |
---|
1796 | # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) |
---|
1797 | # ---------------------------------------------- |
---|
1798 | # Check hardcoding attributes. |
---|
1799 | AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], |
---|
1800 | [AC_MSG_CHECKING([how to hardcode library paths into programs]) |
---|
1801 | _LT_AC_TAGVAR(hardcode_action, $1)= |
---|
1802 | if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ |
---|
1803 | test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \ |
---|
1804 | test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then |
---|
1805 | |
---|
1806 | # We can hardcode non-existant directories. |
---|
1807 | if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && |
---|
1808 | # If the only mechanism to avoid hardcoding is shlibpath_var, we |
---|
1809 | # have to relink, otherwise we might link with an installed library |
---|
1810 | # when we should be linking with a yet-to-be-installed one |
---|
1811 | ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && |
---|
1812 | test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then |
---|
1813 | # Linking always hardcodes the temporary library directory. |
---|
1814 | _LT_AC_TAGVAR(hardcode_action, $1)=relink |
---|
1815 | else |
---|
1816 | # We can link without hardcoding, and we can hardcode nonexisting dirs. |
---|
1817 | _LT_AC_TAGVAR(hardcode_action, $1)=immediate |
---|
1818 | fi |
---|
1819 | else |
---|
1820 | # We cannot hardcode anything, or else we can only hardcode existing |
---|
1821 | # directories. |
---|
1822 | _LT_AC_TAGVAR(hardcode_action, $1)=unsupported |
---|
1823 | fi |
---|
1824 | AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) |
---|
1825 | |
---|
1826 | if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then |
---|
1827 | # Fast installation is not supported |
---|
1828 | enable_fast_install=no |
---|
1829 | elif test "$shlibpath_overrides_runpath" = yes || |
---|
1830 | test "$enable_shared" = no; then |
---|
1831 | # Fast installation is not necessary |
---|
1832 | enable_fast_install=needless |
---|
1833 | fi |
---|
1834 | ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH |
---|
1835 | |
---|
1836 | |
---|
1837 | # AC_LIBTOOL_SYS_LIB_STRIP |
---|
1838 | # ------------------------ |
---|
1839 | AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], |
---|
1840 | [striplib= |
---|
1841 | old_striplib= |
---|
1842 | AC_MSG_CHECKING([whether stripping libraries is possible]) |
---|
1843 | if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then |
---|
1844 | test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" |
---|
1845 | test -z "$striplib" && striplib="$STRIP --strip-unneeded" |
---|
1846 | AC_MSG_RESULT([yes]) |
---|
1847 | else |
---|
1848 | # FIXME - insert some real tests, host_os isn't really good enough |
---|
1849 | case $host_os in |
---|
1850 | darwin*) |
---|
1851 | if test -n "$STRIP" ; then |
---|
1852 | striplib="$STRIP -x" |
---|
1853 | AC_MSG_RESULT([yes]) |
---|
1854 | else |
---|
1855 | AC_MSG_RESULT([no]) |
---|
1856 | fi |
---|
1857 | ;; |
---|
1858 | *) |
---|
1859 | AC_MSG_RESULT([no]) |
---|
1860 | ;; |
---|
1861 | esac |
---|
1862 | fi |
---|
1863 | ])# AC_LIBTOOL_SYS_LIB_STRIP |
---|
1864 | |
---|
1865 | |
---|
1866 | # AC_LIBTOOL_SYS_DYNAMIC_LINKER |
---|
1867 | # ----------------------------- |
---|
1868 | # PORTME Fill in your ld.so characteristics |
---|
1869 | AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], |
---|
1870 | [AC_MSG_CHECKING([dynamic linker characteristics]) |
---|
1871 | library_names_spec= |
---|
1872 | libname_spec='lib$name' |
---|
1873 | soname_spec= |
---|
1874 | shrext=".so" |
---|
1875 | postinstall_cmds= |
---|
1876 | postuninstall_cmds= |
---|
1877 | finish_cmds= |
---|
1878 | finish_eval= |
---|
1879 | shlibpath_var= |
---|
1880 | shlibpath_overrides_runpath=unknown |
---|
1881 | version_type=none |
---|
1882 | dynamic_linker="$host_os ld.so" |
---|
1883 | sys_lib_dlsearch_path_spec="/lib /usr/lib" |
---|
1884 | if test "$GCC" = yes; then |
---|
1885 | sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` |
---|
1886 | if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then |
---|
1887 | # if the path contains ";" then we assume it to be the separator |
---|
1888 | # otherwise default to the standard path separator (i.e. ":") - it is |
---|
1889 | # assumed that no part of a normal pathname contains ";" but that should |
---|
1890 | # okay in the real world where ";" in dirpaths is itself problematic. |
---|
1891 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` |
---|
1892 | else |
---|
1893 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` |
---|
1894 | fi |
---|
1895 | else |
---|
1896 | sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" |
---|
1897 | fi |
---|
1898 | need_lib_prefix=unknown |
---|
1899 | hardcode_into_libs=no |
---|
1900 | |
---|
1901 | # when you set need_version to no, make sure it does not cause -set_version |
---|
1902 | # flags to be left without arguments |
---|
1903 | need_version=unknown |
---|
1904 | |
---|
1905 | case $host_os in |
---|
1906 | aix3*) |
---|
1907 | version_type=linux |
---|
1908 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' |
---|
1909 | shlibpath_var=LIBPATH |
---|
1910 | |
---|
1911 | # AIX 3 has no versioning support, so we append a major version to the name. |
---|
1912 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
1913 | ;; |
---|
1914 | |
---|
1915 | aix4* | aix5*) |
---|
1916 | version_type=linux |
---|
1917 | need_lib_prefix=no |
---|
1918 | need_version=no |
---|
1919 | hardcode_into_libs=yes |
---|
1920 | if test "$host_cpu" = ia64; then |
---|
1921 | # AIX 5 supports IA64 |
---|
1922 | library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' |
---|
1923 | shlibpath_var=LD_LIBRARY_PATH |
---|
1924 | else |
---|
1925 | # With GCC up to 2.95.x, collect2 would create an import file |
---|
1926 | # for dependence libraries. The import file would start with |
---|
1927 | # the line `#! .'. This would cause the generated library to |
---|
1928 | # depend on `.', always an invalid library. This was fixed in |
---|
1929 | # development snapshots of GCC prior to 3.0. |
---|
1930 | case $host_os in |
---|
1931 | aix4 | aix4.[[01]] | aix4.[[01]].*) |
---|
1932 | if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' |
---|
1933 | echo ' yes ' |
---|
1934 | echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then |
---|
1935 | : |
---|
1936 | else |
---|
1937 | can_build_shared=no |
---|
1938 | fi |
---|
1939 | ;; |
---|
1940 | esac |
---|
1941 | # AIX (on Power*) has no versioning support, so currently we can not hardcode correct |
---|
1942 | # soname into executable. Probably we can add versioning support to |
---|
1943 | # collect2, so additional links can be useful in future. |
---|
1944 | if test "$aix_use_runtimelinking" = yes; then |
---|
1945 | # If using run time linking (on AIX 4.2 or later) use lib<name>.so |
---|
1946 | # instead of lib<name>.a to let people know that these are not |
---|
1947 | # typical AIX shared libraries. |
---|
1948 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
1949 | else |
---|
1950 | # We preserve .a as extension for shared libraries through AIX4.2 |
---|
1951 | # and later when we are not doing run time linking. |
---|
1952 | library_names_spec='${libname}${release}.a $libname.a' |
---|
1953 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
1954 | fi |
---|
1955 | shlibpath_var=LIBPATH |
---|
1956 | fi |
---|
1957 | ;; |
---|
1958 | |
---|
1959 | amigaos*) |
---|
1960 | library_names_spec='$libname.ixlibrary $libname.a' |
---|
1961 | # Create ${libname}_ixlibrary.a entries in /sys/libs. |
---|
1962 | 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' |
---|
1963 | ;; |
---|
1964 | |
---|
1965 | beos*) |
---|
1966 | library_names_spec='${libname}${shared_ext}' |
---|
1967 | dynamic_linker="$host_os ld.so" |
---|
1968 | shlibpath_var=LIBRARY_PATH |
---|
1969 | ;; |
---|
1970 | |
---|
1971 | bsdi4*) |
---|
1972 | version_type=linux |
---|
1973 | need_version=no |
---|
1974 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
1975 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
1976 | finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' |
---|
1977 | shlibpath_var=LD_LIBRARY_PATH |
---|
1978 | sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" |
---|
1979 | sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" |
---|
1980 | # the default ld.so.conf also contains /usr/contrib/lib and |
---|
1981 | # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow |
---|
1982 | # libtool to hard-code these into programs |
---|
1983 | ;; |
---|
1984 | |
---|
1985 | cygwin* | mingw* | pw32*) |
---|
1986 | version_type=windows |
---|
1987 | shrext=".dll" |
---|
1988 | need_version=no |
---|
1989 | need_lib_prefix=no |
---|
1990 | |
---|
1991 | case $GCC,$host_os in |
---|
1992 | yes,cygwin* | yes,mingw* | yes,pw32*) |
---|
1993 | library_names_spec='$libname.dll.a' |
---|
1994 | # DLL is installed to $(libdir)/../bin by postinstall_cmds |
---|
1995 | postinstall_cmds='base_file=`basename \${file}`~ |
---|
1996 | dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ |
---|
1997 | dldir=$destdir/`dirname \$dlpath`~ |
---|
1998 | test -d \$dldir || mkdir -p \$dldir~ |
---|
1999 | $install_prog $dir/$dlname \$dldir/$dlname' |
---|
2000 | postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ |
---|
2001 | dlpath=$dir/\$dldll~ |
---|
2002 | $rm \$dlpath' |
---|
2003 | shlibpath_overrides_runpath=yes |
---|
2004 | |
---|
2005 | case $host_os in |
---|
2006 | cygwin*) |
---|
2007 | # Cygwin DLLs use 'cyg' prefix rather than 'lib' |
---|
2008 | soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' |
---|
2009 | sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib" |
---|
2010 | ;; |
---|
2011 | mingw*) |
---|
2012 | # MinGW DLLs use traditional 'lib' prefix |
---|
2013 | soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' |
---|
2014 | sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` |
---|
2015 | if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then |
---|
2016 | # It is most probably a Windows format PATH printed by |
---|
2017 | # mingw gcc, but we are running on Cygwin. Gcc prints its search |
---|
2018 | # path with ; separators, and with drive letters. We can handle the |
---|
2019 | # drive letters (cygwin fileutils understands them), so leave them, |
---|
2020 | # especially as we might pass files found there to a mingw objdump, |
---|
2021 | # which wouldn't understand a cygwinified path. Ahh. |
---|
2022 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` |
---|
2023 | else |
---|
2024 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` |
---|
2025 | fi |
---|
2026 | ;; |
---|
2027 | pw32*) |
---|
2028 | # pw32 DLLs use 'pw' prefix rather than 'lib' |
---|
2029 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' |
---|
2030 | ;; |
---|
2031 | esac |
---|
2032 | ;; |
---|
2033 | |
---|
2034 | *) |
---|
2035 | library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' |
---|
2036 | ;; |
---|
2037 | esac |
---|
2038 | dynamic_linker='Win32 ld.exe' |
---|
2039 | # FIXME: first we should search . and the directory the executable is in |
---|
2040 | shlibpath_var=PATH |
---|
2041 | ;; |
---|
2042 | |
---|
2043 | darwin* | rhapsody*) |
---|
2044 | dynamic_linker="$host_os dyld" |
---|
2045 | version_type=darwin |
---|
2046 | need_lib_prefix=no |
---|
2047 | need_version=no |
---|
2048 | # FIXME: Relying on posixy $() will cause problems for |
---|
2049 | # cross-compilation, but unfortunately the echo tests do not |
---|
2050 | # yet detect zsh echo's removal of \ escapes. |
---|
2051 | library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' |
---|
2052 | soname_spec='${libname}${release}${major}$shared_ext' |
---|
2053 | shlibpath_overrides_runpath=yes |
---|
2054 | shlibpath_var=DYLD_LIBRARY_PATH |
---|
2055 | shrext='$(test .$module = .yes && echo .so || echo .dylib)' |
---|
2056 | # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. |
---|
2057 | if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then |
---|
2058 | sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` |
---|
2059 | fi |
---|
2060 | sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' |
---|
2061 | ;; |
---|
2062 | |
---|
2063 | dgux*) |
---|
2064 | version_type=linux |
---|
2065 | need_lib_prefix=no |
---|
2066 | need_version=no |
---|
2067 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' |
---|
2068 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2069 | shlibpath_var=LD_LIBRARY_PATH |
---|
2070 | ;; |
---|
2071 | |
---|
2072 | freebsd1*) |
---|
2073 | dynamic_linker=no |
---|
2074 | ;; |
---|
2075 | |
---|
2076 | freebsd*) |
---|
2077 | objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` |
---|
2078 | version_type=freebsd-$objformat |
---|
2079 | case $version_type in |
---|
2080 | freebsd-elf*) |
---|
2081 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' |
---|
2082 | need_version=no |
---|
2083 | need_lib_prefix=no |
---|
2084 | ;; |
---|
2085 | freebsd-*) |
---|
2086 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' |
---|
2087 | need_version=yes |
---|
2088 | ;; |
---|
2089 | esac |
---|
2090 | shlibpath_var=LD_LIBRARY_PATH |
---|
2091 | case $host_os in |
---|
2092 | freebsd2*) |
---|
2093 | shlibpath_overrides_runpath=yes |
---|
2094 | ;; |
---|
2095 | freebsd3.[01]* | freebsdelf3.[01]*) |
---|
2096 | shlibpath_overrides_runpath=yes |
---|
2097 | hardcode_into_libs=yes |
---|
2098 | ;; |
---|
2099 | *) # from 3.2 on |
---|
2100 | shlibpath_overrides_runpath=no |
---|
2101 | hardcode_into_libs=yes |
---|
2102 | ;; |
---|
2103 | esac |
---|
2104 | ;; |
---|
2105 | |
---|
2106 | gnu*) |
---|
2107 | version_type=linux |
---|
2108 | need_lib_prefix=no |
---|
2109 | need_version=no |
---|
2110 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' |
---|
2111 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2112 | shlibpath_var=LD_LIBRARY_PATH |
---|
2113 | hardcode_into_libs=yes |
---|
2114 | ;; |
---|
2115 | |
---|
2116 | hpux9* | hpux10* | hpux11*) |
---|
2117 | # Give a soname corresponding to the major version so that dld.sl refuses to |
---|
2118 | # link against other versions. |
---|
2119 | version_type=sunos |
---|
2120 | need_lib_prefix=no |
---|
2121 | need_version=no |
---|
2122 | case "$host_cpu" in |
---|
2123 | ia64*) |
---|
2124 | shrext='.so' |
---|
2125 | hardcode_into_libs=yes |
---|
2126 | dynamic_linker="$host_os dld.so" |
---|
2127 | shlibpath_var=LD_LIBRARY_PATH |
---|
2128 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. |
---|
2129 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2130 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2131 | if test "X$HPUX_IA64_MODE" = X32; then |
---|
2132 | sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" |
---|
2133 | else |
---|
2134 | sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" |
---|
2135 | fi |
---|
2136 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec |
---|
2137 | ;; |
---|
2138 | hppa*64*) |
---|
2139 | shrext='.sl' |
---|
2140 | hardcode_into_libs=yes |
---|
2141 | dynamic_linker="$host_os dld.sl" |
---|
2142 | shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH |
---|
2143 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. |
---|
2144 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2145 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2146 | sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" |
---|
2147 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec |
---|
2148 | ;; |
---|
2149 | *) |
---|
2150 | shrext='.sl' |
---|
2151 | dynamic_linker="$host_os dld.sl" |
---|
2152 | shlibpath_var=SHLIB_PATH |
---|
2153 | shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH |
---|
2154 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2155 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2156 | ;; |
---|
2157 | esac |
---|
2158 | # HP-UX runs *really* slowly unless shared libraries are mode 555. |
---|
2159 | postinstall_cmds='chmod 555 $lib' |
---|
2160 | ;; |
---|
2161 | |
---|
2162 | irix5* | irix6* | nonstopux*) |
---|
2163 | case $host_os in |
---|
2164 | nonstopux*) version_type=nonstopux ;; |
---|
2165 | *) |
---|
2166 | if test "$lt_cv_prog_gnu_ld" = yes; then |
---|
2167 | version_type=linux |
---|
2168 | else |
---|
2169 | version_type=irix |
---|
2170 | fi ;; |
---|
2171 | esac |
---|
2172 | need_lib_prefix=no |
---|
2173 | need_version=no |
---|
2174 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2175 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' |
---|
2176 | case $host_os in |
---|
2177 | irix5* | nonstopux*) |
---|
2178 | libsuff= shlibsuff= |
---|
2179 | ;; |
---|
2180 | *) |
---|
2181 | case $LD in # libtool.m4 will add one of these switches to LD |
---|
2182 | *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") |
---|
2183 | libsuff= shlibsuff= libmagic=32-bit;; |
---|
2184 | *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") |
---|
2185 | libsuff=32 shlibsuff=N32 libmagic=N32;; |
---|
2186 | *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") |
---|
2187 | libsuff=64 shlibsuff=64 libmagic=64-bit;; |
---|
2188 | *) libsuff= shlibsuff= libmagic=never-match;; |
---|
2189 | esac |
---|
2190 | ;; |
---|
2191 | esac |
---|
2192 | shlibpath_var=LD_LIBRARY${shlibsuff}_PATH |
---|
2193 | shlibpath_overrides_runpath=no |
---|
2194 | sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" |
---|
2195 | sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" |
---|
2196 | hardcode_into_libs=yes |
---|
2197 | ;; |
---|
2198 | |
---|
2199 | # No shared lib support for Linux oldld, aout, or coff. |
---|
2200 | linux*oldld* | linux*aout* | linux*coff*) |
---|
2201 | dynamic_linker=no |
---|
2202 | ;; |
---|
2203 | |
---|
2204 | # This must be Linux ELF. |
---|
2205 | linux*) |
---|
2206 | version_type=linux |
---|
2207 | need_lib_prefix=no |
---|
2208 | need_version=no |
---|
2209 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2210 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2211 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' |
---|
2212 | shlibpath_var=LD_LIBRARY_PATH |
---|
2213 | shlibpath_overrides_runpath=no |
---|
2214 | # This implies no fast_install, which is unacceptable. |
---|
2215 | # Some rework will be needed to allow for fast_install |
---|
2216 | # before this can be enabled. |
---|
2217 | hardcode_into_libs=yes |
---|
2218 | |
---|
2219 | # We used to test for /lib/ld.so.1 and disable shared libraries on |
---|
2220 | # powerpc, because MkLinux only supported shared libraries with the |
---|
2221 | # GNU dynamic linker. Since this was broken with cross compilers, |
---|
2222 | # most powerpc-linux boxes support dynamic linking these days and |
---|
2223 | # people can always --disable-shared, the test was removed, and we |
---|
2224 | # assume the GNU/Linux dynamic linker is in use. |
---|
2225 | dynamic_linker='GNU/Linux ld.so' |
---|
2226 | ;; |
---|
2227 | |
---|
2228 | netbsd*) |
---|
2229 | version_type=sunos |
---|
2230 | need_lib_prefix=no |
---|
2231 | need_version=no |
---|
2232 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
---|
2233 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' |
---|
2234 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
---|
2235 | dynamic_linker='NetBSD (a.out) ld.so' |
---|
2236 | else |
---|
2237 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}' |
---|
2238 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2239 | dynamic_linker='NetBSD ld.elf_so' |
---|
2240 | fi |
---|
2241 | shlibpath_var=LD_LIBRARY_PATH |
---|
2242 | shlibpath_overrides_runpath=yes |
---|
2243 | hardcode_into_libs=yes |
---|
2244 | ;; |
---|
2245 | |
---|
2246 | newsos6) |
---|
2247 | version_type=linux |
---|
2248 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2249 | shlibpath_var=LD_LIBRARY_PATH |
---|
2250 | shlibpath_overrides_runpath=yes |
---|
2251 | ;; |
---|
2252 | |
---|
2253 | nto-qnx) |
---|
2254 | version_type=linux |
---|
2255 | need_lib_prefix=no |
---|
2256 | need_version=no |
---|
2257 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2258 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2259 | shlibpath_var=LD_LIBRARY_PATH |
---|
2260 | shlibpath_overrides_runpath=yes |
---|
2261 | ;; |
---|
2262 | |
---|
2263 | openbsd*) |
---|
2264 | version_type=sunos |
---|
2265 | need_lib_prefix=no |
---|
2266 | need_version=no |
---|
2267 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' |
---|
2268 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
---|
2269 | shlibpath_var=LD_LIBRARY_PATH |
---|
2270 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
---|
2271 | case $host_os in |
---|
2272 | openbsd2.[[89]] | openbsd2.[[89]].*) |
---|
2273 | shlibpath_overrides_runpath=no |
---|
2274 | ;; |
---|
2275 | *) |
---|
2276 | shlibpath_overrides_runpath=yes |
---|
2277 | ;; |
---|
2278 | esac |
---|
2279 | else |
---|
2280 | shlibpath_overrides_runpath=yes |
---|
2281 | fi |
---|
2282 | ;; |
---|
2283 | |
---|
2284 | os2*) |
---|
2285 | libname_spec='$name' |
---|
2286 | shrext=".dll" |
---|
2287 | need_lib_prefix=no |
---|
2288 | library_names_spec='$libname${shared_ext} $libname.a' |
---|
2289 | dynamic_linker='OS/2 ld.exe' |
---|
2290 | shlibpath_var=LIBPATH |
---|
2291 | ;; |
---|
2292 | |
---|
2293 | osf3* | osf4* | osf5*) |
---|
2294 | version_type=osf |
---|
2295 | need_lib_prefix=no |
---|
2296 | need_version=no |
---|
2297 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2298 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2299 | shlibpath_var=LD_LIBRARY_PATH |
---|
2300 | sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" |
---|
2301 | sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" |
---|
2302 | ;; |
---|
2303 | |
---|
2304 | sco3.2v5*) |
---|
2305 | version_type=osf |
---|
2306 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2307 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2308 | shlibpath_var=LD_LIBRARY_PATH |
---|
2309 | ;; |
---|
2310 | |
---|
2311 | solaris*) |
---|
2312 | version_type=linux |
---|
2313 | need_lib_prefix=no |
---|
2314 | need_version=no |
---|
2315 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2316 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2317 | shlibpath_var=LD_LIBRARY_PATH |
---|
2318 | shlibpath_overrides_runpath=yes |
---|
2319 | hardcode_into_libs=yes |
---|
2320 | # ldd complains unless libraries are executable |
---|
2321 | postinstall_cmds='chmod +x $lib' |
---|
2322 | ;; |
---|
2323 | |
---|
2324 | sunos4*) |
---|
2325 | version_type=sunos |
---|
2326 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' |
---|
2327 | finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' |
---|
2328 | shlibpath_var=LD_LIBRARY_PATH |
---|
2329 | shlibpath_overrides_runpath=yes |
---|
2330 | if test "$with_gnu_ld" = yes; then |
---|
2331 | need_lib_prefix=no |
---|
2332 | fi |
---|
2333 | need_version=yes |
---|
2334 | ;; |
---|
2335 | |
---|
2336 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
---|
2337 | version_type=linux |
---|
2338 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2339 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2340 | shlibpath_var=LD_LIBRARY_PATH |
---|
2341 | case $host_vendor in |
---|
2342 | sni) |
---|
2343 | shlibpath_overrides_runpath=no |
---|
2344 | need_lib_prefix=no |
---|
2345 | export_dynamic_flag_spec='${wl}-Blargedynsym' |
---|
2346 | runpath_var=LD_RUN_PATH |
---|
2347 | ;; |
---|
2348 | siemens) |
---|
2349 | need_lib_prefix=no |
---|
2350 | ;; |
---|
2351 | motorola) |
---|
2352 | need_lib_prefix=no |
---|
2353 | need_version=no |
---|
2354 | shlibpath_overrides_runpath=no |
---|
2355 | sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' |
---|
2356 | ;; |
---|
2357 | esac |
---|
2358 | ;; |
---|
2359 | |
---|
2360 | sysv4*MP*) |
---|
2361 | if test -d /usr/nec ;then |
---|
2362 | version_type=linux |
---|
2363 | library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' |
---|
2364 | soname_spec='$libname${shared_ext}.$major' |
---|
2365 | shlibpath_var=LD_LIBRARY_PATH |
---|
2366 | fi |
---|
2367 | ;; |
---|
2368 | |
---|
2369 | uts4*) |
---|
2370 | version_type=linux |
---|
2371 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
---|
2372 | soname_spec='${libname}${release}${shared_ext}$major' |
---|
2373 | shlibpath_var=LD_LIBRARY_PATH |
---|
2374 | ;; |
---|
2375 | |
---|
2376 | *) |
---|
2377 | dynamic_linker=no |
---|
2378 | ;; |
---|
2379 | esac |
---|
2380 | AC_MSG_RESULT([$dynamic_linker]) |
---|
2381 | test "$dynamic_linker" = no && can_build_shared=no |
---|
2382 | ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER |
---|
2383 | |
---|
2384 | |
---|
2385 | # _LT_AC_TAGCONFIG |
---|
2386 | # ---------------- |
---|
2387 | AC_DEFUN([_LT_AC_TAGCONFIG], |
---|
2388 | [AC_ARG_WITH([tags], |
---|
2389 | [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], |
---|
2390 | [include additional configurations @<:@automatic@:>@])], |
---|
2391 | [tagnames="$withval"]) |
---|
2392 | |
---|
2393 | if test -f "$ltmain" && test -n "$tagnames"; then |
---|
2394 | if test ! -f "${ofile}"; then |
---|
2395 | AC_MSG_WARN([output file `$ofile' does not exist]) |
---|
2396 | fi |
---|
2397 | |
---|
2398 | if test -z "$LTCC"; then |
---|
2399 | eval "`$SHELL ${ofile} --config | grep '^LTCC='`" |
---|
2400 | if test -z "$LTCC"; then |
---|
2401 | AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) |
---|
2402 | else |
---|
2403 | AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) |
---|
2404 | fi |
---|
2405 | fi |
---|
2406 | |
---|
2407 | # Extract list of available tagged configurations in $ofile. |
---|
2408 | # Note that this assumes the entire list is on one line. |
---|
2409 | available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` |
---|
2410 | |
---|
2411 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," |
---|
2412 | for tagname in $tagnames; do |
---|
2413 | IFS="$lt_save_ifs" |
---|
2414 | # Check whether tagname contains only valid characters |
---|
2415 | case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in |
---|
2416 | "") ;; |
---|
2417 | *) AC_MSG_ERROR([invalid tag name: $tagname]) |
---|
2418 | ;; |
---|
2419 | esac |
---|
2420 | |
---|
2421 | if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null |
---|
2422 | then |
---|
2423 | AC_MSG_ERROR([tag name \"$tagname\" already exists]) |
---|
2424 | fi |
---|
2425 | |
---|
2426 | # Update the list of available tags. |
---|
2427 | if test -n "$tagname"; then |
---|
2428 | echo appending configuration tag \"$tagname\" to $ofile |
---|
2429 | |
---|
2430 | case $tagname in |
---|
2431 | CXX) |
---|
2432 | if test -n "$CXX" && test "X$CXX" != "Xno"; then |
---|
2433 | AC_LIBTOOL_LANG_CXX_CONFIG |
---|
2434 | else |
---|
2435 | tagname="" |
---|
2436 | fi |
---|
2437 | ;; |
---|
2438 | |
---|
2439 | F77) |
---|
2440 | if test -n "$F77" && test "X$F77" != "Xno"; then |
---|
2441 | AC_LIBTOOL_LANG_F77_CONFIG |
---|
2442 | else |
---|
2443 | tagname="" |
---|
2444 | fi |
---|
2445 | ;; |
---|
2446 | |
---|
2447 | GCJ) |
---|
2448 | if test -n "$GCJ" && test "X$GCJ" != "Xno"; then |
---|
2449 | AC_LIBTOOL_LANG_GCJ_CONFIG |
---|
2450 | else |
---|
2451 | tagname="" |
---|
2452 | fi |
---|
2453 | ;; |
---|
2454 | |
---|
2455 | RC) |
---|
2456 | AC_LIBTOOL_LANG_RC_CONFIG |
---|
2457 | ;; |
---|
2458 | |
---|
2459 | *) |
---|
2460 | AC_MSG_ERROR([Unsupported tag name: $tagname]) |
---|
2461 | ;; |
---|
2462 | esac |
---|
2463 | |
---|
2464 | # Append the new tag name to the list of available tags. |
---|
2465 | if test -n "$tagname" ; then |
---|
2466 | available_tags="$available_tags $tagname" |
---|
2467 | fi |
---|
2468 | fi |
---|
2469 | done |
---|
2470 | IFS="$lt_save_ifs" |
---|
2471 | |
---|
2472 | # Now substitute the updated list of available tags. |
---|
2473 | if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then |
---|
2474 | mv "${ofile}T" "$ofile" |
---|
2475 | chmod +x "$ofile" |
---|
2476 | else |
---|
2477 | rm -f "${ofile}T" |
---|
2478 | AC_MSG_ERROR([unable to update list of available tagged configurations.]) |
---|
2479 | fi |
---|
2480 | fi |
---|
2481 | ])# _LT_AC_TAGCONFIG |
---|
2482 | |
---|
2483 | |
---|
2484 | # AC_LIBTOOL_DLOPEN |
---|
2485 | # ----------------- |
---|
2486 | # enable checks for dlopen support |
---|
2487 | AC_DEFUN([AC_LIBTOOL_DLOPEN], |
---|
2488 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) |
---|
2489 | ])# AC_LIBTOOL_DLOPEN |
---|
2490 | |
---|
2491 | |
---|
2492 | # AC_LIBTOOL_WIN32_DLL |
---|
2493 | # -------------------- |
---|
2494 | # declare package support for building win32 dll's |
---|
2495 | AC_DEFUN([AC_LIBTOOL_WIN32_DLL], |
---|
2496 | [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) |
---|
2497 | ])# AC_LIBTOOL_WIN32_DLL |
---|
2498 | |
---|
2499 | |
---|
2500 | # AC_ENABLE_SHARED([DEFAULT]) |
---|
2501 | # --------------------------- |
---|
2502 | # implement the --enable-shared flag |
---|
2503 | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. |
---|
2504 | AC_DEFUN([AC_ENABLE_SHARED], |
---|
2505 | [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl |
---|
2506 | AC_ARG_ENABLE([shared], |
---|
2507 | [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], |
---|
2508 | [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], |
---|
2509 | [p=${PACKAGE-default} |
---|
2510 | case $enableval in |
---|
2511 | yes) enable_shared=yes ;; |
---|
2512 | no) enable_shared=no ;; |
---|
2513 | *) |
---|
2514 | enable_shared=no |
---|
2515 | # Look at the argument we got. We use all the common list separators. |
---|
2516 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," |
---|
2517 | for pkg in $enableval; do |
---|
2518 | IFS="$lt_save_ifs" |
---|
2519 | if test "X$pkg" = "X$p"; then |
---|
2520 | enable_shared=yes |
---|
2521 | fi |
---|
2522 | done |
---|
2523 | IFS="$lt_save_ifs" |
---|
2524 | ;; |
---|
2525 | esac], |
---|
2526 | [enable_shared=]AC_ENABLE_SHARED_DEFAULT) |
---|
2527 | ])# AC_ENABLE_SHARED |
---|
2528 | |
---|
2529 | |
---|
2530 | # AC_DISABLE_SHARED |
---|
2531 | # ----------------- |
---|
2532 | #- set the default shared flag to --disable-shared |
---|
2533 | AC_DEFUN([AC_DISABLE_SHARED], |
---|
2534 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
2535 | AC_ENABLE_SHARED(no) |
---|
2536 | ])# AC_DISABLE_SHARED |
---|
2537 | |
---|
2538 | |
---|
2539 | # AC_ENABLE_STATIC([DEFAULT]) |
---|
2540 | # --------------------------- |
---|
2541 | # implement the --enable-static flag |
---|
2542 | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. |
---|
2543 | AC_DEFUN([AC_ENABLE_STATIC], |
---|
2544 | [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl |
---|
2545 | AC_ARG_ENABLE([static], |
---|
2546 | [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], |
---|
2547 | [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], |
---|
2548 | [p=${PACKAGE-default} |
---|
2549 | case $enableval in |
---|
2550 | yes) enable_static=yes ;; |
---|
2551 | no) enable_static=no ;; |
---|
2552 | *) |
---|
2553 | enable_static=no |
---|
2554 | # Look at the argument we got. We use all the common list separators. |
---|
2555 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," |
---|
2556 | for pkg in $enableval; do |
---|
2557 | IFS="$lt_save_ifs" |
---|
2558 | if test "X$pkg" = "X$p"; then |
---|
2559 | enable_static=yes |
---|
2560 | fi |
---|
2561 | done |
---|
2562 | IFS="$lt_save_ifs" |
---|
2563 | ;; |
---|
2564 | esac], |
---|
2565 | [enable_static=]AC_ENABLE_STATIC_DEFAULT) |
---|
2566 | ])# AC_ENABLE_STATIC |
---|
2567 | |
---|
2568 | |
---|
2569 | # AC_DISABLE_STATIC |
---|
2570 | # ----------------- |
---|
2571 | # set the default static flag to --disable-static |
---|
2572 | AC_DEFUN([AC_DISABLE_STATIC], |
---|
2573 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
2574 | AC_ENABLE_STATIC(no) |
---|
2575 | ])# AC_DISABLE_STATIC |
---|
2576 | |
---|
2577 | |
---|
2578 | # AC_ENABLE_FAST_INSTALL([DEFAULT]) |
---|
2579 | # --------------------------------- |
---|
2580 | # implement the --enable-fast-install flag |
---|
2581 | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. |
---|
2582 | AC_DEFUN([AC_ENABLE_FAST_INSTALL], |
---|
2583 | [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl |
---|
2584 | AC_ARG_ENABLE([fast-install], |
---|
2585 | [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], |
---|
2586 | [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], |
---|
2587 | [p=${PACKAGE-default} |
---|
2588 | case $enableval in |
---|
2589 | yes) enable_fast_install=yes ;; |
---|
2590 | no) enable_fast_install=no ;; |
---|
2591 | *) |
---|
2592 | enable_fast_install=no |
---|
2593 | # Look at the argument we got. We use all the common list separators. |
---|
2594 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," |
---|
2595 | for pkg in $enableval; do |
---|
2596 | IFS="$lt_save_ifs" |
---|
2597 | if test "X$pkg" = "X$p"; then |
---|
2598 | enable_fast_install=yes |
---|
2599 | fi |
---|
2600 | done |
---|
2601 | IFS="$lt_save_ifs" |
---|
2602 | ;; |
---|
2603 | esac], |
---|
2604 | [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) |
---|
2605 | ])# AC_ENABLE_FAST_INSTALL |
---|
2606 | |
---|
2607 | |
---|
2608 | # AC_DISABLE_FAST_INSTALL |
---|
2609 | # ----------------------- |
---|
2610 | # set the default to --disable-fast-install |
---|
2611 | AC_DEFUN([AC_DISABLE_FAST_INSTALL], |
---|
2612 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
2613 | AC_ENABLE_FAST_INSTALL(no) |
---|
2614 | ])# AC_DISABLE_FAST_INSTALL |
---|
2615 | |
---|
2616 | |
---|
2617 | # AC_LIBTOOL_PICMODE([MODE]) |
---|
2618 | # -------------------------- |
---|
2619 | # implement the --with-pic flag |
---|
2620 | # MODE is either `yes' or `no'. If omitted, it defaults to `both'. |
---|
2621 | AC_DEFUN([AC_LIBTOOL_PICMODE], |
---|
2622 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
2623 | pic_mode=ifelse($#,1,$1,default) |
---|
2624 | ])# AC_LIBTOOL_PICMODE |
---|
2625 | |
---|
2626 | |
---|
2627 | # AC_PROG_EGREP |
---|
2628 | # ------------- |
---|
2629 | # This is predefined starting with Autoconf 2.54, so this conditional |
---|
2630 | # definition can be removed once we require Autoconf 2.54 or later. |
---|
2631 | m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], |
---|
2632 | [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], |
---|
2633 | [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 |
---|
2634 | then ac_cv_prog_egrep='grep -E' |
---|
2635 | else ac_cv_prog_egrep='egrep' |
---|
2636 | fi]) |
---|
2637 | EGREP=$ac_cv_prog_egrep |
---|
2638 | AC_SUBST([EGREP]) |
---|
2639 | ])]) |
---|
2640 | |
---|
2641 | |
---|
2642 | # AC_PATH_TOOL_PREFIX |
---|
2643 | # ------------------- |
---|
2644 | # find a file program which can recognise shared library |
---|
2645 | AC_DEFUN([AC_PATH_TOOL_PREFIX], |
---|
2646 | [AC_REQUIRE([AC_PROG_EGREP])dnl |
---|
2647 | AC_MSG_CHECKING([for $1]) |
---|
2648 | AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, |
---|
2649 | [case $MAGIC_CMD in |
---|
2650 | [[\\/*] | ?:[\\/]*]) |
---|
2651 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. |
---|
2652 | ;; |
---|
2653 | *) |
---|
2654 | lt_save_MAGIC_CMD="$MAGIC_CMD" |
---|
2655 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
---|
2656 | dnl $ac_dummy forces splitting on constant user-supplied paths. |
---|
2657 | dnl POSIX.2 word splitting is done only on the output of word expansions, |
---|
2658 | dnl not every word. This closes a longstanding sh security hole. |
---|
2659 | ac_dummy="ifelse([$2], , $PATH, [$2])" |
---|
2660 | for ac_dir in $ac_dummy; do |
---|
2661 | IFS="$lt_save_ifs" |
---|
2662 | test -z "$ac_dir" && ac_dir=. |
---|
2663 | if test -f $ac_dir/$1; then |
---|
2664 | lt_cv_path_MAGIC_CMD="$ac_dir/$1" |
---|
2665 | if test -n "$file_magic_test_file"; then |
---|
2666 | case $deplibs_check_method in |
---|
2667 | "file_magic "*) |
---|
2668 | file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" |
---|
2669 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
---|
2670 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | |
---|
2671 | $EGREP "$file_magic_regex" > /dev/null; then |
---|
2672 | : |
---|
2673 | else |
---|
2674 | cat <<EOF 1>&2 |
---|
2675 | |
---|
2676 | *** Warning: the command libtool uses to detect shared libraries, |
---|
2677 | *** $file_magic_cmd, produces output that libtool cannot recognize. |
---|
2678 | *** The result is that libtool may fail to recognize shared libraries |
---|
2679 | *** as such. This will affect the creation of libtool libraries that |
---|
2680 | *** depend on shared libraries, but programs linked with such libtool |
---|
2681 | *** libraries will work regardless of this problem. Nevertheless, you |
---|
2682 | *** may want to report the problem to your system manager and/or to |
---|
2683 | *** bug-libtool@gnu.org |
---|
2684 | |
---|
2685 | EOF |
---|
2686 | fi ;; |
---|
2687 | esac |
---|
2688 | fi |
---|
2689 | break |
---|
2690 | fi |
---|
2691 | done |
---|
2692 | IFS="$lt_save_ifs" |
---|
2693 | MAGIC_CMD="$lt_save_MAGIC_CMD" |
---|
2694 | ;; |
---|
2695 | esac]) |
---|
2696 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
---|
2697 | if test -n "$MAGIC_CMD"; then |
---|
2698 | AC_MSG_RESULT($MAGIC_CMD) |
---|
2699 | else |
---|
2700 | AC_MSG_RESULT(no) |
---|
2701 | fi |
---|
2702 | ])# AC_PATH_TOOL_PREFIX |
---|
2703 | |
---|
2704 | |
---|
2705 | # AC_PATH_MAGIC |
---|
2706 | # ------------- |
---|
2707 | # find a file program which can recognise a shared library |
---|
2708 | AC_DEFUN([AC_PATH_MAGIC], |
---|
2709 | [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) |
---|
2710 | if test -z "$lt_cv_path_MAGIC_CMD"; then |
---|
2711 | if test -n "$ac_tool_prefix"; then |
---|
2712 | AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) |
---|
2713 | else |
---|
2714 | MAGIC_CMD=: |
---|
2715 | fi |
---|
2716 | fi |
---|
2717 | ])# AC_PATH_MAGIC |
---|
2718 | |
---|
2719 | |
---|
2720 | # AC_PROG_LD |
---|
2721 | # ---------- |
---|
2722 | # find the path to the GNU or non-GNU linker |
---|
2723 | AC_DEFUN([AC_PROG_LD], |
---|
2724 | [AC_ARG_WITH([gnu-ld], |
---|
2725 | [AC_HELP_STRING([--with-gnu-ld], |
---|
2726 | [assume the C compiler uses GNU ld @<:@default=no@:>@])], |
---|
2727 | [test "$withval" = no || with_gnu_ld=yes], |
---|
2728 | [with_gnu_ld=no]) |
---|
2729 | AC_REQUIRE([LT_AC_PROG_SED])dnl |
---|
2730 | AC_REQUIRE([AC_PROG_CC])dnl |
---|
2731 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
---|
2732 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
---|
2733 | ac_prog=ld |
---|
2734 | if test "$GCC" = yes; then |
---|
2735 | # Check if gcc -print-prog-name=ld gives a path. |
---|
2736 | AC_MSG_CHECKING([for ld used by $CC]) |
---|
2737 | case $host in |
---|
2738 | *-*-mingw*) |
---|
2739 | # gcc leaves a trailing carriage return which upsets mingw |
---|
2740 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; |
---|
2741 | *) |
---|
2742 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; |
---|
2743 | esac |
---|
2744 | case $ac_prog in |
---|
2745 | # Accept absolute paths. |
---|
2746 | [[\\/]]* | ?:[[\\/]]*) |
---|
2747 | re_direlt='/[[^/]][[^/]]*/\.\./' |
---|
2748 | # Canonicalize the path of ld |
---|
2749 | ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` |
---|
2750 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
---|
2751 | ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` |
---|
2752 | done |
---|
2753 | test -z "$LD" && LD="$ac_prog" |
---|
2754 | ;; |
---|
2755 | "") |
---|
2756 | # If it fails, then pretend we aren't using GCC. |
---|
2757 | ac_prog=ld |
---|
2758 | ;; |
---|
2759 | *) |
---|
2760 | # If it is relative, then search for the first ld in PATH. |
---|
2761 | with_gnu_ld=unknown |
---|
2762 | ;; |
---|
2763 | esac |
---|
2764 | elif test "$with_gnu_ld" = yes; then |
---|
2765 | AC_MSG_CHECKING([for GNU ld]) |
---|
2766 | else |
---|
2767 | AC_MSG_CHECKING([for non-GNU ld]) |
---|
2768 | fi |
---|
2769 | AC_CACHE_VAL(lt_cv_path_LD, |
---|
2770 | [if test -z "$LD"; then |
---|
2771 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
---|
2772 | for ac_dir in $PATH; do |
---|
2773 | IFS="$lt_save_ifs" |
---|
2774 | test -z "$ac_dir" && ac_dir=. |
---|
2775 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
---|
2776 | lt_cv_path_LD="$ac_dir/$ac_prog" |
---|
2777 | # Check to see if the program is GNU ld. I'd rather use --version, |
---|
2778 | # but apparently some GNU ld's only accept -v. |
---|
2779 | # Break only if it was the GNU/non-GNU ld that we prefer. |
---|
2780 | case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in |
---|
2781 | *GNU* | *'with BFD'*) |
---|
2782 | test "$with_gnu_ld" != no && break |
---|
2783 | ;; |
---|
2784 | *) |
---|
2785 | test "$with_gnu_ld" != yes && break |
---|
2786 | ;; |
---|
2787 | esac |
---|
2788 | fi |
---|
2789 | done |
---|
2790 | IFS="$lt_save_ifs" |
---|
2791 | else |
---|
2792 | lt_cv_path_LD="$LD" # Let the user override the test with a path. |
---|
2793 | fi]) |
---|
2794 | LD="$lt_cv_path_LD" |
---|
2795 | if test -n "$LD"; then |
---|
2796 | AC_MSG_RESULT($LD) |
---|
2797 | else |
---|
2798 | AC_MSG_RESULT(no) |
---|
2799 | fi |
---|
2800 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
---|
2801 | AC_PROG_LD_GNU |
---|
2802 | ])# AC_PROG_LD |
---|
2803 | |
---|
2804 | |
---|
2805 | # AC_PROG_LD_GNU |
---|
2806 | # -------------- |
---|
2807 | AC_DEFUN([AC_PROG_LD_GNU], |
---|
2808 | [AC_REQUIRE([AC_PROG_EGREP])dnl |
---|
2809 | AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, |
---|
2810 | [# I'd rather use --version here, but apparently some GNU ld's only accept -v. |
---|
2811 | case `"$LD" -v 2>&1 </dev/null` in |
---|
2812 | *GNU* | *'with BFD'*) |
---|
2813 | lt_cv_prog_gnu_ld=yes |
---|
2814 | ;; |
---|
2815 | *) |
---|
2816 | lt_cv_prog_gnu_ld=no |
---|
2817 | ;; |
---|
2818 | esac]) |
---|
2819 | with_gnu_ld=$lt_cv_prog_gnu_ld |
---|
2820 | ])# AC_PROG_LD_GNU |
---|
2821 | |
---|
2822 | |
---|
2823 | # AC_PROG_LD_RELOAD_FLAG |
---|
2824 | # ---------------------- |
---|
2825 | # find reload flag for linker |
---|
2826 | # -- PORTME Some linkers may need a different reload flag. |
---|
2827 | AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], |
---|
2828 | [AC_CACHE_CHECK([for $LD option to reload object files], |
---|
2829 | lt_cv_ld_reload_flag, |
---|
2830 | [lt_cv_ld_reload_flag='-r']) |
---|
2831 | reload_flag=$lt_cv_ld_reload_flag |
---|
2832 | case $reload_flag in |
---|
2833 | "" | " "*) ;; |
---|
2834 | *) reload_flag=" $reload_flag" ;; |
---|
2835 | esac |
---|
2836 | reload_cmds='$LD$reload_flag -o $output$reload_objs' |
---|
2837 | ])# AC_PROG_LD_RELOAD_FLAG |
---|
2838 | |
---|
2839 | |
---|
2840 | # AC_DEPLIBS_CHECK_METHOD |
---|
2841 | # ----------------------- |
---|
2842 | # how to check for library dependencies |
---|
2843 | # -- PORTME fill in with the dynamic library characteristics |
---|
2844 | AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], |
---|
2845 | [AC_CACHE_CHECK([how to recognise dependent libraries], |
---|
2846 | lt_cv_deplibs_check_method, |
---|
2847 | [lt_cv_file_magic_cmd='$MAGIC_CMD' |
---|
2848 | lt_cv_file_magic_test_file= |
---|
2849 | lt_cv_deplibs_check_method='unknown' |
---|
2850 | # Need to set the preceding variable on all platforms that support |
---|
2851 | # interlibrary dependencies. |
---|
2852 | # 'none' -- dependencies not supported. |
---|
2853 | # `unknown' -- same as none, but documents that we really don't know. |
---|
2854 | # 'pass_all' -- all dependencies passed with no checks. |
---|
2855 | # 'test_compile' -- check by making test program. |
---|
2856 | # 'file_magic [[regex]]' -- check by looking for files in library path |
---|
2857 | # which responds to the $file_magic_cmd with a given extended regex. |
---|
2858 | # If you have `file' or equivalent on your system and you're not sure |
---|
2859 | # whether `pass_all' will *always* work, you probably want this one. |
---|
2860 | |
---|
2861 | case $host_os in |
---|
2862 | aix4* | aix5*) |
---|
2863 | lt_cv_deplibs_check_method=pass_all |
---|
2864 | ;; |
---|
2865 | |
---|
2866 | beos*) |
---|
2867 | lt_cv_deplibs_check_method=pass_all |
---|
2868 | ;; |
---|
2869 | |
---|
2870 | bsdi4*) |
---|
2871 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' |
---|
2872 | lt_cv_file_magic_cmd='/usr/bin/file -L' |
---|
2873 | lt_cv_file_magic_test_file=/shlib/libc.so |
---|
2874 | ;; |
---|
2875 | |
---|
2876 | cygwin* | mingw* | pw32*) |
---|
2877 | # win32_libid is a shell function defined in ltmain.sh |
---|
2878 | lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' |
---|
2879 | lt_cv_file_magic_cmd='win32_libid' |
---|
2880 | ;; |
---|
2881 | |
---|
2882 | darwin* | rhapsody*) |
---|
2883 | # this will be overwritten by pass_all, but leave it in just in case |
---|
2884 | lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' |
---|
2885 | lt_cv_file_magic_cmd='/usr/bin/file -L' |
---|
2886 | case "$host_os" in |
---|
2887 | rhapsody* | darwin1.[[012]]) |
---|
2888 | lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System` |
---|
2889 | ;; |
---|
2890 | *) # Darwin 1.3 on |
---|
2891 | lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' |
---|
2892 | ;; |
---|
2893 | esac |
---|
2894 | lt_cv_deplibs_check_method=pass_all |
---|
2895 | ;; |
---|
2896 | |
---|
2897 | freebsd*) |
---|
2898 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
---|
2899 | case $host_cpu in |
---|
2900 | i*86 ) |
---|
2901 | # Not sure whether the presence of OpenBSD here was a mistake. |
---|
2902 | # Let's accept both of them until this is cleared up. |
---|
2903 | lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' |
---|
2904 | lt_cv_file_magic_cmd=/usr/bin/file |
---|
2905 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
---|
2906 | ;; |
---|
2907 | esac |
---|
2908 | else |
---|
2909 | lt_cv_deplibs_check_method=pass_all |
---|
2910 | fi |
---|
2911 | ;; |
---|
2912 | |
---|
2913 | gnu*) |
---|
2914 | lt_cv_deplibs_check_method=pass_all |
---|
2915 | ;; |
---|
2916 | |
---|
2917 | hpux10.20* | hpux11*) |
---|
2918 | lt_cv_file_magic_cmd=/usr/bin/file |
---|
2919 | case "$host_cpu" in |
---|
2920 | ia64*) |
---|
2921 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' |
---|
2922 | lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so |
---|
2923 | ;; |
---|
2924 | hppa*64*) |
---|
2925 | [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] |
---|
2926 | lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl |
---|
2927 | ;; |
---|
2928 | *) |
---|
2929 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' |
---|
2930 | lt_cv_file_magic_test_file=/usr/lib/libc.sl |
---|
2931 | ;; |
---|
2932 | esac |
---|
2933 | ;; |
---|
2934 | |
---|
2935 | irix5* | irix6* | nonstopux*) |
---|
2936 | case $host_os in |
---|
2937 | irix5* | nonstopux*) |
---|
2938 | # this will be overridden with pass_all, but let us keep it just in case |
---|
2939 | lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" |
---|
2940 | ;; |
---|
2941 | *) |
---|
2942 | case $LD in |
---|
2943 | *-32|*"-32 ") libmagic=32-bit;; |
---|
2944 | *-n32|*"-n32 ") libmagic=N32;; |
---|
2945 | *-64|*"-64 ") libmagic=64-bit;; |
---|
2946 | *) libmagic=never-match;; |
---|
2947 | esac |
---|
2948 | # this will be overridden with pass_all, but let us keep it just in case |
---|
2949 | lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1" |
---|
2950 | ;; |
---|
2951 | esac |
---|
2952 | lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` |
---|
2953 | lt_cv_deplibs_check_method=pass_all |
---|
2954 | ;; |
---|
2955 | |
---|
2956 | # This must be Linux ELF. |
---|
2957 | linux*) |
---|
2958 | case $host_cpu in |
---|
2959 | alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh*) |
---|
2960 | lt_cv_deplibs_check_method=pass_all ;; |
---|
2961 | *) |
---|
2962 | # glibc up to 2.1.1 does not perform some relocations on ARM |
---|
2963 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; |
---|
2964 | esac |
---|
2965 | lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` |
---|
2966 | ;; |
---|
2967 | |
---|
2968 | netbsd*) |
---|
2969 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then |
---|
2970 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' |
---|
2971 | else |
---|
2972 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' |
---|
2973 | fi |
---|
2974 | ;; |
---|
2975 | |
---|
2976 | newos6*) |
---|
2977 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' |
---|
2978 | lt_cv_file_magic_cmd=/usr/bin/file |
---|
2979 | lt_cv_file_magic_test_file=/usr/lib/libnls.so |
---|
2980 | ;; |
---|
2981 | |
---|
2982 | nto-qnx) |
---|
2983 | lt_cv_deplibs_check_method=unknown |
---|
2984 | ;; |
---|
2985 | |
---|
2986 | openbsd*) |
---|
2987 | lt_cv_file_magic_cmd=/usr/bin/file |
---|
2988 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
---|
2989 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
---|
2990 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' |
---|
2991 | else |
---|
2992 | lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' |
---|
2993 | fi |
---|
2994 | ;; |
---|
2995 | |
---|
2996 | osf3* | osf4* | osf5*) |
---|
2997 | # this will be overridden with pass_all, but let us keep it just in case |
---|
2998 | lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' |
---|
2999 | lt_cv_file_magic_test_file=/shlib/libc.so |
---|
3000 | lt_cv_deplibs_check_method=pass_all |
---|
3001 | ;; |
---|
3002 | |
---|
3003 | sco3.2v5*) |
---|
3004 | lt_cv_deplibs_check_method=pass_all |
---|
3005 | ;; |
---|
3006 | |
---|
3007 | solaris*) |
---|
3008 | lt_cv_deplibs_check_method=pass_all |
---|
3009 | lt_cv_file_magic_test_file=/lib/libc.so |
---|
3010 | ;; |
---|
3011 | |
---|
3012 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
---|
3013 | case $host_vendor in |
---|
3014 | motorola) |
---|
3015 | 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]]' |
---|
3016 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` |
---|
3017 | ;; |
---|
3018 | ncr) |
---|
3019 | lt_cv_deplibs_check_method=pass_all |
---|
3020 | ;; |
---|
3021 | sequent) |
---|
3022 | lt_cv_file_magic_cmd='/bin/file' |
---|
3023 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' |
---|
3024 | ;; |
---|
3025 | sni) |
---|
3026 | lt_cv_file_magic_cmd='/bin/file' |
---|
3027 | lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" |
---|
3028 | lt_cv_file_magic_test_file=/lib/libc.so |
---|
3029 | ;; |
---|
3030 | siemens) |
---|
3031 | lt_cv_deplibs_check_method=pass_all |
---|
3032 | ;; |
---|
3033 | esac |
---|
3034 | ;; |
---|
3035 | |
---|
3036 | sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) |
---|
3037 | lt_cv_deplibs_check_method=pass_all |
---|
3038 | ;; |
---|
3039 | esac |
---|
3040 | ]) |
---|
3041 | file_magic_cmd=$lt_cv_file_magic_cmd |
---|
3042 | deplibs_check_method=$lt_cv_deplibs_check_method |
---|
3043 | test -z "$deplibs_check_method" && deplibs_check_method=unknown |
---|
3044 | ])# AC_DEPLIBS_CHECK_METHOD |
---|
3045 | |
---|
3046 | |
---|
3047 | # AC_PROG_NM |
---|
3048 | # ---------- |
---|
3049 | # find the path to a BSD-compatible name lister |
---|
3050 | AC_DEFUN([AC_PROG_NM], |
---|
3051 | [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, |
---|
3052 | [if test -n "$NM"; then |
---|
3053 | # Let the user override the test. |
---|
3054 | lt_cv_path_NM="$NM" |
---|
3055 | else |
---|
3056 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
---|
3057 | for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do |
---|
3058 | IFS="$lt_save_ifs" |
---|
3059 | test -z "$ac_dir" && ac_dir=. |
---|
3060 | tmp_nm="$ac_dir/${ac_tool_prefix}nm" |
---|
3061 | if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then |
---|
3062 | # Check to see if the nm accepts a BSD-compat flag. |
---|
3063 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: |
---|
3064 | # nm: unknown option "B" ignored |
---|
3065 | # Tru64's nm complains that /dev/null is an invalid object file |
---|
3066 | case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in |
---|
3067 | */dev/null* | *'Invalid file or object type'*) |
---|
3068 | lt_cv_path_NM="$tmp_nm -B" |
---|
3069 | break |
---|
3070 | ;; |
---|
3071 | *) |
---|
3072 | case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in |
---|
3073 | */dev/null*) |
---|
3074 | lt_cv_path_NM="$tmp_nm -p" |
---|
3075 | break |
---|
3076 | ;; |
---|
3077 | *) |
---|
3078 | lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but |
---|
3079 | continue # so that we can try to find one that supports BSD flags |
---|
3080 | ;; |
---|
3081 | esac |
---|
3082 | esac |
---|
3083 | fi |
---|
3084 | done |
---|
3085 | IFS="$lt_save_ifs" |
---|
3086 | test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm |
---|
3087 | fi]) |
---|
3088 | NM="$lt_cv_path_NM" |
---|
3089 | ])# AC_PROG_NM |
---|
3090 | |
---|
3091 | |
---|
3092 | # AC_CHECK_LIBM |
---|
3093 | # ------------- |
---|
3094 | # check for math library |
---|
3095 | AC_DEFUN([AC_CHECK_LIBM], |
---|
3096 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl |
---|
3097 | LIBM= |
---|
3098 | case $host in |
---|
3099 | *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) |
---|
3100 | # These system don't have libm, or don't need it |
---|
3101 | ;; |
---|
3102 | *-ncr-sysv4.3*) |
---|
3103 | AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") |
---|
3104 | AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") |
---|
3105 | ;; |
---|
3106 | *) |
---|
3107 | AC_CHECK_LIB(m, cos, LIBM="-lm") |
---|
3108 | ;; |
---|
3109 | esac |
---|
3110 | ])# AC_CHECK_LIBM |
---|
3111 | |
---|
3112 | |
---|
3113 | # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) |
---|
3114 | # ----------------------------------- |
---|
3115 | # sets LIBLTDL to the link flags for the libltdl convenience library and |
---|
3116 | # LTDLINCL to the include flags for the libltdl header and adds |
---|
3117 | # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL |
---|
3118 | # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If |
---|
3119 | # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will |
---|
3120 | # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with |
---|
3121 | # '${top_srcdir}/' (note the single quotes!). If your package is not |
---|
3122 | # flat and you're not using automake, define top_builddir and |
---|
3123 | # top_srcdir appropriately in the Makefiles. |
---|
3124 | AC_DEFUN([AC_LIBLTDL_CONVENIENCE], |
---|
3125 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
3126 | case $enable_ltdl_convenience in |
---|
3127 | no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; |
---|
3128 | "") enable_ltdl_convenience=yes |
---|
3129 | ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; |
---|
3130 | esac |
---|
3131 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la |
---|
3132 | LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
---|
3133 | # For backwards non-gettext consistent compatibility... |
---|
3134 | INCLTDL="$LTDLINCL" |
---|
3135 | ])# AC_LIBLTDL_CONVENIENCE |
---|
3136 | |
---|
3137 | |
---|
3138 | # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) |
---|
3139 | # ----------------------------------- |
---|
3140 | # sets LIBLTDL to the link flags for the libltdl installable library and |
---|
3141 | # LTDLINCL to the include flags for the libltdl header and adds |
---|
3142 | # --enable-ltdl-install to the configure arguments. Note that LIBLTDL |
---|
3143 | # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If |
---|
3144 | # DIRECTORY is not provided and an installed libltdl is not found, it is |
---|
3145 | # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' |
---|
3146 | # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single |
---|
3147 | # quotes!). If your package is not flat and you're not using automake, |
---|
3148 | # define top_builddir and top_srcdir appropriately in the Makefiles. |
---|
3149 | # In the future, this macro may have to be called after AC_PROG_LIBTOOL. |
---|
3150 | AC_DEFUN([AC_LIBLTDL_INSTALLABLE], |
---|
3151 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
3152 | AC_CHECK_LIB(ltdl, lt_dlinit, |
---|
3153 | [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], |
---|
3154 | [if test x"$enable_ltdl_install" = xno; then |
---|
3155 | AC_MSG_WARN([libltdl not installed, but installation disabled]) |
---|
3156 | else |
---|
3157 | enable_ltdl_install=yes |
---|
3158 | fi |
---|
3159 | ]) |
---|
3160 | if test x"$enable_ltdl_install" = x"yes"; then |
---|
3161 | ac_configure_args="$ac_configure_args --enable-ltdl-install" |
---|
3162 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la |
---|
3163 | LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
---|
3164 | else |
---|
3165 | ac_configure_args="$ac_configure_args --enable-ltdl-install=no" |
---|
3166 | LIBLTDL="-lltdl" |
---|
3167 | LTDLINCL= |
---|
3168 | fi |
---|
3169 | # For backwards non-gettext consistent compatibility... |
---|
3170 | INCLTDL="$LTDLINCL" |
---|
3171 | ])# AC_LIBLTDL_INSTALLABLE |
---|
3172 | |
---|
3173 | |
---|
3174 | # AC_LIBTOOL_CXX |
---|
3175 | # -------------- |
---|
3176 | # enable support for C++ libraries |
---|
3177 | AC_DEFUN([AC_LIBTOOL_CXX], |
---|
3178 | [AC_REQUIRE([_LT_AC_LANG_CXX]) |
---|
3179 | ])# AC_LIBTOOL_CXX |
---|
3180 | |
---|
3181 | |
---|
3182 | # _LT_AC_LANG_CXX |
---|
3183 | # --------------- |
---|
3184 | AC_DEFUN([_LT_AC_LANG_CXX], |
---|
3185 | [AC_REQUIRE([AC_PROG_CXX]) |
---|
3186 | AC_REQUIRE([AC_PROG_CXXCPP]) |
---|
3187 | _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,CXX" | sed 's/^,//'`]) |
---|
3188 | ])# _LT_AC_LANG_CXX |
---|
3189 | |
---|
3190 | |
---|
3191 | # AC_LIBTOOL_F77 |
---|
3192 | # -------------- |
---|
3193 | # enable support for Fortran 77 libraries |
---|
3194 | AC_DEFUN([AC_LIBTOOL_F77], |
---|
3195 | [AC_REQUIRE([_LT_AC_LANG_F77]) |
---|
3196 | ])# AC_LIBTOOL_F77 |
---|
3197 | |
---|
3198 | |
---|
3199 | # _LT_AC_LANG_F77 |
---|
3200 | # --------------- |
---|
3201 | AC_DEFUN([_LT_AC_LANG_F77], |
---|
3202 | [AC_REQUIRE([AC_PROG_F77]) |
---|
3203 | _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,F77" | sed 's/^,//'`]) |
---|
3204 | ])# _LT_AC_LANG_F77 |
---|
3205 | |
---|
3206 | |
---|
3207 | # AC_LIBTOOL_GCJ |
---|
3208 | # -------------- |
---|
3209 | # enable support for GCJ libraries |
---|
3210 | AC_DEFUN([AC_LIBTOOL_GCJ], |
---|
3211 | [AC_REQUIRE([_LT_AC_LANG_GCJ]) |
---|
3212 | ])# AC_LIBTOOL_GCJ |
---|
3213 | |
---|
3214 | |
---|
3215 | # _LT_AC_LANG_GCJ |
---|
3216 | # --------------- |
---|
3217 | AC_DEFUN([_LT_AC_LANG_GCJ], |
---|
3218 | [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], |
---|
3219 | [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], |
---|
3220 | [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], |
---|
3221 | [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], |
---|
3222 | [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], |
---|
3223 | [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) |
---|
3224 | _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,GCJ" | sed 's/^,//'`]) |
---|
3225 | ])# _LT_AC_LANG_GCJ |
---|
3226 | |
---|
3227 | |
---|
3228 | # AC_LIBTOOL_RC |
---|
3229 | # -------------- |
---|
3230 | # enable support for Windows resource files |
---|
3231 | AC_DEFUN([AC_LIBTOOL_RC], |
---|
3232 | [AC_REQUIRE([LT_AC_PROG_RC]) |
---|
3233 | _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,RC" | sed 's/^,//'`]) |
---|
3234 | ])# AC_LIBTOOL_RC |
---|
3235 | |
---|
3236 | |
---|
3237 | # AC_LIBTOOL_LANG_C_CONFIG |
---|
3238 | # ------------------------ |
---|
3239 | # Ensure that the configuration vars for the C compiler are |
---|
3240 | # suitably defined. Those variables are subsequently used by |
---|
3241 | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
---|
3242 | AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) |
---|
3243 | AC_DEFUN([_LT_AC_LANG_C_CONFIG], |
---|
3244 | [lt_save_CC="$CC" |
---|
3245 | AC_LANG_PUSH(C) |
---|
3246 | |
---|
3247 | # Source file extension for C test sources. |
---|
3248 | ac_ext=c |
---|
3249 | |
---|
3250 | # Object file extension for compiled C test sources. |
---|
3251 | objext=o |
---|
3252 | _LT_AC_TAGVAR(objext, $1)=$objext |
---|
3253 | |
---|
3254 | # Code to be used in simple compile tests |
---|
3255 | lt_simple_compile_test_code="int some_variable = 0;\n" |
---|
3256 | |
---|
3257 | # Code to be used in simple link tests |
---|
3258 | lt_simple_link_test_code='int main(){return(0);}\n' |
---|
3259 | |
---|
3260 | _LT_AC_SYS_COMPILER |
---|
3261 | |
---|
3262 | # |
---|
3263 | # Check for any special shared library compilation flags. |
---|
3264 | # |
---|
3265 | _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= |
---|
3266 | if test "$GCC" = no; then |
---|
3267 | case $host_os in |
---|
3268 | sco3.2v5*) |
---|
3269 | _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' |
---|
3270 | ;; |
---|
3271 | esac |
---|
3272 | fi |
---|
3273 | if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then |
---|
3274 | AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) |
---|
3275 | if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then : |
---|
3276 | else |
---|
3277 | AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) |
---|
3278 | _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no |
---|
3279 | fi |
---|
3280 | fi |
---|
3281 | |
---|
3282 | |
---|
3283 | # |
---|
3284 | # Check to make sure the static flag actually works. |
---|
3285 | # |
---|
3286 | AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], |
---|
3287 | _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), |
---|
3288 | $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), |
---|
3289 | [], |
---|
3290 | [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) |
---|
3291 | |
---|
3292 | |
---|
3293 | AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) |
---|
3294 | AC_LIBTOOL_PROG_COMPILER_PIC($1) |
---|
3295 | AC_LIBTOOL_PROG_CC_C_O($1) |
---|
3296 | AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) |
---|
3297 | AC_LIBTOOL_PROG_LD_SHLIBS($1) |
---|
3298 | AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) |
---|
3299 | AC_LIBTOOL_SYS_LIB_STRIP |
---|
3300 | AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) |
---|
3301 | AC_LIBTOOL_DLOPEN_SELF($1) |
---|
3302 | |
---|
3303 | # Report which librarie types wil actually be built |
---|
3304 | AC_MSG_CHECKING([if libtool supports shared libraries]) |
---|
3305 | AC_MSG_RESULT([$can_build_shared]) |
---|
3306 | |
---|
3307 | AC_MSG_CHECKING([whether to build shared libraries]) |
---|
3308 | test "$can_build_shared" = "no" && enable_shared=no |
---|
3309 | |
---|
3310 | # On AIX, shared libraries and static libraries use the same namespace, and |
---|
3311 | # are all built from PIC. |
---|
3312 | case "$host_os" in |
---|
3313 | aix3*) |
---|
3314 | test "$enable_shared" = yes && enable_static=no |
---|
3315 | if test -n "$RANLIB"; then |
---|
3316 | archive_cmds="$archive_cmds~\$RANLIB \$lib" |
---|
3317 | postinstall_cmds='$RANLIB $lib' |
---|
3318 | fi |
---|
3319 | ;; |
---|
3320 | |
---|
3321 | aix4*) |
---|
3322 | if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then |
---|
3323 | test "$enable_shared" = yes && enable_static=no |
---|
3324 | fi |
---|
3325 | ;; |
---|
3326 | darwin* | rhapsody*) |
---|
3327 | if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then |
---|
3328 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
---|
3329 | case "$host_os" in |
---|
3330 | rhapsody* | darwin1.[[012]]) |
---|
3331 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' |
---|
3332 | ;; |
---|
3333 | *) # Darwin 1.3 on |
---|
3334 | test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' |
---|
3335 | ;; |
---|
3336 | esac |
---|
3337 | # FIXME: Relying on posixy $() will cause problems for |
---|
3338 | # cross-compilation, but unfortunately the echo tests do not |
---|
3339 | # yet detect zsh echo's removal of \ escapes. Also zsh mangles |
---|
3340 | # `"' quotes if we put them in here... so don't! |
---|
3341 | output_verbose_link_cmd='echo' |
---|
3342 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' |
---|
3343 | _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' |
---|
3344 | # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's |
---|
3345 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
---|
3346 | _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
---|
3347 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
---|
3348 | _LT_AC_TAGVAR(hardcode_automatic, $1)=yes |
---|
3349 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported |
---|
3350 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' |
---|
3351 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
---|
3352 | fi |
---|
3353 | ;; |
---|
3354 | esac |
---|
3355 | AC_MSG_RESULT([$enable_shared]) |
---|
3356 | |
---|
3357 | AC_MSG_CHECKING([whether to build static libraries]) |
---|
3358 | # Make sure either enable_shared or enable_static is yes. |
---|
3359 | test "$enable_shared" = yes || enable_static=yes |
---|
3360 | AC_MSG_RESULT([$enable_static]) |
---|
3361 | |
---|
3362 | AC_LIBTOOL_CONFIG($1) |
---|
3363 | |
---|
3364 | AC_LANG_POP |
---|
3365 | CC="$lt_save_CC" |
---|
3366 | ])# AC_LIBTOOL_LANG_C_CONFIG |
---|
3367 | |
---|
3368 | |
---|
3369 | # AC_LIBTOOL_LANG_CXX_CONFIG |
---|
3370 | # -------------------------- |
---|
3371 | # Ensure that the configuration vars for the C compiler are |
---|
3372 | # suitably defined. Those variables are subsequently used by |
---|
3373 | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
---|
3374 | AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) |
---|
3375 | AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], |
---|
3376 | [AC_LANG_PUSH(C++) |
---|
3377 | AC_REQUIRE([AC_PROG_CXX]) |
---|
3378 | AC_REQUIRE([AC_PROG_CXXCPP]) |
---|
3379 | |
---|
3380 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
---|
3381 | _LT_AC_TAGVAR(allow_undefined_flag, $1)= |
---|
3382 | _LT_AC_TAGVAR(always_export_symbols, $1)=no |
---|
3383 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)= |
---|
3384 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= |
---|
3385 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
---|
3386 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= |
---|
3387 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= |
---|
3388 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
---|
3389 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=no |
---|
3390 | _LT_AC_TAGVAR(hardcode_automatic, $1)=no |
---|
3391 | _LT_AC_TAGVAR(module_cmds, $1)= |
---|
3392 | _LT_AC_TAGVAR(module_expsym_cmds, $1)= |
---|
3393 | _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown |
---|
3394 | _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds |
---|
3395 | _LT_AC_TAGVAR(no_undefined_flag, $1)= |
---|
3396 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
---|
3397 | _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no |
---|
3398 | |
---|
3399 | # Dependencies to place before and after the object being linked: |
---|
3400 | _LT_AC_TAGVAR(predep_objects, $1)= |
---|
3401 | _LT_AC_TAGVAR(postdep_objects, $1)= |
---|
3402 | _LT_AC_TAGVAR(predeps, $1)= |
---|
3403 | _LT_AC_TAGVAR(postdeps, $1)= |
---|
3404 | _LT_AC_TAGVAR(compiler_lib_search_path, $1)= |
---|
3405 | |
---|
3406 | # Source file extension for C++ test sources. |
---|
3407 | ac_ext=cc |
---|
3408 | |
---|
3409 | # Object file extension for compiled C++ test sources. |
---|
3410 | objext=o |
---|
3411 | _LT_AC_TAGVAR(objext, $1)=$objext |
---|
3412 | |
---|
3413 | # Code to be used in simple compile tests |
---|
3414 | lt_simple_compile_test_code="int some_variable = 0;\n" |
---|
3415 | |
---|
3416 | # Code to be used in simple link tests |
---|
3417 | lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' |
---|
3418 | |
---|
3419 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. |
---|
3420 | _LT_AC_SYS_COMPILER |
---|
3421 | |
---|
3422 | # Allow CC to be a program name with arguments. |
---|
3423 | lt_save_CC=$CC |
---|
3424 | lt_save_LD=$LD |
---|
3425 | lt_save_GCC=$GCC |
---|
3426 | GCC=$GXX |
---|
3427 | lt_save_with_gnu_ld=$with_gnu_ld |
---|
3428 | lt_save_path_LD=$lt_cv_path_LD |
---|
3429 | if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then |
---|
3430 | lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx |
---|
3431 | else |
---|
3432 | unset lt_cv_prog_gnu_ld |
---|
3433 | fi |
---|
3434 | if test -n "${lt_cv_path_LDCXX+set}"; then |
---|
3435 | lt_cv_path_LD=$lt_cv_path_LDCXX |
---|
3436 | else |
---|
3437 | unset lt_cv_path_LD |
---|
3438 | fi |
---|
3439 | test -z "${LDCXX+set}" || LD=$LDCXX |
---|
3440 | CC=${CXX-"c++"} |
---|
3441 | compiler=$CC |
---|
3442 | _LT_AC_TAGVAR(compiler, $1)=$CC |
---|
3443 | cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` |
---|
3444 | |
---|
3445 | # We don't want -fno-exception wen compiling C++ code, so set the |
---|
3446 | # no_builtin_flag separately |
---|
3447 | if test "$GXX" = yes; then |
---|
3448 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' |
---|
3449 | else |
---|
3450 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= |
---|
3451 | fi |
---|
3452 | |
---|
3453 | if test "$GXX" = yes; then |
---|
3454 | # Set up default GNU C++ configuration |
---|
3455 | |
---|
3456 | AC_PROG_LD |
---|
3457 | |
---|
3458 | # Check if GNU C++ uses GNU ld as the underlying linker, since the |
---|
3459 | # archiving commands below assume that GNU ld is being used. |
---|
3460 | if test "$with_gnu_ld" = yes; then |
---|
3461 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
3462 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
---|
3463 | |
---|
3464 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' |
---|
3465 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' |
---|
3466 | |
---|
3467 | # If archive_cmds runs LD, not CC, wlarc should be empty |
---|
3468 | # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to |
---|
3469 | # investigate it a little bit more. (MM) |
---|
3470 | wlarc='${wl}' |
---|
3471 | |
---|
3472 | # ancient GNU ld didn't support --whole-archive et. al. |
---|
3473 | if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ |
---|
3474 | grep 'no-whole-archive' > /dev/null; then |
---|
3475 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' |
---|
3476 | else |
---|
3477 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
---|
3478 | fi |
---|
3479 | else |
---|
3480 | with_gnu_ld=no |
---|
3481 | wlarc= |
---|
3482 | |
---|
3483 | # A generic and very simple default shared library creation |
---|
3484 | # command for GNU C++ for the case where it uses the native |
---|
3485 | # linker, instead of GNU ld. If possible, this setting should |
---|
3486 | # overridden to take advantage of the native linker features on |
---|
3487 | # the platform it is being used on. |
---|
3488 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' |
---|
3489 | fi |
---|
3490 | |
---|
3491 | # Commands to make compiler produce verbose output that lists |
---|
3492 | # what "hidden" libraries, object files and flags are used when |
---|
3493 | # linking a shared library. |
---|
3494 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' |
---|
3495 | |
---|
3496 | else |
---|
3497 | GXX=no |
---|
3498 | with_gnu_ld=no |
---|
3499 | wlarc= |
---|
3500 | fi |
---|
3501 | |
---|
3502 | # PORTME: fill in a description of your system's C++ link characteristics |
---|
3503 | AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) |
---|
3504 | _LT_AC_TAGVAR(ld_shlibs, $1)=yes |
---|
3505 | case $host_os in |
---|
3506 | aix3*) |
---|
3507 | # FIXME: insert proper C++ library support |
---|
3508 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3509 | ;; |
---|
3510 | aix4* | aix5*) |
---|
3511 | if test "$host_cpu" = ia64; then |
---|
3512 | # On IA64, the linker does run time linking by default, so we don't |
---|
3513 | # have to do anything special. |
---|
3514 | aix_use_runtimelinking=no |
---|
3515 | exp_sym_flag='-Bexport' |
---|
3516 | no_entry_flag="" |
---|
3517 | else |
---|
3518 | aix_use_runtimelinking=no |
---|
3519 | |
---|
3520 | # Test if we are trying to use run time linking or normal |
---|
3521 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we |
---|
3522 | # need to do runtime linking. |
---|
3523 | case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) |
---|
3524 | for ld_flag in $LDFLAGS; do |
---|
3525 | case $ld_flag in |
---|
3526 | *-brtl*) |
---|
3527 | aix_use_runtimelinking=yes |
---|
3528 | break |
---|
3529 | ;; |
---|
3530 | esac |
---|
3531 | done |
---|
3532 | esac |
---|
3533 | |
---|
3534 | exp_sym_flag='-bexport' |
---|
3535 | no_entry_flag='-bnoentry' |
---|
3536 | fi |
---|
3537 | |
---|
3538 | # When large executables or shared objects are built, AIX ld can |
---|
3539 | # have problems creating the table of contents. If linking a library |
---|
3540 | # or program results in "error TOC overflow" add -mminimal-toc to |
---|
3541 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
---|
3542 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
---|
3543 | |
---|
3544 | _LT_AC_TAGVAR(archive_cmds, $1)='' |
---|
3545 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
3546 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' |
---|
3547 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
---|
3548 | |
---|
3549 | if test "$GXX" = yes; then |
---|
3550 | case $host_os in aix4.[012]|aix4.[012].*) |
---|
3551 | # We only want to do this on AIX 4.2 and lower, the check |
---|
3552 | # below for broken collect2 doesn't work under 4.3+ |
---|
3553 | collect2name=`${CC} -print-prog-name=collect2` |
---|
3554 | if test -f "$collect2name" && \ |
---|
3555 | strings "$collect2name" | grep resolve_lib_name >/dev/null |
---|
3556 | then |
---|
3557 | # We have reworked collect2 |
---|
3558 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
3559 | else |
---|
3560 | # We have old collect2 |
---|
3561 | _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported |
---|
3562 | # It fails to find uninstalled libraries when the uninstalled |
---|
3563 | # path is not listed in the libpath. Setting hardcode_minus_L |
---|
3564 | # to unsupported forces relinking |
---|
3565 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
---|
3566 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
3567 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
---|
3568 | fi |
---|
3569 | esac |
---|
3570 | shared_flag='-shared' |
---|
3571 | else |
---|
3572 | # not using gcc |
---|
3573 | if test "$host_cpu" = ia64; then |
---|
3574 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release |
---|
3575 | # chokes on -Wl,-G. The following line is correct: |
---|
3576 | shared_flag='-G' |
---|
3577 | else |
---|
3578 | if test "$aix_use_runtimelinking" = yes; then |
---|
3579 | shared_flag='${wl}-G' |
---|
3580 | else |
---|
3581 | shared_flag='${wl}-bM:SRE' |
---|
3582 | fi |
---|
3583 | fi |
---|
3584 | fi |
---|
3585 | |
---|
3586 | # It seems that -bexpall does not export symbols beginning with |
---|
3587 | # underscore (_), so it is better to generate a list of symbols to export. |
---|
3588 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes |
---|
3589 | if test "$aix_use_runtimelinking" = yes; then |
---|
3590 | # Warning - without using the other runtime loading flags (-brtl), |
---|
3591 | # -berok will link without error, but may produce a broken library. |
---|
3592 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' |
---|
3593 | # Determine the default libpath from the value encoded in an empty executable. |
---|
3594 | _LT_AC_SYS_LIBPATH_AIX |
---|
3595 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" |
---|
3596 | |
---|
3597 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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" |
---|
3598 | else |
---|
3599 | if test "$host_cpu" = ia64; then |
---|
3600 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' |
---|
3601 | _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" |
---|
3602 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" |
---|
3603 | else |
---|
3604 | # Determine the default libpath from the value encoded in an empty executable. |
---|
3605 | _LT_AC_SYS_LIBPATH_AIX |
---|
3606 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" |
---|
3607 | # Warning - without using the other run time loading flags, |
---|
3608 | # -berok will link without error, but may produce a broken library. |
---|
3609 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' |
---|
3610 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' |
---|
3611 | # -bexpall does not export symbols beginning with underscore (_) |
---|
3612 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes |
---|
3613 | # Exported symbols can be pulled into shared objects from archives |
---|
3614 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' |
---|
3615 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes |
---|
3616 | # This is similar to how AIX traditionally builds it's shared libraries. |
---|
3617 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' |
---|
3618 | fi |
---|
3619 | fi |
---|
3620 | ;; |
---|
3621 | chorus*) |
---|
3622 | case $cc_basename in |
---|
3623 | *) |
---|
3624 | # FIXME: insert proper C++ library support |
---|
3625 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3626 | ;; |
---|
3627 | esac |
---|
3628 | ;; |
---|
3629 | |
---|
3630 | cygwin* | mingw* | pw32*) |
---|
3631 | # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, |
---|
3632 | # as there is no search path for DLLs. |
---|
3633 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
3634 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
---|
3635 | _LT_AC_TAGVAR(always_export_symbols, $1)=no |
---|
3636 | _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
---|
3637 | |
---|
3638 | if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then |
---|
3639 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' |
---|
3640 | # If the export-symbols file already is a .def file (1st line |
---|
3641 | # is EXPORTS), use it as is; otherwise, prepend... |
---|
3642 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then |
---|
3643 | cp $export_symbols $output_objdir/$soname.def; |
---|
3644 | else |
---|
3645 | echo EXPORTS > $output_objdir/$soname.def; |
---|
3646 | cat $export_symbols >> $output_objdir/$soname.def; |
---|
3647 | fi~ |
---|
3648 | $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' |
---|
3649 | else |
---|
3650 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3651 | fi |
---|
3652 | ;; |
---|
3653 | |
---|
3654 | darwin* | rhapsody*) |
---|
3655 | if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then |
---|
3656 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
---|
3657 | case "$host_os" in |
---|
3658 | rhapsody* | darwin1.[[012]]) |
---|
3659 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' |
---|
3660 | ;; |
---|
3661 | *) # Darwin 1.3 on |
---|
3662 | test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' |
---|
3663 | ;; |
---|
3664 | esac |
---|
3665 | lt_int_apple_cc_single_mod=no |
---|
3666 | output_verbose_link_cmd='echo' |
---|
3667 | if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then |
---|
3668 | lt_int_apple_cc_single_mod=yes |
---|
3669 | fi |
---|
3670 | if test "X$lt_int_apple_cc_single_mod" = Xyes ; then |
---|
3671 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' |
---|
3672 | else |
---|
3673 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' |
---|
3674 | fi |
---|
3675 | _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' |
---|
3676 | |
---|
3677 | # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's |
---|
3678 | if test "X$lt_int_apple_cc_single_mod" = Xyes ; then |
---|
3679 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
---|
3680 | else |
---|
3681 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
---|
3682 | fi |
---|
3683 | _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
---|
3684 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
---|
3685 | _LT_AC_TAGVAR(hardcode_automatic, $1)=yes |
---|
3686 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported |
---|
3687 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' |
---|
3688 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
---|
3689 | fi |
---|
3690 | ;; |
---|
3691 | |
---|
3692 | dgux*) |
---|
3693 | case $cc_basename in |
---|
3694 | ec++) |
---|
3695 | # FIXME: insert proper C++ library support |
---|
3696 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3697 | ;; |
---|
3698 | ghcx) |
---|
3699 | # Green Hills C++ Compiler |
---|
3700 | # FIXME: insert proper C++ library support |
---|
3701 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3702 | ;; |
---|
3703 | *) |
---|
3704 | # FIXME: insert proper C++ library support |
---|
3705 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3706 | ;; |
---|
3707 | esac |
---|
3708 | ;; |
---|
3709 | freebsd[12]*) |
---|
3710 | # C++ shared libraries reported to be fairly broken before switch to ELF |
---|
3711 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3712 | ;; |
---|
3713 | freebsd-elf*) |
---|
3714 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
---|
3715 | ;; |
---|
3716 | freebsd*) |
---|
3717 | # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF |
---|
3718 | # conventions |
---|
3719 | _LT_AC_TAGVAR(ld_shlibs, $1)=yes |
---|
3720 | ;; |
---|
3721 | gnu*) |
---|
3722 | ;; |
---|
3723 | hpux9*) |
---|
3724 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
---|
3725 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
3726 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
---|
3727 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
3728 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, |
---|
3729 | # but as the default |
---|
3730 | # location of the library. |
---|
3731 | |
---|
3732 | case $cc_basename in |
---|
3733 | CC) |
---|
3734 | # FIXME: insert proper C++ library support |
---|
3735 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3736 | ;; |
---|
3737 | aCC) |
---|
3738 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' |
---|
3739 | # Commands to make compiler produce verbose output that lists |
---|
3740 | # what "hidden" libraries, object files and flags are used when |
---|
3741 | # linking a shared library. |
---|
3742 | # |
---|
3743 | # There doesn't appear to be a way to prevent this compiler from |
---|
3744 | # explicitly linking system object files so we need to strip them |
---|
3745 | # from the output so that they don't get included in the library |
---|
3746 | # dependencies. |
---|
3747 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' |
---|
3748 | ;; |
---|
3749 | *) |
---|
3750 | if test "$GXX" = yes; then |
---|
3751 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' |
---|
3752 | else |
---|
3753 | # FIXME: insert proper C++ library support |
---|
3754 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3755 | fi |
---|
3756 | ;; |
---|
3757 | esac |
---|
3758 | ;; |
---|
3759 | hpux10*|hpux11*) |
---|
3760 | if test $with_gnu_ld = no; then |
---|
3761 | case "$host_cpu" in |
---|
3762 | hppa*64*) |
---|
3763 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
---|
3764 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' |
---|
3765 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
3766 | ;; |
---|
3767 | ia64*) |
---|
3768 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
3769 | ;; |
---|
3770 | *) |
---|
3771 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
---|
3772 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
3773 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
---|
3774 | ;; |
---|
3775 | esac |
---|
3776 | fi |
---|
3777 | case "$host_cpu" in |
---|
3778 | hppa*64*) |
---|
3779 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
---|
3780 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
3781 | ;; |
---|
3782 | ia64*) |
---|
3783 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
---|
3784 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
3785 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, |
---|
3786 | # but as the default |
---|
3787 | # location of the library. |
---|
3788 | ;; |
---|
3789 | *) |
---|
3790 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
3791 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, |
---|
3792 | # but as the default |
---|
3793 | # location of the library. |
---|
3794 | ;; |
---|
3795 | esac |
---|
3796 | |
---|
3797 | case $cc_basename in |
---|
3798 | CC) |
---|
3799 | # FIXME: insert proper C++ library support |
---|
3800 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3801 | ;; |
---|
3802 | aCC) |
---|
3803 | case "$host_cpu" in |
---|
3804 | hppa*64*|ia64*) |
---|
3805 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' |
---|
3806 | ;; |
---|
3807 | *) |
---|
3808 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' |
---|
3809 | ;; |
---|
3810 | esac |
---|
3811 | # Commands to make compiler produce verbose output that lists |
---|
3812 | # what "hidden" libraries, object files and flags are used when |
---|
3813 | # linking a shared library. |
---|
3814 | # |
---|
3815 | # There doesn't appear to be a way to prevent this compiler from |
---|
3816 | # explicitly linking system object files so we need to strip them |
---|
3817 | # from the output so that they don't get included in the library |
---|
3818 | # dependencies. |
---|
3819 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' |
---|
3820 | ;; |
---|
3821 | *) |
---|
3822 | if test "$GXX" = yes; then |
---|
3823 | if test $with_gnu_ld = no; then |
---|
3824 | case "$host_cpu" in |
---|
3825 | ia64*|hppa*64*) |
---|
3826 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' |
---|
3827 | ;; |
---|
3828 | *) |
---|
3829 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' |
---|
3830 | ;; |
---|
3831 | esac |
---|
3832 | fi |
---|
3833 | else |
---|
3834 | # FIXME: insert proper C++ library support |
---|
3835 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3836 | fi |
---|
3837 | ;; |
---|
3838 | esac |
---|
3839 | ;; |
---|
3840 | irix5* | irix6*) |
---|
3841 | case $cc_basename in |
---|
3842 | CC) |
---|
3843 | # SGI C++ |
---|
3844 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' |
---|
3845 | |
---|
3846 | # Archives containing C++ object files must be created using |
---|
3847 | # "CC -ar", where "CC" is the IRIX C++ compiler. This is |
---|
3848 | # necessary to make sure instantiated templates are included |
---|
3849 | # in the archive. |
---|
3850 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' |
---|
3851 | ;; |
---|
3852 | *) |
---|
3853 | if test "$GXX" = yes; then |
---|
3854 | if test "$with_gnu_ld" = no; then |
---|
3855 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' |
---|
3856 | else |
---|
3857 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' |
---|
3858 | fi |
---|
3859 | fi |
---|
3860 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
---|
3861 | ;; |
---|
3862 | esac |
---|
3863 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
---|
3864 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
3865 | ;; |
---|
3866 | linux*) |
---|
3867 | case $cc_basename in |
---|
3868 | KCC) |
---|
3869 | # Kuck and Associates, Inc. (KAI) C++ Compiler |
---|
3870 | |
---|
3871 | # KCC will only create a shared library if the output file |
---|
3872 | # ends with ".so" (or ".sl" for HP-UX), so rename the library |
---|
3873 | # to its proper name (with version) after linking. |
---|
3874 | _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' |
---|
3875 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' |
---|
3876 | # Commands to make compiler produce verbose output that lists |
---|
3877 | # what "hidden" libraries, object files and flags are used when |
---|
3878 | # linking a shared library. |
---|
3879 | # |
---|
3880 | # There doesn't appear to be a way to prevent this compiler from |
---|
3881 | # explicitly linking system object files so we need to strip them |
---|
3882 | # from the output so that they don't get included in the library |
---|
3883 | # dependencies. |
---|
3884 | output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' |
---|
3885 | |
---|
3886 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' |
---|
3887 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' |
---|
3888 | |
---|
3889 | # Archives containing C++ object files must be created using |
---|
3890 | # "CC -Bstatic", where "CC" is the KAI C++ compiler. |
---|
3891 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' |
---|
3892 | ;; |
---|
3893 | icpc) |
---|
3894 | # Intel C++ |
---|
3895 | with_gnu_ld=yes |
---|
3896 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
---|
3897 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
3898 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
---|
3899 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
---|
3900 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' |
---|
3901 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' |
---|
3902 | ;; |
---|
3903 | cxx) |
---|
3904 | # Compaq C++ |
---|
3905 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
3906 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' |
---|
3907 | |
---|
3908 | runpath_var=LD_RUN_PATH |
---|
3909 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' |
---|
3910 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
3911 | |
---|
3912 | # Commands to make compiler produce verbose output that lists |
---|
3913 | # what "hidden" libraries, object files and flags are used when |
---|
3914 | # linking a shared library. |
---|
3915 | # |
---|
3916 | # There doesn't appear to be a way to prevent this compiler from |
---|
3917 | # explicitly linking system object files so we need to strip them |
---|
3918 | # from the output so that they don't get included in the library |
---|
3919 | # dependencies. |
---|
3920 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' |
---|
3921 | ;; |
---|
3922 | esac |
---|
3923 | ;; |
---|
3924 | lynxos*) |
---|
3925 | # FIXME: insert proper C++ library support |
---|
3926 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3927 | ;; |
---|
3928 | m88k*) |
---|
3929 | # FIXME: insert proper C++ library support |
---|
3930 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3931 | ;; |
---|
3932 | mvs*) |
---|
3933 | case $cc_basename in |
---|
3934 | cxx) |
---|
3935 | # FIXME: insert proper C++ library support |
---|
3936 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3937 | ;; |
---|
3938 | *) |
---|
3939 | # FIXME: insert proper C++ library support |
---|
3940 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3941 | ;; |
---|
3942 | esac |
---|
3943 | ;; |
---|
3944 | netbsd*) |
---|
3945 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
---|
3946 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' |
---|
3947 | wlarc= |
---|
3948 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
---|
3949 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
3950 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
3951 | fi |
---|
3952 | # Workaround some broken pre-1.5 toolchains |
---|
3953 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' |
---|
3954 | ;; |
---|
3955 | osf3*) |
---|
3956 | case $cc_basename in |
---|
3957 | KCC) |
---|
3958 | # Kuck and Associates, Inc. (KAI) C++ Compiler |
---|
3959 | |
---|
3960 | # KCC will only create a shared library if the output file |
---|
3961 | # ends with ".so" (or ".sl" for HP-UX), so rename the library |
---|
3962 | # to its proper name (with version) after linking. |
---|
3963 | _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' |
---|
3964 | |
---|
3965 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
---|
3966 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
3967 | |
---|
3968 | # Archives containing C++ object files must be created using |
---|
3969 | # "CC -Bstatic", where "CC" is the KAI C++ compiler. |
---|
3970 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' |
---|
3971 | |
---|
3972 | ;; |
---|
3973 | RCC) |
---|
3974 | # Rational C++ 2.4.1 |
---|
3975 | # FIXME: insert proper C++ library support |
---|
3976 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
3977 | ;; |
---|
3978 | cxx) |
---|
3979 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
---|
3980 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' |
---|
3981 | |
---|
3982 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
---|
3983 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
3984 | |
---|
3985 | # Commands to make compiler produce verbose output that lists |
---|
3986 | # what "hidden" libraries, object files and flags are used when |
---|
3987 | # linking a shared library. |
---|
3988 | # |
---|
3989 | # There doesn't appear to be a way to prevent this compiler from |
---|
3990 | # explicitly linking system object files so we need to strip them |
---|
3991 | # from the output so that they don't get included in the library |
---|
3992 | # dependencies. |
---|
3993 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' |
---|
3994 | ;; |
---|
3995 | *) |
---|
3996 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then |
---|
3997 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
---|
3998 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' |
---|
3999 | |
---|
4000 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
---|
4001 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
4002 | |
---|
4003 | # Commands to make compiler produce verbose output that lists |
---|
4004 | # what "hidden" libraries, object files and flags are used when |
---|
4005 | # linking a shared library. |
---|
4006 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' |
---|
4007 | |
---|
4008 | else |
---|
4009 | # FIXME: insert proper C++ library support |
---|
4010 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4011 | fi |
---|
4012 | ;; |
---|
4013 | esac |
---|
4014 | ;; |
---|
4015 | osf4* | osf5*) |
---|
4016 | case $cc_basename in |
---|
4017 | KCC) |
---|
4018 | # Kuck and Associates, Inc. (KAI) C++ Compiler |
---|
4019 | |
---|
4020 | # KCC will only create a shared library if the output file |
---|
4021 | # ends with ".so" (or ".sl" for HP-UX), so rename the library |
---|
4022 | # to its proper name (with version) after linking. |
---|
4023 | _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' |
---|
4024 | |
---|
4025 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
---|
4026 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
4027 | |
---|
4028 | # Archives containing C++ object files must be created using |
---|
4029 | # the KAI C++ compiler. |
---|
4030 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' |
---|
4031 | ;; |
---|
4032 | RCC) |
---|
4033 | # Rational C++ 2.4.1 |
---|
4034 | # FIXME: insert proper C++ library support |
---|
4035 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4036 | ;; |
---|
4037 | cxx) |
---|
4038 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' |
---|
4039 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' |
---|
4040 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ |
---|
4041 | echo "-hidden">> $lib.exp~ |
---|
4042 | $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ |
---|
4043 | $rm $lib.exp' |
---|
4044 | |
---|
4045 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' |
---|
4046 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
4047 | |
---|
4048 | # Commands to make compiler produce verbose output that lists |
---|
4049 | # what "hidden" libraries, object files and flags are used when |
---|
4050 | # linking a shared library. |
---|
4051 | # |
---|
4052 | # There doesn't appear to be a way to prevent this compiler from |
---|
4053 | # explicitly linking system object files so we need to strip them |
---|
4054 | # from the output so that they don't get included in the library |
---|
4055 | # dependencies. |
---|
4056 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' |
---|
4057 | ;; |
---|
4058 | *) |
---|
4059 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then |
---|
4060 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
---|
4061 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' |
---|
4062 | |
---|
4063 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
---|
4064 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
4065 | |
---|
4066 | # Commands to make compiler produce verbose output that lists |
---|
4067 | # what "hidden" libraries, object files and flags are used when |
---|
4068 | # linking a shared library. |
---|
4069 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' |
---|
4070 | |
---|
4071 | else |
---|
4072 | # FIXME: insert proper C++ library support |
---|
4073 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4074 | fi |
---|
4075 | ;; |
---|
4076 | esac |
---|
4077 | ;; |
---|
4078 | psos*) |
---|
4079 | # FIXME: insert proper C++ library support |
---|
4080 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4081 | ;; |
---|
4082 | sco*) |
---|
4083 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
---|
4084 | case $cc_basename in |
---|
4085 | CC) |
---|
4086 | # FIXME: insert proper C++ library support |
---|
4087 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4088 | ;; |
---|
4089 | *) |
---|
4090 | # FIXME: insert proper C++ library support |
---|
4091 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4092 | ;; |
---|
4093 | esac |
---|
4094 | ;; |
---|
4095 | sunos4*) |
---|
4096 | case $cc_basename in |
---|
4097 | CC) |
---|
4098 | # Sun C++ 4.x |
---|
4099 | # FIXME: insert proper C++ library support |
---|
4100 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4101 | ;; |
---|
4102 | lcc) |
---|
4103 | # Lucid |
---|
4104 | # FIXME: insert proper C++ library support |
---|
4105 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4106 | ;; |
---|
4107 | *) |
---|
4108 | # FIXME: insert proper C++ library support |
---|
4109 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4110 | ;; |
---|
4111 | esac |
---|
4112 | ;; |
---|
4113 | solaris*) |
---|
4114 | case $cc_basename in |
---|
4115 | CC) |
---|
4116 | # Sun C++ 4.2, 5.x and Centerline C++ |
---|
4117 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' |
---|
4118 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' |
---|
4119 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
---|
4120 | $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' |
---|
4121 | |
---|
4122 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
---|
4123 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
4124 | case $host_os in |
---|
4125 | solaris2.[0-5] | solaris2.[0-5].*) ;; |
---|
4126 | *) |
---|
4127 | # The C++ compiler is used as linker so we must use $wl |
---|
4128 | # flag to pass the commands to the underlying system |
---|
4129 | # linker. |
---|
4130 | # Supported since Solaris 2.6 (maybe 2.5.1?) |
---|
4131 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' |
---|
4132 | ;; |
---|
4133 | esac |
---|
4134 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
---|
4135 | |
---|
4136 | # Commands to make compiler produce verbose output that lists |
---|
4137 | # what "hidden" libraries, object files and flags are used when |
---|
4138 | # linking a shared library. |
---|
4139 | # |
---|
4140 | # There doesn't appear to be a way to prevent this compiler from |
---|
4141 | # explicitly linking system object files so we need to strip them |
---|
4142 | # from the output so that they don't get included in the library |
---|
4143 | # dependencies. |
---|
4144 | output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' |
---|
4145 | |
---|
4146 | # Archives containing C++ object files must be created using |
---|
4147 | # "CC -xar", where "CC" is the Sun C++ compiler. This is |
---|
4148 | # necessary to make sure instantiated templates are included |
---|
4149 | # in the archive. |
---|
4150 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' |
---|
4151 | ;; |
---|
4152 | gcx) |
---|
4153 | # Green Hills C++ Compiler |
---|
4154 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' |
---|
4155 | |
---|
4156 | # The C++ compiler must be used to create the archive. |
---|
4157 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' |
---|
4158 | ;; |
---|
4159 | *) |
---|
4160 | # GNU C++ compiler with Solaris linker |
---|
4161 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then |
---|
4162 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' |
---|
4163 | if $CC --version | grep -v '^2\.7' > /dev/null; then |
---|
4164 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' |
---|
4165 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
---|
4166 | $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' |
---|
4167 | |
---|
4168 | # Commands to make compiler produce verbose output that lists |
---|
4169 | # what "hidden" libraries, object files and flags are used when |
---|
4170 | # linking a shared library. |
---|
4171 | output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" |
---|
4172 | else |
---|
4173 | # g++ 2.7 appears to require `-G' NOT `-shared' on this |
---|
4174 | # platform. |
---|
4175 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' |
---|
4176 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
---|
4177 | $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' |
---|
4178 | |
---|
4179 | # Commands to make compiler produce verbose output that lists |
---|
4180 | # what "hidden" libraries, object files and flags are used when |
---|
4181 | # linking a shared library. |
---|
4182 | output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" |
---|
4183 | fi |
---|
4184 | |
---|
4185 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' |
---|
4186 | fi |
---|
4187 | ;; |
---|
4188 | esac |
---|
4189 | ;; |
---|
4190 | sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) |
---|
4191 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
---|
4192 | ;; |
---|
4193 | tandem*) |
---|
4194 | case $cc_basename in |
---|
4195 | NCC) |
---|
4196 | # NonStop-UX NCC 3.20 |
---|
4197 | # FIXME: insert proper C++ library support |
---|
4198 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4199 | ;; |
---|
4200 | *) |
---|
4201 | # FIXME: insert proper C++ library support |
---|
4202 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4203 | ;; |
---|
4204 | esac |
---|
4205 | ;; |
---|
4206 | vxworks*) |
---|
4207 | # FIXME: insert proper C++ library support |
---|
4208 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4209 | ;; |
---|
4210 | *) |
---|
4211 | # FIXME: insert proper C++ library support |
---|
4212 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
4213 | ;; |
---|
4214 | esac |
---|
4215 | AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) |
---|
4216 | test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no |
---|
4217 | |
---|
4218 | _LT_AC_TAGVAR(GCC, $1)="$GXX" |
---|
4219 | _LT_AC_TAGVAR(LD, $1)="$LD" |
---|
4220 | |
---|
4221 | AC_LIBTOOL_POSTDEP_PREDEP($1) |
---|
4222 | AC_LIBTOOL_PROG_COMPILER_PIC($1) |
---|
4223 | AC_LIBTOOL_PROG_CC_C_O($1) |
---|
4224 | AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) |
---|
4225 | AC_LIBTOOL_PROG_LD_SHLIBS($1) |
---|
4226 | AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) |
---|
4227 | AC_LIBTOOL_SYS_LIB_STRIP |
---|
4228 | AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) |
---|
4229 | AC_LIBTOOL_DLOPEN_SELF($1) |
---|
4230 | |
---|
4231 | AC_LIBTOOL_CONFIG($1) |
---|
4232 | |
---|
4233 | AC_LANG_POP |
---|
4234 | CC=$lt_save_CC |
---|
4235 | LDCXX=$LD |
---|
4236 | LD=$lt_save_LD |
---|
4237 | GCC=$lt_save_GCC |
---|
4238 | with_gnu_ldcxx=$with_gnu_ld |
---|
4239 | with_gnu_ld=$lt_save_with_gnu_ld |
---|
4240 | lt_cv_path_LDCXX=$lt_cv_path_LD |
---|
4241 | lt_cv_path_LD=$lt_save_path_LD |
---|
4242 | lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld |
---|
4243 | lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld |
---|
4244 | ])# AC_LIBTOOL_LANG_CXX_CONFIG |
---|
4245 | |
---|
4246 | # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) |
---|
4247 | # ------------------------ |
---|
4248 | # Figure out "hidden" library dependencies from verbose |
---|
4249 | # compiler output when linking a shared library. |
---|
4250 | # Parse the compiler output and extract the necessary |
---|
4251 | # objects, libraries and library flags. |
---|
4252 | AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ |
---|
4253 | dnl we can't use the lt_simple_compile_test_code here, |
---|
4254 | dnl because it contains code intended for an executable, |
---|
4255 | dnl not a library. It's possible we should let each |
---|
4256 | dnl tag define a new lt_????_link_test_code variable, |
---|
4257 | dnl but it's only used here... |
---|
4258 | ifelse([$1],[],[cat > conftest.$ac_ext <<EOF |
---|
4259 | int a; |
---|
4260 | void foo (void) { a = 0; } |
---|
4261 | EOF |
---|
4262 | ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF |
---|
4263 | class Foo |
---|
4264 | { |
---|
4265 | public: |
---|
4266 | Foo (void) { a = 0; } |
---|
4267 | private: |
---|
4268 | int a; |
---|
4269 | }; |
---|
4270 | EOF |
---|
4271 | ],[$1],[F77],[cat > conftest.$ac_ext <<EOF |
---|
4272 | subroutine foo |
---|
4273 | implicit none |
---|
4274 | integer*4 a |
---|
4275 | a=0 |
---|
4276 | return |
---|
4277 | end |
---|
4278 | EOF |
---|
4279 | ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF |
---|
4280 | public class foo { |
---|
4281 | private int a; |
---|
4282 | public void bar (void) { |
---|
4283 | a = 0; |
---|
4284 | } |
---|
4285 | }; |
---|
4286 | EOF |
---|
4287 | ]) |
---|
4288 | dnl Parse the compiler output and extract the necessary |
---|
4289 | dnl objects, libraries and library flags. |
---|
4290 | if AC_TRY_EVAL(ac_compile); then |
---|
4291 | # Parse the compiler output and extract the necessary |
---|
4292 | # objects, libraries and library flags. |
---|
4293 | |
---|
4294 | # Sentinel used to keep track of whether or not we are before |
---|
4295 | # the conftest object file. |
---|
4296 | pre_test_object_deps_done=no |
---|
4297 | |
---|
4298 | # The `*' in the case matches for architectures that use `case' in |
---|
4299 | # $output_verbose_cmd can trigger glob expansion during the loop |
---|
4300 | # eval without this substitution. |
---|
4301 | output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" |
---|
4302 | |
---|
4303 | for p in `eval $output_verbose_link_cmd`; do |
---|
4304 | case $p in |
---|
4305 | |
---|
4306 | -L* | -R* | -l*) |
---|
4307 | # Some compilers place space between "-{L,R}" and the path. |
---|
4308 | # Remove the space. |
---|
4309 | if test $p = "-L" \ |
---|
4310 | || test $p = "-R"; then |
---|
4311 | prev=$p |
---|
4312 | continue |
---|
4313 | else |
---|
4314 | prev= |
---|
4315 | fi |
---|
4316 | |
---|
4317 | if test "$pre_test_object_deps_done" = no; then |
---|
4318 | case $p in |
---|
4319 | -L* | -R*) |
---|
4320 | # Internal compiler library paths should come after those |
---|
4321 | # provided the user. The postdeps already come after the |
---|
4322 | # user supplied libs so there is no need to process them. |
---|
4323 | if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then |
---|
4324 | _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" |
---|
4325 | else |
---|
4326 | _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" |
---|
4327 | fi |
---|
4328 | ;; |
---|
4329 | # The "-l" case would never come before the object being |
---|
4330 | # linked, so don't bother handling this case. |
---|
4331 | esac |
---|
4332 | else |
---|
4333 | if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then |
---|
4334 | _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" |
---|
4335 | else |
---|
4336 | _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" |
---|
4337 | fi |
---|
4338 | fi |
---|
4339 | ;; |
---|
4340 | |
---|
4341 | *.$objext) |
---|
4342 | # This assumes that the test object file only shows up |
---|
4343 | # once in the compiler output. |
---|
4344 | if test "$p" = "conftest.$objext"; then |
---|
4345 | pre_test_object_deps_done=yes |
---|
4346 | continue |
---|
4347 | fi |
---|
4348 | |
---|
4349 | if test "$pre_test_object_deps_done" = no; then |
---|
4350 | if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then |
---|
4351 | _LT_AC_TAGVAR(predep_objects, $1)="$p" |
---|
4352 | else |
---|
4353 | _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" |
---|
4354 | fi |
---|
4355 | else |
---|
4356 | if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then |
---|
4357 | _LT_AC_TAGVAR(postdep_objects, $1)="$p" |
---|
4358 | else |
---|
4359 | _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" |
---|
4360 | fi |
---|
4361 | fi |
---|
4362 | ;; |
---|
4363 | |
---|
4364 | *) ;; # Ignore the rest. |
---|
4365 | |
---|
4366 | esac |
---|
4367 | done |
---|
4368 | |
---|
4369 | # Clean up. |
---|
4370 | rm -f a.out a.exe |
---|
4371 | else |
---|
4372 | echo "libtool.m4: error: problem compiling $1 test program" |
---|
4373 | fi |
---|
4374 | |
---|
4375 | $rm -f confest.$objext |
---|
4376 | |
---|
4377 | case " $_LT_AC_TAGVAR(postdeps, $1) " in |
---|
4378 | *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; |
---|
4379 | esac |
---|
4380 | ])# AC_LIBTOOL_POSTDEP_PREDEP |
---|
4381 | |
---|
4382 | # AC_LIBTOOL_LANG_F77_CONFIG |
---|
4383 | # ------------------------ |
---|
4384 | # Ensure that the configuration vars for the C compiler are |
---|
4385 | # suitably defined. Those variables are subsequently used by |
---|
4386 | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
---|
4387 | AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) |
---|
4388 | AC_DEFUN([_LT_AC_LANG_F77_CONFIG], |
---|
4389 | [AC_REQUIRE([AC_PROG_F77]) |
---|
4390 | AC_LANG_PUSH(Fortran 77) |
---|
4391 | |
---|
4392 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
---|
4393 | _LT_AC_TAGVAR(allow_undefined_flag, $1)= |
---|
4394 | _LT_AC_TAGVAR(always_export_symbols, $1)=no |
---|
4395 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)= |
---|
4396 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= |
---|
4397 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
---|
4398 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= |
---|
4399 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= |
---|
4400 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
---|
4401 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=no |
---|
4402 | _LT_AC_TAGVAR(hardcode_automatic, $1)=no |
---|
4403 | _LT_AC_TAGVAR(module_cmds, $1)= |
---|
4404 | _LT_AC_TAGVAR(module_expsym_cmds, $1)= |
---|
4405 | _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown |
---|
4406 | _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds |
---|
4407 | _LT_AC_TAGVAR(no_undefined_flag, $1)= |
---|
4408 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
---|
4409 | _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no |
---|
4410 | |
---|
4411 | # Source file extension for f77 test sources. |
---|
4412 | ac_ext=f |
---|
4413 | |
---|
4414 | # Object file extension for compiled f77 test sources. |
---|
4415 | objext=o |
---|
4416 | _LT_AC_TAGVAR(objext, $1)=$objext |
---|
4417 | |
---|
4418 | # Code to be used in simple compile tests |
---|
4419 | lt_simple_compile_test_code=" subroutine t\n return\n end\n" |
---|
4420 | |
---|
4421 | # Code to be used in simple link tests |
---|
4422 | lt_simple_link_test_code=" program t\n end\n" |
---|
4423 | |
---|
4424 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. |
---|
4425 | _LT_AC_SYS_COMPILER |
---|
4426 | |
---|
4427 | # Allow CC to be a program name with arguments. |
---|
4428 | lt_save_CC="$CC" |
---|
4429 | CC=${F77-"f77"} |
---|
4430 | compiler=$CC |
---|
4431 | _LT_AC_TAGVAR(compiler, $1)=$CC |
---|
4432 | cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` |
---|
4433 | |
---|
4434 | AC_MSG_CHECKING([if libtool supports shared libraries]) |
---|
4435 | AC_MSG_RESULT([$can_build_shared]) |
---|
4436 | |
---|
4437 | AC_MSG_CHECKING([whether to build shared libraries]) |
---|
4438 | test "$can_build_shared" = "no" && enable_shared=no |
---|
4439 | |
---|
4440 | # On AIX, shared libraries and static libraries use the same namespace, and |
---|
4441 | # are all built from PIC. |
---|
4442 | case "$host_os" in |
---|
4443 | aix3*) |
---|
4444 | test "$enable_shared" = yes && enable_static=no |
---|
4445 | if test -n "$RANLIB"; then |
---|
4446 | archive_cmds="$archive_cmds~\$RANLIB \$lib" |
---|
4447 | postinstall_cmds='$RANLIB $lib' |
---|
4448 | fi |
---|
4449 | ;; |
---|
4450 | aix4*) |
---|
4451 | test "$enable_shared" = yes && enable_static=no |
---|
4452 | ;; |
---|
4453 | esac |
---|
4454 | AC_MSG_RESULT([$enable_shared]) |
---|
4455 | |
---|
4456 | AC_MSG_CHECKING([whether to build static libraries]) |
---|
4457 | # Make sure either enable_shared or enable_static is yes. |
---|
4458 | test "$enable_shared" = yes || enable_static=yes |
---|
4459 | AC_MSG_RESULT([$enable_static]) |
---|
4460 | |
---|
4461 | test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no |
---|
4462 | |
---|
4463 | _LT_AC_TAGVAR(GCC, $1)="$G77" |
---|
4464 | _LT_AC_TAGVAR(LD, $1)="$LD" |
---|
4465 | |
---|
4466 | AC_LIBTOOL_PROG_COMPILER_PIC($1) |
---|
4467 | AC_LIBTOOL_PROG_CC_C_O($1) |
---|
4468 | AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) |
---|
4469 | AC_LIBTOOL_PROG_LD_SHLIBS($1) |
---|
4470 | AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) |
---|
4471 | AC_LIBTOOL_SYS_LIB_STRIP |
---|
4472 | AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) |
---|
4473 | |
---|
4474 | AC_LIBTOOL_CONFIG($1) |
---|
4475 | |
---|
4476 | AC_LANG_POP |
---|
4477 | CC="$lt_save_CC" |
---|
4478 | ])# AC_LIBTOOL_LANG_F77_CONFIG |
---|
4479 | |
---|
4480 | |
---|
4481 | # AC_LIBTOOL_LANG_GCJ_CONFIG |
---|
4482 | # -------------------------- |
---|
4483 | # Ensure that the configuration vars for the C compiler are |
---|
4484 | # suitably defined. Those variables are subsequently used by |
---|
4485 | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
---|
4486 | AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) |
---|
4487 | AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], |
---|
4488 | [AC_LANG_SAVE |
---|
4489 | |
---|
4490 | # Source file extension for Java test sources. |
---|
4491 | ac_ext=java |
---|
4492 | |
---|
4493 | # Object file extension for compiled Java test sources. |
---|
4494 | objext=o |
---|
4495 | _LT_AC_TAGVAR(objext, $1)=$objext |
---|
4496 | |
---|
4497 | # Code to be used in simple compile tests |
---|
4498 | lt_simple_compile_test_code="class foo {}\n" |
---|
4499 | |
---|
4500 | # Code to be used in simple link tests |
---|
4501 | lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' |
---|
4502 | |
---|
4503 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. |
---|
4504 | _LT_AC_SYS_COMPILER |
---|
4505 | |
---|
4506 | # Allow CC to be a program name with arguments. |
---|
4507 | lt_save_CC="$CC" |
---|
4508 | CC=${GCJ-"gcj"} |
---|
4509 | compiler=$CC |
---|
4510 | _LT_AC_TAGVAR(compiler, $1)=$CC |
---|
4511 | |
---|
4512 | # GCJ did not exist at the time GCC didn't implicitly link libc in. |
---|
4513 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
---|
4514 | |
---|
4515 | AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) |
---|
4516 | AC_LIBTOOL_PROG_COMPILER_PIC($1) |
---|
4517 | AC_LIBTOOL_PROG_CC_C_O($1) |
---|
4518 | AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) |
---|
4519 | AC_LIBTOOL_PROG_LD_SHLIBS($1) |
---|
4520 | AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) |
---|
4521 | AC_LIBTOOL_SYS_LIB_STRIP |
---|
4522 | AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) |
---|
4523 | AC_LIBTOOL_DLOPEN_SELF($1) |
---|
4524 | |
---|
4525 | AC_LIBTOOL_CONFIG($1) |
---|
4526 | |
---|
4527 | AC_LANG_RESTORE |
---|
4528 | CC="$lt_save_CC" |
---|
4529 | ])# AC_LIBTOOL_LANG_GCJ_CONFIG |
---|
4530 | |
---|
4531 | |
---|
4532 | # AC_LIBTOOL_LANG_RC_CONFIG |
---|
4533 | # -------------------------- |
---|
4534 | # Ensure that the configuration vars for the Windows resource compiler are |
---|
4535 | # suitably defined. Those variables are subsequently used by |
---|
4536 | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. |
---|
4537 | AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) |
---|
4538 | AC_DEFUN([_LT_AC_LANG_RC_CONFIG], |
---|
4539 | [AC_LANG_SAVE |
---|
4540 | |
---|
4541 | # Source file extension for RC test sources. |
---|
4542 | ac_ext=rc |
---|
4543 | |
---|
4544 | # Object file extension for compiled RC test sources. |
---|
4545 | objext=o |
---|
4546 | _LT_AC_TAGVAR(objext, $1)=$objext |
---|
4547 | |
---|
4548 | # Code to be used in simple compile tests |
---|
4549 | lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' |
---|
4550 | |
---|
4551 | # Code to be used in simple link tests |
---|
4552 | lt_simple_link_test_code="$lt_simple_compile_test_code" |
---|
4553 | |
---|
4554 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. |
---|
4555 | _LT_AC_SYS_COMPILER |
---|
4556 | |
---|
4557 | # Allow CC to be a program name with arguments. |
---|
4558 | lt_save_CC="$CC" |
---|
4559 | CC=${RC-"windres"} |
---|
4560 | compiler=$CC |
---|
4561 | _LT_AC_TAGVAR(compiler, $1)=$CC |
---|
4562 | _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes |
---|
4563 | |
---|
4564 | AC_LIBTOOL_CONFIG($1) |
---|
4565 | |
---|
4566 | AC_LANG_RESTORE |
---|
4567 | CC="$lt_save_CC" |
---|
4568 | ])# AC_LIBTOOL_LANG_RC_CONFIG |
---|
4569 | |
---|
4570 | |
---|
4571 | # AC_LIBTOOL_CONFIG([TAGNAME]) |
---|
4572 | # ---------------------------- |
---|
4573 | # If TAGNAME is not passed, then create an initial libtool script |
---|
4574 | # with a default configuration from the untagged config vars. Otherwise |
---|
4575 | # add code to config.status for appending the configuration named by |
---|
4576 | # TAGNAME from the matching tagged config vars. |
---|
4577 | AC_DEFUN([AC_LIBTOOL_CONFIG], |
---|
4578 | [# The else clause should only fire when bootstrapping the |
---|
4579 | # libtool distribution, otherwise you forgot to ship ltmain.sh |
---|
4580 | # with your package, and you will get complaints that there are |
---|
4581 | # no rules to generate ltmain.sh. |
---|
4582 | if test -f "$ltmain"; then |
---|
4583 | # See if we are running on zsh, and set the options which allow our commands through |
---|
4584 | # without removal of \ escapes. |
---|
4585 | if test -n "${ZSH_VERSION+set}" ; then |
---|
4586 | setopt NO_GLOB_SUBST |
---|
4587 | fi |
---|
4588 | # Now quote all the things that may contain metacharacters while being |
---|
4589 | # careful not to overquote the AC_SUBSTed values. We take copies of the |
---|
4590 | # variables and quote the copies for generation of the libtool script. |
---|
4591 | for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \ |
---|
4592 | libname_spec library_names_spec soname_spec extract_expsyms_cmds \ |
---|
4593 | old_striplib striplib file_magic_cmd finish_cmds finish_eval \ |
---|
4594 | deplibs_check_method reload_flag reload_cmds need_locks \ |
---|
4595 | lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ |
---|
4596 | lt_cv_sys_global_symbol_to_c_name_address \ |
---|
4597 | sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ |
---|
4598 | old_postinstall_cmds old_postuninstall_cmds \ |
---|
4599 | _LT_AC_TAGVAR(compiler, $1) \ |
---|
4600 | _LT_AC_TAGVAR(CC, $1) \ |
---|
4601 | _LT_AC_TAGVAR(LD, $1) \ |
---|
4602 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ |
---|
4603 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ |
---|
4604 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ |
---|
4605 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ |
---|
4606 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ |
---|
4607 | _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ |
---|
4608 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ |
---|
4609 | _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ |
---|
4610 | _LT_AC_TAGVAR(old_archive_cmds, $1) \ |
---|
4611 | _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ |
---|
4612 | _LT_AC_TAGVAR(predep_objects, $1) \ |
---|
4613 | _LT_AC_TAGVAR(postdep_objects, $1) \ |
---|
4614 | _LT_AC_TAGVAR(predeps, $1) \ |
---|
4615 | _LT_AC_TAGVAR(postdeps, $1) \ |
---|
4616 | _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ |
---|
4617 | _LT_AC_TAGVAR(archive_cmds, $1) \ |
---|
4618 | _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ |
---|
4619 | _LT_AC_TAGVAR(postinstall_cmds, $1) \ |
---|
4620 | _LT_AC_TAGVAR(postuninstall_cmds, $1) \ |
---|
4621 | _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ |
---|
4622 | _LT_AC_TAGVAR(allow_undefined_flag, $1) \ |
---|
4623 | _LT_AC_TAGVAR(no_undefined_flag, $1) \ |
---|
4624 | _LT_AC_TAGVAR(export_symbols_cmds, $1) \ |
---|
4625 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ |
---|
4626 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ |
---|
4627 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ |
---|
4628 | _LT_AC_TAGVAR(hardcode_automatic, $1) \ |
---|
4629 | _LT_AC_TAGVAR(module_cmds, $1) \ |
---|
4630 | _LT_AC_TAGVAR(module_expsym_cmds, $1) \ |
---|
4631 | _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ |
---|
4632 | _LT_AC_TAGVAR(exclude_expsyms, $1) \ |
---|
4633 | _LT_AC_TAGVAR(include_expsyms, $1); do |
---|
4634 | |
---|
4635 | case $var in |
---|
4636 | _LT_AC_TAGVAR(old_archive_cmds, $1) | \ |
---|
4637 | _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ |
---|
4638 | _LT_AC_TAGVAR(archive_cmds, $1) | \ |
---|
4639 | _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ |
---|
4640 | _LT_AC_TAGVAR(module_cmds, $1) | \ |
---|
4641 | _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ |
---|
4642 | _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ |
---|
4643 | _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ |
---|
4644 | extract_expsyms_cmds | reload_cmds | finish_cmds | \ |
---|
4645 | postinstall_cmds | postuninstall_cmds | \ |
---|
4646 | old_postinstall_cmds | old_postuninstall_cmds | \ |
---|
4647 | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) |
---|
4648 | # Double-quote double-evaled strings. |
---|
4649 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" |
---|
4650 | ;; |
---|
4651 | *) |
---|
4652 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" |
---|
4653 | ;; |
---|
4654 | esac |
---|
4655 | done |
---|
4656 | |
---|
4657 | case $lt_echo in |
---|
4658 | *'\[$]0 --fallback-echo"') |
---|
4659 | lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` |
---|
4660 | ;; |
---|
4661 | esac |
---|
4662 | |
---|
4663 | ifelse([$1], [], |
---|
4664 | [cfgfile="${ofile}T" |
---|
4665 | trap "$rm \"$cfgfile\"; exit 1" 1 2 15 |
---|
4666 | $rm -f "$cfgfile" |
---|
4667 | AC_MSG_NOTICE([creating $ofile])], |
---|
4668 | [cfgfile="$ofile"]) |
---|
4669 | |
---|
4670 | cat <<__EOF__ >> "$cfgfile" |
---|
4671 | ifelse([$1], [], |
---|
4672 | [#! $SHELL |
---|
4673 | |
---|
4674 | # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. |
---|
4675 | # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) |
---|
4676 | # NOTE: Changes made to this file will be lost: look at ltmain.sh. |
---|
4677 | # |
---|
4678 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 |
---|
4679 | # Free Software Foundation, Inc. |
---|
4680 | # |
---|
4681 | # This file is part of GNU Libtool: |
---|
4682 | # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 |
---|
4683 | # |
---|
4684 | # This program is free software; you can redistribute it and/or modify |
---|
4685 | # it under the terms of the GNU General Public License as published by |
---|
4686 | # the Free Software Foundation; either version 2 of the License, or |
---|
4687 | # (at your option) any later version. |
---|
4688 | # |
---|
4689 | # This program is distributed in the hope that it will be useful, but |
---|
4690 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
4691 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
4692 | # General Public License for more details. |
---|
4693 | # |
---|
4694 | # You should have received a copy of the GNU General Public License |
---|
4695 | # along with this program; if not, write to the Free Software |
---|
4696 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
4697 | # |
---|
4698 | # As a special exception to the GNU General Public License, if you |
---|
4699 | # distribute this file as part of a program that contains a |
---|
4700 | # configuration script generated by Autoconf, you may include it under |
---|
4701 | # the same distribution terms that you use for the rest of that program. |
---|
4702 | |
---|
4703 | # A sed program that does not truncate output. |
---|
4704 | SED=$lt_SED |
---|
4705 | |
---|
4706 | # Sed that helps us avoid accidentally triggering echo(1) options like -n. |
---|
4707 | Xsed="$SED -e s/^X//" |
---|
4708 | |
---|
4709 | # The HP-UX ksh and POSIX shell print the target directory to stdout |
---|
4710 | # if CDPATH is set. |
---|
4711 | if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi |
---|
4712 | |
---|
4713 | # The names of the tagged configurations supported by this script. |
---|
4714 | available_tags= |
---|
4715 | |
---|
4716 | # ### BEGIN LIBTOOL CONFIG], |
---|
4717 | [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) |
---|
4718 | |
---|
4719 | # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
---|
4720 | |
---|
4721 | # Shell to use when invoking shell scripts. |
---|
4722 | SHELL=$lt_SHELL |
---|
4723 | |
---|
4724 | # Whether or not to build shared libraries. |
---|
4725 | build_libtool_libs=$enable_shared |
---|
4726 | |
---|
4727 | # Whether or not to build static libraries. |
---|
4728 | build_old_libs=$enable_static |
---|
4729 | |
---|
4730 | # Whether or not to add -lc for building shared libraries. |
---|
4731 | build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) |
---|
4732 | |
---|
4733 | # Whether or not to disallow shared libs when runtime libs are static |
---|
4734 | allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) |
---|
4735 | |
---|
4736 | # Whether or not to optimize for fast installation. |
---|
4737 | fast_install=$enable_fast_install |
---|
4738 | |
---|
4739 | # The host system. |
---|
4740 | host_alias=$host_alias |
---|
4741 | host=$host |
---|
4742 | |
---|
4743 | # An echo program that does not interpret backslashes. |
---|
4744 | echo=$lt_echo |
---|
4745 | |
---|
4746 | # The archiver. |
---|
4747 | AR=$lt_AR |
---|
4748 | AR_FLAGS=$lt_AR_FLAGS |
---|
4749 | |
---|
4750 | # A C compiler. |
---|
4751 | LTCC=$lt_LTCC |
---|
4752 | |
---|
4753 | # A language-specific compiler. |
---|
4754 | CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) |
---|
4755 | |
---|
4756 | # Is the compiler the GNU C compiler? |
---|
4757 | with_gcc=$_LT_AC_TAGVAR(GCC, $1) |
---|
4758 | |
---|
4759 | # An ERE matcher. |
---|
4760 | EGREP=$lt_EGREP |
---|
4761 | |
---|
4762 | # The linker used to build libraries. |
---|
4763 | LD=$lt_[]_LT_AC_TAGVAR(LD, $1) |
---|
4764 | |
---|
4765 | # Whether we need hard or soft links. |
---|
4766 | LN_S=$lt_LN_S |
---|
4767 | |
---|
4768 | # A BSD-compatible nm program. |
---|
4769 | NM=$lt_NM |
---|
4770 | |
---|
4771 | # A symbol stripping program |
---|
4772 | STRIP=$STRIP |
---|
4773 | |
---|
4774 | # Used to examine libraries when file_magic_cmd begins "file" |
---|
4775 | MAGIC_CMD=$MAGIC_CMD |
---|
4776 | |
---|
4777 | # Used on cygwin: DLL creation program. |
---|
4778 | DLLTOOL="$DLLTOOL" |
---|
4779 | |
---|
4780 | # Used on cygwin: object dumper. |
---|
4781 | OBJDUMP="$OBJDUMP" |
---|
4782 | |
---|
4783 | # Used on cygwin: assembler. |
---|
4784 | AS="$AS" |
---|
4785 | |
---|
4786 | # The name of the directory that contains temporary libtool files. |
---|
4787 | objdir=$objdir |
---|
4788 | |
---|
4789 | # How to create reloadable object files. |
---|
4790 | reload_flag=$lt_reload_flag |
---|
4791 | reload_cmds=$lt_reload_cmds |
---|
4792 | |
---|
4793 | # How to pass a linker flag through the compiler. |
---|
4794 | wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) |
---|
4795 | |
---|
4796 | # Object file suffix (normally "o"). |
---|
4797 | objext="$ac_objext" |
---|
4798 | |
---|
4799 | # Old archive suffix (normally "a"). |
---|
4800 | libext="$libext" |
---|
4801 | |
---|
4802 | # Shared library suffix (normally ".so"). |
---|
4803 | shrext='$shrext' |
---|
4804 | |
---|
4805 | # Executable file suffix (normally ""). |
---|
4806 | exeext="$exeext" |
---|
4807 | |
---|
4808 | # Additional compiler flags for building library objects. |
---|
4809 | pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) |
---|
4810 | pic_mode=$pic_mode |
---|
4811 | |
---|
4812 | # What is the maximum length of a command? |
---|
4813 | max_cmd_len=$lt_cv_sys_max_cmd_len |
---|
4814 | |
---|
4815 | # Does compiler simultaneously support -c and -o options? |
---|
4816 | compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) |
---|
4817 | |
---|
4818 | # Must we lock files when doing compilation ? |
---|
4819 | need_locks=$lt_need_locks |
---|
4820 | |
---|
4821 | # Do we need the lib prefix for modules? |
---|
4822 | need_lib_prefix=$need_lib_prefix |
---|
4823 | |
---|
4824 | # Do we need a version for libraries? |
---|
4825 | need_version=$need_version |
---|
4826 | |
---|
4827 | # Whether dlopen is supported. |
---|
4828 | dlopen_support=$enable_dlopen |
---|
4829 | |
---|
4830 | # Whether dlopen of programs is supported. |
---|
4831 | dlopen_self=$enable_dlopen_self |
---|
4832 | |
---|
4833 | # Whether dlopen of statically linked programs is supported. |
---|
4834 | dlopen_self_static=$enable_dlopen_self_static |
---|
4835 | |
---|
4836 | # Compiler flag to prevent dynamic linking. |
---|
4837 | link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) |
---|
4838 | |
---|
4839 | # Compiler flag to turn off builtin functions. |
---|
4840 | no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) |
---|
4841 | |
---|
4842 | # Compiler flag to allow reflexive dlopens. |
---|
4843 | export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) |
---|
4844 | |
---|
4845 | # Compiler flag to generate shared objects directly from archives. |
---|
4846 | whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) |
---|
4847 | |
---|
4848 | # Compiler flag to generate thread-safe objects. |
---|
4849 | thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) |
---|
4850 | |
---|
4851 | # Library versioning type. |
---|
4852 | version_type=$version_type |
---|
4853 | |
---|
4854 | # Format of library name prefix. |
---|
4855 | libname_spec=$lt_libname_spec |
---|
4856 | |
---|
4857 | # List of archive names. First name is the real one, the rest are links. |
---|
4858 | # The last name is the one that the linker finds with -lNAME. |
---|
4859 | library_names_spec=$lt_library_names_spec |
---|
4860 | |
---|
4861 | # The coded name of the library, if different from the real name. |
---|
4862 | soname_spec=$lt_soname_spec |
---|
4863 | |
---|
4864 | # Commands used to build and install an old-style archive. |
---|
4865 | RANLIB=$lt_RANLIB |
---|
4866 | old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) |
---|
4867 | old_postinstall_cmds=$lt_old_postinstall_cmds |
---|
4868 | old_postuninstall_cmds=$lt_old_postuninstall_cmds |
---|
4869 | |
---|
4870 | # Create an old-style archive from a shared archive. |
---|
4871 | old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) |
---|
4872 | |
---|
4873 | # Create a temporary old-style archive to link instead of a shared archive. |
---|
4874 | old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) |
---|
4875 | |
---|
4876 | # Commands used to build and install a shared archive. |
---|
4877 | archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) |
---|
4878 | archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) |
---|
4879 | postinstall_cmds=$lt_postinstall_cmds |
---|
4880 | postuninstall_cmds=$lt_postuninstall_cmds |
---|
4881 | |
---|
4882 | # Commands used to build a loadable module (assumed same as above if empty) |
---|
4883 | module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) |
---|
4884 | module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) |
---|
4885 | |
---|
4886 | # Commands to strip libraries. |
---|
4887 | old_striplib=$lt_old_striplib |
---|
4888 | striplib=$lt_striplib |
---|
4889 | |
---|
4890 | # Dependencies to place before the objects being linked to create a |
---|
4891 | # shared library. |
---|
4892 | predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) |
---|
4893 | |
---|
4894 | # Dependencies to place after the objects being linked to create a |
---|
4895 | # shared library. |
---|
4896 | postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) |
---|
4897 | |
---|
4898 | # Dependencies to place before the objects being linked to create a |
---|
4899 | # shared library. |
---|
4900 | predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) |
---|
4901 | |
---|
4902 | # Dependencies to place after the objects being linked to create a |
---|
4903 | # shared library. |
---|
4904 | postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) |
---|
4905 | |
---|
4906 | # The library search path used internally by the compiler when linking |
---|
4907 | # a shared library. |
---|
4908 | compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) |
---|
4909 | |
---|
4910 | # Method to check whether dependent libraries are shared objects. |
---|
4911 | deplibs_check_method=$lt_deplibs_check_method |
---|
4912 | |
---|
4913 | # Command to use when deplibs_check_method == file_magic. |
---|
4914 | file_magic_cmd=$lt_file_magic_cmd |
---|
4915 | |
---|
4916 | # Flag that allows shared libraries with undefined symbols to be built. |
---|
4917 | allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) |
---|
4918 | |
---|
4919 | # Flag that forces no undefined symbols. |
---|
4920 | no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) |
---|
4921 | |
---|
4922 | # Commands used to finish a libtool library installation in a directory. |
---|
4923 | finish_cmds=$lt_finish_cmds |
---|
4924 | |
---|
4925 | # Same as above, but a single script fragment to be evaled but not shown. |
---|
4926 | finish_eval=$lt_finish_eval |
---|
4927 | |
---|
4928 | # Take the output of nm and produce a listing of raw symbols and C names. |
---|
4929 | global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe |
---|
4930 | |
---|
4931 | # Transform the output of nm in a proper C declaration |
---|
4932 | global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl |
---|
4933 | |
---|
4934 | # Transform the output of nm in a C name address pair |
---|
4935 | global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address |
---|
4936 | |
---|
4937 | # This is the shared library runtime path variable. |
---|
4938 | runpath_var=$runpath_var |
---|
4939 | |
---|
4940 | # This is the shared library path variable. |
---|
4941 | shlibpath_var=$shlibpath_var |
---|
4942 | |
---|
4943 | # Is shlibpath searched before the hard-coded library search path? |
---|
4944 | shlibpath_overrides_runpath=$shlibpath_overrides_runpath |
---|
4945 | |
---|
4946 | # How to hardcode a shared library path into an executable. |
---|
4947 | hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) |
---|
4948 | |
---|
4949 | # Whether we should hardcode library paths into libraries. |
---|
4950 | hardcode_into_libs=$hardcode_into_libs |
---|
4951 | |
---|
4952 | # Flag to hardcode \$libdir into a binary during linking. |
---|
4953 | # This must work even if \$libdir does not exist. |
---|
4954 | hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) |
---|
4955 | |
---|
4956 | # If ld is used when linking, flag to hardcode \$libdir into |
---|
4957 | # a binary during linking. This must work even if \$libdir does |
---|
4958 | # not exist. |
---|
4959 | hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) |
---|
4960 | |
---|
4961 | # Whether we need a single -rpath flag with a separated argument. |
---|
4962 | hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) |
---|
4963 | |
---|
4964 | # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the |
---|
4965 | # resulting binary. |
---|
4966 | hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) |
---|
4967 | |
---|
4968 | # Set to yes if using the -LDIR flag during linking hardcodes DIR into the |
---|
4969 | # resulting binary. |
---|
4970 | hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) |
---|
4971 | |
---|
4972 | # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into |
---|
4973 | # the resulting binary. |
---|
4974 | hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) |
---|
4975 | |
---|
4976 | # Set to yes if building a shared library automatically hardcodes DIR into the library |
---|
4977 | # and all subsequent libraries and executables linked against it. |
---|
4978 | hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) |
---|
4979 | |
---|
4980 | # Variables whose values should be saved in libtool wrapper scripts and |
---|
4981 | # restored at relink time. |
---|
4982 | variables_saved_for_relink="$variables_saved_for_relink" |
---|
4983 | |
---|
4984 | # Whether libtool must link a program against all its dependency libraries. |
---|
4985 | link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) |
---|
4986 | |
---|
4987 | # Compile-time system search path for libraries |
---|
4988 | sys_lib_search_path_spec=$lt_sys_lib_search_path_spec |
---|
4989 | |
---|
4990 | # Run-time system search path for libraries |
---|
4991 | sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec |
---|
4992 | |
---|
4993 | # Fix the shell variable \$srcfile for the compiler. |
---|
4994 | fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" |
---|
4995 | |
---|
4996 | # Set to yes if exported symbols are required. |
---|
4997 | always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) |
---|
4998 | |
---|
4999 | # The commands to list exported symbols. |
---|
5000 | export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) |
---|
5001 | |
---|
5002 | # The commands to extract the exported symbol list from a shared archive. |
---|
5003 | extract_expsyms_cmds=$lt_extract_expsyms_cmds |
---|
5004 | |
---|
5005 | # Symbols that should not be listed in the preloaded symbols. |
---|
5006 | exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) |
---|
5007 | |
---|
5008 | # Symbols that must always be exported. |
---|
5009 | include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) |
---|
5010 | |
---|
5011 | ifelse([$1],[], |
---|
5012 | [# ### END LIBTOOL CONFIG], |
---|
5013 | [# ### END LIBTOOL TAG CONFIG: $tagname]) |
---|
5014 | |
---|
5015 | __EOF__ |
---|
5016 | |
---|
5017 | ifelse([$1],[], [ |
---|
5018 | case $host_os in |
---|
5019 | aix3*) |
---|
5020 | cat <<\EOF >> "$cfgfile" |
---|
5021 | |
---|
5022 | # AIX sometimes has problems with the GCC collect2 program. For some |
---|
5023 | # reason, if we set the COLLECT_NAMES environment variable, the problems |
---|
5024 | # vanish in a puff of smoke. |
---|
5025 | if test "X${COLLECT_NAMES+set}" != Xset; then |
---|
5026 | COLLECT_NAMES= |
---|
5027 | export COLLECT_NAMES |
---|
5028 | fi |
---|
5029 | EOF |
---|
5030 | ;; |
---|
5031 | esac |
---|
5032 | |
---|
5033 | # We use sed instead of cat because bash on DJGPP gets confused if |
---|
5034 | # if finds mixed CR/LF and LF-only lines. Since sed operates in |
---|
5035 | # text mode, it properly converts lines to CR/LF. This bash problem |
---|
5036 | # is reportedly fixed, but why not run on old versions too? |
---|
5037 | sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) |
---|
5038 | |
---|
5039 | mv -f "$cfgfile" "$ofile" || \ |
---|
5040 | (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") |
---|
5041 | chmod +x "$ofile" |
---|
5042 | ]) |
---|
5043 | else |
---|
5044 | # If there is no Makefile yet, we rely on a make rule to execute |
---|
5045 | # `config.status --recheck' to rerun these tests and create the |
---|
5046 | # libtool script then. |
---|
5047 | test -f Makefile && make "$ltmain" |
---|
5048 | fi |
---|
5049 | ])# AC_LIBTOOL_CONFIG |
---|
5050 | |
---|
5051 | |
---|
5052 | # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) |
---|
5053 | # ------------------------------------------- |
---|
5054 | AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], |
---|
5055 | [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl |
---|
5056 | |
---|
5057 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= |
---|
5058 | |
---|
5059 | if test "$GCC" = yes; then |
---|
5060 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' |
---|
5061 | |
---|
5062 | AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], |
---|
5063 | lt_cv_prog_compiler_rtti_exceptions, |
---|
5064 | [-fno-rtti -fno-exceptions], [], |
---|
5065 | [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) |
---|
5066 | fi |
---|
5067 | ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI |
---|
5068 | |
---|
5069 | |
---|
5070 | # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
---|
5071 | # --------------------------------- |
---|
5072 | AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], |
---|
5073 | [AC_REQUIRE([AC_CANONICAL_HOST]) |
---|
5074 | AC_REQUIRE([AC_PROG_NM]) |
---|
5075 | AC_REQUIRE([AC_OBJEXT]) |
---|
5076 | # Check for command to grab the raw symbol name followed by C symbol from nm. |
---|
5077 | AC_MSG_CHECKING([command to parse $NM output from $compiler object]) |
---|
5078 | AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], |
---|
5079 | [ |
---|
5080 | # These are sane defaults that work on at least a few old systems. |
---|
5081 | # [They come from Ultrix. What could be older than Ultrix?!! ;)] |
---|
5082 | |
---|
5083 | # Character class describing NM global symbol codes. |
---|
5084 | symcode='[[BCDEGRST]]' |
---|
5085 | |
---|
5086 | # Regexp to match symbols that can be accessed directly from C. |
---|
5087 | sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' |
---|
5088 | |
---|
5089 | # Transform the above into a raw symbol and a C symbol. |
---|
5090 | symxfrm='\1 \2\3 \3' |
---|
5091 | |
---|
5092 | # Transform an extracted symbol line into a proper C declaration |
---|
5093 | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" |
---|
5094 | |
---|
5095 | # Transform an extracted symbol line into symbol name and symbol address |
---|
5096 | lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" |
---|
5097 | |
---|
5098 | # Define system-specific variables. |
---|
5099 | case $host_os in |
---|
5100 | aix*) |
---|
5101 | symcode='[[BCDT]]' |
---|
5102 | ;; |
---|
5103 | cygwin* | mingw* | pw32*) |
---|
5104 | symcode='[[ABCDGISTW]]' |
---|
5105 | ;; |
---|
5106 | hpux*) # Its linker distinguishes data from code symbols |
---|
5107 | if test "$host_cpu" = ia64; then |
---|
5108 | symcode='[[ABCDEGRST]]' |
---|
5109 | fi |
---|
5110 | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" |
---|
5111 | lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" |
---|
5112 | ;; |
---|
5113 | irix* | nonstopux*) |
---|
5114 | symcode='[[BCDEGRST]]' |
---|
5115 | ;; |
---|
5116 | osf*) |
---|
5117 | symcode='[[BCDEGQRST]]' |
---|
5118 | ;; |
---|
5119 | solaris* | sysv5*) |
---|
5120 | symcode='[[BDT]]' |
---|
5121 | ;; |
---|
5122 | sysv4) |
---|
5123 | symcode='[[DFNSTU]]' |
---|
5124 | ;; |
---|
5125 | esac |
---|
5126 | |
---|
5127 | # Handle CRLF in mingw tool chain |
---|
5128 | opt_cr= |
---|
5129 | case $build_os in |
---|
5130 | mingw*) |
---|
5131 | opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp |
---|
5132 | ;; |
---|
5133 | esac |
---|
5134 | |
---|
5135 | # If we're using GNU nm, then use its standard symbol codes. |
---|
5136 | case `$NM -V 2>&1` in |
---|
5137 | *GNU* | *'with BFD'*) |
---|
5138 | symcode='[[ABCDGISTW]]' ;; |
---|
5139 | esac |
---|
5140 | |
---|
5141 | # Try without a prefix undercore, then with it. |
---|
5142 | for ac_symprfx in "" "_"; do |
---|
5143 | |
---|
5144 | # Write the raw and C identifiers. |
---|
5145 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" |
---|
5146 | |
---|
5147 | # Check to see that the pipe works correctly. |
---|
5148 | pipe_works=no |
---|
5149 | |
---|
5150 | rm -f conftest* |
---|
5151 | cat > conftest.$ac_ext <<EOF |
---|
5152 | #ifdef __cplusplus |
---|
5153 | extern "C" { |
---|
5154 | #endif |
---|
5155 | char nm_test_var; |
---|
5156 | void nm_test_func(){} |
---|
5157 | #ifdef __cplusplus |
---|
5158 | } |
---|
5159 | #endif |
---|
5160 | int main(){nm_test_var='a';nm_test_func();return(0);} |
---|
5161 | EOF |
---|
5162 | |
---|
5163 | if AC_TRY_EVAL(ac_compile); then |
---|
5164 | # Now try to grab the symbols. |
---|
5165 | nlist=conftest.nm |
---|
5166 | if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then |
---|
5167 | # Try sorting and uniquifying the output. |
---|
5168 | if sort "$nlist" | uniq > "$nlist"T; then |
---|
5169 | mv -f "$nlist"T "$nlist" |
---|
5170 | else |
---|
5171 | rm -f "$nlist"T |
---|
5172 | fi |
---|
5173 | |
---|
5174 | # Make sure that we snagged all the symbols we need. |
---|
5175 | if grep ' nm_test_var$' "$nlist" >/dev/null; then |
---|
5176 | if grep ' nm_test_func$' "$nlist" >/dev/null; then |
---|
5177 | cat <<EOF > conftest.$ac_ext |
---|
5178 | #ifdef __cplusplus |
---|
5179 | extern "C" { |
---|
5180 | #endif |
---|
5181 | |
---|
5182 | EOF |
---|
5183 | # Now generate the symbol file. |
---|
5184 | eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' |
---|
5185 | |
---|
5186 | cat <<EOF >> conftest.$ac_ext |
---|
5187 | #if defined (__STDC__) && __STDC__ |
---|
5188 | # define lt_ptr_t void * |
---|
5189 | #else |
---|
5190 | # define lt_ptr_t char * |
---|
5191 | # define const |
---|
5192 | #endif |
---|
5193 | |
---|
5194 | /* The mapping between symbol names and symbols. */ |
---|
5195 | const struct { |
---|
5196 | const char *name; |
---|
5197 | lt_ptr_t address; |
---|
5198 | } |
---|
5199 | lt_preloaded_symbols[[]] = |
---|
5200 | { |
---|
5201 | EOF |
---|
5202 | $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext |
---|
5203 | cat <<\EOF >> conftest.$ac_ext |
---|
5204 | {0, (lt_ptr_t) 0} |
---|
5205 | }; |
---|
5206 | |
---|
5207 | #ifdef __cplusplus |
---|
5208 | } |
---|
5209 | #endif |
---|
5210 | EOF |
---|
5211 | # Now try linking the two files. |
---|
5212 | mv conftest.$ac_objext conftstm.$ac_objext |
---|
5213 | lt_save_LIBS="$LIBS" |
---|
5214 | lt_save_CFLAGS="$CFLAGS" |
---|
5215 | LIBS="conftstm.$ac_objext" |
---|
5216 | CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" |
---|
5217 | if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then |
---|
5218 | pipe_works=yes |
---|
5219 | fi |
---|
5220 | LIBS="$lt_save_LIBS" |
---|
5221 | CFLAGS="$lt_save_CFLAGS" |
---|
5222 | else |
---|
5223 | echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD |
---|
5224 | fi |
---|
5225 | else |
---|
5226 | echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD |
---|
5227 | fi |
---|
5228 | else |
---|
5229 | echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD |
---|
5230 | fi |
---|
5231 | else |
---|
5232 | echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD |
---|
5233 | cat conftest.$ac_ext >&5 |
---|
5234 | fi |
---|
5235 | rm -f conftest* conftst* |
---|
5236 | |
---|
5237 | # Do not use the global_symbol_pipe unless it works. |
---|
5238 | if test "$pipe_works" = yes; then |
---|
5239 | break |
---|
5240 | else |
---|
5241 | lt_cv_sys_global_symbol_pipe= |
---|
5242 | fi |
---|
5243 | done |
---|
5244 | ]) |
---|
5245 | if test -z "$lt_cv_sys_global_symbol_pipe"; then |
---|
5246 | lt_cv_sys_global_symbol_to_cdecl= |
---|
5247 | fi |
---|
5248 | if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then |
---|
5249 | AC_MSG_RESULT(failed) |
---|
5250 | else |
---|
5251 | AC_MSG_RESULT(ok) |
---|
5252 | fi |
---|
5253 | ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE |
---|
5254 | |
---|
5255 | |
---|
5256 | # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) |
---|
5257 | # --------------------------------------- |
---|
5258 | AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], |
---|
5259 | [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= |
---|
5260 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
---|
5261 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= |
---|
5262 | |
---|
5263 | AC_MSG_CHECKING([for $compiler option to produce PIC]) |
---|
5264 | ifelse([$1],[CXX],[ |
---|
5265 | # C++ specific cases for pic, static, wl, etc. |
---|
5266 | if test "$GXX" = yes; then |
---|
5267 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5268 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' |
---|
5269 | |
---|
5270 | case $host_os in |
---|
5271 | aix*) |
---|
5272 | # All AIX code is PIC. |
---|
5273 | if test "$host_cpu" = ia64; then |
---|
5274 | # AIX 5 now supports IA64 processor |
---|
5275 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5276 | fi |
---|
5277 | ;; |
---|
5278 | amigaos*) |
---|
5279 | # FIXME: we need at least 68020 code to build shared libraries, but |
---|
5280 | # adding the `-m68020' flag to GCC prevents building anything better, |
---|
5281 | # like `-m68040'. |
---|
5282 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' |
---|
5283 | ;; |
---|
5284 | beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) |
---|
5285 | # PIC is the default for these OSes. |
---|
5286 | ;; |
---|
5287 | mingw* | os2* | pw32*) |
---|
5288 | # This hack is so that the source file can tell whether it is being |
---|
5289 | # built for inclusion in a dll (and should export symbols for example). |
---|
5290 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' |
---|
5291 | ;; |
---|
5292 | darwin* | rhapsody*) |
---|
5293 | # PIC is the default on this platform |
---|
5294 | # Common symbols not allowed in MH_DYLIB files |
---|
5295 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' |
---|
5296 | ;; |
---|
5297 | *djgpp*) |
---|
5298 | # DJGPP does not support shared libraries at all |
---|
5299 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
---|
5300 | ;; |
---|
5301 | sysv4*MP*) |
---|
5302 | if test -d /usr/nec; then |
---|
5303 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic |
---|
5304 | fi |
---|
5305 | ;; |
---|
5306 | hpux*) |
---|
5307 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but |
---|
5308 | # not for PA HP-UX. |
---|
5309 | case "$host_cpu" in |
---|
5310 | hppa*64*|ia64*) |
---|
5311 | ;; |
---|
5312 | *) |
---|
5313 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
---|
5314 | ;; |
---|
5315 | esac |
---|
5316 | ;; |
---|
5317 | *) |
---|
5318 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
---|
5319 | ;; |
---|
5320 | esac |
---|
5321 | else |
---|
5322 | case $host_os in |
---|
5323 | aix4* | aix5*) |
---|
5324 | # All AIX code is PIC. |
---|
5325 | if test "$host_cpu" = ia64; then |
---|
5326 | # AIX 5 now supports IA64 processor |
---|
5327 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5328 | else |
---|
5329 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' |
---|
5330 | fi |
---|
5331 | ;; |
---|
5332 | chorus*) |
---|
5333 | case $cc_basename in |
---|
5334 | cxch68) |
---|
5335 | # Green Hills C++ Compiler |
---|
5336 | # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" |
---|
5337 | ;; |
---|
5338 | esac |
---|
5339 | ;; |
---|
5340 | dgux*) |
---|
5341 | case $cc_basename in |
---|
5342 | ec++) |
---|
5343 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
---|
5344 | ;; |
---|
5345 | ghcx) |
---|
5346 | # Green Hills C++ Compiler |
---|
5347 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
---|
5348 | ;; |
---|
5349 | *) |
---|
5350 | ;; |
---|
5351 | esac |
---|
5352 | ;; |
---|
5353 | freebsd*) |
---|
5354 | # FreeBSD uses GNU C++ |
---|
5355 | ;; |
---|
5356 | hpux9* | hpux10* | hpux11*) |
---|
5357 | case $cc_basename in |
---|
5358 | CC) |
---|
5359 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5360 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" |
---|
5361 | if test "$host_cpu" != ia64; then |
---|
5362 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' |
---|
5363 | fi |
---|
5364 | ;; |
---|
5365 | aCC) |
---|
5366 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5367 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" |
---|
5368 | case "$host_cpu" in |
---|
5369 | hppa*64*|ia64*) |
---|
5370 | # +Z the default |
---|
5371 | ;; |
---|
5372 | *) |
---|
5373 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' |
---|
5374 | ;; |
---|
5375 | esac |
---|
5376 | ;; |
---|
5377 | *) |
---|
5378 | ;; |
---|
5379 | esac |
---|
5380 | ;; |
---|
5381 | irix5* | irix6* | nonstopux*) |
---|
5382 | case $cc_basename in |
---|
5383 | CC) |
---|
5384 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5385 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
---|
5386 | # CC pic flag -KPIC is the default. |
---|
5387 | ;; |
---|
5388 | *) |
---|
5389 | ;; |
---|
5390 | esac |
---|
5391 | ;; |
---|
5392 | linux*) |
---|
5393 | case $cc_basename in |
---|
5394 | KCC) |
---|
5395 | # KAI C++ Compiler |
---|
5396 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' |
---|
5397 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
---|
5398 | ;; |
---|
5399 | icpc) |
---|
5400 | # Intel C++ |
---|
5401 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5402 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
---|
5403 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' |
---|
5404 | ;; |
---|
5405 | cxx) |
---|
5406 | # Compaq C++ |
---|
5407 | # Make sure the PIC flag is empty. It appears that all Alpha |
---|
5408 | # Linux and Compaq Tru64 Unix objects are PIC. |
---|
5409 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
---|
5410 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
---|
5411 | ;; |
---|
5412 | *) |
---|
5413 | ;; |
---|
5414 | esac |
---|
5415 | ;; |
---|
5416 | lynxos*) |
---|
5417 | ;; |
---|
5418 | m88k*) |
---|
5419 | ;; |
---|
5420 | mvs*) |
---|
5421 | case $cc_basename in |
---|
5422 | cxx) |
---|
5423 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' |
---|
5424 | ;; |
---|
5425 | *) |
---|
5426 | ;; |
---|
5427 | esac |
---|
5428 | ;; |
---|
5429 | netbsd*) |
---|
5430 | ;; |
---|
5431 | osf3* | osf4* | osf5*) |
---|
5432 | case $cc_basename in |
---|
5433 | KCC) |
---|
5434 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' |
---|
5435 | ;; |
---|
5436 | RCC) |
---|
5437 | # Rational C++ 2.4.1 |
---|
5438 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
---|
5439 | ;; |
---|
5440 | cxx) |
---|
5441 | # Digital/Compaq C++ |
---|
5442 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5443 | # Make sure the PIC flag is empty. It appears that all Alpha |
---|
5444 | # Linux and Compaq Tru64 Unix objects are PIC. |
---|
5445 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
---|
5446 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
---|
5447 | ;; |
---|
5448 | *) |
---|
5449 | ;; |
---|
5450 | esac |
---|
5451 | ;; |
---|
5452 | psos*) |
---|
5453 | ;; |
---|
5454 | sco*) |
---|
5455 | case $cc_basename in |
---|
5456 | CC) |
---|
5457 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
---|
5458 | ;; |
---|
5459 | *) |
---|
5460 | ;; |
---|
5461 | esac |
---|
5462 | ;; |
---|
5463 | solaris*) |
---|
5464 | case $cc_basename in |
---|
5465 | CC) |
---|
5466 | # Sun C++ 4.2, 5.x and Centerline C++ |
---|
5467 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
---|
5468 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5469 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' |
---|
5470 | ;; |
---|
5471 | gcx) |
---|
5472 | # Green Hills C++ Compiler |
---|
5473 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' |
---|
5474 | ;; |
---|
5475 | *) |
---|
5476 | ;; |
---|
5477 | esac |
---|
5478 | ;; |
---|
5479 | sunos4*) |
---|
5480 | case $cc_basename in |
---|
5481 | CC) |
---|
5482 | # Sun C++ 4.x |
---|
5483 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
---|
5484 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5485 | ;; |
---|
5486 | lcc) |
---|
5487 | # Lucid |
---|
5488 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
---|
5489 | ;; |
---|
5490 | *) |
---|
5491 | ;; |
---|
5492 | esac |
---|
5493 | ;; |
---|
5494 | tandem*) |
---|
5495 | case $cc_basename in |
---|
5496 | NCC) |
---|
5497 | # NonStop-UX NCC 3.20 |
---|
5498 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
---|
5499 | ;; |
---|
5500 | *) |
---|
5501 | ;; |
---|
5502 | esac |
---|
5503 | ;; |
---|
5504 | unixware*) |
---|
5505 | ;; |
---|
5506 | vxworks*) |
---|
5507 | ;; |
---|
5508 | *) |
---|
5509 | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
---|
5510 | ;; |
---|
5511 | esac |
---|
5512 | fi |
---|
5513 | ], |
---|
5514 | [ |
---|
5515 | if test "$GCC" = yes; then |
---|
5516 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5517 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' |
---|
5518 | |
---|
5519 | case $host_os in |
---|
5520 | aix*) |
---|
5521 | # All AIX code is PIC. |
---|
5522 | if test "$host_cpu" = ia64; then |
---|
5523 | # AIX 5 now supports IA64 processor |
---|
5524 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5525 | fi |
---|
5526 | ;; |
---|
5527 | |
---|
5528 | amigaos*) |
---|
5529 | # FIXME: we need at least 68020 code to build shared libraries, but |
---|
5530 | # adding the `-m68020' flag to GCC prevents building anything better, |
---|
5531 | # like `-m68040'. |
---|
5532 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' |
---|
5533 | ;; |
---|
5534 | |
---|
5535 | beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) |
---|
5536 | # PIC is the default for these OSes. |
---|
5537 | ;; |
---|
5538 | |
---|
5539 | mingw* | pw32* | os2*) |
---|
5540 | # This hack is so that the source file can tell whether it is being |
---|
5541 | # built for inclusion in a dll (and should export symbols for example). |
---|
5542 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' |
---|
5543 | ;; |
---|
5544 | |
---|
5545 | darwin* | rhapsody*) |
---|
5546 | # PIC is the default on this platform |
---|
5547 | # Common symbols not allowed in MH_DYLIB files |
---|
5548 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' |
---|
5549 | ;; |
---|
5550 | |
---|
5551 | msdosdjgpp*) |
---|
5552 | # Just because we use GCC doesn't mean we suddenly get shared libraries |
---|
5553 | # on systems that don't support them. |
---|
5554 | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
---|
5555 | enable_shared=no |
---|
5556 | ;; |
---|
5557 | |
---|
5558 | sysv4*MP*) |
---|
5559 | if test -d /usr/nec; then |
---|
5560 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic |
---|
5561 | fi |
---|
5562 | ;; |
---|
5563 | |
---|
5564 | hpux*) |
---|
5565 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but |
---|
5566 | # not for PA HP-UX. |
---|
5567 | case "$host_cpu" in |
---|
5568 | hppa*64*|ia64*) |
---|
5569 | # +Z the default |
---|
5570 | ;; |
---|
5571 | *) |
---|
5572 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
---|
5573 | ;; |
---|
5574 | esac |
---|
5575 | ;; |
---|
5576 | |
---|
5577 | *) |
---|
5578 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
---|
5579 | ;; |
---|
5580 | esac |
---|
5581 | else |
---|
5582 | # PORTME Check for flag to pass linker flags through the system compiler. |
---|
5583 | case $host_os in |
---|
5584 | aix*) |
---|
5585 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5586 | if test "$host_cpu" = ia64; then |
---|
5587 | # AIX 5 now supports IA64 processor |
---|
5588 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5589 | else |
---|
5590 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' |
---|
5591 | fi |
---|
5592 | ;; |
---|
5593 | |
---|
5594 | mingw* | pw32* | os2*) |
---|
5595 | # This hack is so that the source file can tell whether it is being |
---|
5596 | # built for inclusion in a dll (and should export symbols for example). |
---|
5597 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' |
---|
5598 | ;; |
---|
5599 | |
---|
5600 | hpux9* | hpux10* | hpux11*) |
---|
5601 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5602 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but |
---|
5603 | # not for PA HP-UX. |
---|
5604 | case "$host_cpu" in |
---|
5605 | hppa*64*|ia64*) |
---|
5606 | # +Z the default |
---|
5607 | ;; |
---|
5608 | *) |
---|
5609 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' |
---|
5610 | ;; |
---|
5611 | esac |
---|
5612 | # Is there a better lt_prog_compiler_static that works with the bundled CC? |
---|
5613 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' |
---|
5614 | ;; |
---|
5615 | |
---|
5616 | irix5* | irix6* | nonstopux*) |
---|
5617 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5618 | # PIC (with -KPIC) is the default. |
---|
5619 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
---|
5620 | ;; |
---|
5621 | |
---|
5622 | newsos6) |
---|
5623 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
---|
5624 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5625 | ;; |
---|
5626 | |
---|
5627 | linux*) |
---|
5628 | case $CC in |
---|
5629 | icc|ecc) |
---|
5630 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5631 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
---|
5632 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' |
---|
5633 | ;; |
---|
5634 | ccc) |
---|
5635 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5636 | # All Alpha code is PIC. |
---|
5637 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
---|
5638 | ;; |
---|
5639 | esac |
---|
5640 | ;; |
---|
5641 | |
---|
5642 | osf3* | osf4* | osf5*) |
---|
5643 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5644 | # All OSF/1 code is PIC. |
---|
5645 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
---|
5646 | ;; |
---|
5647 | |
---|
5648 | sco3.2v5*) |
---|
5649 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' |
---|
5650 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' |
---|
5651 | ;; |
---|
5652 | |
---|
5653 | solaris*) |
---|
5654 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5655 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
---|
5656 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5657 | ;; |
---|
5658 | |
---|
5659 | sunos4*) |
---|
5660 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' |
---|
5661 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' |
---|
5662 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5663 | ;; |
---|
5664 | |
---|
5665 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
---|
5666 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
---|
5667 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
---|
5668 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5669 | ;; |
---|
5670 | |
---|
5671 | sysv4*MP*) |
---|
5672 | if test -d /usr/nec ;then |
---|
5673 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' |
---|
5674 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5675 | fi |
---|
5676 | ;; |
---|
5677 | |
---|
5678 | uts4*) |
---|
5679 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
---|
5680 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
---|
5681 | ;; |
---|
5682 | |
---|
5683 | *) |
---|
5684 | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
---|
5685 | ;; |
---|
5686 | esac |
---|
5687 | fi |
---|
5688 | ]) |
---|
5689 | AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) |
---|
5690 | |
---|
5691 | # |
---|
5692 | # Check to make sure the PIC flag actually works. |
---|
5693 | # |
---|
5694 | if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then |
---|
5695 | AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], |
---|
5696 | _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), |
---|
5697 | [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], |
---|
5698 | [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in |
---|
5699 | "" | " "*) ;; |
---|
5700 | *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; |
---|
5701 | esac], |
---|
5702 | [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
---|
5703 | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) |
---|
5704 | fi |
---|
5705 | case "$host_os" in |
---|
5706 | # For platforms which do not support PIC, -DPIC is meaningless: |
---|
5707 | *djgpp*) |
---|
5708 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= |
---|
5709 | ;; |
---|
5710 | *) |
---|
5711 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" |
---|
5712 | ;; |
---|
5713 | esac |
---|
5714 | ]) |
---|
5715 | |
---|
5716 | |
---|
5717 | # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) |
---|
5718 | # ------------------------------------ |
---|
5719 | # See if the linker supports building shared libraries. |
---|
5720 | AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], |
---|
5721 | [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) |
---|
5722 | ifelse([$1],[CXX],[ |
---|
5723 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' |
---|
5724 | case $host_os in |
---|
5725 | aix4* | aix5*) |
---|
5726 | # If we're using GNU nm, then we don't want the "-C" option. |
---|
5727 | # -C means demangle to AIX nm, but means don't demangle with GNU nm |
---|
5728 | if $NM -V 2>&1 | grep 'GNU' > /dev/null; then |
---|
5729 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' |
---|
5730 | else |
---|
5731 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' |
---|
5732 | fi |
---|
5733 | ;; |
---|
5734 | pw32*) |
---|
5735 | _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" |
---|
5736 | ;; |
---|
5737 | cygwin* | mingw*) |
---|
5738 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' |
---|
5739 | ;; |
---|
5740 | *) |
---|
5741 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' |
---|
5742 | ;; |
---|
5743 | esac |
---|
5744 | ],[ |
---|
5745 | runpath_var= |
---|
5746 | _LT_AC_TAGVAR(allow_undefined_flag, $1)= |
---|
5747 | _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no |
---|
5748 | _LT_AC_TAGVAR(archive_cmds, $1)= |
---|
5749 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)= |
---|
5750 | _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= |
---|
5751 | _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= |
---|
5752 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= |
---|
5753 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
---|
5754 | _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= |
---|
5755 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= |
---|
5756 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= |
---|
5757 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
---|
5758 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
---|
5759 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=no |
---|
5760 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported |
---|
5761 | _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown |
---|
5762 | _LT_AC_TAGVAR(hardcode_automatic, $1)=no |
---|
5763 | _LT_AC_TAGVAR(module_cmds, $1)= |
---|
5764 | _LT_AC_TAGVAR(module_expsym_cmds, $1)= |
---|
5765 | _LT_AC_TAGVAR(always_export_symbols, $1)=no |
---|
5766 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' |
---|
5767 | # include_expsyms should be a list of space-separated symbols to be *always* |
---|
5768 | # included in the symbol list |
---|
5769 | _LT_AC_TAGVAR(include_expsyms, $1)= |
---|
5770 | # exclude_expsyms can be an extended regexp of symbols to exclude |
---|
5771 | # it will be wrapped by ` (' and `)$', so one must not match beginning or |
---|
5772 | # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', |
---|
5773 | # as well as any symbol that contains `d'. |
---|
5774 | _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" |
---|
5775 | # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out |
---|
5776 | # platforms (ab)use it in PIC code, but their linkers get confused if |
---|
5777 | # the symbol is explicitly referenced. Since portable code cannot |
---|
5778 | # rely on this symbol name, it's probably fine to never include it in |
---|
5779 | # preloaded symbol tables. |
---|
5780 | extract_expsyms_cmds= |
---|
5781 | |
---|
5782 | case $host_os in |
---|
5783 | cygwin* | mingw* | pw32*) |
---|
5784 | # FIXME: the MSVC++ port hasn't been tested in a loooong time |
---|
5785 | # When not using gcc, we currently assume that we are using |
---|
5786 | # Microsoft Visual C++. |
---|
5787 | if test "$GCC" != yes; then |
---|
5788 | with_gnu_ld=no |
---|
5789 | fi |
---|
5790 | ;; |
---|
5791 | openbsd*) |
---|
5792 | with_gnu_ld=no |
---|
5793 | ;; |
---|
5794 | esac |
---|
5795 | |
---|
5796 | _LT_AC_TAGVAR(ld_shlibs, $1)=yes |
---|
5797 | if test "$with_gnu_ld" = yes; then |
---|
5798 | # If archive_cmds runs LD, not CC, wlarc should be empty |
---|
5799 | wlarc='${wl}' |
---|
5800 | |
---|
5801 | # See if GNU ld supports shared libraries. |
---|
5802 | case $host_os in |
---|
5803 | aix3* | aix4* | aix5*) |
---|
5804 | # On AIX/PPC, the GNU linker is very broken |
---|
5805 | if test "$host_cpu" != ia64; then |
---|
5806 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
5807 | cat <<EOF 1>&2 |
---|
5808 | |
---|
5809 | *** Warning: the GNU linker, at least up to release 2.9.1, is reported |
---|
5810 | *** to be unable to reliably create shared libraries on AIX. |
---|
5811 | *** Therefore, libtool is disabling shared libraries support. If you |
---|
5812 | *** really care for shared libraries, you may want to modify your PATH |
---|
5813 | *** so that a non-GNU linker is found, and then restart. |
---|
5814 | |
---|
5815 | EOF |
---|
5816 | fi |
---|
5817 | ;; |
---|
5818 | |
---|
5819 | amigaos*) |
---|
5820 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' |
---|
5821 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
5822 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
---|
5823 | |
---|
5824 | # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports |
---|
5825 | # that the semantics of dynamic libraries on AmigaOS, at least up |
---|
5826 | # to version 4, is to share data among multiple programs linked |
---|
5827 | # with the same dynamic library. Since this doesn't match the |
---|
5828 | # behavior of shared libraries on other platforms, we can't use |
---|
5829 | # them. |
---|
5830 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
5831 | ;; |
---|
5832 | |
---|
5833 | beos*) |
---|
5834 | if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then |
---|
5835 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
---|
5836 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc |
---|
5837 | # support --undefined. This deserves some investigation. FIXME |
---|
5838 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
5839 | else |
---|
5840 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
5841 | fi |
---|
5842 | ;; |
---|
5843 | |
---|
5844 | cygwin* | mingw* | pw32*) |
---|
5845 | # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, |
---|
5846 | # as there is no search path for DLLs. |
---|
5847 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
5848 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
---|
5849 | _LT_AC_TAGVAR(always_export_symbols, $1)=no |
---|
5850 | _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
---|
5851 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' |
---|
5852 | |
---|
5853 | if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then |
---|
5854 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' |
---|
5855 | # If the export-symbols file already is a .def file (1st line |
---|
5856 | # is EXPORTS), use it as is; otherwise, prepend... |
---|
5857 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then |
---|
5858 | cp $export_symbols $output_objdir/$soname.def; |
---|
5859 | else |
---|
5860 | echo EXPORTS > $output_objdir/$soname.def; |
---|
5861 | cat $export_symbols >> $output_objdir/$soname.def; |
---|
5862 | fi~ |
---|
5863 | $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' |
---|
5864 | else |
---|
5865 | ld_shlibs=no |
---|
5866 | fi |
---|
5867 | ;; |
---|
5868 | |
---|
5869 | netbsd*) |
---|
5870 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
---|
5871 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' |
---|
5872 | wlarc= |
---|
5873 | else |
---|
5874 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
5875 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
---|
5876 | fi |
---|
5877 | ;; |
---|
5878 | |
---|
5879 | solaris* | sysv5*) |
---|
5880 | if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then |
---|
5881 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
5882 | cat <<EOF 1>&2 |
---|
5883 | |
---|
5884 | *** Warning: The releases 2.8.* of the GNU linker cannot reliably |
---|
5885 | *** create shared libraries on Solaris systems. Therefore, libtool |
---|
5886 | *** is disabling shared libraries support. We urge you to upgrade GNU |
---|
5887 | *** binutils to release 2.9.1 or newer. Another option is to modify |
---|
5888 | *** your PATH or compiler configuration so that the native linker is |
---|
5889 | *** used, and then restart. |
---|
5890 | |
---|
5891 | EOF |
---|
5892 | elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then |
---|
5893 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
5894 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
---|
5895 | else |
---|
5896 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
5897 | fi |
---|
5898 | ;; |
---|
5899 | |
---|
5900 | sunos4*) |
---|
5901 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
---|
5902 | wlarc= |
---|
5903 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
5904 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
5905 | ;; |
---|
5906 | |
---|
5907 | *) |
---|
5908 | if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then |
---|
5909 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
---|
5910 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
---|
5911 | else |
---|
5912 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
5913 | fi |
---|
5914 | ;; |
---|
5915 | esac |
---|
5916 | |
---|
5917 | if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then |
---|
5918 | runpath_var=LD_RUN_PATH |
---|
5919 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' |
---|
5920 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' |
---|
5921 | # ancient GNU ld didn't support --whole-archive et. al. |
---|
5922 | if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then |
---|
5923 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' |
---|
5924 | else |
---|
5925 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= |
---|
5926 | fi |
---|
5927 | fi |
---|
5928 | else |
---|
5929 | # PORTME fill in a description of your system's linker (not GNU ld) |
---|
5930 | case $host_os in |
---|
5931 | aix3*) |
---|
5932 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
---|
5933 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes |
---|
5934 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' |
---|
5935 | # Note: this linker hardcodes the directories in LIBPATH if there |
---|
5936 | # are no directories specified by -L. |
---|
5937 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
---|
5938 | if test "$GCC" = yes && test -z "$link_static_flag"; then |
---|
5939 | # Neither direct hardcoding nor static linking is supported with a |
---|
5940 | # broken collect2. |
---|
5941 | _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported |
---|
5942 | fi |
---|
5943 | ;; |
---|
5944 | |
---|
5945 | aix4* | aix5*) |
---|
5946 | if test "$host_cpu" = ia64; then |
---|
5947 | # On IA64, the linker does run time linking by default, so we don't |
---|
5948 | # have to do anything special. |
---|
5949 | aix_use_runtimelinking=no |
---|
5950 | exp_sym_flag='-Bexport' |
---|
5951 | no_entry_flag="" |
---|
5952 | else |
---|
5953 | # If we're using GNU nm, then we don't want the "-C" option. |
---|
5954 | # -C means demangle to AIX nm, but means don't demangle with GNU nm |
---|
5955 | if $NM -V 2>&1 | grep 'GNU' > /dev/null; then |
---|
5956 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' |
---|
5957 | else |
---|
5958 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' |
---|
5959 | fi |
---|
5960 | aix_use_runtimelinking=no |
---|
5961 | |
---|
5962 | # Test if we are trying to use run time linking or normal |
---|
5963 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we |
---|
5964 | # need to do runtime linking. |
---|
5965 | case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) |
---|
5966 | for ld_flag in $LDFLAGS; do |
---|
5967 | if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then |
---|
5968 | aix_use_runtimelinking=yes |
---|
5969 | break |
---|
5970 | fi |
---|
5971 | done |
---|
5972 | esac |
---|
5973 | |
---|
5974 | exp_sym_flag='-bexport' |
---|
5975 | no_entry_flag='-bnoentry' |
---|
5976 | fi |
---|
5977 | |
---|
5978 | # When large executables or shared objects are built, AIX ld can |
---|
5979 | # have problems creating the table of contents. If linking a library |
---|
5980 | # or program results in "error TOC overflow" add -mminimal-toc to |
---|
5981 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
---|
5982 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
---|
5983 | |
---|
5984 | _LT_AC_TAGVAR(archive_cmds, $1)='' |
---|
5985 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
5986 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' |
---|
5987 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
---|
5988 | |
---|
5989 | if test "$GCC" = yes; then |
---|
5990 | case $host_os in aix4.[012]|aix4.[012].*) |
---|
5991 | # We only want to do this on AIX 4.2 and lower, the check |
---|
5992 | # below for broken collect2 doesn't work under 4.3+ |
---|
5993 | collect2name=`${CC} -print-prog-name=collect2` |
---|
5994 | if test -f "$collect2name" && \ |
---|
5995 | strings "$collect2name" | grep resolve_lib_name >/dev/null |
---|
5996 | then |
---|
5997 | # We have reworked collect2 |
---|
5998 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
5999 | else |
---|
6000 | # We have old collect2 |
---|
6001 | _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported |
---|
6002 | # It fails to find uninstalled libraries when the uninstalled |
---|
6003 | # path is not listed in the libpath. Setting hardcode_minus_L |
---|
6004 | # to unsupported forces relinking |
---|
6005 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
---|
6006 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
6007 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= |
---|
6008 | fi |
---|
6009 | esac |
---|
6010 | shared_flag='-shared' |
---|
6011 | else |
---|
6012 | # not using gcc |
---|
6013 | if test "$host_cpu" = ia64; then |
---|
6014 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release |
---|
6015 | # chokes on -Wl,-G. The following line is correct: |
---|
6016 | shared_flag='-G' |
---|
6017 | else |
---|
6018 | if test "$aix_use_runtimelinking" = yes; then |
---|
6019 | shared_flag='${wl}-G' |
---|
6020 | else |
---|
6021 | shared_flag='${wl}-bM:SRE' |
---|
6022 | fi |
---|
6023 | fi |
---|
6024 | fi |
---|
6025 | |
---|
6026 | # It seems that -bexpall does not export symbols beginning with |
---|
6027 | # underscore (_), so it is better to generate a list of symbols to export. |
---|
6028 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes |
---|
6029 | if test "$aix_use_runtimelinking" = yes; then |
---|
6030 | # Warning - without using the other runtime loading flags (-brtl), |
---|
6031 | # -berok will link without error, but may produce a broken library. |
---|
6032 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' |
---|
6033 | # Determine the default libpath from the value encoded in an empty executable. |
---|
6034 | _LT_AC_SYS_LIBPATH_AIX |
---|
6035 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" |
---|
6036 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$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" |
---|
6037 | else |
---|
6038 | if test "$host_cpu" = ia64; then |
---|
6039 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' |
---|
6040 | _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" |
---|
6041 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" |
---|
6042 | else |
---|
6043 | # Determine the default libpath from the value encoded in an empty executable. |
---|
6044 | _LT_AC_SYS_LIBPATH_AIX |
---|
6045 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" |
---|
6046 | # Warning - without using the other run time loading flags, |
---|
6047 | # -berok will link without error, but may produce a broken library. |
---|
6048 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' |
---|
6049 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' |
---|
6050 | # -bexpall does not export symbols beginning with underscore (_) |
---|
6051 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes |
---|
6052 | # Exported symbols can be pulled into shared objects from archives |
---|
6053 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' |
---|
6054 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes |
---|
6055 | # This is similar to how AIX traditionally builds it's shared libraries. |
---|
6056 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' |
---|
6057 | fi |
---|
6058 | fi |
---|
6059 | ;; |
---|
6060 | |
---|
6061 | amigaos*) |
---|
6062 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' |
---|
6063 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
6064 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
---|
6065 | # see comment about different semantics on the GNU ld section |
---|
6066 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
6067 | ;; |
---|
6068 | |
---|
6069 | bsdi4*) |
---|
6070 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic |
---|
6071 | ;; |
---|
6072 | |
---|
6073 | cygwin* | mingw* | pw32*) |
---|
6074 | # When not using gcc, we currently assume that we are using |
---|
6075 | # Microsoft Visual C++. |
---|
6076 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
---|
6077 | # no search path for DLLs. |
---|
6078 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' |
---|
6079 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
---|
6080 | # Tell ltmain to make .lib files, not .a files. |
---|
6081 | libext=lib |
---|
6082 | # Tell ltmain to make .dll files, not .so files. |
---|
6083 | shrext=".dll" |
---|
6084 | # FIXME: Setting linknames here is a bad hack. |
---|
6085 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' |
---|
6086 | # The linker will automatically build a .lib file if we build a DLL. |
---|
6087 | _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' |
---|
6088 | # FIXME: Should let the user specify the lib program. |
---|
6089 | _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' |
---|
6090 | fix_srcfile_path='`cygpath -w "$srcfile"`' |
---|
6091 | _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
---|
6092 | ;; |
---|
6093 | |
---|
6094 | darwin* | rhapsody*) |
---|
6095 | if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then |
---|
6096 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
---|
6097 | case "$host_os" in |
---|
6098 | rhapsody* | darwin1.[[012]]) |
---|
6099 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' |
---|
6100 | ;; |
---|
6101 | *) # Darwin 1.3 on |
---|
6102 | test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' |
---|
6103 | ;; |
---|
6104 | esac |
---|
6105 | # FIXME: Relying on posixy $() will cause problems for |
---|
6106 | # cross-compilation, but unfortunately the echo tests do not |
---|
6107 | # yet detect zsh echo's removal of \ escapes. Also zsh mangles |
---|
6108 | # `"' quotes if we put them in here... so don't! |
---|
6109 | lt_int_apple_cc_single_mod=no |
---|
6110 | output_verbose_link_cmd='echo' |
---|
6111 | if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then |
---|
6112 | lt_int_apple_cc_single_mod=yes |
---|
6113 | fi |
---|
6114 | if test "X$lt_int_apple_cc_single_mod" = Xyes ; then |
---|
6115 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' |
---|
6116 | else |
---|
6117 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' |
---|
6118 | fi |
---|
6119 | _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' |
---|
6120 | # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's |
---|
6121 | if test "X$lt_int_apple_cc_single_mod" = Xyes ; then |
---|
6122 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
---|
6123 | else |
---|
6124 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
---|
6125 | fi |
---|
6126 | _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' |
---|
6127 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
---|
6128 | _LT_AC_TAGVAR(hardcode_automatic, $1)=yes |
---|
6129 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported |
---|
6130 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' |
---|
6131 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
---|
6132 | fi |
---|
6133 | ;; |
---|
6134 | |
---|
6135 | dgux*) |
---|
6136 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
6137 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
6138 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6139 | ;; |
---|
6140 | |
---|
6141 | freebsd1*) |
---|
6142 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
6143 | ;; |
---|
6144 | |
---|
6145 | # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor |
---|
6146 | # support. Future versions do this automatically, but an explicit c++rt0.o |
---|
6147 | # does not break anything, and helps significantly (at the cost of a little |
---|
6148 | # extra space). |
---|
6149 | freebsd2.2*) |
---|
6150 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' |
---|
6151 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
---|
6152 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
6153 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6154 | ;; |
---|
6155 | |
---|
6156 | # Unfortunately, older versions of FreeBSD 2 do not have this feature. |
---|
6157 | freebsd2*) |
---|
6158 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
---|
6159 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
6160 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
---|
6161 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6162 | ;; |
---|
6163 | |
---|
6164 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. |
---|
6165 | freebsd*) |
---|
6166 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' |
---|
6167 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
---|
6168 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
6169 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6170 | ;; |
---|
6171 | |
---|
6172 | hpux9*) |
---|
6173 | if test "$GCC" = yes; then |
---|
6174 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' |
---|
6175 | else |
---|
6176 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' |
---|
6177 | fi |
---|
6178 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
---|
6179 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
6180 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
6181 | |
---|
6182 | # hardcode_minus_L: Not really in the search PATH, |
---|
6183 | # but as the default location of the library. |
---|
6184 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
---|
6185 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
---|
6186 | ;; |
---|
6187 | |
---|
6188 | hpux10* | hpux11*) |
---|
6189 | if test "$GCC" = yes -a "$with_gnu_ld" = no; then |
---|
6190 | case "$host_cpu" in |
---|
6191 | hppa*64*|ia64*) |
---|
6192 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
---|
6193 | ;; |
---|
6194 | *) |
---|
6195 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' |
---|
6196 | ;; |
---|
6197 | esac |
---|
6198 | else |
---|
6199 | case "$host_cpu" in |
---|
6200 | hppa*64*|ia64*) |
---|
6201 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
6202 | ;; |
---|
6203 | *) |
---|
6204 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' |
---|
6205 | ;; |
---|
6206 | esac |
---|
6207 | fi |
---|
6208 | if test "$with_gnu_ld" = no; then |
---|
6209 | case "$host_cpu" in |
---|
6210 | hppa*64*) |
---|
6211 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
---|
6212 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' |
---|
6213 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
6214 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
---|
6215 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6216 | ;; |
---|
6217 | ia64*) |
---|
6218 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
6219 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
---|
6220 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6221 | |
---|
6222 | # hardcode_minus_L: Not really in the search PATH, |
---|
6223 | # but as the default location of the library. |
---|
6224 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
---|
6225 | ;; |
---|
6226 | *) |
---|
6227 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' |
---|
6228 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
6229 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
6230 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
---|
6231 | |
---|
6232 | # hardcode_minus_L: Not really in the search PATH, |
---|
6233 | # but as the default location of the library. |
---|
6234 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
---|
6235 | ;; |
---|
6236 | esac |
---|
6237 | fi |
---|
6238 | ;; |
---|
6239 | |
---|
6240 | irix5* | irix6* | nonstopux*) |
---|
6241 | if test "$GCC" = yes; then |
---|
6242 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
---|
6243 | else |
---|
6244 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' |
---|
6245 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' |
---|
6246 | fi |
---|
6247 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
---|
6248 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
6249 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
---|
6250 | ;; |
---|
6251 | |
---|
6252 | netbsd*) |
---|
6253 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then |
---|
6254 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out |
---|
6255 | else |
---|
6256 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF |
---|
6257 | fi |
---|
6258 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
---|
6259 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
6260 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6261 | ;; |
---|
6262 | |
---|
6263 | newsos6) |
---|
6264 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
6265 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
6266 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
---|
6267 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
6268 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6269 | ;; |
---|
6270 | |
---|
6271 | openbsd*) |
---|
6272 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
6273 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6274 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
---|
6275 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' |
---|
6276 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
---|
6277 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
---|
6278 | else |
---|
6279 | case $host_os in |
---|
6280 | openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) |
---|
6281 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
---|
6282 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
---|
6283 | ;; |
---|
6284 | *) |
---|
6285 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' |
---|
6286 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
---|
6287 | ;; |
---|
6288 | esac |
---|
6289 | fi |
---|
6290 | ;; |
---|
6291 | |
---|
6292 | os2*) |
---|
6293 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
6294 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
---|
6295 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported |
---|
6296 | _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' |
---|
6297 | _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' |
---|
6298 | ;; |
---|
6299 | |
---|
6300 | osf3*) |
---|
6301 | if test "$GCC" = yes; then |
---|
6302 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
---|
6303 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
---|
6304 | else |
---|
6305 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' |
---|
6306 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' |
---|
6307 | fi |
---|
6308 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
---|
6309 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
6310 | ;; |
---|
6311 | |
---|
6312 | osf4* | osf5*) # as osf3* with the addition of -msym flag |
---|
6313 | if test "$GCC" = yes; then |
---|
6314 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' |
---|
6315 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' |
---|
6316 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
---|
6317 | else |
---|
6318 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' |
---|
6319 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' |
---|
6320 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ |
---|
6321 | $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' |
---|
6322 | |
---|
6323 | # Both c and cxx compiler support -rpath directly |
---|
6324 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' |
---|
6325 | fi |
---|
6326 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: |
---|
6327 | ;; |
---|
6328 | |
---|
6329 | sco3.2v5*) |
---|
6330 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
6331 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6332 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' |
---|
6333 | runpath_var=LD_RUN_PATH |
---|
6334 | hardcode_runpath_var=yes |
---|
6335 | ;; |
---|
6336 | |
---|
6337 | solaris*) |
---|
6338 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' |
---|
6339 | if test "$GCC" = yes; then |
---|
6340 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
---|
6341 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
---|
6342 | $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' |
---|
6343 | else |
---|
6344 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
6345 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
---|
6346 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
---|
6347 | fi |
---|
6348 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
---|
6349 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6350 | case $host_os in |
---|
6351 | solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; |
---|
6352 | *) # Supported since Solaris 2.6 (maybe 2.5.1?) |
---|
6353 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; |
---|
6354 | esac |
---|
6355 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes |
---|
6356 | ;; |
---|
6357 | |
---|
6358 | sunos4*) |
---|
6359 | if test "x$host_vendor" = xsequent; then |
---|
6360 | # Use $CC to link under sequent, because it throws in some extra .o |
---|
6361 | # files that make .init and .fini sections work. |
---|
6362 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' |
---|
6363 | else |
---|
6364 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' |
---|
6365 | fi |
---|
6366 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
6367 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
6368 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes |
---|
6369 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6370 | ;; |
---|
6371 | |
---|
6372 | sysv4) |
---|
6373 | case $host_vendor in |
---|
6374 | sni) |
---|
6375 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
6376 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? |
---|
6377 | ;; |
---|
6378 | siemens) |
---|
6379 | ## LD is ld it makes a PLAMLIB |
---|
6380 | ## CC just makes a GrossModule. |
---|
6381 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' |
---|
6382 | _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' |
---|
6383 | _LT_AC_TAGVAR(hardcode_direct, $1)=no |
---|
6384 | ;; |
---|
6385 | motorola) |
---|
6386 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
6387 | _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie |
---|
6388 | ;; |
---|
6389 | esac |
---|
6390 | runpath_var='LD_RUN_PATH' |
---|
6391 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6392 | ;; |
---|
6393 | |
---|
6394 | sysv4.3*) |
---|
6395 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
6396 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6397 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' |
---|
6398 | ;; |
---|
6399 | |
---|
6400 | sysv4*MP*) |
---|
6401 | if test -d /usr/nec; then |
---|
6402 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
6403 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6404 | runpath_var=LD_RUN_PATH |
---|
6405 | hardcode_runpath_var=yes |
---|
6406 | _LT_AC_TAGVAR(ld_shlibs, $1)=yes |
---|
6407 | fi |
---|
6408 | ;; |
---|
6409 | |
---|
6410 | sysv4.2uw2*) |
---|
6411 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' |
---|
6412 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes |
---|
6413 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=no |
---|
6414 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6415 | hardcode_runpath_var=yes |
---|
6416 | runpath_var=LD_RUN_PATH |
---|
6417 | ;; |
---|
6418 | |
---|
6419 | sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) |
---|
6420 | _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' |
---|
6421 | if test "$GCC" = yes; then |
---|
6422 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
---|
6423 | else |
---|
6424 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' |
---|
6425 | fi |
---|
6426 | runpath_var='LD_RUN_PATH' |
---|
6427 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6428 | ;; |
---|
6429 | |
---|
6430 | sysv5*) |
---|
6431 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' |
---|
6432 | # $CC -shared without GNU ld will not create a library from C++ |
---|
6433 | # object files and a static libstdc++, better avoid it by now |
---|
6434 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
6435 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ |
---|
6436 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' |
---|
6437 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= |
---|
6438 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6439 | runpath_var='LD_RUN_PATH' |
---|
6440 | ;; |
---|
6441 | |
---|
6442 | uts4*) |
---|
6443 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
---|
6444 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
---|
6445 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no |
---|
6446 | ;; |
---|
6447 | |
---|
6448 | *) |
---|
6449 | _LT_AC_TAGVAR(ld_shlibs, $1)=no |
---|
6450 | ;; |
---|
6451 | esac |
---|
6452 | fi |
---|
6453 | ]) |
---|
6454 | AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) |
---|
6455 | test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no |
---|
6456 | |
---|
6457 | variables_saved_for_relink="PATH $shlibpath_var $runpath_var" |
---|
6458 | if test "$GCC" = yes; then |
---|
6459 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" |
---|
6460 | fi |
---|
6461 | |
---|
6462 | # |
---|
6463 | # Do we need to explicitly link libc? |
---|
6464 | # |
---|
6465 | case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in |
---|
6466 | x|xyes) |
---|
6467 | # Assume -lc should be added |
---|
6468 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes |
---|
6469 | |
---|
6470 | if test "$enable_shared" = yes && test "$GCC" = yes; then |
---|
6471 | case $_LT_AC_TAGVAR(archive_cmds, $1) in |
---|
6472 | *'~'*) |
---|
6473 | # FIXME: we may have to deal with multi-command sequences. |
---|
6474 | ;; |
---|
6475 | '$CC '*) |
---|
6476 | # Test whether the compiler implicitly links with -lc since on some |
---|
6477 | # systems, -lgcc has to come before -lc. If gcc already passes -lc |
---|
6478 | # to ld, don't add -lc before -lgcc. |
---|
6479 | AC_MSG_CHECKING([whether -lc should be explicitly linked in]) |
---|
6480 | $rm conftest* |
---|
6481 | printf "$lt_simple_compile_test_code" > conftest.$ac_ext |
---|
6482 | |
---|
6483 | if AC_TRY_EVAL(ac_compile) 2>conftest.err; then |
---|
6484 | soname=conftest |
---|
6485 | lib=conftest |
---|
6486 | libobjs=conftest.$ac_objext |
---|
6487 | deplibs= |
---|
6488 | wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) |
---|
6489 | compiler_flags=-v |
---|
6490 | linker_flags=-v |
---|
6491 | verstring= |
---|
6492 | output_objdir=. |
---|
6493 | libname=conftest |
---|
6494 | lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) |
---|
6495 | _LT_AC_TAGVAR(allow_undefined_flag, $1)= |
---|
6496 | if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) |
---|
6497 | then |
---|
6498 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no |
---|
6499 | else |
---|
6500 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes |
---|
6501 | fi |
---|
6502 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag |
---|
6503 | else |
---|
6504 | cat conftest.err 1>&5 |
---|
6505 | fi |
---|
6506 | $rm conftest* |
---|
6507 | AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) |
---|
6508 | ;; |
---|
6509 | esac |
---|
6510 | fi |
---|
6511 | ;; |
---|
6512 | esac |
---|
6513 | ])# AC_LIBTOOL_PROG_LD_SHLIBS |
---|
6514 | |
---|
6515 | |
---|
6516 | # _LT_AC_FILE_LTDLL_C |
---|
6517 | # ------------------- |
---|
6518 | # Be careful that the start marker always follows a newline. |
---|
6519 | AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ |
---|
6520 | # /* ltdll.c starts here */ |
---|
6521 | # #define WIN32_LEAN_AND_MEAN |
---|
6522 | # #include <windows.h> |
---|
6523 | # #undef WIN32_LEAN_AND_MEAN |
---|
6524 | # #include <stdio.h> |
---|
6525 | # |
---|
6526 | # #ifndef __CYGWIN__ |
---|
6527 | # # ifdef __CYGWIN32__ |
---|
6528 | # # define __CYGWIN__ __CYGWIN32__ |
---|
6529 | # # endif |
---|
6530 | # #endif |
---|
6531 | # |
---|
6532 | # #ifdef __cplusplus |
---|
6533 | # extern "C" { |
---|
6534 | # #endif |
---|
6535 | # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); |
---|
6536 | # #ifdef __cplusplus |
---|
6537 | # } |
---|
6538 | # #endif |
---|
6539 | # |
---|
6540 | # #ifdef __CYGWIN__ |
---|
6541 | # #include <cygwin/cygwin_dll.h> |
---|
6542 | # DECLARE_CYGWIN_DLL( DllMain ); |
---|
6543 | # #endif |
---|
6544 | # HINSTANCE __hDllInstance_base; |
---|
6545 | # |
---|
6546 | # BOOL APIENTRY |
---|
6547 | # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) |
---|
6548 | # { |
---|
6549 | # __hDllInstance_base = hInst; |
---|
6550 | # return TRUE; |
---|
6551 | # } |
---|
6552 | # /* ltdll.c ends here */ |
---|
6553 | ])# _LT_AC_FILE_LTDLL_C |
---|
6554 | |
---|
6555 | |
---|
6556 | # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) |
---|
6557 | # --------------------------------- |
---|
6558 | AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) |
---|
6559 | |
---|
6560 | |
---|
6561 | # old names |
---|
6562 | AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) |
---|
6563 | AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) |
---|
6564 | AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) |
---|
6565 | AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) |
---|
6566 | AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) |
---|
6567 | AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) |
---|
6568 | AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) |
---|
6569 | |
---|
6570 | # This is just to silence aclocal about the macro not being used |
---|
6571 | ifelse([AC_DISABLE_FAST_INSTALL]) |
---|
6572 | |
---|
6573 | AC_DEFUN([LT_AC_PROG_GCJ], |
---|
6574 | [AC_CHECK_TOOL(GCJ, gcj, no) |
---|
6575 | test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" |
---|
6576 | AC_SUBST(GCJFLAGS) |
---|
6577 | ]) |
---|
6578 | |
---|
6579 | AC_DEFUN([LT_AC_PROG_RC], |
---|
6580 | [AC_CHECK_TOOL(RC, windres, no) |
---|
6581 | ]) |
---|
6582 | |
---|
6583 | # NOTE: This macro has been submitted for inclusion into # |
---|
6584 | # GNU Autoconf as AC_PROG_SED. When it is available in # |
---|
6585 | # a released version of Autoconf we should remove this # |
---|
6586 | # macro and use it instead. # |
---|
6587 | # LT_AC_PROG_SED |
---|
6588 | # -------------- |
---|
6589 | # Check for a fully-functional sed program, that truncates |
---|
6590 | # as few characters as possible. Prefer GNU sed if found. |
---|
6591 | AC_DEFUN([LT_AC_PROG_SED], |
---|
6592 | [AC_MSG_CHECKING([for a sed that does not truncate output]) |
---|
6593 | AC_CACHE_VAL(lt_cv_path_SED, |
---|
6594 | [# Loop through the user's path and test for sed and gsed. |
---|
6595 | # Then use that list of sed's as ones to test for truncation. |
---|
6596 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
---|
6597 | for as_dir in $PATH |
---|
6598 | do |
---|
6599 | IFS=$as_save_IFS |
---|
6600 | test -z "$as_dir" && as_dir=. |
---|
6601 | for lt_ac_prog in sed gsed; do |
---|
6602 | for ac_exec_ext in '' $ac_executable_extensions; do |
---|
6603 | if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then |
---|
6604 | lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" |
---|
6605 | fi |
---|
6606 | done |
---|
6607 | done |
---|
6608 | done |
---|
6609 | lt_ac_max=0 |
---|
6610 | lt_ac_count=0 |
---|
6611 | # Add /usr/xpg4/bin/sed as it is typically found on Solaris |
---|
6612 | # along with /bin/sed that truncates output. |
---|
6613 | for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do |
---|
6614 | test ! -f $lt_ac_sed && break |
---|
6615 | cat /dev/null > conftest.in |
---|
6616 | lt_ac_count=0 |
---|
6617 | echo $ECHO_N "0123456789$ECHO_C" >conftest.in |
---|
6618 | # Check for GNU sed and select it if it is found. |
---|
6619 | if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then |
---|
6620 | lt_cv_path_SED=$lt_ac_sed |
---|
6621 | break |
---|
6622 | fi |
---|
6623 | while true; do |
---|
6624 | cat conftest.in conftest.in >conftest.tmp |
---|
6625 | mv conftest.tmp conftest.in |
---|
6626 | cp conftest.in conftest.nl |
---|
6627 | echo >>conftest.nl |
---|
6628 | $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break |
---|
6629 | cmp -s conftest.out conftest.nl || break |
---|
6630 | # 10000 chars as input seems more than enough |
---|
6631 | test $lt_ac_count -gt 10 && break |
---|
6632 | lt_ac_count=`expr $lt_ac_count + 1` |
---|
6633 | if test $lt_ac_count -gt $lt_ac_max; then |
---|
6634 | lt_ac_max=$lt_ac_count |
---|
6635 | lt_cv_path_SED=$lt_ac_sed |
---|
6636 | fi |
---|
6637 | done |
---|
6638 | done |
---|
6639 | SED=$lt_cv_path_SED |
---|
6640 | ]) |
---|
6641 | AC_MSG_RESULT([$SED]) |
---|
6642 | ]) |
---|
6643 | |
---|
6644 | # Configure paths for GLIB |
---|
6645 | # Owen Taylor 1997-2001 |
---|
6646 | |
---|
6647 | dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) |
---|
6648 | dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject or |
---|
6649 | dnl gthread is specified in MODULES, pass to pkg-config |
---|
6650 | dnl |
---|
6651 | AC_DEFUN([AM_PATH_GLIB_2_0], |
---|
6652 | [dnl |
---|
6653 | dnl Get the cflags and libraries from pkg-config |
---|
6654 | dnl |
---|
6655 | AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program], |
---|
6656 | , enable_glibtest=yes) |
---|
6657 | |
---|
6658 | pkg_config_args=glib-2.0 |
---|
6659 | for module in . $4 |
---|
6660 | do |
---|
6661 | case "$module" in |
---|
6662 | gmodule) |
---|
6663 | pkg_config_args="$pkg_config_args gmodule-2.0" |
---|
6664 | ;; |
---|
6665 | gobject) |
---|
6666 | pkg_config_args="$pkg_config_args gobject-2.0" |
---|
6667 | ;; |
---|
6668 | gthread) |
---|
6669 | pkg_config_args="$pkg_config_args gthread-2.0" |
---|
6670 | ;; |
---|
6671 | esac |
---|
6672 | done |
---|
6673 | |
---|
6674 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
---|
6675 | |
---|
6676 | no_glib="" |
---|
6677 | |
---|
6678 | if test x$PKG_CONFIG != xno ; then |
---|
6679 | if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then |
---|
6680 | : |
---|
6681 | else |
---|
6682 | echo *** pkg-config too old; version 0.7 or better required. |
---|
6683 | no_glib=yes |
---|
6684 | PKG_CONFIG=no |
---|
6685 | fi |
---|
6686 | else |
---|
6687 | no_glib=yes |
---|
6688 | fi |
---|
6689 | |
---|
6690 | min_glib_version=ifelse([$1], ,2.0.0,$1) |
---|
6691 | AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) |
---|
6692 | |
---|
6693 | if test x$PKG_CONFIG != xno ; then |
---|
6694 | ## don't try to run the test against uninstalled libtool libs |
---|
6695 | if $PKG_CONFIG --uninstalled $pkg_config_args; then |
---|
6696 | echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH" |
---|
6697 | enable_glibtest=no |
---|
6698 | fi |
---|
6699 | |
---|
6700 | if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then |
---|
6701 | : |
---|
6702 | else |
---|
6703 | no_glib=yes |
---|
6704 | fi |
---|
6705 | fi |
---|
6706 | |
---|
6707 | if test x"$no_glib" = x ; then |
---|
6708 | GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` |
---|
6709 | GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0` |
---|
6710 | GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` |
---|
6711 | |
---|
6712 | GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args` |
---|
6713 | GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args` |
---|
6714 | glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \ |
---|
6715 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` |
---|
6716 | glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \ |
---|
6717 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` |
---|
6718 | glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \ |
---|
6719 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` |
---|
6720 | if test "x$enable_glibtest" = "xyes" ; then |
---|
6721 | ac_save_CFLAGS="$CFLAGS" |
---|
6722 | ac_save_LIBS="$LIBS" |
---|
6723 | CFLAGS="$CFLAGS $GLIB_CFLAGS" |
---|
6724 | LIBS="$GLIB_LIBS $LIBS" |
---|
6725 | dnl |
---|
6726 | dnl Now check if the installed GLIB is sufficiently new. (Also sanity |
---|
6727 | dnl checks the results of pkg-config to some extent) |
---|
6728 | dnl |
---|
6729 | rm -f conf.glibtest |
---|
6730 | AC_TRY_RUN([ |
---|
6731 | #include <glib.h> |
---|
6732 | #include <stdio.h> |
---|
6733 | #include <stdlib.h> |
---|
6734 | |
---|
6735 | int |
---|
6736 | main () |
---|
6737 | { |
---|
6738 | int major, minor, micro; |
---|
6739 | char *tmp_version; |
---|
6740 | |
---|
6741 | system ("touch conf.glibtest"); |
---|
6742 | |
---|
6743 | /* HP/UX 9 (%@#!) writes to sscanf strings */ |
---|
6744 | tmp_version = g_strdup("$min_glib_version"); |
---|
6745 | if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { |
---|
6746 | printf("%s, bad version string\n", "$min_glib_version"); |
---|
6747 | exit(1); |
---|
6748 | } |
---|
6749 | |
---|
6750 | if ((glib_major_version != $glib_config_major_version) || |
---|
6751 | (glib_minor_version != $glib_config_minor_version) || |
---|
6752 | (glib_micro_version != $glib_config_micro_version)) |
---|
6753 | { |
---|
6754 | printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", |
---|
6755 | $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, |
---|
6756 | glib_major_version, glib_minor_version, glib_micro_version); |
---|
6757 | printf ("*** was found! If pkg-config was correct, then it is best\n"); |
---|
6758 | printf ("*** to remove the old version of GLib. You may also be able to fix the error\n"); |
---|
6759 | printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); |
---|
6760 | printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); |
---|
6761 | printf("*** required on your system.\n"); |
---|
6762 | printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); |
---|
6763 | printf("*** to point to the correct configuration files\n"); |
---|
6764 | } |
---|
6765 | else if ((glib_major_version != GLIB_MAJOR_VERSION) || |
---|
6766 | (glib_minor_version != GLIB_MINOR_VERSION) || |
---|
6767 | (glib_micro_version != GLIB_MICRO_VERSION)) |
---|
6768 | { |
---|
6769 | printf("*** GLIB header files (version %d.%d.%d) do not match\n", |
---|
6770 | GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); |
---|
6771 | printf("*** library (version %d.%d.%d)\n", |
---|
6772 | glib_major_version, glib_minor_version, glib_micro_version); |
---|
6773 | } |
---|
6774 | else |
---|
6775 | { |
---|
6776 | if ((glib_major_version > major) || |
---|
6777 | ((glib_major_version == major) && (glib_minor_version > minor)) || |
---|
6778 | ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) |
---|
6779 | { |
---|
6780 | return 0; |
---|
6781 | } |
---|
6782 | else |
---|
6783 | { |
---|
6784 | printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", |
---|
6785 | glib_major_version, glib_minor_version, glib_micro_version); |
---|
6786 | printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", |
---|
6787 | major, minor, micro); |
---|
6788 | printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); |
---|
6789 | printf("***\n"); |
---|
6790 | printf("*** If you have already installed a sufficiently new version, this error\n"); |
---|
6791 | printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); |
---|
6792 | printf("*** being found. The easiest way to fix this is to remove the old version\n"); |
---|
6793 | printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n"); |
---|
6794 | printf("*** correct copy of pkg-config. (In this case, you will have to\n"); |
---|
6795 | printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); |
---|
6796 | printf("*** so that the correct libraries are found at run-time))\n"); |
---|
6797 | } |
---|
6798 | } |
---|
6799 | return 1; |
---|
6800 | } |
---|
6801 | ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) |
---|
6802 | CFLAGS="$ac_save_CFLAGS" |
---|
6803 | LIBS="$ac_save_LIBS" |
---|
6804 | fi |
---|
6805 | fi |
---|
6806 | if test "x$no_glib" = x ; then |
---|
6807 | AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)) |
---|
6808 | ifelse([$2], , :, [$2]) |
---|
6809 | else |
---|
6810 | AC_MSG_RESULT(no) |
---|
6811 | if test "$PKG_CONFIG" = "no" ; then |
---|
6812 | echo "*** A new enough version of pkg-config was not found." |
---|
6813 | echo "*** See http://www.freedesktop.org/software/pkgconfig/" |
---|
6814 | else |
---|
6815 | if test -f conf.glibtest ; then |
---|
6816 | : |
---|
6817 | else |
---|
6818 | echo "*** Could not run GLIB test program, checking why..." |
---|
6819 | ac_save_CFLAGS="$CFLAGS" |
---|
6820 | ac_save_LIBS="$LIBS" |
---|
6821 | CFLAGS="$CFLAGS $GLIB_CFLAGS" |
---|
6822 | LIBS="$LIBS $GLIB_LIBS" |
---|
6823 | AC_TRY_LINK([ |
---|
6824 | #include <glib.h> |
---|
6825 | #include <stdio.h> |
---|
6826 | ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], |
---|
6827 | [ echo "*** The test program compiled, but did not run. This usually means" |
---|
6828 | echo "*** that the run-time linker is not finding GLIB or finding the wrong" |
---|
6829 | echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" |
---|
6830 | echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" |
---|
6831 | echo "*** to the installed location Also, make sure you have run ldconfig if that" |
---|
6832 | echo "*** is required on your system" |
---|
6833 | echo "***" |
---|
6834 | echo "*** If you have an old version installed, it is best to remove it, although" |
---|
6835 | echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], |
---|
6836 | [ echo "*** The test program failed to compile or link. See the file config.log for the" |
---|
6837 | echo "*** exact error that occured. This usually means GLIB is incorrectly installed."]) |
---|
6838 | CFLAGS="$ac_save_CFLAGS" |
---|
6839 | LIBS="$ac_save_LIBS" |
---|
6840 | fi |
---|
6841 | fi |
---|
6842 | GLIB_CFLAGS="" |
---|
6843 | GLIB_LIBS="" |
---|
6844 | GLIB_GENMARSHAL="" |
---|
6845 | GOBJECT_QUERY="" |
---|
6846 | GLIB_MKENUMS="" |
---|
6847 | ifelse([$3], , :, [$3]) |
---|
6848 | fi |
---|
6849 | AC_SUBST(GLIB_CFLAGS) |
---|
6850 | AC_SUBST(GLIB_LIBS) |
---|
6851 | AC_SUBST(GLIB_GENMARSHAL) |
---|
6852 | AC_SUBST(GOBJECT_QUERY) |
---|
6853 | AC_SUBST(GLIB_MKENUMS) |
---|
6854 | rm -f conf.glibtest |
---|
6855 | ]) |
---|
6856 | |
---|
6857 | |
---|
6858 | dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) |
---|
6859 | dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page |
---|
6860 | dnl also defines GSTUFF_PKG_ERRORS on error |
---|
6861 | AC_DEFUN(PKG_CHECK_MODULES, [ |
---|
6862 | succeeded=no |
---|
6863 | |
---|
6864 | if test -z "$PKG_CONFIG"; then |
---|
6865 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
---|
6866 | fi |
---|
6867 | |
---|
6868 | if test "$PKG_CONFIG" = "no" ; then |
---|
6869 | echo "*** The pkg-config script could not be found. Make sure it is" |
---|
6870 | echo "*** in your path, or set the PKG_CONFIG environment variable" |
---|
6871 | echo "*** to the full path to pkg-config." |
---|
6872 | echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." |
---|
6873 | else |
---|
6874 | PKG_CONFIG_MIN_VERSION=0.9.0 |
---|
6875 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
---|
6876 | AC_MSG_CHECKING(for $2) |
---|
6877 | |
---|
6878 | if $PKG_CONFIG --exists "$2" ; then |
---|
6879 | AC_MSG_RESULT(yes) |
---|
6880 | succeeded=yes |
---|
6881 | |
---|
6882 | AC_MSG_CHECKING($1_CFLAGS) |
---|
6883 | $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` |
---|
6884 | AC_MSG_RESULT($$1_CFLAGS) |
---|
6885 | |
---|
6886 | AC_MSG_CHECKING($1_LIBS) |
---|
6887 | $1_LIBS=`$PKG_CONFIG --libs "$2"` |
---|
6888 | AC_MSG_RESULT($$1_LIBS) |
---|
6889 | else |
---|
6890 | $1_CFLAGS="" |
---|
6891 | $1_LIBS="" |
---|
6892 | ## If we have a custom action on failure, don't print errors, but |
---|
6893 | ## do set a variable so people can do so. |
---|
6894 | $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` |
---|
6895 | ifelse([$4], ,echo $$1_PKG_ERRORS,) |
---|
6896 | fi |
---|
6897 | |
---|
6898 | AC_SUBST($1_CFLAGS) |
---|
6899 | AC_SUBST($1_LIBS) |
---|
6900 | else |
---|
6901 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." |
---|
6902 | echo "*** See http://www.freedesktop.org/software/pkgconfig" |
---|
6903 | fi |
---|
6904 | fi |
---|
6905 | |
---|
6906 | if test $succeeded = yes; then |
---|
6907 | ifelse([$3], , :, [$3]) |
---|
6908 | else |
---|
6909 | 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]) |
---|
6910 | fi |
---|
6911 | ]) |
---|
6912 | |
---|
6913 | |
---|
6914 | |
---|
6915 | # Copyright (C) 1995-2002 Free Software Foundation, Inc. |
---|
6916 | # Copyright (C) 2001-2003 Red Hat, Inc. |
---|
6917 | # |
---|
6918 | # This file is free software, distributed under the terms of the GNU |
---|
6919 | # General Public License. As a special exception to the GNU General |
---|
6920 | # Public License, this file may be distributed as part of a program |
---|
6921 | # that contains a configuration script generated by Autoconf, under |
---|
6922 | # the same distribution terms as the rest of that program. |
---|
6923 | # |
---|
6924 | # This file can be copied and used freely without restrictions. It can |
---|
6925 | # be used in projects which are not available under the GNU Public License |
---|
6926 | # but which still want to provide support for the GNU gettext functionality. |
---|
6927 | # |
---|
6928 | # Macro to add for using GNU gettext. |
---|
6929 | # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996 |
---|
6930 | # |
---|
6931 | # Modified to never use included libintl. |
---|
6932 | # Owen Taylor <otaylor@redhat.com>, 12/15/1998 |
---|
6933 | # |
---|
6934 | # Major rework to remove unused code |
---|
6935 | # Owen Taylor <otaylor@redhat.com>, 12/11/2002 |
---|
6936 | # |
---|
6937 | # Added better handling of ALL_LINGUAS from GNU gettext version |
---|
6938 | # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002 |
---|
6939 | |
---|
6940 | # |
---|
6941 | # We need this here as well, since someone might use autoconf-2.5x |
---|
6942 | # to configure GLib then an older version to configure a package |
---|
6943 | # using AM_GLIB_GNU_GETTEXT |
---|
6944 | AC_PREREQ(2.53) |
---|
6945 | |
---|
6946 | dnl |
---|
6947 | dnl We go to great lengths to make sure that aclocal won't |
---|
6948 | dnl try to pull in the installed version of these macros |
---|
6949 | dnl when running aclocal in the glib directory. |
---|
6950 | dnl |
---|
6951 | m4_copy([AC_DEFUN],[glib_DEFUN]) |
---|
6952 | m4_copy([AC_REQUIRE],[glib_REQUIRE]) |
---|
6953 | dnl |
---|
6954 | dnl At the end, if we're not within glib, we'll define the public |
---|
6955 | dnl definitions in terms of our private definitions. |
---|
6956 | dnl |
---|
6957 | |
---|
6958 | # GLIB_LC_MESSAGES |
---|
6959 | #-------------------- |
---|
6960 | glib_DEFUN([GLIB_LC_MESSAGES], |
---|
6961 | [AC_CHECK_HEADERS([locale.h]) |
---|
6962 | if test $ac_cv_header_locale_h = yes; then |
---|
6963 | AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, |
---|
6964 | [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], |
---|
6965 | am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) |
---|
6966 | if test $am_cv_val_LC_MESSAGES = yes; then |
---|
6967 | AC_DEFINE(HAVE_LC_MESSAGES, 1, |
---|
6968 | [Define if your <locale.h> file defines LC_MESSAGES.]) |
---|
6969 | fi |
---|
6970 | fi]) |
---|
6971 | |
---|
6972 | # GLIB_PATH_PROG_WITH_TEST |
---|
6973 | #---------------------------- |
---|
6974 | dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, |
---|
6975 | dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) |
---|
6976 | glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], |
---|
6977 | [# Extract the first word of "$2", so it can be a program name with args. |
---|
6978 | set dummy $2; ac_word=[$]2 |
---|
6979 | AC_MSG_CHECKING([for $ac_word]) |
---|
6980 | AC_CACHE_VAL(ac_cv_path_$1, |
---|
6981 | [case "[$]$1" in |
---|
6982 | /*) |
---|
6983 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path. |
---|
6984 | ;; |
---|
6985 | *) |
---|
6986 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
---|
6987 | for ac_dir in ifelse([$5], , $PATH, [$5]); do |
---|
6988 | test -z "$ac_dir" && ac_dir=. |
---|
6989 | if test -f $ac_dir/$ac_word; then |
---|
6990 | if [$3]; then |
---|
6991 | ac_cv_path_$1="$ac_dir/$ac_word" |
---|
6992 | break |
---|
6993 | fi |
---|
6994 | fi |
---|
6995 | done |
---|
6996 | IFS="$ac_save_ifs" |
---|
6997 | dnl If no 4th arg is given, leave the cache variable unset, |
---|
6998 | dnl so AC_PATH_PROGS will keep looking. |
---|
6999 | ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" |
---|
7000 | ])dnl |
---|
7001 | ;; |
---|
7002 | esac])dnl |
---|
7003 | $1="$ac_cv_path_$1" |
---|
7004 | if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then |
---|
7005 | AC_MSG_RESULT([$]$1) |
---|
7006 | else |
---|
7007 | AC_MSG_RESULT(no) |
---|
7008 | fi |
---|
7009 | AC_SUBST($1)dnl |
---|
7010 | ]) |
---|
7011 | |
---|
7012 | # GLIB_WITH_NLS |
---|
7013 | #----------------- |
---|
7014 | glib_DEFUN([GLIB_WITH_NLS], |
---|
7015 | dnl NLS is obligatory |
---|
7016 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl |
---|
7017 | USE_NLS=yes |
---|
7018 | AC_SUBST(USE_NLS) |
---|
7019 | |
---|
7020 | gt_cv_have_gettext=no |
---|
7021 | |
---|
7022 | CATOBJEXT=NONE |
---|
7023 | XGETTEXT=: |
---|
7024 | INTLLIBS= |
---|
7025 | |
---|
7026 | AC_CHECK_HEADER(libintl.h, |
---|
7027 | [gt_cv_func_dgettext_libintl="no" |
---|
7028 | libintl_extra_libs="" |
---|
7029 | |
---|
7030 | # |
---|
7031 | # First check in libc |
---|
7032 | # |
---|
7033 | AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, |
---|
7034 | [AC_TRY_LINK([ |
---|
7035 | #include <libintl.h> |
---|
7036 | ], |
---|
7037 | [return (int) dgettext ("","")], |
---|
7038 | gt_cv_func_dgettext_libc=yes, |
---|
7039 | gt_cv_func_dgettext_libc=no) |
---|
7040 | ]) |
---|
7041 | |
---|
7042 | if test "$gt_cv_func_dgettext_libc" = "yes" ; then |
---|
7043 | AC_CHECK_FUNCS(bind_textdomain_codeset) |
---|
7044 | fi |
---|
7045 | |
---|
7046 | # |
---|
7047 | # If we don't have everything we want, check in libintl |
---|
7048 | # |
---|
7049 | if test "$gt_cv_func_dgettext_libc" != "yes" \ |
---|
7050 | || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then |
---|
7051 | |
---|
7052 | AC_CHECK_LIB(intl, bindtextdomain, |
---|
7053 | [AC_CHECK_LIB(intl, dgettext, |
---|
7054 | gt_cv_func_dgettext_libintl=yes)]) |
---|
7055 | |
---|
7056 | if test "$gt_cv_func_dgettext_libintl" != "yes" ; then |
---|
7057 | AC_MSG_CHECKING([if -liconv is needed to use gettext]) |
---|
7058 | AC_MSG_RESULT([]) |
---|
7059 | AC_CHECK_LIB(intl, dcgettext, |
---|
7060 | [gt_cv_func_dgettext_libintl=yes |
---|
7061 | libintl_extra_libs=-liconv], |
---|
7062 | :,-liconv) |
---|
7063 | fi |
---|
7064 | |
---|
7065 | # |
---|
7066 | # If we found libintl, then check in it for bind_textdomain_codeset(); |
---|
7067 | # we'll prefer libc if neither have bind_textdomain_codeset(), |
---|
7068 | # and both have dgettext |
---|
7069 | # |
---|
7070 | if test "$gt_cv_func_dgettext_libintl" = "yes" ; then |
---|
7071 | glib_save_LIBS="$LIBS" |
---|
7072 | LIBS="$LIBS -lintl $libintl_extra_libs" |
---|
7073 | unset ac_cv_func_bind_textdomain_codeset |
---|
7074 | AC_CHECK_FUNCS(bind_textdomain_codeset) |
---|
7075 | LIBS="$glib_save_LIBS" |
---|
7076 | |
---|
7077 | if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then |
---|
7078 | gt_cv_func_dgettext_libc=no |
---|
7079 | else |
---|
7080 | if test "$gt_cv_func_dgettext_libc" = "yes"; then |
---|
7081 | gt_cv_func_dgettext_libintl=no |
---|
7082 | fi |
---|
7083 | fi |
---|
7084 | fi |
---|
7085 | fi |
---|
7086 | |
---|
7087 | if test "$gt_cv_func_dgettext_libc" = "yes" \ |
---|
7088 | || test "$gt_cv_func_dgettext_libintl" = "yes"; then |
---|
7089 | gt_cv_have_gettext=yes |
---|
7090 | fi |
---|
7091 | |
---|
7092 | if test "$gt_cv_func_dgettext_libintl" = "yes"; then |
---|
7093 | INTLLIBS="-lintl $libintl_extra_libs" |
---|
7094 | fi |
---|
7095 | |
---|
7096 | if test "$gt_cv_have_gettext" = "yes"; then |
---|
7097 | AC_DEFINE(HAVE_GETTEXT,1, |
---|
7098 | [Define if the GNU gettext() function is already present or preinstalled.]) |
---|
7099 | GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, |
---|
7100 | [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl |
---|
7101 | if test "$MSGFMT" != "no"; then |
---|
7102 | glib_save_LIBS="$LIBS" |
---|
7103 | LIBS="$LIBS $INTLLIBS" |
---|
7104 | AC_CHECK_FUNCS(dcgettext) |
---|
7105 | AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) |
---|
7106 | GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, |
---|
7107 | [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) |
---|
7108 | AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; |
---|
7109 | return _nl_msg_cat_cntr], |
---|
7110 | [CATOBJEXT=.gmo |
---|
7111 | DATADIRNAME=share], |
---|
7112 | [case $host in |
---|
7113 | *-*-solaris*) |
---|
7114 | dnl On Solaris, if bind_textdomain_codeset is in libc, |
---|
7115 | dnl GNU format message catalog is always supported, |
---|
7116 | dnl since both are added to the libc all together. |
---|
7117 | dnl Hence, we'd like to go with DATADIRNAME=share and |
---|
7118 | dnl and CATOBJEXT=.gmo in this case. |
---|
7119 | AC_CHECK_FUNC(bind_textdomain_codeset, |
---|
7120 | [CATOBJEXT=.gmo |
---|
7121 | DATADIRNAME=share], |
---|
7122 | [CATOBJEXT=.mo |
---|
7123 | DATADIRNAME=lib]) |
---|
7124 | ;; |
---|
7125 | *) |
---|
7126 | CATOBJEXT=.mo |
---|
7127 | DATADIRNAME=lib |
---|
7128 | ;; |
---|
7129 | esac]) |
---|
7130 | LIBS="$glib_save_LIBS" |
---|
7131 | INSTOBJEXT=.mo |
---|
7132 | else |
---|
7133 | gt_cv_have_gettext=no |
---|
7134 | fi |
---|
7135 | fi |
---|
7136 | ]) |
---|
7137 | |
---|
7138 | if test "$gt_cv_have_gettext" = "yes" ; then |
---|
7139 | AC_DEFINE(ENABLE_NLS, 1, |
---|
7140 | [always defined to indicate that i18n is enabled]) |
---|
7141 | fi |
---|
7142 | |
---|
7143 | dnl Test whether we really found GNU xgettext. |
---|
7144 | if test "$XGETTEXT" != ":"; then |
---|
7145 | dnl If it is not GNU xgettext we define it as : so that the |
---|
7146 | dnl Makefiles still can work. |
---|
7147 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then |
---|
7148 | : ; |
---|
7149 | else |
---|
7150 | AC_MSG_RESULT( |
---|
7151 | [found xgettext program is not GNU xgettext; ignore it]) |
---|
7152 | XGETTEXT=":" |
---|
7153 | fi |
---|
7154 | fi |
---|
7155 | |
---|
7156 | # We need to process the po/ directory. |
---|
7157 | POSUB=po |
---|
7158 | |
---|
7159 | AC_OUTPUT_COMMANDS( |
---|
7160 | [case "$CONFIG_FILES" in *po/Makefile.in*) |
---|
7161 | sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile |
---|
7162 | esac]) |
---|
7163 | |
---|
7164 | dnl These rules are solely for the distribution goal. While doing this |
---|
7165 | dnl we only have to keep exactly one list of the available catalogs |
---|
7166 | dnl in configure.in. |
---|
7167 | for lang in $ALL_LINGUAS; do |
---|
7168 | GMOFILES="$GMOFILES $lang.gmo" |
---|
7169 | POFILES="$POFILES $lang.po" |
---|
7170 | done |
---|
7171 | |
---|
7172 | dnl Make all variables we use known to autoconf. |
---|
7173 | AC_SUBST(CATALOGS) |
---|
7174 | AC_SUBST(CATOBJEXT) |
---|
7175 | AC_SUBST(DATADIRNAME) |
---|
7176 | AC_SUBST(GMOFILES) |
---|
7177 | AC_SUBST(INSTOBJEXT) |
---|
7178 | AC_SUBST(INTLLIBS) |
---|
7179 | AC_SUBST(PO_IN_DATADIR_TRUE) |
---|
7180 | AC_SUBST(PO_IN_DATADIR_FALSE) |
---|
7181 | AC_SUBST(POFILES) |
---|
7182 | AC_SUBST(POSUB) |
---|
7183 | ]) |
---|
7184 | |
---|
7185 | # AM_GLIB_GNU_GETTEXT |
---|
7186 | # ------------------- |
---|
7187 | # Do checks necessary for use of gettext. If a suitable implementation |
---|
7188 | # of gettext is found in either in libintl or in the C library, |
---|
7189 | # it will set INTLLIBS to the libraries needed for use of gettext |
---|
7190 | # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable |
---|
7191 | # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() |
---|
7192 | # on various variables needed by the Makefile.in.in installed by |
---|
7193 | # glib-gettextize. |
---|
7194 | dnl |
---|
7195 | glib_DEFUN([GLIB_GNU_GETTEXT], |
---|
7196 | [AC_REQUIRE([AC_PROG_CC])dnl |
---|
7197 | AC_REQUIRE([AC_HEADER_STDC])dnl |
---|
7198 | |
---|
7199 | GLIB_LC_MESSAGES |
---|
7200 | GLIB_WITH_NLS |
---|
7201 | |
---|
7202 | if test "$gt_cv_have_gettext" = "yes"; then |
---|
7203 | if test "x$ALL_LINGUAS" = "x"; then |
---|
7204 | LINGUAS= |
---|
7205 | else |
---|
7206 | AC_MSG_CHECKING(for catalogs to be installed) |
---|
7207 | NEW_LINGUAS= |
---|
7208 | for presentlang in $ALL_LINGUAS; do |
---|
7209 | useit=no |
---|
7210 | if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then |
---|
7211 | desiredlanguages="$LINGUAS" |
---|
7212 | else |
---|
7213 | desiredlanguages="$ALL_LINGUAS" |
---|
7214 | fi |
---|
7215 | for desiredlang in $desiredlanguages; do |
---|
7216 | # Use the presentlang catalog if desiredlang is |
---|
7217 | # a. equal to presentlang, or |
---|
7218 | # b. a variant of presentlang (because in this case, |
---|
7219 | # presentlang can be used as a fallback for messages |
---|
7220 | # which are not translated in the desiredlang catalog). |
---|
7221 | case "$desiredlang" in |
---|
7222 | "$presentlang"*) useit=yes;; |
---|
7223 | esac |
---|
7224 | done |
---|
7225 | if test $useit = yes; then |
---|
7226 | NEW_LINGUAS="$NEW_LINGUAS $presentlang" |
---|
7227 | fi |
---|
7228 | done |
---|
7229 | LINGUAS=$NEW_LINGUAS |
---|
7230 | AC_MSG_RESULT($LINGUAS) |
---|
7231 | fi |
---|
7232 | |
---|
7233 | dnl Construct list of names of catalog files to be constructed. |
---|
7234 | if test -n "$LINGUAS"; then |
---|
7235 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done |
---|
7236 | fi |
---|
7237 | fi |
---|
7238 | |
---|
7239 | dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly |
---|
7240 | dnl find the mkinstalldirs script in another subdir but ($top_srcdir). |
---|
7241 | dnl Try to locate is. |
---|
7242 | MKINSTALLDIRS= |
---|
7243 | if test -n "$ac_aux_dir"; then |
---|
7244 | MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" |
---|
7245 | fi |
---|
7246 | if test -z "$MKINSTALLDIRS"; then |
---|
7247 | MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" |
---|
7248 | fi |
---|
7249 | AC_SUBST(MKINSTALLDIRS) |
---|
7250 | |
---|
7251 | dnl Generate list of files to be processed by xgettext which will |
---|
7252 | dnl be included in po/Makefile. |
---|
7253 | test -d po || mkdir po |
---|
7254 | if test "x$srcdir" != "x."; then |
---|
7255 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then |
---|
7256 | posrcprefix="$srcdir/" |
---|
7257 | else |
---|
7258 | posrcprefix="../$srcdir/" |
---|
7259 | fi |
---|
7260 | else |
---|
7261 | posrcprefix="../" |
---|
7262 | fi |
---|
7263 | rm -f po/POTFILES |
---|
7264 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ |
---|
7265 | < $srcdir/po/POTFILES.in > po/POTFILES |
---|
7266 | ]) |
---|
7267 | |
---|
7268 | # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) |
---|
7269 | # ------------------------------- |
---|
7270 | # Define VARIABLE to the location where catalog files will |
---|
7271 | # be installed by po/Makefile. |
---|
7272 | glib_DEFUN([GLIB_DEFINE_LOCALEDIR], |
---|
7273 | [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl |
---|
7274 | glib_save_prefix="$prefix" |
---|
7275 | glib_save_exec_prefix="$exec_prefix" |
---|
7276 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
---|
7277 | test "x$exec_prefix" = xNONE && exec_prefix=$prefix |
---|
7278 | if test "x$CATOBJEXT" = "x.mo" ; then |
---|
7279 | localedir=`eval echo "${libdir}/locale"` |
---|
7280 | else |
---|
7281 | localedir=`eval echo "${datadir}/locale"` |
---|
7282 | fi |
---|
7283 | prefix="$glib_save_prefix" |
---|
7284 | exec_prefix="$glib_save_exec_prefix" |
---|
7285 | AC_DEFINE_UNQUOTED($1, "$localedir", |
---|
7286 | [Define the location where the catalogs will be installed]) |
---|
7287 | ]) |
---|
7288 | |
---|
7289 | dnl |
---|
7290 | dnl Now the definitions that aclocal will find |
---|
7291 | dnl |
---|
7292 | ifdef(glib_configure_in,[],[ |
---|
7293 | AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) |
---|
7294 | AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) |
---|
7295 | ])dnl |
---|
7296 | |
---|
7297 | dnl -*- mode: autoconf -*- |
---|
7298 | |
---|
7299 | # serial 1 |
---|
7300 | |
---|
7301 | dnl Usage: |
---|
7302 | dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) |
---|
7303 | AC_DEFUN([GTK_DOC_CHECK], |
---|
7304 | [ |
---|
7305 | AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first |
---|
7306 | AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first |
---|
7307 | dnl for overriding the documentation installation directory |
---|
7308 | AC_ARG_WITH(html-dir, |
---|
7309 | AC_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, |
---|
7310 | [with_html_dir='${datadir}/gtk-doc/html']) |
---|
7311 | HTML_DIR="$with_html_dir" |
---|
7312 | AC_SUBST(HTML_DIR) |
---|
7313 | |
---|
7314 | dnl enable/disable documentation building |
---|
7315 | AC_ARG_ENABLE(gtk-doc, |
---|
7316 | AC_HELP_STRING([--enable-gtk-doc], |
---|
7317 | [use gtk-doc to build documentation [default=no]]),, |
---|
7318 | enable_gtk_doc=no) |
---|
7319 | |
---|
7320 | have_gtk_doc=no |
---|
7321 | if test -z "$PKG_CONFIG"; then |
---|
7322 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
---|
7323 | fi |
---|
7324 | if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists gtk-doc; then |
---|
7325 | have_gtk_doc=yes |
---|
7326 | fi |
---|
7327 | |
---|
7328 | dnl do we want to do a version check? |
---|
7329 | ifelse([$1],[],, |
---|
7330 | [gtk_doc_min_version=$1 |
---|
7331 | if test "$have_gtk_doc" = yes; then |
---|
7332 | AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version]) |
---|
7333 | if $PKG_CONFIG --atleast-version $gtk_doc_min_version gtk-doc; then |
---|
7334 | AC_MSG_RESULT(yes) |
---|
7335 | else |
---|
7336 | AC_MSG_RESULT(no) |
---|
7337 | have_gtk_doc=no |
---|
7338 | fi |
---|
7339 | fi |
---|
7340 | ]) |
---|
7341 | if test x$enable_gtk_doc = xyes; then |
---|
7342 | if test "$have_gtk_doc" != yes; then |
---|
7343 | enable_gtk_doc=no |
---|
7344 | fi |
---|
7345 | fi |
---|
7346 | |
---|
7347 | AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes) |
---|
7348 | AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL") |
---|
7349 | ]) |
---|
7350 | |
---|