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