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