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