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