diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-09-05 12:04:54 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-09-05 12:04:54 +0000 |
commit | 5ef83163f7535b36c9ac5b3c302284a2ccaacb30 (patch) | |
tree | f32973763f3d298474f8b387725b26f9f68603f5 /m4 | |
parent | ab185489bc22430ddce5a9c7112074361f0a92cb (diff) | |
download | libmicrohttpd-5ef83163f7535b36c9ac5b3c302284a2ccaacb30.tar.gz libmicrohttpd-5ef83163f7535b36c9ac5b3c302284a2ccaacb30.zip |
adding gettext stuff for fixing #4614
Diffstat (limited to 'm4')
-rw-r--r-- | m4/codeset.m4 | 21 | ||||
-rw-r--r-- | m4/fcntl-o.m4 | 81 | ||||
-rw-r--r-- | m4/gettext.m4 | 420 | ||||
-rw-r--r-- | m4/glibc2.m4 | 30 | ||||
-rw-r--r-- | m4/glibc21.m4 | 30 | ||||
-rw-r--r-- | m4/iconv.m4 | 271 | ||||
-rw-r--r-- | m4/intdiv0.m4 | 84 | ||||
-rw-r--r-- | m4/intl.m4 | 294 | ||||
-rw-r--r-- | m4/intldir.m4 | 19 | ||||
-rw-r--r-- | m4/intlmacosx.m4 | 56 | ||||
-rw-r--r-- | m4/intmax.m4 | 33 | ||||
-rw-r--r-- | m4/inttypes-pri.m4 | 36 | ||||
-rw-r--r-- | m4/inttypes_h.m4 | 26 | ||||
-rw-r--r-- | m4/lcmessage.m4 | 31 | ||||
-rw-r--r-- | m4/lib-ld.m4 | 119 | ||||
-rw-r--r-- | m4/lib-link.m4 | 777 | ||||
-rw-r--r-- | m4/lib-prefix.m4 | 224 | ||||
-rw-r--r-- | m4/libtool.m4 | 8388 | ||||
-rw-r--r-- | m4/lock.m4 | 37 | ||||
-rw-r--r-- | m4/longlong.m4 | 106 | ||||
-rw-r--r-- | m4/ltoptions.m4 | 437 | ||||
-rw-r--r-- | m4/ltsugar.m4 | 124 | ||||
-rw-r--r-- | m4/ltversion.m4 | 23 | ||||
-rw-r--r-- | m4/lt~obsolete.m4 | 99 | ||||
-rw-r--r-- | m4/nls.m4 | 32 | ||||
-rw-r--r-- | m4/po.m4 | 453 | ||||
-rw-r--r-- | m4/printf-posix.m4 | 45 | ||||
-rw-r--r-- | m4/progtest.m4 | 91 | ||||
-rw-r--r-- | m4/size_max.m4 | 75 | ||||
-rw-r--r-- | m4/stdint_h.m4 | 26 | ||||
-rw-r--r-- | m4/threadlib.m4 | 347 | ||||
-rw-r--r-- | m4/uintmax_t.m4 | 30 | ||||
-rw-r--r-- | m4/visibility.m4 | 74 | ||||
-rw-r--r-- | m4/wchar_t.m4 | 20 | ||||
-rw-r--r-- | m4/wint_t.m4 | 28 | ||||
-rw-r--r-- | m4/xsize.m4 | 13 |
36 files changed, 13000 insertions, 0 deletions
diff --git a/m4/codeset.m4 b/m4/codeset.m4 new file mode 100644 index 00000000..a53c0426 --- /dev/null +++ b/m4/codeset.m4 | |||
@@ -0,0 +1,21 @@ | |||
1 | # codeset.m4 serial 4 (gettext-0.18) | ||
2 | dnl Copyright (C) 2000-2002, 2006, 2008-2010 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | dnl From Bruno Haible. | ||
8 | |||
9 | AC_DEFUN([AM_LANGINFO_CODESET], | ||
10 | [ | ||
11 | AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset], | ||
12 | [AC_TRY_LINK([#include <langinfo.h>], | ||
13 | [char* cs = nl_langinfo(CODESET); return !cs;], | ||
14 | [am_cv_langinfo_codeset=yes], | ||
15 | [am_cv_langinfo_codeset=no]) | ||
16 | ]) | ||
17 | if test $am_cv_langinfo_codeset = yes; then | ||
18 | AC_DEFINE([HAVE_LANGINFO_CODESET], [1], | ||
19 | [Define if you have <langinfo.h> and nl_langinfo(CODESET).]) | ||
20 | fi | ||
21 | ]) | ||
diff --git a/m4/fcntl-o.m4 b/m4/fcntl-o.m4 new file mode 100644 index 00000000..d416a61c --- /dev/null +++ b/m4/fcntl-o.m4 | |||
@@ -0,0 +1,81 @@ | |||
1 | # fcntl-o.m4 serial 1 | ||
2 | dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | dnl Written by Paul Eggert. | ||
8 | |||
9 | # Test whether the flags O_NOATIME and O_NOFOLLOW actually work. | ||
10 | # Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise. | ||
11 | # Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise. | ||
12 | AC_DEFUN([gl_FCNTL_O_FLAGS], | ||
13 | [ | ||
14 | dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW. | ||
15 | AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) | ||
16 | AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h], | ||
17 | [AC_RUN_IFELSE( | ||
18 | [AC_LANG_PROGRAM( | ||
19 | [[#include <sys/types.h> | ||
20 | #include <sys/stat.h> | ||
21 | #include <unistd.h> | ||
22 | #include <fcntl.h> | ||
23 | #ifndef O_NOATIME | ||
24 | #define O_NOATIME 0 | ||
25 | #endif | ||
26 | #ifndef O_NOFOLLOW | ||
27 | #define O_NOFOLLOW 0 | ||
28 | #endif | ||
29 | static int const constants[] = | ||
30 | { | ||
31 | O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, | ||
32 | O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY | ||
33 | }; | ||
34 | ]], | ||
35 | [[ | ||
36 | int status = !constants; | ||
37 | { | ||
38 | static char const sym[] = "conftest.sym"; | ||
39 | if (symlink (".", sym) != 0 | ||
40 | || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0) | ||
41 | status |= 32; | ||
42 | unlink (sym); | ||
43 | } | ||
44 | { | ||
45 | static char const file[] = "confdefs.h"; | ||
46 | int fd = open (file, O_RDONLY | O_NOATIME); | ||
47 | char c; | ||
48 | struct stat st0, st1; | ||
49 | if (fd < 0 | ||
50 | || fstat (fd, &st0) != 0 | ||
51 | || sleep (1) != 0 | ||
52 | || read (fd, &c, 1) != 1 | ||
53 | || close (fd) != 0 | ||
54 | || stat (file, &st1) != 0 | ||
55 | || st0.st_atime != st1.st_atime) | ||
56 | status |= 64; | ||
57 | } | ||
58 | return status;]])], | ||
59 | [gl_cv_header_working_fcntl_h=yes], | ||
60 | [case $? in #( | ||
61 | 32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( | ||
62 | 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( | ||
63 | 96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( | ||
64 | *) gl_cv_header_working_fcntl_h='no';; | ||
65 | esac], | ||
66 | [gl_cv_header_working_fcntl_h=cross-compiling])]) | ||
67 | |||
68 | case $gl_cv_header_working_fcntl_h in #( | ||
69 | *O_NOATIME* | no | cross-compiling) ac_val=0;; #( | ||
70 | *) ac_val=1;; | ||
71 | esac | ||
72 | AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val], | ||
73 | [Define to 1 if O_NOATIME works.]) | ||
74 | |||
75 | case $gl_cv_header_working_fcntl_h in #( | ||
76 | *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( | ||
77 | *) ac_val=1;; | ||
78 | esac | ||
79 | AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val], | ||
80 | [Define to 1 if O_NOFOLLOW works.]) | ||
81 | ]) | ||
diff --git a/m4/gettext.m4 b/m4/gettext.m4 new file mode 100644 index 00000000..eef5073b --- /dev/null +++ b/m4/gettext.m4 | |||
@@ -0,0 +1,420 @@ | |||
1 | # gettext.m4 serial 68 (gettext-0.19.8) | ||
2 | dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | dnl | ||
7 | dnl This file can be used in projects which are not available under | ||
8 | dnl the GNU General Public License or the GNU Library General Public | ||
9 | dnl License but which still want to provide support for the GNU gettext | ||
10 | dnl functionality. | ||
11 | dnl Please note that the actual code of the GNU gettext library is covered | ||
12 | dnl by the GNU Library General Public License, and the rest of the GNU | ||
13 | dnl gettext package is covered by the GNU General Public License. | ||
14 | dnl They are *not* in the public domain. | ||
15 | |||
16 | dnl Authors: | ||
17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. | ||
18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010. | ||
19 | |||
20 | dnl Macro to add for using GNU gettext. | ||
21 | |||
22 | dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). | ||
23 | dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The | ||
24 | dnl default (if it is not specified or empty) is 'no-libtool'. | ||
25 | dnl INTLSYMBOL should be 'external' for packages with no intl directory, | ||
26 | dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. | ||
27 | dnl If INTLSYMBOL is 'use-libtool', then a libtool library | ||
28 | dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, | ||
29 | dnl depending on --{enable,disable}-{shared,static} and on the presence of | ||
30 | dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library | ||
31 | dnl $(top_builddir)/intl/libintl.a will be created. | ||
32 | dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext | ||
33 | dnl implementations (in libc or libintl) without the ngettext() function | ||
34 | dnl will be ignored. If NEEDSYMBOL is specified and is | ||
35 | dnl 'need-formatstring-macros', then GNU gettext implementations that don't | ||
36 | dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored. | ||
37 | dnl INTLDIR is used to find the intl libraries. If empty, | ||
38 | dnl the value '$(top_builddir)/intl/' is used. | ||
39 | dnl | ||
40 | dnl The result of the configuration is one of three cases: | ||
41 | dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled | ||
42 | dnl and used. | ||
43 | dnl Catalog format: GNU --> install in $(datadir) | ||
44 | dnl Catalog extension: .mo after installation, .gmo in source tree | ||
45 | dnl 2) GNU gettext has been found in the system's C library. | ||
46 | dnl Catalog format: GNU --> install in $(datadir) | ||
47 | dnl Catalog extension: .mo after installation, .gmo in source tree | ||
48 | dnl 3) No internationalization, always use English msgid. | ||
49 | dnl Catalog format: none | ||
50 | dnl Catalog extension: none | ||
51 | dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. | ||
52 | dnl The use of .gmo is historical (it was needed to avoid overwriting the | ||
53 | dnl GNU format catalogs when building on a platform with an X/Open gettext), | ||
54 | dnl but we keep it in order not to force irrelevant filename changes on the | ||
55 | dnl maintainers. | ||
56 | dnl | ||
57 | AC_DEFUN([AM_GNU_GETTEXT], | ||
58 | [ | ||
59 | dnl Argument checking. | ||
60 | ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , | ||
61 | [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT | ||
62 | ])])])])]) | ||
63 | ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], | ||
64 | [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) | ||
65 | ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , | ||
66 | [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT | ||
67 | ])])])]) | ||
68 | define([gt_included_intl], | ||
69 | ifelse([$1], [external], | ||
70 | ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), | ||
71 | [yes])) | ||
72 | define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) | ||
73 | gt_NEEDS_INIT | ||
74 | AM_GNU_GETTEXT_NEED([$2]) | ||
75 | |||
76 | AC_REQUIRE([AM_PO_SUBDIRS])dnl | ||
77 | ifelse(gt_included_intl, yes, [ | ||
78 | AC_REQUIRE([AM_INTL_SUBDIR])dnl | ||
79 | ]) | ||
80 | |||
81 | dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. | ||
82 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | ||
83 | AC_REQUIRE([AC_LIB_RPATH]) | ||
84 | |||
85 | dnl Sometimes libintl requires libiconv, so first search for libiconv. | ||
86 | dnl Ideally we would do this search only after the | ||
87 | dnl if test "$USE_NLS" = "yes"; then | ||
88 | dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then | ||
89 | dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT | ||
90 | dnl the configure script would need to contain the same shell code | ||
91 | dnl again, outside any 'if'. There are two solutions: | ||
92 | dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. | ||
93 | dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. | ||
94 | dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not | ||
95 | dnl documented, we avoid it. | ||
96 | ifelse(gt_included_intl, yes, , [ | ||
97 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) | ||
98 | ]) | ||
99 | |||
100 | dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation. | ||
101 | gt_INTL_MACOSX | ||
102 | |||
103 | dnl Set USE_NLS. | ||
104 | AC_REQUIRE([AM_NLS]) | ||
105 | |||
106 | ifelse(gt_included_intl, yes, [ | ||
107 | BUILD_INCLUDED_LIBINTL=no | ||
108 | USE_INCLUDED_LIBINTL=no | ||
109 | ]) | ||
110 | LIBINTL= | ||
111 | LTLIBINTL= | ||
112 | POSUB= | ||
113 | |||
114 | dnl Add a version number to the cache macros. | ||
115 | case " $gt_needs " in | ||
116 | *" need-formatstring-macros "*) gt_api_version=3 ;; | ||
117 | *" need-ngettext "*) gt_api_version=2 ;; | ||
118 | *) gt_api_version=1 ;; | ||
119 | esac | ||
120 | gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" | ||
121 | gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" | ||
122 | |||
123 | dnl If we use NLS figure out what method | ||
124 | if test "$USE_NLS" = "yes"; then | ||
125 | gt_use_preinstalled_gnugettext=no | ||
126 | ifelse(gt_included_intl, yes, [ | ||
127 | AC_MSG_CHECKING([whether included gettext is requested]) | ||
128 | AC_ARG_WITH([included-gettext], | ||
129 | [ --with-included-gettext use the GNU gettext library included here], | ||
130 | nls_cv_force_use_gnu_gettext=$withval, | ||
131 | nls_cv_force_use_gnu_gettext=no) | ||
132 | AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) | ||
133 | |||
134 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | ||
135 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | ||
136 | ]) | ||
137 | dnl User does not insist on using GNU NLS library. Figure out what | ||
138 | dnl to use. If GNU gettext is available we use this. Else we have | ||
139 | dnl to fall back to GNU NLS library. | ||
140 | |||
141 | if test $gt_api_version -ge 3; then | ||
142 | gt_revision_test_code=' | ||
143 | #ifndef __GNU_GETTEXT_SUPPORTED_REVISION | ||
144 | #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) | ||
145 | #endif | ||
146 | changequote(,)dnl | ||
147 | typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; | ||
148 | changequote([,])dnl | ||
149 | ' | ||
150 | else | ||
151 | gt_revision_test_code= | ||
152 | fi | ||
153 | if test $gt_api_version -ge 2; then | ||
154 | gt_expression_test_code=' + * ngettext ("", "", 0)' | ||
155 | else | ||
156 | gt_expression_test_code= | ||
157 | fi | ||
158 | |||
159 | AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], | ||
160 | [AC_LINK_IFELSE( | ||
161 | [AC_LANG_PROGRAM( | ||
162 | [[ | ||
163 | #include <libintl.h> | ||
164 | #ifndef __GNU_GETTEXT_SUPPORTED_REVISION | ||
165 | extern int _nl_msg_cat_cntr; | ||
166 | extern int *_nl_domain_bindings; | ||
167 | #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings) | ||
168 | #else | ||
169 | #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 | ||
170 | #endif | ||
171 | $gt_revision_test_code | ||
172 | ]], | ||
173 | [[ | ||
174 | bindtextdomain ("", ""); | ||
175 | return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION | ||
176 | ]])], | ||
177 | [eval "$gt_func_gnugettext_libc=yes"], | ||
178 | [eval "$gt_func_gnugettext_libc=no"])]) | ||
179 | |||
180 | if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then | ||
181 | dnl Sometimes libintl requires libiconv, so first search for libiconv. | ||
182 | ifelse(gt_included_intl, yes, , [ | ||
183 | AM_ICONV_LINK | ||
184 | ]) | ||
185 | dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL | ||
186 | dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) | ||
187 | dnl because that would add "-liconv" to LIBINTL and LTLIBINTL | ||
188 | dnl even if libiconv doesn't exist. | ||
189 | AC_LIB_LINKFLAGS_BODY([intl]) | ||
190 | AC_CACHE_CHECK([for GNU gettext in libintl], | ||
191 | [$gt_func_gnugettext_libintl], | ||
192 | [gt_save_CPPFLAGS="$CPPFLAGS" | ||
193 | CPPFLAGS="$CPPFLAGS $INCINTL" | ||
194 | gt_save_LIBS="$LIBS" | ||
195 | LIBS="$LIBS $LIBINTL" | ||
196 | dnl Now see whether libintl exists and does not depend on libiconv. | ||
197 | AC_LINK_IFELSE( | ||
198 | [AC_LANG_PROGRAM( | ||
199 | [[ | ||
200 | #include <libintl.h> | ||
201 | #ifndef __GNU_GETTEXT_SUPPORTED_REVISION | ||
202 | extern int _nl_msg_cat_cntr; | ||
203 | extern | ||
204 | #ifdef __cplusplus | ||
205 | "C" | ||
206 | #endif | ||
207 | const char *_nl_expand_alias (const char *); | ||
208 | #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) | ||
209 | #else | ||
210 | #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 | ||
211 | #endif | ||
212 | $gt_revision_test_code | ||
213 | ]], | ||
214 | [[ | ||
215 | bindtextdomain ("", ""); | ||
216 | return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION | ||
217 | ]])], | ||
218 | [eval "$gt_func_gnugettext_libintl=yes"], | ||
219 | [eval "$gt_func_gnugettext_libintl=no"]) | ||
220 | dnl Now see whether libintl exists and depends on libiconv. | ||
221 | if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then | ||
222 | LIBS="$LIBS $LIBICONV" | ||
223 | AC_LINK_IFELSE( | ||
224 | [AC_LANG_PROGRAM( | ||
225 | [[ | ||
226 | #include <libintl.h> | ||
227 | #ifndef __GNU_GETTEXT_SUPPORTED_REVISION | ||
228 | extern int _nl_msg_cat_cntr; | ||
229 | extern | ||
230 | #ifdef __cplusplus | ||
231 | "C" | ||
232 | #endif | ||
233 | const char *_nl_expand_alias (const char *); | ||
234 | #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) | ||
235 | #else | ||
236 | #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 | ||
237 | #endif | ||
238 | $gt_revision_test_code | ||
239 | ]], | ||
240 | [[ | ||
241 | bindtextdomain ("", ""); | ||
242 | return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION | ||
243 | ]])], | ||
244 | [LIBINTL="$LIBINTL $LIBICONV" | ||
245 | LTLIBINTL="$LTLIBINTL $LTLIBICONV" | ||
246 | eval "$gt_func_gnugettext_libintl=yes" | ||
247 | ]) | ||
248 | fi | ||
249 | CPPFLAGS="$gt_save_CPPFLAGS" | ||
250 | LIBS="$gt_save_LIBS"]) | ||
251 | fi | ||
252 | |||
253 | dnl If an already present or preinstalled GNU gettext() is found, | ||
254 | dnl use it. But if this macro is used in GNU gettext, and GNU | ||
255 | dnl gettext is already preinstalled in libintl, we update this | ||
256 | dnl libintl. (Cf. the install rule in intl/Makefile.in.) | ||
257 | if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ | ||
258 | || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ | ||
259 | && test "$PACKAGE" != gettext-runtime \ | ||
260 | && test "$PACKAGE" != gettext-tools; }; then | ||
261 | gt_use_preinstalled_gnugettext=yes | ||
262 | else | ||
263 | dnl Reset the values set by searching for libintl. | ||
264 | LIBINTL= | ||
265 | LTLIBINTL= | ||
266 | INCINTL= | ||
267 | fi | ||
268 | |||
269 | ifelse(gt_included_intl, yes, [ | ||
270 | if test "$gt_use_preinstalled_gnugettext" != "yes"; then | ||
271 | dnl GNU gettext is not found in the C library. | ||
272 | dnl Fall back on included GNU gettext library. | ||
273 | nls_cv_use_gnu_gettext=yes | ||
274 | fi | ||
275 | fi | ||
276 | |||
277 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | ||
278 | dnl Mark actions used to generate GNU NLS library. | ||
279 | BUILD_INCLUDED_LIBINTL=yes | ||
280 | USE_INCLUDED_LIBINTL=yes | ||
281 | LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" | ||
282 | LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" | ||
283 | LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` | ||
284 | fi | ||
285 | |||
286 | CATOBJEXT= | ||
287 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ | ||
288 | || test "$nls_cv_use_gnu_gettext" = "yes"; then | ||
289 | dnl Mark actions to use GNU gettext tools. | ||
290 | CATOBJEXT=.gmo | ||
291 | fi | ||
292 | ]) | ||
293 | |||
294 | if test -n "$INTL_MACOSX_LIBS"; then | ||
295 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ | ||
296 | || test "$nls_cv_use_gnu_gettext" = "yes"; then | ||
297 | dnl Some extra flags are needed during linking. | ||
298 | LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" | ||
299 | LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" | ||
300 | fi | ||
301 | fi | ||
302 | |||
303 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ | ||
304 | || test "$nls_cv_use_gnu_gettext" = "yes"; then | ||
305 | AC_DEFINE([ENABLE_NLS], [1], | ||
306 | [Define to 1 if translation of program messages to the user's native language | ||
307 | is requested.]) | ||
308 | else | ||
309 | USE_NLS=no | ||
310 | fi | ||
311 | fi | ||
312 | |||
313 | AC_MSG_CHECKING([whether to use NLS]) | ||
314 | AC_MSG_RESULT([$USE_NLS]) | ||
315 | if test "$USE_NLS" = "yes"; then | ||
316 | AC_MSG_CHECKING([where the gettext function comes from]) | ||
317 | if test "$gt_use_preinstalled_gnugettext" = "yes"; then | ||
318 | if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then | ||
319 | gt_source="external libintl" | ||
320 | else | ||
321 | gt_source="libc" | ||
322 | fi | ||
323 | else | ||
324 | gt_source="included intl directory" | ||
325 | fi | ||
326 | AC_MSG_RESULT([$gt_source]) | ||
327 | fi | ||
328 | |||
329 | if test "$USE_NLS" = "yes"; then | ||
330 | |||
331 | if test "$gt_use_preinstalled_gnugettext" = "yes"; then | ||
332 | if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then | ||
333 | AC_MSG_CHECKING([how to link with libintl]) | ||
334 | AC_MSG_RESULT([$LIBINTL]) | ||
335 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) | ||
336 | fi | ||
337 | |||
338 | dnl For backward compatibility. Some packages may be using this. | ||
339 | AC_DEFINE([HAVE_GETTEXT], [1], | ||
340 | [Define if the GNU gettext() function is already present or preinstalled.]) | ||
341 | AC_DEFINE([HAVE_DCGETTEXT], [1], | ||
342 | [Define if the GNU dcgettext() function is already present or preinstalled.]) | ||
343 | fi | ||
344 | |||
345 | dnl We need to process the po/ directory. | ||
346 | POSUB=po | ||
347 | fi | ||
348 | |||
349 | ifelse(gt_included_intl, yes, [ | ||
350 | dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL | ||
351 | dnl to 'yes' because some of the testsuite requires it. | ||
352 | if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then | ||
353 | BUILD_INCLUDED_LIBINTL=yes | ||
354 | fi | ||
355 | |||
356 | dnl Make all variables we use known to autoconf. | ||
357 | AC_SUBST([BUILD_INCLUDED_LIBINTL]) | ||
358 | AC_SUBST([USE_INCLUDED_LIBINTL]) | ||
359 | AC_SUBST([CATOBJEXT]) | ||
360 | |||
361 | dnl For backward compatibility. Some configure.ins may be using this. | ||
362 | nls_cv_header_intl= | ||
363 | nls_cv_header_libgt= | ||
364 | |||
365 | dnl For backward compatibility. Some Makefiles may be using this. | ||
366 | DATADIRNAME=share | ||
367 | AC_SUBST([DATADIRNAME]) | ||
368 | |||
369 | dnl For backward compatibility. Some Makefiles may be using this. | ||
370 | INSTOBJEXT=.mo | ||
371 | AC_SUBST([INSTOBJEXT]) | ||
372 | |||
373 | dnl For backward compatibility. Some Makefiles may be using this. | ||
374 | GENCAT=gencat | ||
375 | AC_SUBST([GENCAT]) | ||
376 | |||
377 | dnl For backward compatibility. Some Makefiles may be using this. | ||
378 | INTLOBJS= | ||
379 | if test "$USE_INCLUDED_LIBINTL" = yes; then | ||
380 | INTLOBJS="\$(GETTOBJS)" | ||
381 | fi | ||
382 | AC_SUBST([INTLOBJS]) | ||
383 | |||
384 | dnl Enable libtool support if the surrounding package wishes it. | ||
385 | INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix | ||
386 | AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) | ||
387 | ]) | ||
388 | |||
389 | dnl For backward compatibility. Some Makefiles may be using this. | ||
390 | INTLLIBS="$LIBINTL" | ||
391 | AC_SUBST([INTLLIBS]) | ||
392 | |||
393 | dnl Make all documented variables known to autoconf. | ||
394 | AC_SUBST([LIBINTL]) | ||
395 | AC_SUBST([LTLIBINTL]) | ||
396 | AC_SUBST([POSUB]) | ||
397 | ]) | ||
398 | |||
399 | |||
400 | dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. | ||
401 | m4_define([gt_NEEDS_INIT], | ||
402 | [ | ||
403 | m4_divert_text([DEFAULTS], [gt_needs=]) | ||
404 | m4_define([gt_NEEDS_INIT], []) | ||
405 | ]) | ||
406 | |||
407 | |||
408 | dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) | ||
409 | AC_DEFUN([AM_GNU_GETTEXT_NEED], | ||
410 | [ | ||
411 | m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) | ||
412 | ]) | ||
413 | |||
414 | |||
415 | dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) | ||
416 | AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) | ||
417 | |||
418 | |||
419 | dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version]) | ||
420 | AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], []) | ||
diff --git a/m4/glibc2.m4 b/m4/glibc2.m4 new file mode 100644 index 00000000..f148c12c --- /dev/null +++ b/m4/glibc2.m4 | |||
@@ -0,0 +1,30 @@ | |||
1 | # glibc2.m4 serial 2 | ||
2 | dnl Copyright (C) 2000-2002, 2004, 2008-2010 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | # Test for the GNU C Library, version 2.0 or newer. | ||
8 | # From Bruno Haible. | ||
9 | |||
10 | AC_DEFUN([gt_GLIBC2], | ||
11 | [ | ||
12 | AC_CACHE_CHECK([whether we are using the GNU C Library 2 or newer], | ||
13 | [ac_cv_gnu_library_2], | ||
14 | [AC_EGREP_CPP([Lucky GNU user], | ||
15 | [ | ||
16 | #include <features.h> | ||
17 | #ifdef __GNU_LIBRARY__ | ||
18 | #if (__GLIBC__ >= 2) | ||
19 | Lucky GNU user | ||
20 | #endif | ||
21 | #endif | ||
22 | ], | ||
23 | [ac_cv_gnu_library_2=yes], | ||
24 | [ac_cv_gnu_library_2=no]) | ||
25 | ] | ||
26 | ) | ||
27 | AC_SUBST([GLIBC2]) | ||
28 | GLIBC2="$ac_cv_gnu_library_2" | ||
29 | ] | ||
30 | ) | ||
diff --git a/m4/glibc21.m4 b/m4/glibc21.m4 new file mode 100644 index 00000000..68ada9d4 --- /dev/null +++ b/m4/glibc21.m4 | |||
@@ -0,0 +1,30 @@ | |||
1 | # glibc21.m4 serial 4 | ||
2 | dnl Copyright (C) 2000-2002, 2004, 2008-2010 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | # Test for the GNU C Library, version 2.1 or newer. | ||
8 | # From Bruno Haible. | ||
9 | |||
10 | AC_DEFUN([gl_GLIBC21], | ||
11 | [ | ||
12 | AC_CACHE_CHECK([whether we are using the GNU C Library 2.1 or newer], | ||
13 | [ac_cv_gnu_library_2_1], | ||
14 | [AC_EGREP_CPP([Lucky GNU user], | ||
15 | [ | ||
16 | #include <features.h> | ||
17 | #ifdef __GNU_LIBRARY__ | ||
18 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) | ||
19 | Lucky GNU user | ||
20 | #endif | ||
21 | #endif | ||
22 | ], | ||
23 | [ac_cv_gnu_library_2_1=yes], | ||
24 | [ac_cv_gnu_library_2_1=no]) | ||
25 | ] | ||
26 | ) | ||
27 | AC_SUBST([GLIBC21]) | ||
28 | GLIBC21="$ac_cv_gnu_library_2_1" | ||
29 | ] | ||
30 | ) | ||
diff --git a/m4/iconv.m4 b/m4/iconv.m4 new file mode 100644 index 00000000..aa159c53 --- /dev/null +++ b/m4/iconv.m4 | |||
@@ -0,0 +1,271 @@ | |||
1 | # iconv.m4 serial 19 (gettext-0.18.2) | ||
2 | dnl Copyright (C) 2000-2002, 2007-2014, 2016 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | dnl From Bruno Haible. | ||
8 | |||
9 | AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], | ||
10 | [ | ||
11 | dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. | ||
12 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | ||
13 | AC_REQUIRE([AC_LIB_RPATH]) | ||
14 | |||
15 | dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV | ||
16 | dnl accordingly. | ||
17 | AC_LIB_LINKFLAGS_BODY([iconv]) | ||
18 | ]) | ||
19 | |||
20 | AC_DEFUN([AM_ICONV_LINK], | ||
21 | [ | ||
22 | dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and | ||
23 | dnl those with the standalone portable GNU libiconv installed). | ||
24 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles | ||
25 | |||
26 | dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV | ||
27 | dnl accordingly. | ||
28 | AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) | ||
29 | |||
30 | dnl Add $INCICONV to CPPFLAGS before performing the following checks, | ||
31 | dnl because if the user has installed libiconv and not disabled its use | ||
32 | dnl via --without-libiconv-prefix, he wants to use it. The first | ||
33 | dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. | ||
34 | am_save_CPPFLAGS="$CPPFLAGS" | ||
35 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) | ||
36 | |||
37 | AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ | ||
38 | am_cv_func_iconv="no, consider installing GNU libiconv" | ||
39 | am_cv_lib_iconv=no | ||
40 | AC_LINK_IFELSE( | ||
41 | [AC_LANG_PROGRAM( | ||
42 | [[ | ||
43 | #include <stdlib.h> | ||
44 | #include <iconv.h> | ||
45 | ]], | ||
46 | [[iconv_t cd = iconv_open("",""); | ||
47 | iconv(cd,NULL,NULL,NULL,NULL); | ||
48 | iconv_close(cd);]])], | ||
49 | [am_cv_func_iconv=yes]) | ||
50 | if test "$am_cv_func_iconv" != yes; then | ||
51 | am_save_LIBS="$LIBS" | ||
52 | LIBS="$LIBS $LIBICONV" | ||
53 | AC_LINK_IFELSE( | ||
54 | [AC_LANG_PROGRAM( | ||
55 | [[ | ||
56 | #include <stdlib.h> | ||
57 | #include <iconv.h> | ||
58 | ]], | ||
59 | [[iconv_t cd = iconv_open("",""); | ||
60 | iconv(cd,NULL,NULL,NULL,NULL); | ||
61 | iconv_close(cd);]])], | ||
62 | [am_cv_lib_iconv=yes] | ||
63 | [am_cv_func_iconv=yes]) | ||
64 | LIBS="$am_save_LIBS" | ||
65 | fi | ||
66 | ]) | ||
67 | if test "$am_cv_func_iconv" = yes; then | ||
68 | AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ | ||
69 | dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, | ||
70 | dnl Solaris 10. | ||
71 | am_save_LIBS="$LIBS" | ||
72 | if test $am_cv_lib_iconv = yes; then | ||
73 | LIBS="$LIBS $LIBICONV" | ||
74 | fi | ||
75 | am_cv_func_iconv_works=no | ||
76 | for ac_iconv_const in '' 'const'; do | ||
77 | AC_RUN_IFELSE( | ||
78 | [AC_LANG_PROGRAM( | ||
79 | [[ | ||
80 | #include <iconv.h> | ||
81 | #include <string.h> | ||
82 | |||
83 | #ifndef ICONV_CONST | ||
84 | # define ICONV_CONST $ac_iconv_const | ||
85 | #endif | ||
86 | ]], | ||
87 | [[int result = 0; | ||
88 | /* Test against AIX 5.1 bug: Failures are not distinguishable from successful | ||
89 | returns. */ | ||
90 | { | ||
91 | iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); | ||
92 | if (cd_utf8_to_88591 != (iconv_t)(-1)) | ||
93 | { | ||
94 | static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ | ||
95 | char buf[10]; | ||
96 | ICONV_CONST char *inptr = input; | ||
97 | size_t inbytesleft = strlen (input); | ||
98 | char *outptr = buf; | ||
99 | size_t outbytesleft = sizeof (buf); | ||
100 | size_t res = iconv (cd_utf8_to_88591, | ||
101 | &inptr, &inbytesleft, | ||
102 | &outptr, &outbytesleft); | ||
103 | if (res == 0) | ||
104 | result |= 1; | ||
105 | iconv_close (cd_utf8_to_88591); | ||
106 | } | ||
107 | } | ||
108 | /* Test against Solaris 10 bug: Failures are not distinguishable from | ||
109 | successful returns. */ | ||
110 | { | ||
111 | iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); | ||
112 | if (cd_ascii_to_88591 != (iconv_t)(-1)) | ||
113 | { | ||
114 | static ICONV_CONST char input[] = "\263"; | ||
115 | char buf[10]; | ||
116 | ICONV_CONST char *inptr = input; | ||
117 | size_t inbytesleft = strlen (input); | ||
118 | char *outptr = buf; | ||
119 | size_t outbytesleft = sizeof (buf); | ||
120 | size_t res = iconv (cd_ascii_to_88591, | ||
121 | &inptr, &inbytesleft, | ||
122 | &outptr, &outbytesleft); | ||
123 | if (res == 0) | ||
124 | result |= 2; | ||
125 | iconv_close (cd_ascii_to_88591); | ||
126 | } | ||
127 | } | ||
128 | /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ | ||
129 | { | ||
130 | iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); | ||
131 | if (cd_88591_to_utf8 != (iconv_t)(-1)) | ||
132 | { | ||
133 | static ICONV_CONST char input[] = "\304"; | ||
134 | static char buf[2] = { (char)0xDE, (char)0xAD }; | ||
135 | ICONV_CONST char *inptr = input; | ||
136 | size_t inbytesleft = 1; | ||
137 | char *outptr = buf; | ||
138 | size_t outbytesleft = 1; | ||
139 | size_t res = iconv (cd_88591_to_utf8, | ||
140 | &inptr, &inbytesleft, | ||
141 | &outptr, &outbytesleft); | ||
142 | if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) | ||
143 | result |= 4; | ||
144 | iconv_close (cd_88591_to_utf8); | ||
145 | } | ||
146 | } | ||
147 | #if 0 /* This bug could be worked around by the caller. */ | ||
148 | /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ | ||
149 | { | ||
150 | iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); | ||
151 | if (cd_88591_to_utf8 != (iconv_t)(-1)) | ||
152 | { | ||
153 | static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; | ||
154 | char buf[50]; | ||
155 | ICONV_CONST char *inptr = input; | ||
156 | size_t inbytesleft = strlen (input); | ||
157 | char *outptr = buf; | ||
158 | size_t outbytesleft = sizeof (buf); | ||
159 | size_t res = iconv (cd_88591_to_utf8, | ||
160 | &inptr, &inbytesleft, | ||
161 | &outptr, &outbytesleft); | ||
162 | if ((int)res > 0) | ||
163 | result |= 8; | ||
164 | iconv_close (cd_88591_to_utf8); | ||
165 | } | ||
166 | } | ||
167 | #endif | ||
168 | /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is | ||
169 | provided. */ | ||
170 | if (/* Try standardized names. */ | ||
171 | iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) | ||
172 | /* Try IRIX, OSF/1 names. */ | ||
173 | && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) | ||
174 | /* Try AIX names. */ | ||
175 | && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) | ||
176 | /* Try HP-UX names. */ | ||
177 | && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) | ||
178 | result |= 16; | ||
179 | return result; | ||
180 | ]])], | ||
181 | [am_cv_func_iconv_works=yes], , | ||
182 | [case "$host_os" in | ||
183 | aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; | ||
184 | *) am_cv_func_iconv_works="guessing yes" ;; | ||
185 | esac]) | ||
186 | test "$am_cv_func_iconv_works" = no || break | ||
187 | done | ||
188 | LIBS="$am_save_LIBS" | ||
189 | ]) | ||
190 | case "$am_cv_func_iconv_works" in | ||
191 | *no) am_func_iconv=no am_cv_lib_iconv=no ;; | ||
192 | *) am_func_iconv=yes ;; | ||
193 | esac | ||
194 | else | ||
195 | am_func_iconv=no am_cv_lib_iconv=no | ||
196 | fi | ||
197 | if test "$am_func_iconv" = yes; then | ||
198 | AC_DEFINE([HAVE_ICONV], [1], | ||
199 | [Define if you have the iconv() function and it works.]) | ||
200 | fi | ||
201 | if test "$am_cv_lib_iconv" = yes; then | ||
202 | AC_MSG_CHECKING([how to link with libiconv]) | ||
203 | AC_MSG_RESULT([$LIBICONV]) | ||
204 | else | ||
205 | dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV | ||
206 | dnl either. | ||
207 | CPPFLAGS="$am_save_CPPFLAGS" | ||
208 | LIBICONV= | ||
209 | LTLIBICONV= | ||
210 | fi | ||
211 | AC_SUBST([LIBICONV]) | ||
212 | AC_SUBST([LTLIBICONV]) | ||
213 | ]) | ||
214 | |||
215 | dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to | ||
216 | dnl avoid warnings like | ||
217 | dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". | ||
218 | dnl This is tricky because of the way 'aclocal' is implemented: | ||
219 | dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. | ||
220 | dnl Otherwise aclocal's initial scan pass would miss the macro definition. | ||
221 | dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. | ||
222 | dnl Otherwise aclocal would emit many "Use of uninitialized value $1" | ||
223 | dnl warnings. | ||
224 | m4_define([gl_iconv_AC_DEFUN], | ||
225 | m4_version_prereq([2.64], | ||
226 | [[AC_DEFUN_ONCE( | ||
227 | [$1], [$2])]], | ||
228 | [m4_ifdef([gl_00GNULIB], | ||
229 | [[AC_DEFUN_ONCE( | ||
230 | [$1], [$2])]], | ||
231 | [[AC_DEFUN( | ||
232 | [$1], [$2])]])])) | ||
233 | gl_iconv_AC_DEFUN([AM_ICONV], | ||
234 | [ | ||
235 | AM_ICONV_LINK | ||
236 | if test "$am_cv_func_iconv" = yes; then | ||
237 | AC_MSG_CHECKING([for iconv declaration]) | ||
238 | AC_CACHE_VAL([am_cv_proto_iconv], [ | ||
239 | AC_COMPILE_IFELSE( | ||
240 | [AC_LANG_PROGRAM( | ||
241 | [[ | ||
242 | #include <stdlib.h> | ||
243 | #include <iconv.h> | ||
244 | extern | ||
245 | #ifdef __cplusplus | ||
246 | "C" | ||
247 | #endif | ||
248 | #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) | ||
249 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | ||
250 | #else | ||
251 | size_t iconv(); | ||
252 | #endif | ||
253 | ]], | ||
254 | [[]])], | ||
255 | [am_cv_proto_iconv_arg1=""], | ||
256 | [am_cv_proto_iconv_arg1="const"]) | ||
257 | am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) | ||
258 | am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | ||
259 | AC_MSG_RESULT([ | ||
260 | $am_cv_proto_iconv]) | ||
261 | AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], | ||
262 | [Define as const if the declaration of iconv() needs const.]) | ||
263 | dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>. | ||
264 | m4_ifdef([gl_ICONV_H_DEFAULTS], | ||
265 | [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) | ||
266 | if test -n "$am_cv_proto_iconv_arg1"; then | ||
267 | ICONV_CONST="const" | ||
268 | fi | ||
269 | ]) | ||
270 | fi | ||
271 | ]) | ||
diff --git a/m4/intdiv0.m4 b/m4/intdiv0.m4 new file mode 100644 index 00000000..289c4df5 --- /dev/null +++ b/m4/intdiv0.m4 | |||
@@ -0,0 +1,84 @@ | |||
1 | # intdiv0.m4 serial 3 (gettext-0.18) | ||
2 | dnl Copyright (C) 2002, 2007-2010 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | dnl From Bruno Haible. | ||
8 | |||
9 | AC_DEFUN([gt_INTDIV0], | ||
10 | [ | ||
11 | AC_REQUIRE([AC_PROG_CC])dnl | ||
12 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
13 | |||
14 | AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], | ||
15 | gt_cv_int_divbyzero_sigfpe, | ||
16 | [ | ||
17 | gt_cv_int_divbyzero_sigfpe= | ||
18 | changequote(,)dnl | ||
19 | case "$host_os" in | ||
20 | macos* | darwin[6-9]* | darwin[1-9][0-9]*) | ||
21 | # On MacOS X 10.2 or newer, just assume the same as when cross- | ||
22 | # compiling. If we were to perform the real test, 1 Crash Report | ||
23 | # dialog window would pop up. | ||
24 | case "$host_cpu" in | ||
25 | i[34567]86 | x86_64) | ||
26 | gt_cv_int_divbyzero_sigfpe="guessing yes" ;; | ||
27 | esac | ||
28 | ;; | ||
29 | esac | ||
30 | changequote([,])dnl | ||
31 | if test -z "$gt_cv_int_divbyzero_sigfpe"; then | ||
32 | AC_TRY_RUN([ | ||
33 | #include <stdlib.h> | ||
34 | #include <signal.h> | ||
35 | |||
36 | static void | ||
37 | sigfpe_handler (int sig) | ||
38 | { | ||
39 | /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ | ||
40 | exit (sig != SIGFPE); | ||
41 | } | ||
42 | |||
43 | int x = 1; | ||
44 | int y = 0; | ||
45 | int z; | ||
46 | int nan; | ||
47 | |||
48 | int main () | ||
49 | { | ||
50 | signal (SIGFPE, sigfpe_handler); | ||
51 | /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ | ||
52 | #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) | ||
53 | signal (SIGTRAP, sigfpe_handler); | ||
54 | #endif | ||
55 | /* Linux/SPARC yields signal SIGILL. */ | ||
56 | #if defined (__sparc__) && defined (__linux__) | ||
57 | signal (SIGILL, sigfpe_handler); | ||
58 | #endif | ||
59 | |||
60 | z = x / y; | ||
61 | nan = y / y; | ||
62 | exit (1); | ||
63 | } | ||
64 | ], [gt_cv_int_divbyzero_sigfpe=yes], [gt_cv_int_divbyzero_sigfpe=no], | ||
65 | [ | ||
66 | # Guess based on the CPU. | ||
67 | changequote(,)dnl | ||
68 | case "$host_cpu" in | ||
69 | alpha* | i[34567]86 | x86_64 | m68k | s390*) | ||
70 | gt_cv_int_divbyzero_sigfpe="guessing yes";; | ||
71 | *) | ||
72 | gt_cv_int_divbyzero_sigfpe="guessing no";; | ||
73 | esac | ||
74 | changequote([,])dnl | ||
75 | ]) | ||
76 | fi | ||
77 | ]) | ||
78 | case "$gt_cv_int_divbyzero_sigfpe" in | ||
79 | *yes) value=1;; | ||
80 | *) value=0;; | ||
81 | esac | ||
82 | AC_DEFINE_UNQUOTED([INTDIV0_RAISES_SIGFPE], [$value], | ||
83 | [Define if integer division by zero raises signal SIGFPE.]) | ||
84 | ]) | ||
diff --git a/m4/intl.m4 b/m4/intl.m4 new file mode 100644 index 00000000..335b23c2 --- /dev/null +++ b/m4/intl.m4 | |||
@@ -0,0 +1,294 @@ | |||
1 | # intl.m4 serial 17 (gettext-0.18) | ||
2 | dnl Copyright (C) 1995-2009 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | dnl | ||
7 | dnl This file can can be used in projects which are not available under | ||
8 | dnl the GNU General Public License or the GNU Library General Public | ||
9 | dnl License but which still want to provide support for the GNU gettext | ||
10 | dnl functionality. | ||
11 | dnl Please note that the actual code of the GNU gettext library is covered | ||
12 | dnl by the GNU Library General Public License, and the rest of the GNU | ||
13 | dnl gettext package package is covered by the GNU General Public License. | ||
14 | dnl They are *not* in the public domain. | ||
15 | |||
16 | dnl Authors: | ||
17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. | ||
18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2009. | ||
19 | |||
20 | AC_PREREQ([2.52]) | ||
21 | |||
22 | dnl Checks for all prerequisites of the intl subdirectory, | ||
23 | dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, | ||
24 | dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. | ||
25 | AC_DEFUN([AM_INTL_SUBDIR], | ||
26 | [ | ||
27 | AC_REQUIRE([AC_PROG_INSTALL])dnl | ||
28 | AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake | ||
29 | AC_REQUIRE([AC_PROG_CC])dnl | ||
30 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
31 | AC_REQUIRE([gt_GLIBC2])dnl | ||
32 | AC_REQUIRE([AC_PROG_RANLIB])dnl | ||
33 | AC_REQUIRE([gl_VISIBILITY])dnl | ||
34 | AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl | ||
35 | AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl | ||
36 | AC_REQUIRE([gt_TYPE_WCHAR_T])dnl | ||
37 | AC_REQUIRE([gt_TYPE_WINT_T])dnl | ||
38 | AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) | ||
39 | AC_REQUIRE([gt_TYPE_INTMAX_T]) | ||
40 | AC_REQUIRE([gt_PRINTF_POSIX]) | ||
41 | AC_REQUIRE([gl_GLIBC21])dnl | ||
42 | AC_REQUIRE([gl_XSIZE])dnl | ||
43 | AC_REQUIRE([gl_FCNTL_O_FLAGS])dnl | ||
44 | AC_REQUIRE([gt_INTL_MACOSX])dnl | ||
45 | |||
46 | dnl Support for automake's --enable-silent-rules. | ||
47 | case "$enable_silent_rules" in | ||
48 | yes) INTL_DEFAULT_VERBOSITY=0;; | ||
49 | no) INTL_DEFAULT_VERBOSITY=1;; | ||
50 | *) INTL_DEFAULT_VERBOSITY=1;; | ||
51 | esac | ||
52 | AC_SUBST([INTL_DEFAULT_VERBOSITY]) | ||
53 | |||
54 | AC_CHECK_TYPE([ptrdiff_t], , | ||
55 | [AC_DEFINE([ptrdiff_t], [long], | ||
56 | [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) | ||
57 | ]) | ||
58 | AC_CHECK_HEADERS([stddef.h stdlib.h string.h]) | ||
59 | AC_CHECK_FUNCS([asprintf fwprintf newlocale putenv setenv setlocale \ | ||
60 | snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb]) | ||
61 | |||
62 | dnl Use the _snprintf function only if it is declared (because on NetBSD it | ||
63 | dnl is defined as a weak alias of snprintf; we prefer to use the latter). | ||
64 | gt_CHECK_DECL(_snprintf, [#include <stdio.h>]) | ||
65 | gt_CHECK_DECL(_snwprintf, [#include <stdio.h>]) | ||
66 | |||
67 | dnl Use the *_unlocked functions only if they are declared. | ||
68 | dnl (because some of them were defined without being declared in Solaris | ||
69 | dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built | ||
70 | dnl on Solaris 2.5.1 to run on Solaris 2.6). | ||
71 | dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. | ||
72 | gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>]) | ||
73 | |||
74 | case $gt_cv_func_printf_posix in | ||
75 | *yes) HAVE_POSIX_PRINTF=1 ;; | ||
76 | *) HAVE_POSIX_PRINTF=0 ;; | ||
77 | esac | ||
78 | AC_SUBST([HAVE_POSIX_PRINTF]) | ||
79 | if test "$ac_cv_func_asprintf" = yes; then | ||
80 | HAVE_ASPRINTF=1 | ||
81 | else | ||
82 | HAVE_ASPRINTF=0 | ||
83 | fi | ||
84 | AC_SUBST([HAVE_ASPRINTF]) | ||
85 | if test "$ac_cv_func_snprintf" = yes; then | ||
86 | HAVE_SNPRINTF=1 | ||
87 | else | ||
88 | HAVE_SNPRINTF=0 | ||
89 | fi | ||
90 | AC_SUBST([HAVE_SNPRINTF]) | ||
91 | if test "$ac_cv_func_newlocale" = yes; then | ||
92 | HAVE_NEWLOCALE=1 | ||
93 | else | ||
94 | HAVE_NEWLOCALE=0 | ||
95 | fi | ||
96 | AC_SUBST([HAVE_NEWLOCALE]) | ||
97 | if test "$ac_cv_func_wprintf" = yes; then | ||
98 | HAVE_WPRINTF=1 | ||
99 | else | ||
100 | HAVE_WPRINTF=0 | ||
101 | fi | ||
102 | AC_SUBST([HAVE_WPRINTF]) | ||
103 | |||
104 | AM_LANGINFO_CODESET | ||
105 | gt_LC_MESSAGES | ||
106 | |||
107 | dnl Compilation on mingw and Cygwin needs special Makefile rules, because | ||
108 | dnl 1. when we install a shared library, we must arrange to export | ||
109 | dnl auxiliary pointer variables for every exported variable, | ||
110 | dnl 2. when we install a shared library and a static library simultaneously, | ||
111 | dnl the include file specifies __declspec(dllimport) and therefore we | ||
112 | dnl must arrange to define the auxiliary pointer variables for the | ||
113 | dnl exported variables _also_ in the static library. | ||
114 | if test "$enable_shared" = yes; then | ||
115 | case "$host_os" in | ||
116 | mingw* | cygwin*) is_woe32dll=yes ;; | ||
117 | *) is_woe32dll=no ;; | ||
118 | esac | ||
119 | else | ||
120 | is_woe32dll=no | ||
121 | fi | ||
122 | WOE32DLL=$is_woe32dll | ||
123 | AC_SUBST([WOE32DLL]) | ||
124 | |||
125 | dnl On mingw and Cygwin, we can activate special Makefile rules which add | ||
126 | dnl version information to the shared libraries and executables. | ||
127 | case "$host_os" in | ||
128 | mingw* | cygwin*) is_woe32=yes ;; | ||
129 | *) is_woe32=no ;; | ||
130 | esac | ||
131 | WOE32=$is_woe32 | ||
132 | AC_SUBST([WOE32]) | ||
133 | if test $WOE32 = yes; then | ||
134 | dnl Check for a program that compiles Windows resource files. | ||
135 | AC_CHECK_TOOL([WINDRES], [windres]) | ||
136 | fi | ||
137 | |||
138 | dnl Determine whether when creating a library, "-lc" should be passed to | ||
139 | dnl libtool or not. On many platforms, it is required for the libtool option | ||
140 | dnl -no-undefined to work. On HP-UX, however, the -lc - stored by libtool | ||
141 | dnl in the *.la files - makes it impossible to create multithreaded programs, | ||
142 | dnl because libtool also reorders the -lc to come before the -pthread, and | ||
143 | dnl this disables pthread_create() <http://docs.hp.com/en/1896/pthreads.html>. | ||
144 | case "$host_os" in | ||
145 | hpux*) LTLIBC="" ;; | ||
146 | *) LTLIBC="-lc" ;; | ||
147 | esac | ||
148 | AC_SUBST([LTLIBC]) | ||
149 | |||
150 | dnl Rename some macros and functions used for locking. | ||
151 | AH_BOTTOM([ | ||
152 | #define __libc_lock_t gl_lock_t | ||
153 | #define __libc_lock_define gl_lock_define | ||
154 | #define __libc_lock_define_initialized gl_lock_define_initialized | ||
155 | #define __libc_lock_init gl_lock_init | ||
156 | #define __libc_lock_lock gl_lock_lock | ||
157 | #define __libc_lock_unlock gl_lock_unlock | ||
158 | #define __libc_lock_recursive_t gl_recursive_lock_t | ||
159 | #define __libc_lock_define_recursive gl_recursive_lock_define | ||
160 | #define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized | ||
161 | #define __libc_lock_init_recursive gl_recursive_lock_init | ||
162 | #define __libc_lock_lock_recursive gl_recursive_lock_lock | ||
163 | #define __libc_lock_unlock_recursive gl_recursive_lock_unlock | ||
164 | #define glthread_in_use libintl_thread_in_use | ||
165 | #define glthread_lock_init_func libintl_lock_init_func | ||
166 | #define glthread_lock_lock_func libintl_lock_lock_func | ||
167 | #define glthread_lock_unlock_func libintl_lock_unlock_func | ||
168 | #define glthread_lock_destroy_func libintl_lock_destroy_func | ||
169 | #define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded | ||
170 | #define glthread_rwlock_init_func libintl_rwlock_init_func | ||
171 | #define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded | ||
172 | #define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func | ||
173 | #define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded | ||
174 | #define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func | ||
175 | #define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded | ||
176 | #define glthread_rwlock_unlock_func libintl_rwlock_unlock_func | ||
177 | #define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded | ||
178 | #define glthread_rwlock_destroy_func libintl_rwlock_destroy_func | ||
179 | #define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded | ||
180 | #define glthread_recursive_lock_init_func libintl_recursive_lock_init_func | ||
181 | #define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded | ||
182 | #define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func | ||
183 | #define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded | ||
184 | #define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func | ||
185 | #define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded | ||
186 | #define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func | ||
187 | #define glthread_once_func libintl_once_func | ||
188 | #define glthread_once_singlethreaded libintl_once_singlethreaded | ||
189 | #define glthread_once_multithreaded libintl_once_multithreaded | ||
190 | ]) | ||
191 | ]) | ||
192 | |||
193 | |||
194 | dnl Checks for the core files of the intl subdirectory: | ||
195 | dnl dcigettext.c | ||
196 | dnl eval-plural.h | ||
197 | dnl explodename.c | ||
198 | dnl finddomain.c | ||
199 | dnl gettextP.h | ||
200 | dnl gmo.h | ||
201 | dnl hash-string.h hash-string.c | ||
202 | dnl l10nflist.c | ||
203 | dnl libgnuintl.h.in (except the *printf stuff) | ||
204 | dnl loadinfo.h | ||
205 | dnl loadmsgcat.c | ||
206 | dnl localealias.c | ||
207 | dnl log.c | ||
208 | dnl plural-exp.h plural-exp.c | ||
209 | dnl plural.y | ||
210 | dnl Used by libglocale. | ||
211 | AC_DEFUN([gt_INTL_SUBDIR_CORE], | ||
212 | [ | ||
213 | AC_REQUIRE([AC_C_INLINE])dnl | ||
214 | AC_REQUIRE([AC_TYPE_SIZE_T])dnl | ||
215 | AC_REQUIRE([gl_AC_HEADER_STDINT_H]) | ||
216 | AC_REQUIRE([AC_FUNC_ALLOCA])dnl | ||
217 | AC_REQUIRE([AC_FUNC_MMAP])dnl | ||
218 | AC_REQUIRE([gt_INTDIV0])dnl | ||
219 | AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl | ||
220 | AC_REQUIRE([gt_INTTYPES_PRI])dnl | ||
221 | AC_REQUIRE([gl_LOCK])dnl | ||
222 | |||
223 | AC_TRY_LINK( | ||
224 | [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }], | ||
225 | [], | ||
226 | [AC_DEFINE([HAVE_BUILTIN_EXPECT], [1], | ||
227 | [Define to 1 if the compiler understands __builtin_expect.])]) | ||
228 | |||
229 | AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h]) | ||
230 | AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \ | ||
231 | stpcpy strcasecmp strdup strtoul tsearch uselocale argz_count \ | ||
232 | argz_stringify argz_next __fsetlocking]) | ||
233 | |||
234 | dnl Use the *_unlocked functions only if they are declared. | ||
235 | dnl (because some of them were defined without being declared in Solaris | ||
236 | dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built | ||
237 | dnl on Solaris 2.5.1 to run on Solaris 2.6). | ||
238 | dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. | ||
239 | gt_CHECK_DECL([feof_unlocked], [#include <stdio.h>]) | ||
240 | gt_CHECK_DECL([fgets_unlocked], [#include <stdio.h>]) | ||
241 | |||
242 | AM_ICONV | ||
243 | |||
244 | dnl intl/plural.c is generated from intl/plural.y. It requires bison, | ||
245 | dnl because plural.y uses bison specific features. It requires at least | ||
246 | dnl bison-1.26 because earlier versions generate a plural.c that doesn't | ||
247 | dnl compile. | ||
248 | dnl bison is only needed for the maintainer (who touches plural.y). But in | ||
249 | dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put | ||
250 | dnl the rule in general Makefile. Now, some people carelessly touch the | ||
251 | dnl files or have a broken "make" program, hence the plural.c rule will | ||
252 | dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not | ||
253 | dnl present or too old. | ||
254 | AC_CHECK_PROGS([INTLBISON], [bison]) | ||
255 | if test -z "$INTLBISON"; then | ||
256 | ac_verc_fail=yes | ||
257 | else | ||
258 | dnl Found it, now check the version. | ||
259 | AC_MSG_CHECKING([version of bison]) | ||
260 | changequote(<<,>>)dnl | ||
261 | ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` | ||
262 | case $ac_prog_version in | ||
263 | '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; | ||
264 | 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) | ||
265 | changequote([,])dnl | ||
266 | ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; | ||
267 | *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; | ||
268 | esac | ||
269 | AC_MSG_RESULT([$ac_prog_version]) | ||
270 | fi | ||
271 | if test $ac_verc_fail = yes; then | ||
272 | INTLBISON=: | ||
273 | fi | ||
274 | ]) | ||
275 | |||
276 | |||
277 | dnl gt_CHECK_DECL(FUNC, INCLUDES) | ||
278 | dnl Check whether a function is declared. | ||
279 | AC_DEFUN([gt_CHECK_DECL], | ||
280 | [ | ||
281 | AC_CACHE_CHECK([whether $1 is declared], [ac_cv_have_decl_$1], | ||
282 | [AC_TRY_COMPILE([$2], [ | ||
283 | #ifndef $1 | ||
284 | char *p = (char *) $1; | ||
285 | #endif | ||
286 | ], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)]) | ||
287 | if test $ac_cv_have_decl_$1 = yes; then | ||
288 | gt_value=1 | ||
289 | else | ||
290 | gt_value=0 | ||
291 | fi | ||
292 | AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], | ||
293 | [Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) | ||
294 | ]) | ||
diff --git a/m4/intldir.m4 b/m4/intldir.m4 new file mode 100644 index 00000000..ebae76d3 --- /dev/null +++ b/m4/intldir.m4 | |||
@@ -0,0 +1,19 @@ | |||
1 | # intldir.m4 serial 2 (gettext-0.18) | ||
2 | dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | dnl | ||
7 | dnl This file can can be used in projects which are not available under | ||
8 | dnl the GNU General Public License or the GNU Library General Public | ||
9 | dnl License but which still want to provide support for the GNU gettext | ||
10 | dnl functionality. | ||
11 | dnl Please note that the actual code of the GNU gettext library is covered | ||
12 | dnl by the GNU Library General Public License, and the rest of the GNU | ||
13 | dnl gettext package package is covered by the GNU General Public License. | ||
14 | dnl They are *not* in the public domain. | ||
15 | |||
16 | AC_PREREQ([2.52]) | ||
17 | |||
18 | dnl Tells the AM_GNU_GETTEXT macro to consider an intl/ directory. | ||
19 | AC_DEFUN([AM_GNU_GETTEXT_INTL_SUBDIR], []) | ||
diff --git a/m4/intlmacosx.m4 b/m4/intlmacosx.m4 new file mode 100644 index 00000000..aca924c6 --- /dev/null +++ b/m4/intlmacosx.m4 | |||
@@ -0,0 +1,56 @@ | |||
1 | # intlmacosx.m4 serial 5 (gettext-0.18.2) | ||
2 | dnl Copyright (C) 2004-2014, 2016 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | dnl | ||
7 | dnl This file can be used in projects which are not available under | ||
8 | dnl the GNU General Public License or the GNU Library General Public | ||
9 | dnl License but which still want to provide support for the GNU gettext | ||
10 | dnl functionality. | ||
11 | dnl Please note that the actual code of the GNU gettext library is covered | ||
12 | dnl by the GNU Library General Public License, and the rest of the GNU | ||
13 | dnl gettext package is covered by the GNU General Public License. | ||
14 | dnl They are *not* in the public domain. | ||
15 | |||
16 | dnl Checks for special options needed on Mac OS X. | ||
17 | dnl Defines INTL_MACOSX_LIBS. | ||
18 | AC_DEFUN([gt_INTL_MACOSX], | ||
19 | [ | ||
20 | dnl Check for API introduced in Mac OS X 10.2. | ||
21 | AC_CACHE_CHECK([for CFPreferencesCopyAppValue], | ||
22 | [gt_cv_func_CFPreferencesCopyAppValue], | ||
23 | [gt_save_LIBS="$LIBS" | ||
24 | LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" | ||
25 | AC_LINK_IFELSE( | ||
26 | [AC_LANG_PROGRAM( | ||
27 | [[#include <CoreFoundation/CFPreferences.h>]], | ||
28 | [[CFPreferencesCopyAppValue(NULL, NULL)]])], | ||
29 | [gt_cv_func_CFPreferencesCopyAppValue=yes], | ||
30 | [gt_cv_func_CFPreferencesCopyAppValue=no]) | ||
31 | LIBS="$gt_save_LIBS"]) | ||
32 | if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then | ||
33 | AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], | ||
34 | [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) | ||
35 | fi | ||
36 | dnl Check for API introduced in Mac OS X 10.3. | ||
37 | AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], | ||
38 | [gt_save_LIBS="$LIBS" | ||
39 | LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" | ||
40 | AC_LINK_IFELSE( | ||
41 | [AC_LANG_PROGRAM( | ||
42 | [[#include <CoreFoundation/CFLocale.h>]], | ||
43 | [[CFLocaleCopyCurrent();]])], | ||
44 | [gt_cv_func_CFLocaleCopyCurrent=yes], | ||
45 | [gt_cv_func_CFLocaleCopyCurrent=no]) | ||
46 | LIBS="$gt_save_LIBS"]) | ||
47 | if test $gt_cv_func_CFLocaleCopyCurrent = yes; then | ||
48 | AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], | ||
49 | [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) | ||
50 | fi | ||
51 | INTL_MACOSX_LIBS= | ||
52 | if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then | ||
53 | INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" | ||
54 | fi | ||
55 | AC_SUBST([INTL_MACOSX_LIBS]) | ||
56 | ]) | ||
diff --git a/m4/intmax.m4 b/m4/intmax.m4 new file mode 100644 index 00000000..74aaaf5e --- /dev/null +++ b/m4/intmax.m4 | |||
@@ -0,0 +1,33 @@ | |||
1 | # intmax.m4 serial 5 (gettext-0.18) | ||
2 | dnl Copyright (C) 2002-2005, 2008-2010 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | dnl From Bruno Haible. | ||
8 | dnl Test whether the system has the 'intmax_t' type, but don't attempt to | ||
9 | dnl find a replacement if it is lacking. | ||
10 | |||
11 | AC_DEFUN([gt_TYPE_INTMAX_T], | ||
12 | [ | ||
13 | AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) | ||
14 | AC_REQUIRE([gl_AC_HEADER_STDINT_H]) | ||
15 | AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t], | ||
16 | [AC_TRY_COMPILE([ | ||
17 | #include <stddef.h> | ||
18 | #include <stdlib.h> | ||
19 | #if HAVE_STDINT_H_WITH_UINTMAX | ||
20 | #include <stdint.h> | ||
21 | #endif | ||
22 | #if HAVE_INTTYPES_H_WITH_UINTMAX | ||
23 | #include <inttypes.h> | ||
24 | #endif | ||
25 | ], [intmax_t x = -1; | ||
26 | return !x;], | ||
27 | [gt_cv_c_intmax_t=yes], | ||
28 | [gt_cv_c_intmax_t=no])]) | ||
29 | if test $gt_cv_c_intmax_t = yes; then | ||
30 | AC_DEFINE([HAVE_INTMAX_T], [1], | ||
31 | [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.]) | ||
32 | fi | ||
33 | ]) | ||
diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4 new file mode 100644 index 00000000..718a4f4e --- /dev/null +++ b/m4/inttypes-pri.m4 | |||
@@ -0,0 +1,36 @@ | |||
1 | # inttypes-pri.m4 serial 6 (gettext-0.18) | ||
2 | dnl Copyright (C) 1997-2002, 2006, 2008-2010 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | dnl From Bruno Haible. | ||
8 | |||
9 | AC_PREREQ([2.52]) | ||
10 | |||
11 | # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI* | ||
12 | # macros to non-string values. This is the case on AIX 4.3.3. | ||
13 | |||
14 | AC_DEFUN([gt_INTTYPES_PRI], | ||
15 | [ | ||
16 | AC_CHECK_HEADERS([inttypes.h]) | ||
17 | if test $ac_cv_header_inttypes_h = yes; then | ||
18 | AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], | ||
19 | [gt_cv_inttypes_pri_broken], | ||
20 | [ | ||
21 | AC_TRY_COMPILE([#include <inttypes.h> | ||
22 | #ifdef PRId32 | ||
23 | char *p = PRId32; | ||
24 | #endif | ||
25 | ], [], [gt_cv_inttypes_pri_broken=no], [gt_cv_inttypes_pri_broken=yes]) | ||
26 | ]) | ||
27 | fi | ||
28 | if test "$gt_cv_inttypes_pri_broken" = yes; then | ||
29 | AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1], | ||
30 | [Define if <inttypes.h> exists and defines unusable PRI* macros.]) | ||
31 | PRI_MACROS_BROKEN=1 | ||
32 | else | ||
33 | PRI_MACROS_BROKEN=0 | ||
34 | fi | ||
35 | AC_SUBST([PRI_MACROS_BROKEN]) | ||
36 | ]) | ||
diff --git a/m4/inttypes_h.m4 b/m4/inttypes_h.m4 new file mode 100644 index 00000000..782d77ed --- /dev/null +++ b/m4/inttypes_h.m4 | |||
@@ -0,0 +1,26 @@ | |||
1 | # inttypes_h.m4 serial 9 | ||
2 | dnl Copyright (C) 1997-2004, 2006, 2008-2010 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | dnl From Paul Eggert. | ||
8 | |||
9 | # Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists, | ||
10 | # doesn't clash with <sys/types.h>, and declares uintmax_t. | ||
11 | |||
12 | AC_DEFUN([gl_AC_HEADER_INTTYPES_H], | ||
13 | [ | ||
14 | AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h], | ||
15 | [AC_TRY_COMPILE( | ||
16 | [#include <sys/types.h> | ||
17 | #include <inttypes.h>], | ||
18 | [uintmax_t i = (uintmax_t) -1; return !i;], | ||
19 | [gl_cv_header_inttypes_h=yes], | ||
20 | [gl_cv_header_inttypes_h=no])]) | ||
21 | if test $gl_cv_header_inttypes_h = yes; then | ||
22 | AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1], | ||
23 | [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, | ||
24 | and declares uintmax_t. ]) | ||
25 | fi | ||
26 | ]) | ||
diff --git a/m4/lcmessage.m4 b/m4/lcmessage.m4 new file mode 100644 index 00000000..1a705431 --- /dev/null +++ b/m4/lcmessage.m4 | |||
@@ -0,0 +1,31 @@ | |||
1 | # lcmessage.m4 serial 6 (gettext-0.18) | ||
2 | dnl Copyright (C) 1995-2002, 2004-2005, 2008-2010 Free Software Foundation, | ||
3 | dnl 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 | dnl | ||
8 | dnl This file can can be used in projects which are not available under | ||
9 | dnl the GNU General Public License or the GNU Library General Public | ||
10 | dnl License but which still want to provide support for the GNU gettext | ||
11 | dnl functionality. | ||
12 | dnl Please note that the actual code of the GNU gettext library is covered | ||
13 | dnl by the GNU Library General Public License, and the rest of the GNU | ||
14 | dnl gettext package package is covered by the GNU General Public License. | ||
15 | dnl They are *not* in the public domain. | ||
16 | |||
17 | dnl Authors: | ||
18 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995. | ||
19 | |||
20 | # Check whether LC_MESSAGES is available in <locale.h>. | ||
21 | |||
22 | AC_DEFUN([gt_LC_MESSAGES], | ||
23 | [ | ||
24 | AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES], | ||
25 | [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], | ||
26 | [gt_cv_val_LC_MESSAGES=yes], [gt_cv_val_LC_MESSAGES=no])]) | ||
27 | if test $gt_cv_val_LC_MESSAGES = yes; then | ||
28 | AC_DEFINE([HAVE_LC_MESSAGES], [1], | ||
29 | [Define if your <locale.h> file defines LC_MESSAGES.]) | ||
30 | fi | ||
31 | ]) | ||
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4 new file mode 100644 index 00000000..6209de65 --- /dev/null +++ b/m4/lib-ld.m4 | |||
@@ -0,0 +1,119 @@ | |||
1 | # lib-ld.m4 serial 6 | ||
2 | dnl Copyright (C) 1996-2003, 2009-2016 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | dnl Subroutines of libtool.m4, | ||
8 | dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid | ||
9 | dnl collision with libtool.m4. | ||
10 | |||
11 | dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no. | ||
12 | AC_DEFUN([AC_LIB_PROG_LD_GNU], | ||
13 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], | ||
14 | [# I'd rather use --version here, but apparently some GNU lds only accept -v. | ||
15 | case `$LD -v 2>&1 </dev/null` in | ||
16 | *GNU* | *'with BFD'*) | ||
17 | acl_cv_prog_gnu_ld=yes | ||
18 | ;; | ||
19 | *) | ||
20 | acl_cv_prog_gnu_ld=no | ||
21 | ;; | ||
22 | esac]) | ||
23 | with_gnu_ld=$acl_cv_prog_gnu_ld | ||
24 | ]) | ||
25 | |||
26 | dnl From libtool-2.4. Sets the variable LD. | ||
27 | AC_DEFUN([AC_LIB_PROG_LD], | ||
28 | [AC_REQUIRE([AC_PROG_CC])dnl | ||
29 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
30 | |||
31 | AC_ARG_WITH([gnu-ld], | ||
32 | [AS_HELP_STRING([--with-gnu-ld], | ||
33 | [assume the C compiler uses GNU ld [default=no]])], | ||
34 | [test "$withval" = no || with_gnu_ld=yes], | ||
35 | [with_gnu_ld=no])dnl | ||
36 | |||
37 | # Prepare PATH_SEPARATOR. | ||
38 | # The user is always right. | ||
39 | if test "${PATH_SEPARATOR+set}" != set; then | ||
40 | # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which | ||
41 | # contains only /bin. Note that ksh looks also at the FPATH variable, | ||
42 | # so we have to set that as well for the test. | ||
43 | PATH_SEPARATOR=: | ||
44 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ | ||
45 | && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ | ||
46 | || PATH_SEPARATOR=';' | ||
47 | } | ||
48 | fi | ||
49 | |||
50 | ac_prog=ld | ||
51 | if test "$GCC" = yes; then | ||
52 | # Check if gcc -print-prog-name=ld gives a path. | ||
53 | AC_MSG_CHECKING([for ld used by $CC]) | ||
54 | case $host in | ||
55 | *-*-mingw*) | ||
56 | # gcc leaves a trailing carriage return which upsets mingw | ||
57 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | ||
58 | *) | ||
59 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | ||
60 | esac | ||
61 | case $ac_prog in | ||
62 | # Accept absolute paths. | ||
63 | [[\\/]]* | ?:[[\\/]]*) | ||
64 | re_direlt='/[[^/]][[^/]]*/\.\./' | ||
65 | # Canonicalize the pathname of ld | ||
66 | ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` | ||
67 | while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do | ||
68 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | ||
69 | done | ||
70 | test -z "$LD" && LD="$ac_prog" | ||
71 | ;; | ||
72 | "") | ||
73 | # If it fails, then pretend we aren't using GCC. | ||
74 | ac_prog=ld | ||
75 | ;; | ||
76 | *) | ||
77 | # If it is relative, then search for the first ld in PATH. | ||
78 | with_gnu_ld=unknown | ||
79 | ;; | ||
80 | esac | ||
81 | elif test "$with_gnu_ld" = yes; then | ||
82 | AC_MSG_CHECKING([for GNU ld]) | ||
83 | else | ||
84 | AC_MSG_CHECKING([for non-GNU ld]) | ||
85 | fi | ||
86 | AC_CACHE_VAL([acl_cv_path_LD], | ||
87 | [if test -z "$LD"; then | ||
88 | acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | ||
89 | for ac_dir in $PATH; do | ||
90 | IFS="$acl_save_ifs" | ||
91 | test -z "$ac_dir" && ac_dir=. | ||
92 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | ||
93 | acl_cv_path_LD="$ac_dir/$ac_prog" | ||
94 | # Check to see if the program is GNU ld. I'd rather use --version, | ||
95 | # but apparently some variants of GNU ld only accept -v. | ||
96 | # Break only if it was the GNU/non-GNU ld that we prefer. | ||
97 | case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in | ||
98 | *GNU* | *'with BFD'*) | ||
99 | test "$with_gnu_ld" != no && break | ||
100 | ;; | ||
101 | *) | ||
102 | test "$with_gnu_ld" != yes && break | ||
103 | ;; | ||
104 | esac | ||
105 | fi | ||
106 | done | ||
107 | IFS="$acl_save_ifs" | ||
108 | else | ||
109 | acl_cv_path_LD="$LD" # Let the user override the test with a path. | ||
110 | fi]) | ||
111 | LD="$acl_cv_path_LD" | ||
112 | if test -n "$LD"; then | ||
113 | AC_MSG_RESULT([$LD]) | ||
114 | else | ||
115 | AC_MSG_RESULT([no]) | ||
116 | fi | ||
117 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) | ||
118 | AC_LIB_PROG_LD_GNU | ||
119 | ]) | ||
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4 new file mode 100644 index 00000000..2f518553 --- /dev/null +++ b/m4/lib-link.m4 | |||
@@ -0,0 +1,777 @@ | |||
1 | # lib-link.m4 serial 26 (gettext-0.18.2) | ||
2 | dnl Copyright (C) 2001-2016 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | dnl From Bruno Haible. | ||
8 | |||
9 | AC_PREREQ([2.54]) | ||
10 | |||
11 | dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and | ||
12 | dnl the libraries corresponding to explicit and implicit dependencies. | ||
13 | dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and | ||
14 | dnl augments the CPPFLAGS variable. | ||
15 | dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname | ||
16 | dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. | ||
17 | AC_DEFUN([AC_LIB_LINKFLAGS], | ||
18 | [ | ||
19 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | ||
20 | AC_REQUIRE([AC_LIB_RPATH]) | ||
21 | pushdef([Name],[m4_translit([$1],[./+-], [____])]) | ||
22 | pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], | ||
23 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) | ||
24 | AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ | ||
25 | AC_LIB_LINKFLAGS_BODY([$1], [$2]) | ||
26 | ac_cv_lib[]Name[]_libs="$LIB[]NAME" | ||
27 | ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" | ||
28 | ac_cv_lib[]Name[]_cppflags="$INC[]NAME" | ||
29 | ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" | ||
30 | ]) | ||
31 | LIB[]NAME="$ac_cv_lib[]Name[]_libs" | ||
32 | LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" | ||
33 | INC[]NAME="$ac_cv_lib[]Name[]_cppflags" | ||
34 | LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" | ||
35 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) | ||
36 | AC_SUBST([LIB]NAME) | ||
37 | AC_SUBST([LTLIB]NAME) | ||
38 | AC_SUBST([LIB]NAME[_PREFIX]) | ||
39 | dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the | ||
40 | dnl results of this search when this library appears as a dependency. | ||
41 | HAVE_LIB[]NAME=yes | ||
42 | popdef([NAME]) | ||
43 | popdef([Name]) | ||
44 | ]) | ||
45 | |||
46 | dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message]) | ||
47 | dnl searches for libname and the libraries corresponding to explicit and | ||
48 | dnl implicit dependencies, together with the specified include files and | ||
49 | dnl the ability to compile and link the specified testcode. The missing-message | ||
50 | dnl defaults to 'no' and may contain additional hints for the user. | ||
51 | dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} | ||
52 | dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and | ||
53 | dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs | ||
54 | dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. | ||
55 | dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname | ||
56 | dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. | ||
57 | AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], | ||
58 | [ | ||
59 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | ||
60 | AC_REQUIRE([AC_LIB_RPATH]) | ||
61 | pushdef([Name],[m4_translit([$1],[./+-], [____])]) | ||
62 | pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], | ||
63 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) | ||
64 | |||
65 | dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME | ||
66 | dnl accordingly. | ||
67 | AC_LIB_LINKFLAGS_BODY([$1], [$2]) | ||
68 | |||
69 | dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, | ||
70 | dnl because if the user has installed lib[]Name and not disabled its use | ||
71 | dnl via --without-lib[]Name-prefix, he wants to use it. | ||
72 | ac_save_CPPFLAGS="$CPPFLAGS" | ||
73 | AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) | ||
74 | |||
75 | AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ | ||
76 | ac_save_LIBS="$LIBS" | ||
77 | dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS, | ||
78 | dnl because these -l options might require -L options that are present in | ||
79 | dnl LIBS. -l options benefit only from the -L options listed before it. | ||
80 | dnl Otherwise, add it to the front of LIBS, because it may be a static | ||
81 | dnl library that depends on another static library that is present in LIBS. | ||
82 | dnl Static libraries benefit only from the static libraries listed after | ||
83 | dnl it. | ||
84 | case " $LIB[]NAME" in | ||
85 | *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; | ||
86 | *) LIBS="$LIB[]NAME $LIBS" ;; | ||
87 | esac | ||
88 | AC_LINK_IFELSE( | ||
89 | [AC_LANG_PROGRAM([[$3]], [[$4]])], | ||
90 | [ac_cv_lib[]Name=yes], | ||
91 | [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) | ||
92 | LIBS="$ac_save_LIBS" | ||
93 | ]) | ||
94 | if test "$ac_cv_lib[]Name" = yes; then | ||
95 | HAVE_LIB[]NAME=yes | ||
96 | AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.]) | ||
97 | AC_MSG_CHECKING([how to link with lib[]$1]) | ||
98 | AC_MSG_RESULT([$LIB[]NAME]) | ||
99 | else | ||
100 | HAVE_LIB[]NAME=no | ||
101 | dnl If $LIB[]NAME didn't lead to a usable library, we don't need | ||
102 | dnl $INC[]NAME either. | ||
103 | CPPFLAGS="$ac_save_CPPFLAGS" | ||
104 | LIB[]NAME= | ||
105 | LTLIB[]NAME= | ||
106 | LIB[]NAME[]_PREFIX= | ||
107 | fi | ||
108 | AC_SUBST([HAVE_LIB]NAME) | ||
109 | AC_SUBST([LIB]NAME) | ||
110 | AC_SUBST([LTLIB]NAME) | ||
111 | AC_SUBST([LIB]NAME[_PREFIX]) | ||
112 | popdef([NAME]) | ||
113 | popdef([Name]) | ||
114 | ]) | ||
115 | |||
116 | dnl Determine the platform dependent parameters needed to use rpath: | ||
117 | dnl acl_libext, | ||
118 | dnl acl_shlibext, | ||
119 | dnl acl_libname_spec, | ||
120 | dnl acl_library_names_spec, | ||
121 | dnl acl_hardcode_libdir_flag_spec, | ||
122 | dnl acl_hardcode_libdir_separator, | ||
123 | dnl acl_hardcode_direct, | ||
124 | dnl acl_hardcode_minus_L. | ||
125 | AC_DEFUN([AC_LIB_RPATH], | ||
126 | [ | ||
127 | dnl Tell automake >= 1.10 to complain if config.rpath is missing. | ||
128 | m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) | ||
129 | AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS | ||
130 | AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld | ||
131 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host | ||
132 | AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir | ||
133 | AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ | ||
134 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | ||
135 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | ||
136 | . ./conftest.sh | ||
137 | rm -f ./conftest.sh | ||
138 | acl_cv_rpath=done | ||
139 | ]) | ||
140 | wl="$acl_cv_wl" | ||
141 | acl_libext="$acl_cv_libext" | ||
142 | acl_shlibext="$acl_cv_shlibext" | ||
143 | acl_libname_spec="$acl_cv_libname_spec" | ||
144 | acl_library_names_spec="$acl_cv_library_names_spec" | ||
145 | acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | ||
146 | acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | ||
147 | acl_hardcode_direct="$acl_cv_hardcode_direct" | ||
148 | acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" | ||
149 | dnl Determine whether the user wants rpath handling at all. | ||
150 | AC_ARG_ENABLE([rpath], | ||
151 | [ --disable-rpath do not hardcode runtime library paths], | ||
152 | :, enable_rpath=yes) | ||
153 | ]) | ||
154 | |||
155 | dnl AC_LIB_FROMPACKAGE(name, package) | ||
156 | dnl declares that libname comes from the given package. The configure file | ||
157 | dnl will then not have a --with-libname-prefix option but a | ||
158 | dnl --with-package-prefix option. Several libraries can come from the same | ||
159 | dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar | ||
160 | dnl macro call that searches for libname. | ||
161 | AC_DEFUN([AC_LIB_FROMPACKAGE], | ||
162 | [ | ||
163 | pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], | ||
164 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) | ||
165 | define([acl_frompackage_]NAME, [$2]) | ||
166 | popdef([NAME]) | ||
167 | pushdef([PACK],[$2]) | ||
168 | pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], | ||
169 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) | ||
170 | define([acl_libsinpackage_]PACKUP, | ||
171 | m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) | ||
172 | popdef([PACKUP]) | ||
173 | popdef([PACK]) | ||
174 | ]) | ||
175 | |||
176 | dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and | ||
177 | dnl the libraries corresponding to explicit and implicit dependencies. | ||
178 | dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. | ||
179 | dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found | ||
180 | dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. | ||
181 | AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | ||
182 | [ | ||
183 | AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) | ||
184 | pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], | ||
185 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) | ||
186 | pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) | ||
187 | pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], | ||
188 | [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) | ||
189 | pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) | ||
190 | dnl Autoconf >= 2.61 supports dots in --with options. | ||
191 | pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) | ||
192 | dnl By default, look in $includedir and $libdir. | ||
193 | use_additional=yes | ||
194 | AC_LIB_WITH_FINAL_PREFIX([ | ||
195 | eval additional_includedir=\"$includedir\" | ||
196 | eval additional_libdir=\"$libdir\" | ||
197 | ]) | ||
198 | AC_ARG_WITH(P_A_C_K[-prefix], | ||
199 | [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib | ||
200 | --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], | ||
201 | [ | ||
202 | if test "X$withval" = "Xno"; then | ||
203 | use_additional=no | ||
204 | else | ||
205 | if test "X$withval" = "X"; then | ||
206 | AC_LIB_WITH_FINAL_PREFIX([ | ||
207 | eval additional_includedir=\"$includedir\" | ||
208 | eval additional_libdir=\"$libdir\" | ||
209 | ]) | ||
210 | else | ||
211 | additional_includedir="$withval/include" | ||
212 | additional_libdir="$withval/$acl_libdirstem" | ||
213 | if test "$acl_libdirstem2" != "$acl_libdirstem" \ | ||
214 | && ! test -d "$withval/$acl_libdirstem"; then | ||
215 | additional_libdir="$withval/$acl_libdirstem2" | ||
216 | fi | ||
217 | fi | ||
218 | fi | ||
219 | ]) | ||
220 | dnl Search the library and its dependencies in $additional_libdir and | ||
221 | dnl $LDFLAGS. Using breadth-first-seach. | ||
222 | LIB[]NAME= | ||
223 | LTLIB[]NAME= | ||
224 | INC[]NAME= | ||
225 | LIB[]NAME[]_PREFIX= | ||
226 | dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been | ||
227 | dnl computed. So it has to be reset here. | ||
228 | HAVE_LIB[]NAME= | ||
229 | rpathdirs= | ||
230 | ltrpathdirs= | ||
231 | names_already_handled= | ||
232 | names_next_round='$1 $2' | ||
233 | while test -n "$names_next_round"; do | ||
234 | names_this_round="$names_next_round" | ||
235 | names_next_round= | ||
236 | for name in $names_this_round; do | ||
237 | already_handled= | ||
238 | for n in $names_already_handled; do | ||
239 | if test "$n" = "$name"; then | ||
240 | already_handled=yes | ||
241 | break | ||
242 | fi | ||
243 | done | ||
244 | if test -z "$already_handled"; then | ||
245 | names_already_handled="$names_already_handled $name" | ||
246 | dnl See if it was already located by an earlier AC_LIB_LINKFLAGS | ||
247 | dnl or AC_LIB_HAVE_LINKFLAGS call. | ||
248 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` | ||
249 | eval value=\"\$HAVE_LIB$uppername\" | ||
250 | if test -n "$value"; then | ||
251 | if test "$value" = yes; then | ||
252 | eval value=\"\$LIB$uppername\" | ||
253 | test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" | ||
254 | eval value=\"\$LTLIB$uppername\" | ||
255 | test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" | ||
256 | else | ||
257 | dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined | ||
258 | dnl that this library doesn't exist. So just drop it. | ||
259 | : | ||
260 | fi | ||
261 | else | ||
262 | dnl Search the library lib$name in $additional_libdir and $LDFLAGS | ||
263 | dnl and the already constructed $LIBNAME/$LTLIBNAME. | ||
264 | found_dir= | ||
265 | found_la= | ||
266 | found_so= | ||
267 | found_a= | ||
268 | eval libname=\"$acl_libname_spec\" # typically: libname=lib$name | ||
269 | if test -n "$acl_shlibext"; then | ||
270 | shrext=".$acl_shlibext" # typically: shrext=.so | ||
271 | else | ||
272 | shrext= | ||
273 | fi | ||
274 | if test $use_additional = yes; then | ||
275 | dir="$additional_libdir" | ||
276 | dnl The same code as in the loop below: | ||
277 | dnl First look for a shared library. | ||
278 | if test -n "$acl_shlibext"; then | ||
279 | if test -f "$dir/$libname$shrext"; then | ||
280 | found_dir="$dir" | ||
281 | found_so="$dir/$libname$shrext" | ||
282 | else | ||
283 | if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then | ||
284 | ver=`(cd "$dir" && \ | ||
285 | for f in "$libname$shrext".*; do echo "$f"; done \ | ||
286 | | sed -e "s,^$libname$shrext\\\\.,," \ | ||
287 | | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | ||
288 | | sed 1q ) 2>/dev/null` | ||
289 | if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then | ||
290 | found_dir="$dir" | ||
291 | found_so="$dir/$libname$shrext.$ver" | ||
292 | fi | ||
293 | else | ||
294 | eval library_names=\"$acl_library_names_spec\" | ||
295 | for f in $library_names; do | ||
296 | if test -f "$dir/$f"; then | ||
297 | found_dir="$dir" | ||
298 | found_so="$dir/$f" | ||
299 | break | ||
300 | fi | ||
301 | done | ||
302 | fi | ||
303 | fi | ||
304 | fi | ||
305 | dnl Then look for a static library. | ||
306 | if test "X$found_dir" = "X"; then | ||
307 | if test -f "$dir/$libname.$acl_libext"; then | ||
308 | found_dir="$dir" | ||
309 | found_a="$dir/$libname.$acl_libext" | ||
310 | fi | ||
311 | fi | ||
312 | if test "X$found_dir" != "X"; then | ||
313 | if test -f "$dir/$libname.la"; then | ||
314 | found_la="$dir/$libname.la" | ||
315 | fi | ||
316 | fi | ||
317 | fi | ||
318 | if test "X$found_dir" = "X"; then | ||
319 | for x in $LDFLAGS $LTLIB[]NAME; do | ||
320 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
321 | case "$x" in | ||
322 | -L*) | ||
323 | dir=`echo "X$x" | sed -e 's/^X-L//'` | ||
324 | dnl First look for a shared library. | ||
325 | if test -n "$acl_shlibext"; then | ||
326 | if test -f "$dir/$libname$shrext"; then | ||
327 | found_dir="$dir" | ||
328 | found_so="$dir/$libname$shrext" | ||
329 | else | ||
330 | if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then | ||
331 | ver=`(cd "$dir" && \ | ||
332 | for f in "$libname$shrext".*; do echo "$f"; done \ | ||
333 | | sed -e "s,^$libname$shrext\\\\.,," \ | ||
334 | | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | ||
335 | | sed 1q ) 2>/dev/null` | ||
336 | if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then | ||
337 | found_dir="$dir" | ||
338 | found_so="$dir/$libname$shrext.$ver" | ||
339 | fi | ||
340 | else | ||
341 | eval library_names=\"$acl_library_names_spec\" | ||
342 | for f in $library_names; do | ||
343 | if test -f "$dir/$f"; then | ||
344 | found_dir="$dir" | ||
345 | found_so="$dir/$f" | ||
346 | break | ||
347 | fi | ||
348 | done | ||
349 | fi | ||
350 | fi | ||
351 | fi | ||
352 | dnl Then look for a static library. | ||
353 | if test "X$found_dir" = "X"; then | ||
354 | if test -f "$dir/$libname.$acl_libext"; then | ||
355 | found_dir="$dir" | ||
356 | found_a="$dir/$libname.$acl_libext" | ||
357 | fi | ||
358 | fi | ||
359 | if test "X$found_dir" != "X"; then | ||
360 | if test -f "$dir/$libname.la"; then | ||
361 | found_la="$dir/$libname.la" | ||
362 | fi | ||
363 | fi | ||
364 | ;; | ||
365 | esac | ||
366 | if test "X$found_dir" != "X"; then | ||
367 | break | ||
368 | fi | ||
369 | done | ||
370 | fi | ||
371 | if test "X$found_dir" != "X"; then | ||
372 | dnl Found the library. | ||
373 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" | ||
374 | if test "X$found_so" != "X"; then | ||
375 | dnl Linking with a shared library. We attempt to hardcode its | ||
376 | dnl directory into the executable's runpath, unless it's the | ||
377 | dnl standard /usr/lib. | ||
378 | if test "$enable_rpath" = no \ | ||
379 | || test "X$found_dir" = "X/usr/$acl_libdirstem" \ | ||
380 | || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then | ||
381 | dnl No hardcoding is needed. | ||
382 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | ||
383 | else | ||
384 | dnl Use an explicit option to hardcode DIR into the resulting | ||
385 | dnl binary. | ||
386 | dnl Potentially add DIR to ltrpathdirs. | ||
387 | dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. | ||
388 | haveit= | ||
389 | for x in $ltrpathdirs; do | ||
390 | if test "X$x" = "X$found_dir"; then | ||
391 | haveit=yes | ||
392 | break | ||
393 | fi | ||
394 | done | ||
395 | if test -z "$haveit"; then | ||
396 | ltrpathdirs="$ltrpathdirs $found_dir" | ||
397 | fi | ||
398 | dnl The hardcoding into $LIBNAME is system dependent. | ||
399 | if test "$acl_hardcode_direct" = yes; then | ||
400 | dnl Using DIR/libNAME.so during linking hardcodes DIR into the | ||
401 | dnl resulting binary. | ||
402 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | ||
403 | else | ||
404 | if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then | ||
405 | dnl Use an explicit option to hardcode DIR into the resulting | ||
406 | dnl binary. | ||
407 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | ||
408 | dnl Potentially add DIR to rpathdirs. | ||
409 | dnl The rpathdirs will be appended to $LIBNAME at the end. | ||
410 | haveit= | ||
411 | for x in $rpathdirs; do | ||
412 | if test "X$x" = "X$found_dir"; then | ||
413 | haveit=yes | ||
414 | break | ||
415 | fi | ||
416 | done | ||
417 | if test -z "$haveit"; then | ||
418 | rpathdirs="$rpathdirs $found_dir" | ||
419 | fi | ||
420 | else | ||
421 | dnl Rely on "-L$found_dir". | ||
422 | dnl But don't add it if it's already contained in the LDFLAGS | ||
423 | dnl or the already constructed $LIBNAME | ||
424 | haveit= | ||
425 | for x in $LDFLAGS $LIB[]NAME; do | ||
426 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
427 | if test "X$x" = "X-L$found_dir"; then | ||
428 | haveit=yes | ||
429 | break | ||
430 | fi | ||
431 | done | ||
432 | if test -z "$haveit"; then | ||
433 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" | ||
434 | fi | ||
435 | if test "$acl_hardcode_minus_L" != no; then | ||
436 | dnl FIXME: Not sure whether we should use | ||
437 | dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" | ||
438 | dnl here. | ||
439 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | ||
440 | else | ||
441 | dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH | ||
442 | dnl here, because this doesn't fit in flags passed to the | ||
443 | dnl compiler. So give up. No hardcoding. This affects only | ||
444 | dnl very old systems. | ||
445 | dnl FIXME: Not sure whether we should use | ||
446 | dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" | ||
447 | dnl here. | ||
448 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" | ||
449 | fi | ||
450 | fi | ||
451 | fi | ||
452 | fi | ||
453 | else | ||
454 | if test "X$found_a" != "X"; then | ||
455 | dnl Linking with a static library. | ||
456 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" | ||
457 | else | ||
458 | dnl We shouldn't come here, but anyway it's good to have a | ||
459 | dnl fallback. | ||
460 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" | ||
461 | fi | ||
462 | fi | ||
463 | dnl Assume the include files are nearby. | ||
464 | additional_includedir= | ||
465 | case "$found_dir" in | ||
466 | */$acl_libdirstem | */$acl_libdirstem/) | ||
467 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` | ||
468 | if test "$name" = '$1'; then | ||
469 | LIB[]NAME[]_PREFIX="$basedir" | ||
470 | fi | ||
471 | additional_includedir="$basedir/include" | ||
472 | ;; | ||
473 | */$acl_libdirstem2 | */$acl_libdirstem2/) | ||
474 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` | ||
475 | if test "$name" = '$1'; then | ||
476 | LIB[]NAME[]_PREFIX="$basedir" | ||
477 | fi | ||
478 | additional_includedir="$basedir/include" | ||
479 | ;; | ||
480 | esac | ||
481 | if test "X$additional_includedir" != "X"; then | ||
482 | dnl Potentially add $additional_includedir to $INCNAME. | ||
483 | dnl But don't add it | ||
484 | dnl 1. if it's the standard /usr/include, | ||
485 | dnl 2. if it's /usr/local/include and we are using GCC on Linux, | ||
486 | dnl 3. if it's already present in $CPPFLAGS or the already | ||
487 | dnl constructed $INCNAME, | ||
488 | dnl 4. if it doesn't exist as a directory. | ||
489 | if test "X$additional_includedir" != "X/usr/include"; then | ||
490 | haveit= | ||
491 | if test "X$additional_includedir" = "X/usr/local/include"; then | ||
492 | if test -n "$GCC"; then | ||
493 | case $host_os in | ||
494 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; | ||
495 | esac | ||
496 | fi | ||
497 | fi | ||
498 | if test -z "$haveit"; then | ||
499 | for x in $CPPFLAGS $INC[]NAME; do | ||
500 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
501 | if test "X$x" = "X-I$additional_includedir"; then | ||
502 | haveit=yes | ||
503 | break | ||
504 | fi | ||
505 | done | ||
506 | if test -z "$haveit"; then | ||
507 | if test -d "$additional_includedir"; then | ||
508 | dnl Really add $additional_includedir to $INCNAME. | ||
509 | INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" | ||
510 | fi | ||
511 | fi | ||
512 | fi | ||
513 | fi | ||
514 | fi | ||
515 | dnl Look for dependencies. | ||
516 | if test -n "$found_la"; then | ||
517 | dnl Read the .la file. It defines the variables | ||
518 | dnl dlname, library_names, old_library, dependency_libs, current, | ||
519 | dnl age, revision, installed, dlopen, dlpreopen, libdir. | ||
520 | save_libdir="$libdir" | ||
521 | case "$found_la" in | ||
522 | */* | *\\*) . "$found_la" ;; | ||
523 | *) . "./$found_la" ;; | ||
524 | esac | ||
525 | libdir="$save_libdir" | ||
526 | dnl We use only dependency_libs. | ||
527 | for dep in $dependency_libs; do | ||
528 | case "$dep" in | ||
529 | -L*) | ||
530 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | ||
531 | dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. | ||
532 | dnl But don't add it | ||
533 | dnl 1. if it's the standard /usr/lib, | ||
534 | dnl 2. if it's /usr/local/lib and we are using GCC on Linux, | ||
535 | dnl 3. if it's already present in $LDFLAGS or the already | ||
536 | dnl constructed $LIBNAME, | ||
537 | dnl 4. if it doesn't exist as a directory. | ||
538 | if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ | ||
539 | && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then | ||
540 | haveit= | ||
541 | if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ | ||
542 | || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then | ||
543 | if test -n "$GCC"; then | ||
544 | case $host_os in | ||
545 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; | ||
546 | esac | ||
547 | fi | ||
548 | fi | ||
549 | if test -z "$haveit"; then | ||
550 | haveit= | ||
551 | for x in $LDFLAGS $LIB[]NAME; do | ||
552 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
553 | if test "X$x" = "X-L$additional_libdir"; then | ||
554 | haveit=yes | ||
555 | break | ||
556 | fi | ||
557 | done | ||
558 | if test -z "$haveit"; then | ||
559 | if test -d "$additional_libdir"; then | ||
560 | dnl Really add $additional_libdir to $LIBNAME. | ||
561 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" | ||
562 | fi | ||
563 | fi | ||
564 | haveit= | ||
565 | for x in $LDFLAGS $LTLIB[]NAME; do | ||
566 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
567 | if test "X$x" = "X-L$additional_libdir"; then | ||
568 | haveit=yes | ||
569 | break | ||
570 | fi | ||
571 | done | ||
572 | if test -z "$haveit"; then | ||
573 | if test -d "$additional_libdir"; then | ||
574 | dnl Really add $additional_libdir to $LTLIBNAME. | ||
575 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" | ||
576 | fi | ||
577 | fi | ||
578 | fi | ||
579 | fi | ||
580 | ;; | ||
581 | -R*) | ||
582 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | ||
583 | if test "$enable_rpath" != no; then | ||
584 | dnl Potentially add DIR to rpathdirs. | ||
585 | dnl The rpathdirs will be appended to $LIBNAME at the end. | ||
586 | haveit= | ||
587 | for x in $rpathdirs; do | ||
588 | if test "X$x" = "X$dir"; then | ||
589 | haveit=yes | ||
590 | break | ||
591 | fi | ||
592 | done | ||
593 | if test -z "$haveit"; then | ||
594 | rpathdirs="$rpathdirs $dir" | ||
595 | fi | ||
596 | dnl Potentially add DIR to ltrpathdirs. | ||
597 | dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. | ||
598 | haveit= | ||
599 | for x in $ltrpathdirs; do | ||
600 | if test "X$x" = "X$dir"; then | ||
601 | haveit=yes | ||
602 | break | ||
603 | fi | ||
604 | done | ||
605 | if test -z "$haveit"; then | ||
606 | ltrpathdirs="$ltrpathdirs $dir" | ||
607 | fi | ||
608 | fi | ||
609 | ;; | ||
610 | -l*) | ||
611 | dnl Handle this in the next round. | ||
612 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | ||
613 | ;; | ||
614 | *.la) | ||
615 | dnl Handle this in the next round. Throw away the .la's | ||
616 | dnl directory; it is already contained in a preceding -L | ||
617 | dnl option. | ||
618 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | ||
619 | ;; | ||
620 | *) | ||
621 | dnl Most likely an immediate library name. | ||
622 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" | ||
623 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" | ||
624 | ;; | ||
625 | esac | ||
626 | done | ||
627 | fi | ||
628 | else | ||
629 | dnl Didn't find the library; assume it is in the system directories | ||
630 | dnl known to the linker and runtime loader. (All the system | ||
631 | dnl directories known to the linker should also be known to the | ||
632 | dnl runtime loader, otherwise the system is severely misconfigured.) | ||
633 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" | ||
634 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" | ||
635 | fi | ||
636 | fi | ||
637 | fi | ||
638 | done | ||
639 | done | ||
640 | if test "X$rpathdirs" != "X"; then | ||
641 | if test -n "$acl_hardcode_libdir_separator"; then | ||
642 | dnl Weird platform: only the last -rpath option counts, the user must | ||
643 | dnl pass all path elements in one option. We can arrange that for a | ||
644 | dnl single library, but not when more than one $LIBNAMEs are used. | ||
645 | alldirs= | ||
646 | for found_dir in $rpathdirs; do | ||
647 | alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" | ||
648 | done | ||
649 | dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. | ||
650 | acl_save_libdir="$libdir" | ||
651 | libdir="$alldirs" | ||
652 | eval flag=\"$acl_hardcode_libdir_flag_spec\" | ||
653 | libdir="$acl_save_libdir" | ||
654 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" | ||
655 | else | ||
656 | dnl The -rpath options are cumulative. | ||
657 | for found_dir in $rpathdirs; do | ||
658 | acl_save_libdir="$libdir" | ||
659 | libdir="$found_dir" | ||
660 | eval flag=\"$acl_hardcode_libdir_flag_spec\" | ||
661 | libdir="$acl_save_libdir" | ||
662 | LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" | ||
663 | done | ||
664 | fi | ||
665 | fi | ||
666 | if test "X$ltrpathdirs" != "X"; then | ||
667 | dnl When using libtool, the option that works for both libraries and | ||
668 | dnl executables is -R. The -R options are cumulative. | ||
669 | for found_dir in $ltrpathdirs; do | ||
670 | LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" | ||
671 | done | ||
672 | fi | ||
673 | popdef([P_A_C_K]) | ||
674 | popdef([PACKLIBS]) | ||
675 | popdef([PACKUP]) | ||
676 | popdef([PACK]) | ||
677 | popdef([NAME]) | ||
678 | ]) | ||
679 | |||
680 | dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, | ||
681 | dnl unless already present in VAR. | ||
682 | dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes | ||
683 | dnl contains two or three consecutive elements that belong together. | ||
684 | AC_DEFUN([AC_LIB_APPENDTOVAR], | ||
685 | [ | ||
686 | for element in [$2]; do | ||
687 | haveit= | ||
688 | for x in $[$1]; do | ||
689 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
690 | if test "X$x" = "X$element"; then | ||
691 | haveit=yes | ||
692 | break | ||
693 | fi | ||
694 | done | ||
695 | if test -z "$haveit"; then | ||
696 | [$1]="${[$1]}${[$1]:+ }$element" | ||
697 | fi | ||
698 | done | ||
699 | ]) | ||
700 | |||
701 | dnl For those cases where a variable contains several -L and -l options | ||
702 | dnl referring to unknown libraries and directories, this macro determines the | ||
703 | dnl necessary additional linker options for the runtime path. | ||
704 | dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) | ||
705 | dnl sets LDADDVAR to linker options needed together with LIBSVALUE. | ||
706 | dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, | ||
707 | dnl otherwise linking without libtool is assumed. | ||
708 | AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], | ||
709 | [ | ||
710 | AC_REQUIRE([AC_LIB_RPATH]) | ||
711 | AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) | ||
712 | $1= | ||
713 | if test "$enable_rpath" != no; then | ||
714 | if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then | ||
715 | dnl Use an explicit option to hardcode directories into the resulting | ||
716 | dnl binary. | ||
717 | rpathdirs= | ||
718 | next= | ||
719 | for opt in $2; do | ||
720 | if test -n "$next"; then | ||
721 | dir="$next" | ||
722 | dnl No need to hardcode the standard /usr/lib. | ||
723 | if test "X$dir" != "X/usr/$acl_libdirstem" \ | ||
724 | && test "X$dir" != "X/usr/$acl_libdirstem2"; then | ||
725 | rpathdirs="$rpathdirs $dir" | ||
726 | fi | ||
727 | next= | ||
728 | else | ||
729 | case $opt in | ||
730 | -L) next=yes ;; | ||
731 | -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` | ||
732 | dnl No need to hardcode the standard /usr/lib. | ||
733 | if test "X$dir" != "X/usr/$acl_libdirstem" \ | ||
734 | && test "X$dir" != "X/usr/$acl_libdirstem2"; then | ||
735 | rpathdirs="$rpathdirs $dir" | ||
736 | fi | ||
737 | next= ;; | ||
738 | *) next= ;; | ||
739 | esac | ||
740 | fi | ||
741 | done | ||
742 | if test "X$rpathdirs" != "X"; then | ||
743 | if test -n ""$3""; then | ||
744 | dnl libtool is used for linking. Use -R options. | ||
745 | for dir in $rpathdirs; do | ||
746 | $1="${$1}${$1:+ }-R$dir" | ||
747 | done | ||
748 | else | ||
749 | dnl The linker is used for linking directly. | ||
750 | if test -n "$acl_hardcode_libdir_separator"; then | ||
751 | dnl Weird platform: only the last -rpath option counts, the user | ||
752 | dnl must pass all path elements in one option. | ||
753 | alldirs= | ||
754 | for dir in $rpathdirs; do | ||
755 | alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" | ||
756 | done | ||
757 | acl_save_libdir="$libdir" | ||
758 | libdir="$alldirs" | ||
759 | eval flag=\"$acl_hardcode_libdir_flag_spec\" | ||
760 | libdir="$acl_save_libdir" | ||
761 | $1="$flag" | ||
762 | else | ||
763 | dnl The -rpath options are cumulative. | ||
764 | for dir in $rpathdirs; do | ||
765 | acl_save_libdir="$libdir" | ||
766 | libdir="$dir" | ||
767 | eval flag=\"$acl_hardcode_libdir_flag_spec\" | ||
768 | libdir="$acl_save_libdir" | ||
769 | $1="${$1}${$1:+ }$flag" | ||
770 | done | ||
771 | fi | ||
772 | fi | ||
773 | fi | ||
774 | fi | ||
775 | fi | ||
776 | AC_SUBST([$1]) | ||
777 | ]) | ||
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4 new file mode 100644 index 00000000..6851031d --- /dev/null +++ b/m4/lib-prefix.m4 | |||
@@ -0,0 +1,224 @@ | |||
1 | # lib-prefix.m4 serial 7 (gettext-0.18) | ||
2 | dnl Copyright (C) 2001-2005, 2008-2016 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | dnl From Bruno Haible. | ||
8 | |||
9 | dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and | ||
10 | dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't | ||
11 | dnl require excessive bracketing. | ||
12 | ifdef([AC_HELP_STRING], | ||
13 | [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], | ||
14 | [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) | ||
15 | |||
16 | dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed | ||
17 | dnl to access previously installed libraries. The basic assumption is that | ||
18 | dnl a user will want packages to use other packages he previously installed | ||
19 | dnl with the same --prefix option. | ||
20 | dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate | ||
21 | dnl libraries, but is otherwise very convenient. | ||
22 | AC_DEFUN([AC_LIB_PREFIX], | ||
23 | [ | ||
24 | AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) | ||
25 | AC_REQUIRE([AC_PROG_CC]) | ||
26 | AC_REQUIRE([AC_CANONICAL_HOST]) | ||
27 | AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) | ||
28 | AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | ||
29 | dnl By default, look in $includedir and $libdir. | ||
30 | use_additional=yes | ||
31 | AC_LIB_WITH_FINAL_PREFIX([ | ||
32 | eval additional_includedir=\"$includedir\" | ||
33 | eval additional_libdir=\"$libdir\" | ||
34 | ]) | ||
35 | AC_LIB_ARG_WITH([lib-prefix], | ||
36 | [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib | ||
37 | --without-lib-prefix don't search for libraries in includedir and libdir], | ||
38 | [ | ||
39 | if test "X$withval" = "Xno"; then | ||
40 | use_additional=no | ||
41 | else | ||
42 | if test "X$withval" = "X"; then | ||
43 | AC_LIB_WITH_FINAL_PREFIX([ | ||
44 | eval additional_includedir=\"$includedir\" | ||
45 | eval additional_libdir=\"$libdir\" | ||
46 | ]) | ||
47 | else | ||
48 | additional_includedir="$withval/include" | ||
49 | additional_libdir="$withval/$acl_libdirstem" | ||
50 | fi | ||
51 | fi | ||
52 | ]) | ||
53 | if test $use_additional = yes; then | ||
54 | dnl Potentially add $additional_includedir to $CPPFLAGS. | ||
55 | dnl But don't add it | ||
56 | dnl 1. if it's the standard /usr/include, | ||
57 | dnl 2. if it's already present in $CPPFLAGS, | ||
58 | dnl 3. if it's /usr/local/include and we are using GCC on Linux, | ||
59 | dnl 4. if it doesn't exist as a directory. | ||
60 | if test "X$additional_includedir" != "X/usr/include"; then | ||
61 | haveit= | ||
62 | for x in $CPPFLAGS; do | ||
63 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
64 | if test "X$x" = "X-I$additional_includedir"; then | ||
65 | haveit=yes | ||
66 | break | ||
67 | fi | ||
68 | done | ||
69 | if test -z "$haveit"; then | ||
70 | if test "X$additional_includedir" = "X/usr/local/include"; then | ||
71 | if test -n "$GCC"; then | ||
72 | case $host_os in | ||
73 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; | ||
74 | esac | ||
75 | fi | ||
76 | fi | ||
77 | if test -z "$haveit"; then | ||
78 | if test -d "$additional_includedir"; then | ||
79 | dnl Really add $additional_includedir to $CPPFLAGS. | ||
80 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" | ||
81 | fi | ||
82 | fi | ||
83 | fi | ||
84 | fi | ||
85 | dnl Potentially add $additional_libdir to $LDFLAGS. | ||
86 | dnl But don't add it | ||
87 | dnl 1. if it's the standard /usr/lib, | ||
88 | dnl 2. if it's already present in $LDFLAGS, | ||
89 | dnl 3. if it's /usr/local/lib and we are using GCC on Linux, | ||
90 | dnl 4. if it doesn't exist as a directory. | ||
91 | if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then | ||
92 | haveit= | ||
93 | for x in $LDFLAGS; do | ||
94 | AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
95 | if test "X$x" = "X-L$additional_libdir"; then | ||
96 | haveit=yes | ||
97 | break | ||
98 | fi | ||
99 | done | ||
100 | if test -z "$haveit"; then | ||
101 | if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then | ||
102 | if test -n "$GCC"; then | ||
103 | case $host_os in | ||
104 | linux*) haveit=yes;; | ||
105 | esac | ||
106 | fi | ||
107 | fi | ||
108 | if test -z "$haveit"; then | ||
109 | if test -d "$additional_libdir"; then | ||
110 | dnl Really add $additional_libdir to $LDFLAGS. | ||
111 | LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" | ||
112 | fi | ||
113 | fi | ||
114 | fi | ||
115 | fi | ||
116 | fi | ||
117 | ]) | ||
118 | |||
119 | dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, | ||
120 | dnl acl_final_exec_prefix, containing the values to which $prefix and | ||
121 | dnl $exec_prefix will expand at the end of the configure script. | ||
122 | AC_DEFUN([AC_LIB_PREPARE_PREFIX], | ||
123 | [ | ||
124 | dnl Unfortunately, prefix and exec_prefix get only finally determined | ||
125 | dnl at the end of configure. | ||
126 | if test "X$prefix" = "XNONE"; then | ||
127 | acl_final_prefix="$ac_default_prefix" | ||
128 | else | ||
129 | acl_final_prefix="$prefix" | ||
130 | fi | ||
131 | if test "X$exec_prefix" = "XNONE"; then | ||
132 | acl_final_exec_prefix='${prefix}' | ||
133 | else | ||
134 | acl_final_exec_prefix="$exec_prefix" | ||
135 | fi | ||
136 | acl_save_prefix="$prefix" | ||
137 | prefix="$acl_final_prefix" | ||
138 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | ||
139 | prefix="$acl_save_prefix" | ||
140 | ]) | ||
141 | |||
142 | dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the | ||
143 | dnl variables prefix and exec_prefix bound to the values they will have | ||
144 | dnl at the end of the configure script. | ||
145 | AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], | ||
146 | [ | ||
147 | acl_save_prefix="$prefix" | ||
148 | prefix="$acl_final_prefix" | ||
149 | acl_save_exec_prefix="$exec_prefix" | ||
150 | exec_prefix="$acl_final_exec_prefix" | ||
151 | $1 | ||
152 | exec_prefix="$acl_save_exec_prefix" | ||
153 | prefix="$acl_save_prefix" | ||
154 | ]) | ||
155 | |||
156 | dnl AC_LIB_PREPARE_MULTILIB creates | ||
157 | dnl - a variable acl_libdirstem, containing the basename of the libdir, either | ||
158 | dnl "lib" or "lib64" or "lib/64", | ||
159 | dnl - a variable acl_libdirstem2, as a secondary possible value for | ||
160 | dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or | ||
161 | dnl "lib/amd64". | ||
162 | AC_DEFUN([AC_LIB_PREPARE_MULTILIB], | ||
163 | [ | ||
164 | dnl There is no formal standard regarding lib and lib64. | ||
165 | dnl On glibc systems, the current practice is that on a system supporting | ||
166 | dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under | ||
167 | dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine | ||
168 | dnl the compiler's default mode by looking at the compiler's library search | ||
169 | dnl path. If at least one of its elements ends in /lib64 or points to a | ||
170 | dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. | ||
171 | dnl Otherwise we use the default, namely "lib". | ||
172 | dnl On Solaris systems, the current practice is that on a system supporting | ||
173 | dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under | ||
174 | dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or | ||
175 | dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. | ||
176 | AC_REQUIRE([AC_CANONICAL_HOST]) | ||
177 | acl_libdirstem=lib | ||
178 | acl_libdirstem2= | ||
179 | case "$host_os" in | ||
180 | solaris*) | ||
181 | dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment | ||
182 | dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>. | ||
183 | dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." | ||
184 | dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the | ||
185 | dnl symlink is missing, so we set acl_libdirstem2 too. | ||
186 | AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], | ||
187 | [AC_EGREP_CPP([sixtyfour bits], [ | ||
188 | #ifdef _LP64 | ||
189 | sixtyfour bits | ||
190 | #endif | ||
191 | ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) | ||
192 | ]) | ||
193 | if test $gl_cv_solaris_64bit = yes; then | ||
194 | acl_libdirstem=lib/64 | ||
195 | case "$host_cpu" in | ||
196 | sparc*) acl_libdirstem2=lib/sparcv9 ;; | ||
197 | i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; | ||
198 | esac | ||
199 | fi | ||
200 | ;; | ||
201 | *) | ||
202 | searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` | ||
203 | if test -n "$searchpath"; then | ||
204 | acl_save_IFS="${IFS= }"; IFS=":" | ||
205 | for searchdir in $searchpath; do | ||
206 | if test -d "$searchdir"; then | ||
207 | case "$searchdir" in | ||
208 | */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; | ||
209 | */../ | */.. ) | ||
210 | # Better ignore directories of this form. They are misleading. | ||
211 | ;; | ||
212 | *) searchdir=`cd "$searchdir" && pwd` | ||
213 | case "$searchdir" in | ||
214 | */lib64 ) acl_libdirstem=lib64 ;; | ||
215 | esac ;; | ||
216 | esac | ||
217 | fi | ||
218 | done | ||
219 | IFS="$acl_save_IFS" | ||
220 | fi | ||
221 | ;; | ||
222 | esac | ||
223 | test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" | ||
224 | ]) | ||
diff --git a/m4/libtool.m4 b/m4/libtool.m4 new file mode 100644 index 00000000..10ab2844 --- /dev/null +++ b/m4/libtool.m4 | |||
@@ -0,0 +1,8388 @@ | |||
1 | # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- | ||
2 | # | ||
3 | # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. | ||
4 | # Written by Gordon Matzigkeit, 1996 | ||
5 | # | ||
6 | # This file is free software; the Free Software Foundation gives | ||
7 | # unlimited permission to copy and/or distribute it, with or without | ||
8 | # modifications, as long as this notice is preserved. | ||
9 | |||
10 | m4_define([_LT_COPYING], [dnl | ||
11 | # Copyright (C) 2014 Free Software Foundation, Inc. | ||
12 | # This is free software; see the source for copying conditions. There is NO | ||
13 | # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
14 | |||
15 | # GNU Libtool is free software; you can redistribute it and/or modify | ||
16 | # it under the terms of the GNU General Public License as published by | ||
17 | # the Free Software Foundation; either version 2 of of the License, or | ||
18 | # (at your option) any later version. | ||
19 | # | ||
20 | # As a special exception to the GNU General Public License, if you | ||
21 | # distribute this file as part of a program or library that is built | ||
22 | # using GNU Libtool, you may include this file under the same | ||
23 | # distribution terms that you use for the rest of that program. | ||
24 | # | ||
25 | # GNU Libtool is distributed in the hope that it will be useful, but | ||
26 | # WITHOUT ANY WARRANTY; without even the implied warranty of | ||
27 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
28 | # GNU General Public License for more details. | ||
29 | # | ||
30 | # You should have received a copy of the GNU General Public License | ||
31 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
32 | ]) | ||
33 | |||
34 | # serial 58 LT_INIT | ||
35 | |||
36 | |||
37 | # LT_PREREQ(VERSION) | ||
38 | # ------------------ | ||
39 | # Complain and exit if this libtool version is less that VERSION. | ||
40 | m4_defun([LT_PREREQ], | ||
41 | [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, | ||
42 | [m4_default([$3], | ||
43 | [m4_fatal([Libtool version $1 or higher is required], | ||
44 | 63)])], | ||
45 | [$2])]) | ||
46 | |||
47 | |||
48 | # _LT_CHECK_BUILDDIR | ||
49 | # ------------------ | ||
50 | # Complain if the absolute build directory name contains unusual characters | ||
51 | m4_defun([_LT_CHECK_BUILDDIR], | ||
52 | [case `pwd` in | ||
53 | *\ * | *\ *) | ||
54 | AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; | ||
55 | esac | ||
56 | ]) | ||
57 | |||
58 | |||
59 | # LT_INIT([OPTIONS]) | ||
60 | # ------------------ | ||
61 | AC_DEFUN([LT_INIT], | ||
62 | [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK | ||
63 | AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl | ||
64 | AC_BEFORE([$0], [LT_LANG])dnl | ||
65 | AC_BEFORE([$0], [LT_OUTPUT])dnl | ||
66 | AC_BEFORE([$0], [LTDL_INIT])dnl | ||
67 | m4_require([_LT_CHECK_BUILDDIR])dnl | ||
68 | |||
69 | dnl Autoconf doesn't catch unexpanded LT_ macros by default: | ||
70 | m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl | ||
71 | m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl | ||
72 | dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 | ||
73 | dnl unless we require an AC_DEFUNed macro: | ||
74 | AC_REQUIRE([LTOPTIONS_VERSION])dnl | ||
75 | AC_REQUIRE([LTSUGAR_VERSION])dnl | ||
76 | AC_REQUIRE([LTVERSION_VERSION])dnl | ||
77 | AC_REQUIRE([LTOBSOLETE_VERSION])dnl | ||
78 | m4_require([_LT_PROG_LTMAIN])dnl | ||
79 | |||
80 | _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) | ||
81 | |||
82 | dnl Parse OPTIONS | ||
83 | _LT_SET_OPTIONS([$0], [$1]) | ||
84 | |||
85 | # This can be used to rebuild libtool when needed | ||
86 | LIBTOOL_DEPS=$ltmain | ||
87 | |||
88 | # Always use our own libtool. | ||
89 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' | ||
90 | AC_SUBST(LIBTOOL)dnl | ||
91 | |||
92 | _LT_SETUP | ||
93 | |||
94 | # Only expand once: | ||
95 | m4_define([LT_INIT]) | ||
96 | ])# LT_INIT | ||
97 | |||
98 | # Old names: | ||
99 | AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) | ||
100 | AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) | ||
101 | dnl aclocal-1.4 backwards compatibility: | ||
102 | dnl AC_DEFUN([AC_PROG_LIBTOOL], []) | ||
103 | dnl AC_DEFUN([AM_PROG_LIBTOOL], []) | ||
104 | |||
105 | |||
106 | # _LT_PREPARE_CC_BASENAME | ||
107 | # ----------------------- | ||
108 | m4_defun([_LT_PREPARE_CC_BASENAME], [ | ||
109 | # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. | ||
110 | func_cc_basename () | ||
111 | { | ||
112 | for cc_temp in @S|@*""; do | ||
113 | case $cc_temp in | ||
114 | compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; | ||
115 | distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; | ||
116 | \-*) ;; | ||
117 | *) break;; | ||
118 | esac | ||
119 | done | ||
120 | func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` | ||
121 | } | ||
122 | ])# _LT_PREPARE_CC_BASENAME | ||
123 | |||
124 | |||
125 | # _LT_CC_BASENAME(CC) | ||
126 | # ------------------- | ||
127 | # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, | ||
128 | # but that macro is also expanded into generated libtool script, which | ||
129 | # arranges for $SED and $ECHO to be set by different means. | ||
130 | m4_defun([_LT_CC_BASENAME], | ||
131 | [m4_require([_LT_PREPARE_CC_BASENAME])dnl | ||
132 | AC_REQUIRE([_LT_DECL_SED])dnl | ||
133 | AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl | ||
134 | func_cc_basename $1 | ||
135 | cc_basename=$func_cc_basename_result | ||
136 | ]) | ||
137 | |||
138 | |||
139 | # _LT_FILEUTILS_DEFAULTS | ||
140 | # ---------------------- | ||
141 | # It is okay to use these file commands and assume they have been set | ||
142 | # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. | ||
143 | m4_defun([_LT_FILEUTILS_DEFAULTS], | ||
144 | [: ${CP="cp -f"} | ||
145 | : ${MV="mv -f"} | ||
146 | : ${RM="rm -f"} | ||
147 | ])# _LT_FILEUTILS_DEFAULTS | ||
148 | |||
149 | |||
150 | # _LT_SETUP | ||
151 | # --------- | ||
152 | m4_defun([_LT_SETUP], | ||
153 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
154 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl | ||
155 | AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl | ||
156 | AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl | ||
157 | |||
158 | _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl | ||
159 | dnl | ||
160 | _LT_DECL([], [host_alias], [0], [The host system])dnl | ||
161 | _LT_DECL([], [host], [0])dnl | ||
162 | _LT_DECL([], [host_os], [0])dnl | ||
163 | dnl | ||
164 | _LT_DECL([], [build_alias], [0], [The build system])dnl | ||
165 | _LT_DECL([], [build], [0])dnl | ||
166 | _LT_DECL([], [build_os], [0])dnl | ||
167 | dnl | ||
168 | AC_REQUIRE([AC_PROG_CC])dnl | ||
169 | AC_REQUIRE([LT_PATH_LD])dnl | ||
170 | AC_REQUIRE([LT_PATH_NM])dnl | ||
171 | dnl | ||
172 | AC_REQUIRE([AC_PROG_LN_S])dnl | ||
173 | test -z "$LN_S" && LN_S="ln -s" | ||
174 | _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl | ||
175 | dnl | ||
176 | AC_REQUIRE([LT_CMD_MAX_LEN])dnl | ||
177 | _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl | ||
178 | _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl | ||
179 | dnl | ||
180 | m4_require([_LT_FILEUTILS_DEFAULTS])dnl | ||
181 | m4_require([_LT_CHECK_SHELL_FEATURES])dnl | ||
182 | m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl | ||
183 | m4_require([_LT_CMD_RELOAD])dnl | ||
184 | m4_require([_LT_CHECK_MAGIC_METHOD])dnl | ||
185 | m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl | ||
186 | m4_require([_LT_CMD_OLD_ARCHIVE])dnl | ||
187 | m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl | ||
188 | m4_require([_LT_WITH_SYSROOT])dnl | ||
189 | m4_require([_LT_CMD_TRUNCATE])dnl | ||
190 | |||
191 | _LT_CONFIG_LIBTOOL_INIT([ | ||
192 | # See if we are running on zsh, and set the options that allow our | ||
193 | # commands through without removal of \ escapes INIT. | ||
194 | if test -n "\${ZSH_VERSION+set}"; then | ||
195 | setopt NO_GLOB_SUBST | ||
196 | fi | ||
197 | ]) | ||
198 | if test -n "${ZSH_VERSION+set}"; then | ||
199 | setopt NO_GLOB_SUBST | ||
200 | fi | ||
201 | |||
202 | _LT_CHECK_OBJDIR | ||
203 | |||
204 | m4_require([_LT_TAG_COMPILER])dnl | ||
205 | |||
206 | case $host_os in | ||
207 | aix3*) | ||
208 | # AIX sometimes has problems with the GCC collect2 program. For some | ||
209 | # reason, if we set the COLLECT_NAMES environment variable, the problems | ||
210 | # vanish in a puff of smoke. | ||
211 | if test set != "${COLLECT_NAMES+set}"; then | ||
212 | COLLECT_NAMES= | ||
213 | export COLLECT_NAMES | ||
214 | fi | ||
215 | ;; | ||
216 | esac | ||
217 | |||
218 | # Global variables: | ||
219 | ofile=libtool | ||
220 | can_build_shared=yes | ||
221 | |||
222 | # All known linkers require a '.a' archive for static linking (except MSVC, | ||
223 | # which needs '.lib'). | ||
224 | libext=a | ||
225 | |||
226 | with_gnu_ld=$lt_cv_prog_gnu_ld | ||
227 | |||
228 | old_CC=$CC | ||
229 | old_CFLAGS=$CFLAGS | ||
230 | |||
231 | # Set sane defaults for various variables | ||
232 | test -z "$CC" && CC=cc | ||
233 | test -z "$LTCC" && LTCC=$CC | ||
234 | test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS | ||
235 | test -z "$LD" && LD=ld | ||
236 | test -z "$ac_objext" && ac_objext=o | ||
237 | |||
238 | _LT_CC_BASENAME([$compiler]) | ||
239 | |||
240 | # Only perform the check for file, if the check method requires it | ||
241 | test -z "$MAGIC_CMD" && MAGIC_CMD=file | ||
242 | case $deplibs_check_method in | ||
243 | file_magic*) | ||
244 | if test "$file_magic_cmd" = '$MAGIC_CMD'; then | ||
245 | _LT_PATH_MAGIC | ||
246 | fi | ||
247 | ;; | ||
248 | esac | ||
249 | |||
250 | # Use C for the default configuration in the libtool script | ||
251 | LT_SUPPORTED_TAG([CC]) | ||
252 | _LT_LANG_C_CONFIG | ||
253 | _LT_LANG_DEFAULT_CONFIG | ||
254 | _LT_CONFIG_COMMANDS | ||
255 | ])# _LT_SETUP | ||
256 | |||
257 | |||
258 | # _LT_PREPARE_SED_QUOTE_VARS | ||
259 | # -------------------------- | ||
260 | # Define a few sed substitution that help us do robust quoting. | ||
261 | m4_defun([_LT_PREPARE_SED_QUOTE_VARS], | ||
262 | [# Backslashify metacharacters that are still active within | ||
263 | # double-quoted strings. | ||
264 | sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' | ||
265 | |||
266 | # Same as above, but do not quote variable references. | ||
267 | double_quote_subst='s/\([["`\\]]\)/\\\1/g' | ||
268 | |||
269 | # Sed substitution to delay expansion of an escaped shell variable in a | ||
270 | # double_quote_subst'ed string. | ||
271 | delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' | ||
272 | |||
273 | # Sed substitution to delay expansion of an escaped single quote. | ||
274 | delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' | ||
275 | |||
276 | # Sed substitution to avoid accidental globbing in evaled expressions | ||
277 | no_glob_subst='s/\*/\\\*/g' | ||
278 | ]) | ||
279 | |||
280 | # _LT_PROG_LTMAIN | ||
281 | # --------------- | ||
282 | # Note that this code is called both from 'configure', and 'config.status' | ||
283 | # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, | ||
284 | # 'config.status' has no value for ac_aux_dir unless we are using Automake, | ||
285 | # so we pass a copy along to make sure it has a sensible value anyway. | ||
286 | m4_defun([_LT_PROG_LTMAIN], | ||
287 | [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl | ||
288 | _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) | ||
289 | ltmain=$ac_aux_dir/ltmain.sh | ||
290 | ])# _LT_PROG_LTMAIN | ||
291 | |||
292 | |||
293 | ## ------------------------------------- ## | ||
294 | ## Accumulate code for creating libtool. ## | ||
295 | ## ------------------------------------- ## | ||
296 | |||
297 | # So that we can recreate a full libtool script including additional | ||
298 | # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS | ||
299 | # in macros and then make a single call at the end using the 'libtool' | ||
300 | # label. | ||
301 | |||
302 | |||
303 | # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) | ||
304 | # ---------------------------------------- | ||
305 | # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. | ||
306 | m4_define([_LT_CONFIG_LIBTOOL_INIT], | ||
307 | [m4_ifval([$1], | ||
308 | [m4_append([_LT_OUTPUT_LIBTOOL_INIT], | ||
309 | [$1 | ||
310 | ])])]) | ||
311 | |||
312 | # Initialize. | ||
313 | m4_define([_LT_OUTPUT_LIBTOOL_INIT]) | ||
314 | |||
315 | |||
316 | # _LT_CONFIG_LIBTOOL([COMMANDS]) | ||
317 | # ------------------------------ | ||
318 | # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. | ||
319 | m4_define([_LT_CONFIG_LIBTOOL], | ||
320 | [m4_ifval([$1], | ||
321 | [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], | ||
322 | [$1 | ||
323 | ])])]) | ||
324 | |||
325 | # Initialize. | ||
326 | m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) | ||
327 | |||
328 | |||
329 | # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) | ||
330 | # ----------------------------------------------------- | ||
331 | m4_defun([_LT_CONFIG_SAVE_COMMANDS], | ||
332 | [_LT_CONFIG_LIBTOOL([$1]) | ||
333 | _LT_CONFIG_LIBTOOL_INIT([$2]) | ||
334 | ]) | ||
335 | |||
336 | |||
337 | # _LT_FORMAT_COMMENT([COMMENT]) | ||
338 | # ----------------------------- | ||
339 | # Add leading comment marks to the start of each line, and a trailing | ||
340 | # full-stop to the whole comment if one is not present already. | ||
341 | m4_define([_LT_FORMAT_COMMENT], | ||
342 | [m4_ifval([$1], [ | ||
343 | m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], | ||
344 | [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) | ||
345 | )]) | ||
346 | |||
347 | |||
348 | |||
349 | ## ------------------------ ## | ||
350 | ## FIXME: Eliminate VARNAME ## | ||
351 | ## ------------------------ ## | ||
352 | |||
353 | |||
354 | # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) | ||
355 | # ------------------------------------------------------------------- | ||
356 | # CONFIGNAME is the name given to the value in the libtool script. | ||
357 | # VARNAME is the (base) name used in the configure script. | ||
358 | # VALUE may be 0, 1 or 2 for a computed quote escaped value based on | ||
359 | # VARNAME. Any other value will be used directly. | ||
360 | m4_define([_LT_DECL], | ||
361 | [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], | ||
362 | [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], | ||
363 | [m4_ifval([$1], [$1], [$2])]) | ||
364 | lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) | ||
365 | m4_ifval([$4], | ||
366 | [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) | ||
367 | lt_dict_add_subkey([lt_decl_dict], [$2], | ||
368 | [tagged?], [m4_ifval([$5], [yes], [no])])]) | ||
369 | ]) | ||
370 | |||
371 | |||
372 | # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) | ||
373 | # -------------------------------------------------------- | ||
374 | m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) | ||
375 | |||
376 | |||
377 | # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) | ||
378 | # ------------------------------------------------ | ||
379 | m4_define([lt_decl_tag_varnames], | ||
380 | [_lt_decl_filter([tagged?], [yes], $@)]) | ||
381 | |||
382 | |||
383 | # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) | ||
384 | # --------------------------------------------------------- | ||
385 | m4_define([_lt_decl_filter], | ||
386 | [m4_case([$#], | ||
387 | [0], [m4_fatal([$0: too few arguments: $#])], | ||
388 | [1], [m4_fatal([$0: too few arguments: $#: $1])], | ||
389 | [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], | ||
390 | [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], | ||
391 | [lt_dict_filter([lt_decl_dict], $@)])[]dnl | ||
392 | ]) | ||
393 | |||
394 | |||
395 | # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) | ||
396 | # -------------------------------------------------- | ||
397 | m4_define([lt_decl_quote_varnames], | ||
398 | [_lt_decl_filter([value], [1], $@)]) | ||
399 | |||
400 | |||
401 | # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) | ||
402 | # --------------------------------------------------- | ||
403 | m4_define([lt_decl_dquote_varnames], | ||
404 | [_lt_decl_filter([value], [2], $@)]) | ||
405 | |||
406 | |||
407 | # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) | ||
408 | # --------------------------------------------------- | ||
409 | m4_define([lt_decl_varnames_tagged], | ||
410 | [m4_assert([$# <= 2])dnl | ||
411 | _$0(m4_quote(m4_default([$1], [[, ]])), | ||
412 | m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), | ||
413 | m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) | ||
414 | m4_define([_lt_decl_varnames_tagged], | ||
415 | [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) | ||
416 | |||
417 | |||
418 | # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) | ||
419 | # ------------------------------------------------ | ||
420 | m4_define([lt_decl_all_varnames], | ||
421 | [_$0(m4_quote(m4_default([$1], [[, ]])), | ||
422 | m4_if([$2], [], | ||
423 | m4_quote(lt_decl_varnames), | ||
424 | m4_quote(m4_shift($@))))[]dnl | ||
425 | ]) | ||
426 | m4_define([_lt_decl_all_varnames], | ||
427 | [lt_join($@, lt_decl_varnames_tagged([$1], | ||
428 | lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl | ||
429 | ]) | ||
430 | |||
431 | |||
432 | # _LT_CONFIG_STATUS_DECLARE([VARNAME]) | ||
433 | # ------------------------------------ | ||
434 | # Quote a variable value, and forward it to 'config.status' so that its | ||
435 | # declaration there will have the same value as in 'configure'. VARNAME | ||
436 | # must have a single quote delimited value for this to work. | ||
437 | m4_define([_LT_CONFIG_STATUS_DECLARE], | ||
438 | [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) | ||
439 | |||
440 | |||
441 | # _LT_CONFIG_STATUS_DECLARATIONS | ||
442 | # ------------------------------ | ||
443 | # We delimit libtool config variables with single quotes, so when | ||
444 | # we write them to config.status, we have to be sure to quote all | ||
445 | # embedded single quotes properly. In configure, this macro expands | ||
446 | # each variable declared with _LT_DECL (and _LT_TAGDECL) into: | ||
447 | # | ||
448 | # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' | ||
449 | m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], | ||
450 | [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), | ||
451 | [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) | ||
452 | |||
453 | |||
454 | # _LT_LIBTOOL_TAGS | ||
455 | # ---------------- | ||
456 | # Output comment and list of tags supported by the script | ||
457 | m4_defun([_LT_LIBTOOL_TAGS], | ||
458 | [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl | ||
459 | available_tags='_LT_TAGS'dnl | ||
460 | ]) | ||
461 | |||
462 | |||
463 | # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) | ||
464 | # ----------------------------------- | ||
465 | # Extract the dictionary values for VARNAME (optionally with TAG) and | ||
466 | # expand to a commented shell variable setting: | ||
467 | # | ||
468 | # # Some comment about what VAR is for. | ||
469 | # visible_name=$lt_internal_name | ||
470 | m4_define([_LT_LIBTOOL_DECLARE], | ||
471 | [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], | ||
472 | [description])))[]dnl | ||
473 | m4_pushdef([_libtool_name], | ||
474 | m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl | ||
475 | m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), | ||
476 | [0], [_libtool_name=[$]$1], | ||
477 | [1], [_libtool_name=$lt_[]$1], | ||
478 | [2], [_libtool_name=$lt_[]$1], | ||
479 | [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl | ||
480 | m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl | ||
481 | ]) | ||
482 | |||
483 | |||
484 | # _LT_LIBTOOL_CONFIG_VARS | ||
485 | # ----------------------- | ||
486 | # Produce commented declarations of non-tagged libtool config variables | ||
487 | # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' | ||
488 | # script. Tagged libtool config variables (even for the LIBTOOL CONFIG | ||
489 | # section) are produced by _LT_LIBTOOL_TAG_VARS. | ||
490 | m4_defun([_LT_LIBTOOL_CONFIG_VARS], | ||
491 | [m4_foreach([_lt_var], | ||
492 | m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), | ||
493 | [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) | ||
494 | |||
495 | |||
496 | # _LT_LIBTOOL_TAG_VARS(TAG) | ||
497 | # ------------------------- | ||
498 | m4_define([_LT_LIBTOOL_TAG_VARS], | ||
499 | [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), | ||
500 | [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) | ||
501 | |||
502 | |||
503 | # _LT_TAGVAR(VARNAME, [TAGNAME]) | ||
504 | # ------------------------------ | ||
505 | m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) | ||
506 | |||
507 | |||
508 | # _LT_CONFIG_COMMANDS | ||
509 | # ------------------- | ||
510 | # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of | ||
511 | # variables for single and double quote escaping we saved from calls | ||
512 | # to _LT_DECL, we can put quote escaped variables declarations | ||
513 | # into 'config.status', and then the shell code to quote escape them in | ||
514 | # for loops in 'config.status'. Finally, any additional code accumulated | ||
515 | # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. | ||
516 | m4_defun([_LT_CONFIG_COMMANDS], | ||
517 | [AC_PROVIDE_IFELSE([LT_OUTPUT], | ||
518 | dnl If the libtool generation code has been placed in $CONFIG_LT, | ||
519 | dnl instead of duplicating it all over again into config.status, | ||
520 | dnl then we will have config.status run $CONFIG_LT later, so it | ||
521 | dnl needs to know what name is stored there: | ||
522 | [AC_CONFIG_COMMANDS([libtool], | ||
523 | [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], | ||
524 | dnl If the libtool generation code is destined for config.status, | ||
525 | dnl expand the accumulated commands and init code now: | ||
526 | [AC_CONFIG_COMMANDS([libtool], | ||
527 | [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) | ||
528 | ])#_LT_CONFIG_COMMANDS | ||
529 | |||
530 | |||
531 | # Initialize. | ||
532 | m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], | ||
533 | [ | ||
534 | |||
535 | # The HP-UX ksh and POSIX shell print the target directory to stdout | ||
536 | # if CDPATH is set. | ||
537 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH | ||
538 | |||
539 | sed_quote_subst='$sed_quote_subst' | ||
540 | double_quote_subst='$double_quote_subst' | ||
541 | delay_variable_subst='$delay_variable_subst' | ||
542 | _LT_CONFIG_STATUS_DECLARATIONS | ||
543 | LTCC='$LTCC' | ||
544 | LTCFLAGS='$LTCFLAGS' | ||
545 | compiler='$compiler_DEFAULT' | ||
546 | |||
547 | # A function that is used when there is no print builtin or printf. | ||
548 | func_fallback_echo () | ||
549 | { | ||
550 | eval 'cat <<_LTECHO_EOF | ||
551 | \$[]1 | ||
552 | _LTECHO_EOF' | ||
553 | } | ||
554 | |||
555 | # Quote evaled strings. | ||
556 | for var in lt_decl_all_varnames([[ \ | ||
557 | ]], lt_decl_quote_varnames); do | ||
558 | case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in | ||
559 | *[[\\\\\\\`\\"\\\$]]*) | ||
560 | eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes | ||
561 | ;; | ||
562 | *) | ||
563 | eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" | ||
564 | ;; | ||
565 | esac | ||
566 | done | ||
567 | |||
568 | # Double-quote double-evaled strings. | ||
569 | for var in lt_decl_all_varnames([[ \ | ||
570 | ]], lt_decl_dquote_varnames); do | ||
571 | case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in | ||
572 | *[[\\\\\\\`\\"\\\$]]*) | ||
573 | eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes | ||
574 | ;; | ||
575 | *) | ||
576 | eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" | ||
577 | ;; | ||
578 | esac | ||
579 | done | ||
580 | |||
581 | _LT_OUTPUT_LIBTOOL_INIT | ||
582 | ]) | ||
583 | |||
584 | # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) | ||
585 | # ------------------------------------ | ||
586 | # Generate a child script FILE with all initialization necessary to | ||
587 | # reuse the environment learned by the parent script, and make the | ||
588 | # file executable. If COMMENT is supplied, it is inserted after the | ||
589 | # '#!' sequence but before initialization text begins. After this | ||
590 | # macro, additional text can be appended to FILE to form the body of | ||
591 | # the child script. The macro ends with non-zero status if the | ||
592 | # file could not be fully written (such as if the disk is full). | ||
593 | m4_ifdef([AS_INIT_GENERATED], | ||
594 | [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], | ||
595 | [m4_defun([_LT_GENERATED_FILE_INIT], | ||
596 | [m4_require([AS_PREPARE])]dnl | ||
597 | [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl | ||
598 | [lt_write_fail=0 | ||
599 | cat >$1 <<_ASEOF || lt_write_fail=1 | ||
600 | #! $SHELL | ||
601 | # Generated by $as_me. | ||
602 | $2 | ||
603 | SHELL=\${CONFIG_SHELL-$SHELL} | ||
604 | export SHELL | ||
605 | _ASEOF | ||
606 | cat >>$1 <<\_ASEOF || lt_write_fail=1 | ||
607 | AS_SHELL_SANITIZE | ||
608 | _AS_PREPARE | ||
609 | exec AS_MESSAGE_FD>&1 | ||
610 | _ASEOF | ||
611 | test 0 = "$lt_write_fail" && chmod +x $1[]dnl | ||
612 | m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT | ||
613 | |||
614 | # LT_OUTPUT | ||
615 | # --------- | ||
616 | # This macro allows early generation of the libtool script (before | ||
617 | # AC_OUTPUT is called), incase it is used in configure for compilation | ||
618 | # tests. | ||
619 | AC_DEFUN([LT_OUTPUT], | ||
620 | [: ${CONFIG_LT=./config.lt} | ||
621 | AC_MSG_NOTICE([creating $CONFIG_LT]) | ||
622 | _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], | ||
623 | [# Run this file to recreate a libtool stub with the current configuration.]) | ||
624 | |||
625 | cat >>"$CONFIG_LT" <<\_LTEOF | ||
626 | lt_cl_silent=false | ||
627 | exec AS_MESSAGE_LOG_FD>>config.log | ||
628 | { | ||
629 | echo | ||
630 | AS_BOX([Running $as_me.]) | ||
631 | } >&AS_MESSAGE_LOG_FD | ||
632 | |||
633 | lt_cl_help="\ | ||
634 | '$as_me' creates a local libtool stub from the current configuration, | ||
635 | for use in further configure time tests before the real libtool is | ||
636 | generated. | ||
637 | |||
638 | Usage: $[0] [[OPTIONS]] | ||
639 | |||
640 | -h, --help print this help, then exit | ||
641 | -V, --version print version number, then exit | ||
642 | -q, --quiet do not print progress messages | ||
643 | -d, --debug don't remove temporary files | ||
644 | |||
645 | Report bugs to <bug-libtool@gnu.org>." | ||
646 | |||
647 | lt_cl_version="\ | ||
648 | m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl | ||
649 | m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) | ||
650 | configured by $[0], generated by m4_PACKAGE_STRING. | ||
651 | |||
652 | Copyright (C) 2011 Free Software Foundation, Inc. | ||
653 | This config.lt script is free software; the Free Software Foundation | ||
654 | gives unlimited permision to copy, distribute and modify it." | ||
655 | |||
656 | while test 0 != $[#] | ||
657 | do | ||
658 | case $[1] in | ||
659 | --version | --v* | -V ) | ||
660 | echo "$lt_cl_version"; exit 0 ;; | ||
661 | --help | --h* | -h ) | ||
662 | echo "$lt_cl_help"; exit 0 ;; | ||
663 | --debug | --d* | -d ) | ||
664 | debug=: ;; | ||
665 | --quiet | --q* | --silent | --s* | -q ) | ||
666 | lt_cl_silent=: ;; | ||
667 | |||
668 | -*) AC_MSG_ERROR([unrecognized option: $[1] | ||
669 | Try '$[0] --help' for more information.]) ;; | ||
670 | |||
671 | *) AC_MSG_ERROR([unrecognized argument: $[1] | ||
672 | Try '$[0] --help' for more information.]) ;; | ||
673 | esac | ||
674 | shift | ||
675 | done | ||
676 | |||
677 | if $lt_cl_silent; then | ||
678 | exec AS_MESSAGE_FD>/dev/null | ||
679 | fi | ||
680 | _LTEOF | ||
681 | |||
682 | cat >>"$CONFIG_LT" <<_LTEOF | ||
683 | _LT_OUTPUT_LIBTOOL_COMMANDS_INIT | ||
684 | _LTEOF | ||
685 | |||
686 | cat >>"$CONFIG_LT" <<\_LTEOF | ||
687 | AC_MSG_NOTICE([creating $ofile]) | ||
688 | _LT_OUTPUT_LIBTOOL_COMMANDS | ||
689 | AS_EXIT(0) | ||
690 | _LTEOF | ||
691 | chmod +x "$CONFIG_LT" | ||
692 | |||
693 | # configure is writing to config.log, but config.lt does its own redirection, | ||
694 | # appending to config.log, which fails on DOS, as config.log is still kept | ||
695 | # open by configure. Here we exec the FD to /dev/null, effectively closing | ||
696 | # config.log, so it can be properly (re)opened and appended to by config.lt. | ||
697 | lt_cl_success=: | ||
698 | test yes = "$silent" && | ||
699 | lt_config_lt_args="$lt_config_lt_args --quiet" | ||
700 | exec AS_MESSAGE_LOG_FD>/dev/null | ||
701 | $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false | ||
702 | exec AS_MESSAGE_LOG_FD>>config.log | ||
703 | $lt_cl_success || AS_EXIT(1) | ||
704 | ])# LT_OUTPUT | ||
705 | |||
706 | |||
707 | # _LT_CONFIG(TAG) | ||
708 | # --------------- | ||
709 | # If TAG is the built-in tag, create an initial libtool script with a | ||
710 | # default configuration from the untagged config vars. Otherwise add code | ||
711 | # to config.status for appending the configuration named by TAG from the | ||
712 | # matching tagged config vars. | ||
713 | m4_defun([_LT_CONFIG], | ||
714 | [m4_require([_LT_FILEUTILS_DEFAULTS])dnl | ||
715 | _LT_CONFIG_SAVE_COMMANDS([ | ||
716 | m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl | ||
717 | m4_if(_LT_TAG, [C], [ | ||
718 | # See if we are running on zsh, and set the options that allow our | ||
719 | # commands through without removal of \ escapes. | ||
720 | if test -n "${ZSH_VERSION+set}"; then | ||
721 | setopt NO_GLOB_SUBST | ||
722 | fi | ||
723 | |||
724 | cfgfile=${ofile}T | ||
725 | trap "$RM \"$cfgfile\"; exit 1" 1 2 15 | ||
726 | $RM "$cfgfile" | ||
727 | |||
728 | cat <<_LT_EOF >> "$cfgfile" | ||
729 | #! $SHELL | ||
730 | # Generated automatically by $as_me ($PACKAGE) $VERSION | ||
731 | # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | ||
732 | # NOTE: Changes made to this file will be lost: look at ltmain.sh. | ||
733 | |||
734 | # Provide generalized library-building support services. | ||
735 | # Written by Gordon Matzigkeit, 1996 | ||
736 | |||
737 | _LT_COPYING | ||
738 | _LT_LIBTOOL_TAGS | ||
739 | |||
740 | # Configured defaults for sys_lib_dlsearch_path munging. | ||
741 | : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} | ||
742 | |||
743 | # ### BEGIN LIBTOOL CONFIG | ||
744 | _LT_LIBTOOL_CONFIG_VARS | ||
745 | _LT_LIBTOOL_TAG_VARS | ||
746 | # ### END LIBTOOL CONFIG | ||
747 | |||
748 | _LT_EOF | ||
749 | |||
750 | cat <<'_LT_EOF' >> "$cfgfile" | ||
751 | |||
752 | # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE | ||
753 | |||
754 | _LT_PREPARE_MUNGE_PATH_LIST | ||
755 | _LT_PREPARE_CC_BASENAME | ||
756 | |||
757 | # ### END FUNCTIONS SHARED WITH CONFIGURE | ||
758 | |||
759 | _LT_EOF | ||
760 | |||
761 | case $host_os in | ||
762 | aix3*) | ||
763 | cat <<\_LT_EOF >> "$cfgfile" | ||
764 | # AIX sometimes has problems with the GCC collect2 program. For some | ||
765 | # reason, if we set the COLLECT_NAMES environment variable, the problems | ||
766 | # vanish in a puff of smoke. | ||
767 | if test set != "${COLLECT_NAMES+set}"; then | ||
768 | COLLECT_NAMES= | ||
769 | export COLLECT_NAMES | ||
770 | fi | ||
771 | _LT_EOF | ||
772 | ;; | ||
773 | esac | ||
774 | |||
775 | _LT_PROG_LTMAIN | ||
776 | |||
777 | # We use sed instead of cat because bash on DJGPP gets confused if | ||
778 | # if finds mixed CR/LF and LF-only lines. Since sed operates in | ||
779 | # text mode, it properly converts lines to CR/LF. This bash problem | ||
780 | # is reportedly fixed, but why not run on old versions too? | ||
781 | sed '$q' "$ltmain" >> "$cfgfile" \ | ||
782 | || (rm -f "$cfgfile"; exit 1) | ||
783 | |||
784 | mv -f "$cfgfile" "$ofile" || | ||
785 | (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") | ||
786 | chmod +x "$ofile" | ||
787 | ], | ||
788 | [cat <<_LT_EOF >> "$ofile" | ||
789 | |||
790 | dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded | ||
791 | dnl in a comment (ie after a #). | ||
792 | # ### BEGIN LIBTOOL TAG CONFIG: $1 | ||
793 | _LT_LIBTOOL_TAG_VARS(_LT_TAG) | ||
794 | # ### END LIBTOOL TAG CONFIG: $1 | ||
795 | _LT_EOF | ||
796 | ])dnl /m4_if | ||
797 | ], | ||
798 | [m4_if([$1], [], [ | ||
799 | PACKAGE='$PACKAGE' | ||
800 | VERSION='$VERSION' | ||
801 | RM='$RM' | ||
802 | ofile='$ofile'], []) | ||
803 | ])dnl /_LT_CONFIG_SAVE_COMMANDS | ||
804 | ])# _LT_CONFIG | ||
805 | |||
806 | |||
807 | # LT_SUPPORTED_TAG(TAG) | ||
808 | # --------------------- | ||
809 | # Trace this macro to discover what tags are supported by the libtool | ||
810 | # --tag option, using: | ||
811 | # autoconf --trace 'LT_SUPPORTED_TAG:$1' | ||
812 | AC_DEFUN([LT_SUPPORTED_TAG], []) | ||
813 | |||
814 | |||
815 | # C support is built-in for now | ||
816 | m4_define([_LT_LANG_C_enabled], []) | ||
817 | m4_define([_LT_TAGS], []) | ||
818 | |||
819 | |||
820 | # LT_LANG(LANG) | ||
821 | # ------------- | ||
822 | # Enable libtool support for the given language if not already enabled. | ||
823 | AC_DEFUN([LT_LANG], | ||
824 | [AC_BEFORE([$0], [LT_OUTPUT])dnl | ||
825 | m4_case([$1], | ||
826 | [C], [_LT_LANG(C)], | ||
827 | [C++], [_LT_LANG(CXX)], | ||
828 | [Go], [_LT_LANG(GO)], | ||
829 | [Java], [_LT_LANG(GCJ)], | ||
830 | [Fortran 77], [_LT_LANG(F77)], | ||
831 | [Fortran], [_LT_LANG(FC)], | ||
832 | [Windows Resource], [_LT_LANG(RC)], | ||
833 | [m4_ifdef([_LT_LANG_]$1[_CONFIG], | ||
834 | [_LT_LANG($1)], | ||
835 | [m4_fatal([$0: unsupported language: "$1"])])])dnl | ||
836 | ])# LT_LANG | ||
837 | |||
838 | |||
839 | # _LT_LANG(LANGNAME) | ||
840 | # ------------------ | ||
841 | m4_defun([_LT_LANG], | ||
842 | [m4_ifdef([_LT_LANG_]$1[_enabled], [], | ||
843 | [LT_SUPPORTED_TAG([$1])dnl | ||
844 | m4_append([_LT_TAGS], [$1 ])dnl | ||
845 | m4_define([_LT_LANG_]$1[_enabled], [])dnl | ||
846 | _LT_LANG_$1_CONFIG($1)])dnl | ||
847 | ])# _LT_LANG | ||
848 | |||
849 | |||
850 | m4_ifndef([AC_PROG_GO], [ | ||
851 | ############################################################ | ||
852 | # NOTE: This macro has been submitted for inclusion into # | ||
853 | # GNU Autoconf as AC_PROG_GO. When it is available in # | ||
854 | # a released version of Autoconf we should remove this # | ||
855 | # macro and use it instead. # | ||
856 | ############################################################ | ||
857 | m4_defun([AC_PROG_GO], | ||
858 | [AC_LANG_PUSH(Go)dnl | ||
859 | AC_ARG_VAR([GOC], [Go compiler command])dnl | ||
860 | AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl | ||
861 | _AC_ARG_VAR_LDFLAGS()dnl | ||
862 | AC_CHECK_TOOL(GOC, gccgo) | ||
863 | if test -z "$GOC"; then | ||
864 | if test -n "$ac_tool_prefix"; then | ||
865 | AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) | ||
866 | fi | ||
867 | fi | ||
868 | if test -z "$GOC"; then | ||
869 | AC_CHECK_PROG(GOC, gccgo, gccgo, false) | ||
870 | fi | ||
871 | ])#m4_defun | ||
872 | ])#m4_ifndef | ||
873 | |||
874 | |||
875 | # _LT_LANG_DEFAULT_CONFIG | ||
876 | # ----------------------- | ||
877 | m4_defun([_LT_LANG_DEFAULT_CONFIG], | ||
878 | [AC_PROVIDE_IFELSE([AC_PROG_CXX], | ||
879 | [LT_LANG(CXX)], | ||
880 | [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) | ||
881 | |||
882 | AC_PROVIDE_IFELSE([AC_PROG_F77], | ||
883 | [LT_LANG(F77)], | ||
884 | [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) | ||
885 | |||
886 | AC_PROVIDE_IFELSE([AC_PROG_FC], | ||
887 | [LT_LANG(FC)], | ||
888 | [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) | ||
889 | |||
890 | dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal | ||
891 | dnl pulling things in needlessly. | ||
892 | AC_PROVIDE_IFELSE([AC_PROG_GCJ], | ||
893 | [LT_LANG(GCJ)], | ||
894 | [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], | ||
895 | [LT_LANG(GCJ)], | ||
896 | [AC_PROVIDE_IFELSE([LT_PROG_GCJ], | ||
897 | [LT_LANG(GCJ)], | ||
898 | [m4_ifdef([AC_PROG_GCJ], | ||
899 | [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) | ||
900 | m4_ifdef([A][M_PROG_GCJ], | ||
901 | [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) | ||
902 | m4_ifdef([LT_PROG_GCJ], | ||
903 | [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) | ||
904 | |||
905 | AC_PROVIDE_IFELSE([AC_PROG_GO], | ||
906 | [LT_LANG(GO)], | ||
907 | [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) | ||
908 | |||
909 | AC_PROVIDE_IFELSE([LT_PROG_RC], | ||
910 | [LT_LANG(RC)], | ||
911 | [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) | ||
912 | ])# _LT_LANG_DEFAULT_CONFIG | ||
913 | |||
914 | # Obsolete macros: | ||
915 | AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) | ||
916 | AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) | ||
917 | AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) | ||
918 | AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) | ||
919 | AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) | ||
920 | dnl aclocal-1.4 backwards compatibility: | ||
921 | dnl AC_DEFUN([AC_LIBTOOL_CXX], []) | ||
922 | dnl AC_DEFUN([AC_LIBTOOL_F77], []) | ||
923 | dnl AC_DEFUN([AC_LIBTOOL_FC], []) | ||
924 | dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) | ||
925 | dnl AC_DEFUN([AC_LIBTOOL_RC], []) | ||
926 | |||
927 | |||
928 | # _LT_TAG_COMPILER | ||
929 | # ---------------- | ||
930 | m4_defun([_LT_TAG_COMPILER], | ||
931 | [AC_REQUIRE([AC_PROG_CC])dnl | ||
932 | |||
933 | _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl | ||
934 | _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl | ||
935 | _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl | ||
936 | _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl | ||
937 | |||
938 | # If no C compiler was specified, use CC. | ||
939 | LTCC=${LTCC-"$CC"} | ||
940 | |||
941 | # If no C compiler flags were specified, use CFLAGS. | ||
942 | LTCFLAGS=${LTCFLAGS-"$CFLAGS"} | ||
943 | |||
944 | # Allow CC to be a program name with arguments. | ||
945 | compiler=$CC | ||
946 | ])# _LT_TAG_COMPILER | ||
947 | |||
948 | |||
949 | # _LT_COMPILER_BOILERPLATE | ||
950 | # ------------------------ | ||
951 | # Check for compiler boilerplate output or warnings with | ||
952 | # the simple compiler test code. | ||
953 | m4_defun([_LT_COMPILER_BOILERPLATE], | ||
954 | [m4_require([_LT_DECL_SED])dnl | ||
955 | ac_outfile=conftest.$ac_objext | ||
956 | echo "$lt_simple_compile_test_code" >conftest.$ac_ext | ||
957 | eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err | ||
958 | _lt_compiler_boilerplate=`cat conftest.err` | ||
959 | $RM conftest* | ||
960 | ])# _LT_COMPILER_BOILERPLATE | ||
961 | |||
962 | |||
963 | # _LT_LINKER_BOILERPLATE | ||
964 | # ---------------------- | ||
965 | # Check for linker boilerplate output or warnings with | ||
966 | # the simple link test code. | ||
967 | m4_defun([_LT_LINKER_BOILERPLATE], | ||
968 | [m4_require([_LT_DECL_SED])dnl | ||
969 | ac_outfile=conftest.$ac_objext | ||
970 | echo "$lt_simple_link_test_code" >conftest.$ac_ext | ||
971 | eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err | ||
972 | _lt_linker_boilerplate=`cat conftest.err` | ||
973 | $RM -r conftest* | ||
974 | ])# _LT_LINKER_BOILERPLATE | ||
975 | |||
976 | # _LT_REQUIRED_DARWIN_CHECKS | ||
977 | # ------------------------- | ||
978 | m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ | ||
979 | case $host_os in | ||
980 | rhapsody* | darwin*) | ||
981 | AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) | ||
982 | AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) | ||
983 | AC_CHECK_TOOL([LIPO], [lipo], [:]) | ||
984 | AC_CHECK_TOOL([OTOOL], [otool], [:]) | ||
985 | AC_CHECK_TOOL([OTOOL64], [otool64], [:]) | ||
986 | _LT_DECL([], [DSYMUTIL], [1], | ||
987 | [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) | ||
988 | _LT_DECL([], [NMEDIT], [1], | ||
989 | [Tool to change global to local symbols on Mac OS X]) | ||
990 | _LT_DECL([], [LIPO], [1], | ||
991 | [Tool to manipulate fat objects and archives on Mac OS X]) | ||
992 | _LT_DECL([], [OTOOL], [1], | ||
993 | [ldd/readelf like tool for Mach-O binaries on Mac OS X]) | ||
994 | _LT_DECL([], [OTOOL64], [1], | ||
995 | [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) | ||
996 | |||
997 | AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], | ||
998 | [lt_cv_apple_cc_single_mod=no | ||
999 | if test -z "$LT_MULTI_MODULE"; then | ||
1000 | # By default we will add the -single_module flag. You can override | ||
1001 | # by either setting the environment variable LT_MULTI_MODULE | ||
1002 | # non-empty at configure time, or by adding -multi_module to the | ||
1003 | # link flags. | ||
1004 | rm -rf libconftest.dylib* | ||
1005 | echo "int foo(void){return 1;}" > conftest.c | ||
1006 | echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ | ||
1007 | -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD | ||
1008 | $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ | ||
1009 | -dynamiclib -Wl,-single_module conftest.c 2>conftest.err | ||
1010 | _lt_result=$? | ||
1011 | # If there is a non-empty error log, and "single_module" | ||
1012 | # appears in it, assume the flag caused a linker warning | ||
1013 | if test -s conftest.err && $GREP single_module conftest.err; then | ||
1014 | cat conftest.err >&AS_MESSAGE_LOG_FD | ||
1015 | # Otherwise, if the output was created with a 0 exit code from | ||
1016 | # the compiler, it worked. | ||
1017 | elif test -f libconftest.dylib && test 0 = "$_lt_result"; then | ||
1018 | lt_cv_apple_cc_single_mod=yes | ||
1019 | else | ||
1020 | cat conftest.err >&AS_MESSAGE_LOG_FD | ||
1021 | fi | ||
1022 | rm -rf libconftest.dylib* | ||
1023 | rm -f conftest.* | ||
1024 | fi]) | ||
1025 | |||
1026 | AC_CACHE_CHECK([for -exported_symbols_list linker flag], | ||
1027 | [lt_cv_ld_exported_symbols_list], | ||
1028 | [lt_cv_ld_exported_symbols_list=no | ||
1029 | save_LDFLAGS=$LDFLAGS | ||
1030 | echo "_main" > conftest.sym | ||
1031 | LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" | ||
1032 | AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], | ||
1033 | [lt_cv_ld_exported_symbols_list=yes], | ||
1034 | [lt_cv_ld_exported_symbols_list=no]) | ||
1035 | LDFLAGS=$save_LDFLAGS | ||
1036 | ]) | ||
1037 | |||
1038 | AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], | ||
1039 | [lt_cv_ld_force_load=no | ||
1040 | cat > conftest.c << _LT_EOF | ||
1041 | int forced_loaded() { return 2;} | ||
1042 | _LT_EOF | ||
1043 | echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD | ||
1044 | $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD | ||
1045 | echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD | ||
1046 | $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD | ||
1047 | echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD | ||
1048 | $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD | ||
1049 | cat > conftest.c << _LT_EOF | ||
1050 | int main() { return 0;} | ||
1051 | _LT_EOF | ||
1052 | echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD | ||
1053 | $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err | ||
1054 | _lt_result=$? | ||
1055 | if test -s conftest.err && $GREP force_load conftest.err; then | ||
1056 | cat conftest.err >&AS_MESSAGE_LOG_FD | ||
1057 | elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then | ||
1058 | lt_cv_ld_force_load=yes | ||
1059 | else | ||
1060 | cat conftest.err >&AS_MESSAGE_LOG_FD | ||
1061 | fi | ||
1062 | rm -f conftest.err libconftest.a conftest conftest.c | ||
1063 | rm -rf conftest.dSYM | ||
1064 | ]) | ||
1065 | case $host_os in | ||
1066 | rhapsody* | darwin1.[[012]]) | ||
1067 | _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; | ||
1068 | darwin1.*) | ||
1069 | _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; | ||
1070 | darwin*) # darwin 5.x on | ||
1071 | # if running on 10.5 or later, the deployment target defaults | ||
1072 | # to the OS version, if on x86, and 10.4, the deployment | ||
1073 | # target defaults to 10.4. Don't you love it? | ||
1074 | case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in | ||
1075 | 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) | ||
1076 | _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; | ||
1077 | 10.[[012]][[,.]]*) | ||
1078 | _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; | ||
1079 | 10.*) | ||
1080 | _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; | ||
1081 | esac | ||
1082 | ;; | ||
1083 | esac | ||
1084 | if test yes = "$lt_cv_apple_cc_single_mod"; then | ||
1085 | _lt_dar_single_mod='$single_module' | ||
1086 | fi | ||
1087 | if test yes = "$lt_cv_ld_exported_symbols_list"; then | ||
1088 | _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' | ||
1089 | else | ||
1090 | _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' | ||
1091 | fi | ||
1092 | if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then | ||
1093 | _lt_dsymutil='~$DSYMUTIL $lib || :' | ||
1094 | else | ||
1095 | _lt_dsymutil= | ||
1096 | fi | ||
1097 | ;; | ||
1098 | esac | ||
1099 | ]) | ||
1100 | |||
1101 | |||
1102 | # _LT_DARWIN_LINKER_FEATURES([TAG]) | ||
1103 | # --------------------------------- | ||
1104 | # Checks for linker and compiler features on darwin | ||
1105 | m4_defun([_LT_DARWIN_LINKER_FEATURES], | ||
1106 | [ | ||
1107 | m4_require([_LT_REQUIRED_DARWIN_CHECKS]) | ||
1108 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
1109 | _LT_TAGVAR(hardcode_direct, $1)=no | ||
1110 | _LT_TAGVAR(hardcode_automatic, $1)=yes | ||
1111 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported | ||
1112 | if test yes = "$lt_cv_ld_force_load"; then | ||
1113 | _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' | ||
1114 | m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], | ||
1115 | [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) | ||
1116 | else | ||
1117 | _LT_TAGVAR(whole_archive_flag_spec, $1)='' | ||
1118 | fi | ||
1119 | _LT_TAGVAR(link_all_deplibs, $1)=yes | ||
1120 | _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined | ||
1121 | case $cc_basename in | ||
1122 | ifort*|nagfor*) _lt_dar_can_shared=yes ;; | ||
1123 | *) _lt_dar_can_shared=$GCC ;; | ||
1124 | esac | ||
1125 | if test yes = "$_lt_dar_can_shared"; then | ||
1126 | output_verbose_link_cmd=func_echo_all | ||
1127 | _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" | ||
1128 | _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" | ||
1129 | _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" | ||
1130 | _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" | ||
1131 | m4_if([$1], [CXX], | ||
1132 | [ if test yes != "$lt_cv_apple_cc_single_mod"; then | ||
1133 | _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" | ||
1134 | _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" | ||
1135 | fi | ||
1136 | ],[]) | ||
1137 | else | ||
1138 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
1139 | fi | ||
1140 | ]) | ||
1141 | |||
1142 | # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) | ||
1143 | # ---------------------------------- | ||
1144 | # Links a minimal program and checks the executable | ||
1145 | # for the system default hardcoded library path. In most cases, | ||
1146 | # this is /usr/lib:/lib, but when the MPI compilers are used | ||
1147 | # the location of the communication and MPI libs are included too. | ||
1148 | # If we don't find anything, use the default library path according | ||
1149 | # to the aix ld manual. | ||
1150 | # Store the results from the different compilers for each TAGNAME. | ||
1151 | # Allow to override them for all tags through lt_cv_aix_libpath. | ||
1152 | m4_defun([_LT_SYS_MODULE_PATH_AIX], | ||
1153 | [m4_require([_LT_DECL_SED])dnl | ||
1154 | if test set = "${lt_cv_aix_libpath+set}"; then | ||
1155 | aix_libpath=$lt_cv_aix_libpath | ||
1156 | else | ||
1157 | AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], | ||
1158 | [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ | ||
1159 | lt_aix_libpath_sed='[ | ||
1160 | /Import File Strings/,/^$/ { | ||
1161 | /^0/ { | ||
1162 | s/^0 *\([^ ]*\) *$/\1/ | ||
1163 | p | ||
1164 | } | ||
1165 | }]' | ||
1166 | _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
1167 | # Check for a 64-bit object if we didn't find anything. | ||
1168 | if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then | ||
1169 | _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` | ||
1170 | fi],[]) | ||
1171 | if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then | ||
1172 | _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib | ||
1173 | fi | ||
1174 | ]) | ||
1175 | aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) | ||
1176 | fi | ||
1177 | ])# _LT_SYS_MODULE_PATH_AIX | ||
1178 | |||
1179 | |||
1180 | # _LT_SHELL_INIT(ARG) | ||
1181 | # ------------------- | ||
1182 | m4_define([_LT_SHELL_INIT], | ||
1183 | [m4_divert_text([M4SH-INIT], [$1 | ||
1184 | ])])# _LT_SHELL_INIT | ||
1185 | |||
1186 | |||
1187 | |||
1188 | # _LT_PROG_ECHO_BACKSLASH | ||
1189 | # ----------------------- | ||
1190 | # Find how we can fake an echo command that does not interpret backslash. | ||
1191 | # In particular, with Autoconf 2.60 or later we add some code to the start | ||
1192 | # of the generated configure script that will find a shell with a builtin | ||
1193 | # printf (that we can use as an echo command). | ||
1194 | m4_defun([_LT_PROG_ECHO_BACKSLASH], | ||
1195 | [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | ||
1196 | ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO | ||
1197 | ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO | ||
1198 | |||
1199 | AC_MSG_CHECKING([how to print strings]) | ||
1200 | # Test print first, because it will be a builtin if present. | ||
1201 | if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ | ||
1202 | test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then | ||
1203 | ECHO='print -r --' | ||
1204 | elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then | ||
1205 | ECHO='printf %s\n' | ||
1206 | else | ||
1207 | # Use this function as a fallback that always works. | ||
1208 | func_fallback_echo () | ||
1209 | { | ||
1210 | eval 'cat <<_LTECHO_EOF | ||
1211 | $[]1 | ||
1212 | _LTECHO_EOF' | ||
1213 | } | ||
1214 | ECHO='func_fallback_echo' | ||
1215 | fi | ||
1216 | |||
1217 | # func_echo_all arg... | ||
1218 | # Invoke $ECHO with all args, space-separated. | ||
1219 | func_echo_all () | ||
1220 | { | ||
1221 | $ECHO "$*" | ||
1222 | } | ||
1223 | |||
1224 | case $ECHO in | ||
1225 | printf*) AC_MSG_RESULT([printf]) ;; | ||
1226 | print*) AC_MSG_RESULT([print -r]) ;; | ||
1227 | *) AC_MSG_RESULT([cat]) ;; | ||
1228 | esac | ||
1229 | |||
1230 | m4_ifdef([_AS_DETECT_SUGGESTED], | ||
1231 | [_AS_DETECT_SUGGESTED([ | ||
1232 | test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( | ||
1233 | ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' | ||
1234 | ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO | ||
1235 | ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO | ||
1236 | PATH=/empty FPATH=/empty; export PATH FPATH | ||
1237 | test "X`printf %s $ECHO`" = "X$ECHO" \ | ||
1238 | || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) | ||
1239 | |||
1240 | _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) | ||
1241 | _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) | ||
1242 | ])# _LT_PROG_ECHO_BACKSLASH | ||
1243 | |||
1244 | |||
1245 | # _LT_WITH_SYSROOT | ||
1246 | # ---------------- | ||
1247 | AC_DEFUN([_LT_WITH_SYSROOT], | ||
1248 | [AC_MSG_CHECKING([for sysroot]) | ||
1249 | AC_ARG_WITH([sysroot], | ||
1250 | [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], | ||
1251 | [Search for dependent libraries within DIR (or the compiler's sysroot | ||
1252 | if not specified).])], | ||
1253 | [], [with_sysroot=no]) | ||
1254 | |||
1255 | dnl lt_sysroot will always be passed unquoted. We quote it here | ||
1256 | dnl in case the user passed a directory name. | ||
1257 | lt_sysroot= | ||
1258 | case $with_sysroot in #( | ||
1259 | yes) | ||
1260 | if test yes = "$GCC"; then | ||
1261 | lt_sysroot=`$CC --print-sysroot 2>/dev/null` | ||
1262 | fi | ||
1263 | ;; #( | ||
1264 | /*) | ||
1265 | lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` | ||
1266 | ;; #( | ||
1267 | no|'') | ||
1268 | ;; #( | ||
1269 | *) | ||
1270 | AC_MSG_RESULT([$with_sysroot]) | ||
1271 | AC_MSG_ERROR([The sysroot must be an absolute path.]) | ||
1272 | ;; | ||
1273 | esac | ||
1274 | |||
1275 | AC_MSG_RESULT([${lt_sysroot:-no}]) | ||
1276 | _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl | ||
1277 | [dependent libraries, and where our libraries should be installed.])]) | ||
1278 | |||
1279 | # _LT_ENABLE_LOCK | ||
1280 | # --------------- | ||
1281 | m4_defun([_LT_ENABLE_LOCK], | ||
1282 | [AC_ARG_ENABLE([libtool-lock], | ||
1283 | [AS_HELP_STRING([--disable-libtool-lock], | ||
1284 | [avoid locking (might break parallel builds)])]) | ||
1285 | test no = "$enable_libtool_lock" || enable_libtool_lock=yes | ||
1286 | |||
1287 | # Some flags need to be propagated to the compiler or linker for good | ||
1288 | # libtool support. | ||
1289 | case $host in | ||
1290 | ia64-*-hpux*) | ||
1291 | # Find out what ABI is being produced by ac_compile, and set mode | ||
1292 | # options accordingly. | ||
1293 | echo 'int i;' > conftest.$ac_ext | ||
1294 | if AC_TRY_EVAL(ac_compile); then | ||
1295 | case `/usr/bin/file conftest.$ac_objext` in | ||
1296 | *ELF-32*) | ||
1297 | HPUX_IA64_MODE=32 | ||
1298 | ;; | ||
1299 | *ELF-64*) | ||
1300 | HPUX_IA64_MODE=64 | ||
1301 | ;; | ||
1302 | esac | ||
1303 | fi | ||
1304 | rm -rf conftest* | ||
1305 | ;; | ||
1306 | *-*-irix6*) | ||
1307 | # Find out what ABI is being produced by ac_compile, and set linker | ||
1308 | # options accordingly. | ||
1309 | echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext | ||
1310 | if AC_TRY_EVAL(ac_compile); then | ||
1311 | if test yes = "$lt_cv_prog_gnu_ld"; then | ||
1312 | case `/usr/bin/file conftest.$ac_objext` in | ||
1313 | *32-bit*) | ||
1314 | LD="${LD-ld} -melf32bsmip" | ||
1315 | ;; | ||
1316 | *N32*) | ||
1317 | LD="${LD-ld} -melf32bmipn32" | ||
1318 | ;; | ||
1319 | *64-bit*) | ||
1320 | LD="${LD-ld} -melf64bmip" | ||
1321 | ;; | ||
1322 | esac | ||
1323 | else | ||
1324 | case `/usr/bin/file conftest.$ac_objext` in | ||
1325 | *32-bit*) | ||
1326 | LD="${LD-ld} -32" | ||
1327 | ;; | ||
1328 | *N32*) | ||
1329 | LD="${LD-ld} -n32" | ||
1330 | ;; | ||
1331 | *64-bit*) | ||
1332 | LD="${LD-ld} -64" | ||
1333 | ;; | ||
1334 | esac | ||
1335 | fi | ||
1336 | fi | ||
1337 | rm -rf conftest* | ||
1338 | ;; | ||
1339 | |||
1340 | mips64*-*linux*) | ||
1341 | # Find out what ABI is being produced by ac_compile, and set linker | ||
1342 | # options accordingly. | ||
1343 | echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext | ||
1344 | if AC_TRY_EVAL(ac_compile); then | ||
1345 | emul=elf | ||
1346 | case `/usr/bin/file conftest.$ac_objext` in | ||
1347 | *32-bit*) | ||
1348 | emul="${emul}32" | ||
1349 | ;; | ||
1350 | *64-bit*) | ||
1351 | emul="${emul}64" | ||
1352 | ;; | ||
1353 | esac | ||
1354 | case `/usr/bin/file conftest.$ac_objext` in | ||
1355 | *MSB*) | ||
1356 | emul="${emul}btsmip" | ||
1357 | ;; | ||
1358 | *LSB*) | ||
1359 | emul="${emul}ltsmip" | ||
1360 | ;; | ||
1361 | esac | ||
1362 | case `/usr/bin/file conftest.$ac_objext` in | ||
1363 | *N32*) | ||
1364 | emul="${emul}n32" | ||
1365 | ;; | ||
1366 | esac | ||
1367 | LD="${LD-ld} -m $emul" | ||
1368 | fi | ||
1369 | rm -rf conftest* | ||
1370 | ;; | ||
1371 | |||
1372 | x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ | ||
1373 | s390*-*linux*|s390*-*tpf*|sparc*-*linux*) | ||
1374 | # Find out what ABI is being produced by ac_compile, and set linker | ||
1375 | # options accordingly. Note that the listed cases only cover the | ||
1376 | # situations where additional linker options are needed (such as when | ||
1377 | # doing 32-bit compilation for a host where ld defaults to 64-bit, or | ||
1378 | # vice versa); the common cases where no linker options are needed do | ||
1379 | # not appear in the list. | ||
1380 | echo 'int i;' > conftest.$ac_ext | ||
1381 | if AC_TRY_EVAL(ac_compile); then | ||
1382 | case `/usr/bin/file conftest.o` in | ||
1383 | *32-bit*) | ||
1384 | case $host in | ||
1385 | x86_64-*kfreebsd*-gnu) | ||
1386 | LD="${LD-ld} -m elf_i386_fbsd" | ||
1387 | ;; | ||
1388 | x86_64-*linux*) | ||
1389 | case `/usr/bin/file conftest.o` in | ||
1390 | *x86-64*) | ||
1391 | LD="${LD-ld} -m elf32_x86_64" | ||
1392 | ;; | ||
1393 | *) | ||
1394 | LD="${LD-ld} -m elf_i386" | ||
1395 | ;; | ||
1396 | esac | ||
1397 | ;; | ||
1398 | powerpc64le-*linux*) | ||
1399 | LD="${LD-ld} -m elf32lppclinux" | ||
1400 | ;; | ||
1401 | powerpc64-*linux*) | ||
1402 | LD="${LD-ld} -m elf32ppclinux" | ||
1403 | ;; | ||
1404 | s390x-*linux*) | ||
1405 | LD="${LD-ld} -m elf_s390" | ||
1406 | ;; | ||
1407 | sparc64-*linux*) | ||
1408 | LD="${LD-ld} -m elf32_sparc" | ||
1409 | ;; | ||
1410 | esac | ||
1411 | ;; | ||
1412 | *64-bit*) | ||
1413 | case $host in | ||
1414 | x86_64-*kfreebsd*-gnu) | ||
1415 | LD="${LD-ld} -m elf_x86_64_fbsd" | ||
1416 | ;; | ||
1417 | x86_64-*linux*) | ||
1418 | LD="${LD-ld} -m elf_x86_64" | ||
1419 | ;; | ||
1420 | powerpcle-*linux*) | ||
1421 | LD="${LD-ld} -m elf64lppc" | ||
1422 | ;; | ||
1423 | powerpc-*linux*) | ||
1424 | LD="${LD-ld} -m elf64ppc" | ||
1425 | ;; | ||
1426 | s390*-*linux*|s390*-*tpf*) | ||
1427 | LD="${LD-ld} -m elf64_s390" | ||
1428 | ;; | ||
1429 | sparc*-*linux*) | ||
1430 | LD="${LD-ld} -m elf64_sparc" | ||
1431 | ;; | ||
1432 | esac | ||
1433 | ;; | ||
1434 | esac | ||
1435 | fi | ||
1436 | rm -rf conftest* | ||
1437 | ;; | ||
1438 | |||
1439 | *-*-sco3.2v5*) | ||
1440 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. | ||
1441 | SAVE_CFLAGS=$CFLAGS | ||
1442 | CFLAGS="$CFLAGS -belf" | ||
1443 | AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, | ||
1444 | [AC_LANG_PUSH(C) | ||
1445 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) | ||
1446 | AC_LANG_POP]) | ||
1447 | if test yes != "$lt_cv_cc_needs_belf"; then | ||
1448 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf | ||
1449 | CFLAGS=$SAVE_CFLAGS | ||
1450 | fi | ||
1451 | ;; | ||
1452 | *-*solaris*) | ||
1453 | # Find out what ABI is being produced by ac_compile, and set linker | ||
1454 | # options accordingly. | ||
1455 | echo 'int i;' > conftest.$ac_ext | ||
1456 | if AC_TRY_EVAL(ac_compile); then | ||
1457 | case `/usr/bin/file conftest.o` in | ||
1458 | *64-bit*) | ||
1459 | case $lt_cv_prog_gnu_ld in | ||
1460 | yes*) | ||
1461 | case $host in | ||
1462 | i?86-*-solaris*|x86_64-*-solaris*) | ||
1463 | LD="${LD-ld} -m elf_x86_64" | ||
1464 | ;; | ||
1465 | sparc*-*-solaris*) | ||
1466 | LD="${LD-ld} -m elf64_sparc" | ||
1467 | ;; | ||
1468 | esac | ||
1469 | # GNU ld 2.21 introduced _sol2 emulations. Use them if available. | ||
1470 | if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then | ||
1471 | LD=${LD-ld}_sol2 | ||
1472 | fi | ||
1473 | ;; | ||
1474 | *) | ||
1475 | if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then | ||
1476 | LD="${LD-ld} -64" | ||
1477 | fi | ||
1478 | ;; | ||
1479 | esac | ||
1480 | ;; | ||
1481 | esac | ||
1482 | fi | ||
1483 | rm -rf conftest* | ||
1484 | ;; | ||
1485 | esac | ||
1486 | |||
1487 | need_locks=$enable_libtool_lock | ||
1488 | ])# _LT_ENABLE_LOCK | ||
1489 | |||
1490 | |||
1491 | # _LT_PROG_AR | ||
1492 | # ----------- | ||
1493 | m4_defun([_LT_PROG_AR], | ||
1494 | [AC_CHECK_TOOLS(AR, [ar], false) | ||
1495 | : ${AR=ar} | ||
1496 | : ${AR_FLAGS=cru} | ||
1497 | _LT_DECL([], [AR], [1], [The archiver]) | ||
1498 | _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) | ||
1499 | |||
1500 | AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], | ||
1501 | [lt_cv_ar_at_file=no | ||
1502 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM], | ||
1503 | [echo conftest.$ac_objext > conftest.lst | ||
1504 | lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' | ||
1505 | AC_TRY_EVAL([lt_ar_try]) | ||
1506 | if test 0 -eq "$ac_status"; then | ||
1507 | # Ensure the archiver fails upon bogus file names. | ||
1508 | rm -f conftest.$ac_objext libconftest.a | ||
1509 | AC_TRY_EVAL([lt_ar_try]) | ||
1510 | if test 0 -ne "$ac_status"; then | ||
1511 | lt_cv_ar_at_file=@ | ||
1512 | fi | ||
1513 | fi | ||
1514 | rm -f conftest.* libconftest.a | ||
1515 | ]) | ||
1516 | ]) | ||
1517 | |||
1518 | if test no = "$lt_cv_ar_at_file"; then | ||
1519 | archiver_list_spec= | ||
1520 | else | ||
1521 | archiver_list_spec=$lt_cv_ar_at_file | ||
1522 | fi | ||
1523 | _LT_DECL([], [archiver_list_spec], [1], | ||
1524 | [How to feed a file listing to the archiver]) | ||
1525 | ])# _LT_PROG_AR | ||
1526 | |||
1527 | |||
1528 | # _LT_CMD_OLD_ARCHIVE | ||
1529 | # ------------------- | ||
1530 | m4_defun([_LT_CMD_OLD_ARCHIVE], | ||
1531 | [_LT_PROG_AR | ||
1532 | |||
1533 | AC_CHECK_TOOL(STRIP, strip, :) | ||
1534 | test -z "$STRIP" && STRIP=: | ||
1535 | _LT_DECL([], [STRIP], [1], [A symbol stripping program]) | ||
1536 | |||
1537 | AC_CHECK_TOOL(RANLIB, ranlib, :) | ||
1538 | test -z "$RANLIB" && RANLIB=: | ||
1539 | _LT_DECL([], [RANLIB], [1], | ||
1540 | [Commands used to install an old-style archive]) | ||
1541 | |||
1542 | # Determine commands to create old-style static archives. | ||
1543 | old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' | ||
1544 | old_postinstall_cmds='chmod 644 $oldlib' | ||
1545 | old_postuninstall_cmds= | ||
1546 | |||
1547 | if test -n "$RANLIB"; then | ||
1548 | case $host_os in | ||
1549 | bitrig* | openbsd*) | ||
1550 | old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" | ||
1551 | ;; | ||
1552 | *) | ||
1553 | old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" | ||
1554 | ;; | ||
1555 | esac | ||
1556 | old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" | ||
1557 | fi | ||
1558 | |||
1559 | case $host_os in | ||
1560 | darwin*) | ||
1561 | lock_old_archive_extraction=yes ;; | ||
1562 | *) | ||
1563 | lock_old_archive_extraction=no ;; | ||
1564 | esac | ||
1565 | _LT_DECL([], [old_postinstall_cmds], [2]) | ||
1566 | _LT_DECL([], [old_postuninstall_cmds], [2]) | ||
1567 | _LT_TAGDECL([], [old_archive_cmds], [2], | ||
1568 | [Commands used to build an old-style archive]) | ||
1569 | _LT_DECL([], [lock_old_archive_extraction], [0], | ||
1570 | [Whether to use a lock for old archive extraction]) | ||
1571 | ])# _LT_CMD_OLD_ARCHIVE | ||
1572 | |||
1573 | |||
1574 | # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, | ||
1575 | # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) | ||
1576 | # ---------------------------------------------------------------- | ||
1577 | # Check whether the given compiler option works | ||
1578 | AC_DEFUN([_LT_COMPILER_OPTION], | ||
1579 | [m4_require([_LT_FILEUTILS_DEFAULTS])dnl | ||
1580 | m4_require([_LT_DECL_SED])dnl | ||
1581 | AC_CACHE_CHECK([$1], [$2], | ||
1582 | [$2=no | ||
1583 | m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) | ||
1584 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | ||
1585 | lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment | ||
1586 | # Insert the option either (1) after the last *FLAGS variable, or | ||
1587 | # (2) before a word containing "conftest.", or (3) at the end. | ||
1588 | # Note that $ac_compile itself does not contain backslashes and begins | ||
1589 | # with a dollar sign (not a hyphen), so the echo should work correctly. | ||
1590 | # The option is referenced via a variable to avoid confusing sed. | ||
1591 | lt_compile=`echo "$ac_compile" | $SED \ | ||
1592 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | ||
1593 | -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ | ||
1594 | -e 's:$: $lt_compiler_flag:'` | ||
1595 | (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) | ||
1596 | (eval "$lt_compile" 2>conftest.err) | ||
1597 | ac_status=$? | ||
1598 | cat conftest.err >&AS_MESSAGE_LOG_FD | ||
1599 | echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD | ||
1600 | if (exit $ac_status) && test -s "$ac_outfile"; then | ||
1601 | # The compiler can only warn and ignore the option if not recognized | ||
1602 | # So say no if there are warnings other than the usual output. | ||
1603 | $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp | ||
1604 | $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 | ||
1605 | if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then | ||
1606 | $2=yes | ||
1607 | fi | ||
1608 | fi | ||
1609 | $RM conftest* | ||
1610 | ]) | ||
1611 | |||
1612 | if test yes = "[$]$2"; then | ||
1613 | m4_if([$5], , :, [$5]) | ||
1614 | else | ||
1615 | m4_if([$6], , :, [$6]) | ||
1616 | fi | ||
1617 | ])# _LT_COMPILER_OPTION | ||
1618 | |||
1619 | # Old name: | ||
1620 | AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) | ||
1621 | dnl aclocal-1.4 backwards compatibility: | ||
1622 | dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) | ||
1623 | |||
1624 | |||
1625 | # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, | ||
1626 | # [ACTION-SUCCESS], [ACTION-FAILURE]) | ||
1627 | # ---------------------------------------------------- | ||
1628 | # Check whether the given linker option works | ||
1629 | AC_DEFUN([_LT_LINKER_OPTION], | ||
1630 | [m4_require([_LT_FILEUTILS_DEFAULTS])dnl | ||
1631 | m4_require([_LT_DECL_SED])dnl | ||
1632 | AC_CACHE_CHECK([$1], [$2], | ||
1633 | [$2=no | ||
1634 | save_LDFLAGS=$LDFLAGS | ||
1635 | LDFLAGS="$LDFLAGS $3" | ||
1636 | echo "$lt_simple_link_test_code" > conftest.$ac_ext | ||
1637 | if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then | ||
1638 | # The linker can only warn and ignore the option if not recognized | ||
1639 | # So say no if there are warnings | ||
1640 | if test -s conftest.err; then | ||
1641 | # Append any errors to the config.log. | ||
1642 | cat conftest.err 1>&AS_MESSAGE_LOG_FD | ||
1643 | $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp | ||
1644 | $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 | ||
1645 | if diff conftest.exp conftest.er2 >/dev/null; then | ||
1646 | $2=yes | ||
1647 | fi | ||
1648 | else | ||
1649 | $2=yes | ||
1650 | fi | ||
1651 | fi | ||
1652 | $RM -r conftest* | ||
1653 | LDFLAGS=$save_LDFLAGS | ||
1654 | ]) | ||
1655 | |||
1656 | if test yes = "[$]$2"; then | ||
1657 | m4_if([$4], , :, [$4]) | ||
1658 | else | ||
1659 | m4_if([$5], , :, [$5]) | ||
1660 | fi | ||
1661 | ])# _LT_LINKER_OPTION | ||
1662 | |||
1663 | # Old name: | ||
1664 | AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) | ||
1665 | dnl aclocal-1.4 backwards compatibility: | ||
1666 | dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) | ||
1667 | |||
1668 | |||
1669 | # LT_CMD_MAX_LEN | ||
1670 | #--------------- | ||
1671 | AC_DEFUN([LT_CMD_MAX_LEN], | ||
1672 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
1673 | # find the maximum length of command line arguments | ||
1674 | AC_MSG_CHECKING([the maximum length of command line arguments]) | ||
1675 | AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl | ||
1676 | i=0 | ||
1677 | teststring=ABCD | ||
1678 | |||
1679 | case $build_os in | ||
1680 | msdosdjgpp*) | ||
1681 | # On DJGPP, this test can blow up pretty badly due to problems in libc | ||
1682 | # (any single argument exceeding 2000 bytes causes a buffer overrun | ||
1683 | # during glob expansion). Even if it were fixed, the result of this | ||
1684 | # check would be larger than it should be. | ||
1685 | lt_cv_sys_max_cmd_len=12288; # 12K is about right | ||
1686 | ;; | ||
1687 | |||
1688 | gnu*) | ||
1689 | # Under GNU Hurd, this test is not required because there is | ||
1690 | # no limit to the length of command line arguments. | ||
1691 | # Libtool will interpret -1 as no limit whatsoever | ||
1692 | lt_cv_sys_max_cmd_len=-1; | ||
1693 | ;; | ||
1694 | |||
1695 | cygwin* | mingw* | cegcc*) | ||
1696 | # On Win9x/ME, this test blows up -- it succeeds, but takes | ||
1697 | # about 5 minutes as the teststring grows exponentially. | ||
1698 | # Worse, since 9x/ME are not pre-emptively multitasking, | ||
1699 | # you end up with a "frozen" computer, even though with patience | ||
1700 | # the test eventually succeeds (with a max line length of 256k). | ||
1701 | # Instead, let's just punt: use the minimum linelength reported by | ||
1702 | # all of the supported platforms: 8192 (on NT/2K/XP). | ||
1703 | lt_cv_sys_max_cmd_len=8192; | ||
1704 | ;; | ||
1705 | |||
1706 | mint*) | ||
1707 | # On MiNT this can take a long time and run out of memory. | ||
1708 | lt_cv_sys_max_cmd_len=8192; | ||
1709 | ;; | ||
1710 | |||
1711 | amigaos*) | ||
1712 | # On AmigaOS with pdksh, this test takes hours, literally. | ||
1713 | # So we just punt and use a minimum line length of 8192. | ||
1714 | lt_cv_sys_max_cmd_len=8192; | ||
1715 | ;; | ||
1716 | |||
1717 | bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) | ||
1718 | # This has been around since 386BSD, at least. Likely further. | ||
1719 | if test -x /sbin/sysctl; then | ||
1720 | lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` | ||
1721 | elif test -x /usr/sbin/sysctl; then | ||
1722 | lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` | ||
1723 | else | ||
1724 | lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs | ||
1725 | fi | ||
1726 | # And add a safety zone | ||
1727 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` | ||
1728 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` | ||
1729 | ;; | ||
1730 | |||
1731 | interix*) | ||
1732 | # We know the value 262144 and hardcode it with a safety zone (like BSD) | ||
1733 | lt_cv_sys_max_cmd_len=196608 | ||
1734 | ;; | ||
1735 | |||
1736 | os2*) | ||
1737 | # The test takes a long time on OS/2. | ||
1738 | lt_cv_sys_max_cmd_len=8192 | ||
1739 | ;; | ||
1740 | |||
1741 | osf*) | ||
1742 | # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure | ||
1743 | # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not | ||
1744 | # nice to cause kernel panics so lets avoid the loop below. | ||
1745 | # First set a reasonable default. | ||
1746 | lt_cv_sys_max_cmd_len=16384 | ||
1747 | # | ||
1748 | if test -x /sbin/sysconfig; then | ||
1749 | case `/sbin/sysconfig -q proc exec_disable_arg_limit` in | ||
1750 | *1*) lt_cv_sys_max_cmd_len=-1 ;; | ||
1751 | esac | ||
1752 | fi | ||
1753 | ;; | ||
1754 | sco3.2v5*) | ||
1755 | lt_cv_sys_max_cmd_len=102400 | ||
1756 | ;; | ||
1757 | sysv5* | sco5v6* | sysv4.2uw2*) | ||
1758 | kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` | ||
1759 | if test -n "$kargmax"; then | ||
1760 | lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` | ||
1761 | else | ||
1762 | lt_cv_sys_max_cmd_len=32768 | ||
1763 | fi | ||
1764 | ;; | ||
1765 | *) | ||
1766 | lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` | ||
1767 | if test -n "$lt_cv_sys_max_cmd_len" && \ | ||
1768 | test undefined != "$lt_cv_sys_max_cmd_len"; then | ||
1769 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` | ||
1770 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` | ||
1771 | else | ||
1772 | # Make teststring a little bigger before we do anything with it. | ||
1773 | # a 1K string should be a reasonable start. | ||
1774 | for i in 1 2 3 4 5 6 7 8; do | ||
1775 | teststring=$teststring$teststring | ||
1776 | done | ||
1777 | SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} | ||
1778 | # If test is not a shell built-in, we'll probably end up computing a | ||
1779 | # maximum length that is only half of the actual maximum length, but | ||
1780 | # we can't tell. | ||
1781 | while { test X`env echo "$teststring$teststring" 2>/dev/null` \ | ||
1782 | = "X$teststring$teststring"; } >/dev/null 2>&1 && | ||
1783 | test 17 != "$i" # 1/2 MB should be enough | ||
1784 | do | ||
1785 | i=`expr $i + 1` | ||
1786 | teststring=$teststring$teststring | ||
1787 | done | ||
1788 | # Only check the string length outside the loop. | ||
1789 | lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` | ||
1790 | teststring= | ||
1791 | # Add a significant safety factor because C++ compilers can tack on | ||
1792 | # massive amounts of additional arguments before passing them to the | ||
1793 | # linker. It appears as though 1/2 is a usable value. | ||
1794 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` | ||
1795 | fi | ||
1796 | ;; | ||
1797 | esac | ||
1798 | ]) | ||
1799 | if test -n "$lt_cv_sys_max_cmd_len"; then | ||
1800 | AC_MSG_RESULT($lt_cv_sys_max_cmd_len) | ||
1801 | else | ||
1802 | AC_MSG_RESULT(none) | ||
1803 | fi | ||
1804 | max_cmd_len=$lt_cv_sys_max_cmd_len | ||
1805 | _LT_DECL([], [max_cmd_len], [0], | ||
1806 | [What is the maximum length of a command?]) | ||
1807 | ])# LT_CMD_MAX_LEN | ||
1808 | |||
1809 | # Old name: | ||
1810 | AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) | ||
1811 | dnl aclocal-1.4 backwards compatibility: | ||
1812 | dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) | ||
1813 | |||
1814 | |||
1815 | # _LT_HEADER_DLFCN | ||
1816 | # ---------------- | ||
1817 | m4_defun([_LT_HEADER_DLFCN], | ||
1818 | [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl | ||
1819 | ])# _LT_HEADER_DLFCN | ||
1820 | |||
1821 | |||
1822 | # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, | ||
1823 | # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) | ||
1824 | # ---------------------------------------------------------------- | ||
1825 | m4_defun([_LT_TRY_DLOPEN_SELF], | ||
1826 | [m4_require([_LT_HEADER_DLFCN])dnl | ||
1827 | if test yes = "$cross_compiling"; then : | ||
1828 | [$4] | ||
1829 | else | ||
1830 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | ||
1831 | lt_status=$lt_dlunknown | ||
1832 | cat > conftest.$ac_ext <<_LT_EOF | ||
1833 | [#line $LINENO "configure" | ||
1834 | #include "confdefs.h" | ||
1835 | |||
1836 | #if HAVE_DLFCN_H | ||
1837 | #include <dlfcn.h> | ||
1838 | #endif | ||
1839 | |||
1840 | #include <stdio.h> | ||
1841 | |||
1842 | #ifdef RTLD_GLOBAL | ||
1843 | # define LT_DLGLOBAL RTLD_GLOBAL | ||
1844 | #else | ||
1845 | # ifdef DL_GLOBAL | ||
1846 | # define LT_DLGLOBAL DL_GLOBAL | ||
1847 | # else | ||
1848 | # define LT_DLGLOBAL 0 | ||
1849 | # endif | ||
1850 | #endif | ||
1851 | |||
1852 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we | ||
1853 | find out it does not work in some platform. */ | ||
1854 | #ifndef LT_DLLAZY_OR_NOW | ||
1855 | # ifdef RTLD_LAZY | ||
1856 | # define LT_DLLAZY_OR_NOW RTLD_LAZY | ||
1857 | # else | ||
1858 | # ifdef DL_LAZY | ||
1859 | # define LT_DLLAZY_OR_NOW DL_LAZY | ||
1860 | # else | ||
1861 | # ifdef RTLD_NOW | ||
1862 | # define LT_DLLAZY_OR_NOW RTLD_NOW | ||
1863 | # else | ||
1864 | # ifdef DL_NOW | ||
1865 | # define LT_DLLAZY_OR_NOW DL_NOW | ||
1866 | # else | ||
1867 | # define LT_DLLAZY_OR_NOW 0 | ||
1868 | # endif | ||
1869 | # endif | ||
1870 | # endif | ||
1871 | # endif | ||
1872 | #endif | ||
1873 | |||
1874 | /* When -fvisibility=hidden is used, assume the code has been annotated | ||
1875 | correspondingly for the symbols needed. */ | ||
1876 | #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) | ||
1877 | int fnord () __attribute__((visibility("default"))); | ||
1878 | #endif | ||
1879 | |||
1880 | int fnord () { return 42; } | ||
1881 | int main () | ||
1882 | { | ||
1883 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | ||
1884 | int status = $lt_dlunknown; | ||
1885 | |||
1886 | if (self) | ||
1887 | { | ||
1888 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; | ||
1889 | else | ||
1890 | { | ||
1891 | if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; | ||
1892 | else puts (dlerror ()); | ||
1893 | } | ||
1894 | /* dlclose (self); */ | ||
1895 | } | ||
1896 | else | ||
1897 | puts (dlerror ()); | ||
1898 | |||
1899 | return status; | ||
1900 | }] | ||
1901 | _LT_EOF | ||
1902 | if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then | ||
1903 | (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null | ||
1904 | lt_status=$? | ||
1905 | case x$lt_status in | ||
1906 | x$lt_dlno_uscore) $1 ;; | ||
1907 | x$lt_dlneed_uscore) $2 ;; | ||
1908 | x$lt_dlunknown|x*) $3 ;; | ||
1909 | esac | ||
1910 | else : | ||
1911 | # compilation failed | ||
1912 | $3 | ||
1913 | fi | ||
1914 | fi | ||
1915 | rm -fr conftest* | ||
1916 | ])# _LT_TRY_DLOPEN_SELF | ||
1917 | |||
1918 | |||
1919 | # LT_SYS_DLOPEN_SELF | ||
1920 | # ------------------ | ||
1921 | AC_DEFUN([LT_SYS_DLOPEN_SELF], | ||
1922 | [m4_require([_LT_HEADER_DLFCN])dnl | ||
1923 | if test yes != "$enable_dlopen"; then | ||
1924 | enable_dlopen=unknown | ||
1925 | enable_dlopen_self=unknown | ||
1926 | enable_dlopen_self_static=unknown | ||
1927 | else | ||
1928 | lt_cv_dlopen=no | ||
1929 | lt_cv_dlopen_libs= | ||
1930 | |||
1931 | case $host_os in | ||
1932 | beos*) | ||
1933 | lt_cv_dlopen=load_add_on | ||
1934 | lt_cv_dlopen_libs= | ||
1935 | lt_cv_dlopen_self=yes | ||
1936 | ;; | ||
1937 | |||
1938 | mingw* | pw32* | cegcc*) | ||
1939 | lt_cv_dlopen=LoadLibrary | ||
1940 | lt_cv_dlopen_libs= | ||
1941 | ;; | ||
1942 | |||
1943 | cygwin*) | ||
1944 | lt_cv_dlopen=dlopen | ||
1945 | lt_cv_dlopen_libs= | ||
1946 | ;; | ||
1947 | |||
1948 | darwin*) | ||
1949 | # if libdl is installed we need to link against it | ||
1950 | AC_CHECK_LIB([dl], [dlopen], | ||
1951 | [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ | ||
1952 | lt_cv_dlopen=dyld | ||
1953 | lt_cv_dlopen_libs= | ||
1954 | lt_cv_dlopen_self=yes | ||
1955 | ]) | ||
1956 | ;; | ||
1957 | |||
1958 | tpf*) | ||
1959 | # Don't try to run any link tests for TPF. We know it's impossible | ||
1960 | # because TPF is a cross-compiler, and we know how we open DSOs. | ||
1961 | lt_cv_dlopen=dlopen | ||
1962 | lt_cv_dlopen_libs= | ||
1963 | lt_cv_dlopen_self=no | ||
1964 | ;; | ||
1965 | |||
1966 | *) | ||
1967 | AC_CHECK_FUNC([shl_load], | ||
1968 | [lt_cv_dlopen=shl_load], | ||
1969 | [AC_CHECK_LIB([dld], [shl_load], | ||
1970 | [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], | ||
1971 | [AC_CHECK_FUNC([dlopen], | ||
1972 | [lt_cv_dlopen=dlopen], | ||
1973 | [AC_CHECK_LIB([dl], [dlopen], | ||
1974 | [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], | ||
1975 | [AC_CHECK_LIB([svld], [dlopen], | ||
1976 | [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], | ||
1977 | [AC_CHECK_LIB([dld], [dld_link], | ||
1978 | [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) | ||
1979 | ]) | ||
1980 | ]) | ||
1981 | ]) | ||
1982 | ]) | ||
1983 | ]) | ||
1984 | ;; | ||
1985 | esac | ||
1986 | |||
1987 | if test no = "$lt_cv_dlopen"; then | ||
1988 | enable_dlopen=no | ||
1989 | else | ||
1990 | enable_dlopen=yes | ||
1991 | fi | ||
1992 | |||
1993 | case $lt_cv_dlopen in | ||
1994 | dlopen) | ||
1995 | save_CPPFLAGS=$CPPFLAGS | ||
1996 | test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" | ||
1997 | |||
1998 | save_LDFLAGS=$LDFLAGS | ||
1999 | wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" | ||
2000 | |||
2001 | save_LIBS=$LIBS | ||
2002 | LIBS="$lt_cv_dlopen_libs $LIBS" | ||
2003 | |||
2004 | AC_CACHE_CHECK([whether a program can dlopen itself], | ||
2005 | lt_cv_dlopen_self, [dnl | ||
2006 | _LT_TRY_DLOPEN_SELF( | ||
2007 | lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, | ||
2008 | lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) | ||
2009 | ]) | ||
2010 | |||
2011 | if test yes = "$lt_cv_dlopen_self"; then | ||
2012 | wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" | ||
2013 | AC_CACHE_CHECK([whether a statically linked program can dlopen itself], | ||
2014 | lt_cv_dlopen_self_static, [dnl | ||
2015 | _LT_TRY_DLOPEN_SELF( | ||
2016 | lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, | ||
2017 | lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) | ||
2018 | ]) | ||
2019 | fi | ||
2020 | |||
2021 | CPPFLAGS=$save_CPPFLAGS | ||
2022 | LDFLAGS=$save_LDFLAGS | ||
2023 | LIBS=$save_LIBS | ||
2024 | ;; | ||
2025 | esac | ||
2026 | |||
2027 | case $lt_cv_dlopen_self in | ||
2028 | yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; | ||
2029 | *) enable_dlopen_self=unknown ;; | ||
2030 | esac | ||
2031 | |||
2032 | case $lt_cv_dlopen_self_static in | ||
2033 | yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; | ||
2034 | *) enable_dlopen_self_static=unknown ;; | ||
2035 | esac | ||
2036 | fi | ||
2037 | _LT_DECL([dlopen_support], [enable_dlopen], [0], | ||
2038 | [Whether dlopen is supported]) | ||
2039 | _LT_DECL([dlopen_self], [enable_dlopen_self], [0], | ||
2040 | [Whether dlopen of programs is supported]) | ||
2041 | _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], | ||
2042 | [Whether dlopen of statically linked programs is supported]) | ||
2043 | ])# LT_SYS_DLOPEN_SELF | ||
2044 | |||
2045 | # Old name: | ||
2046 | AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) | ||
2047 | dnl aclocal-1.4 backwards compatibility: | ||
2048 | dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) | ||
2049 | |||
2050 | |||
2051 | # _LT_COMPILER_C_O([TAGNAME]) | ||
2052 | # --------------------------- | ||
2053 | # Check to see if options -c and -o are simultaneously supported by compiler. | ||
2054 | # This macro does not hard code the compiler like AC_PROG_CC_C_O. | ||
2055 | m4_defun([_LT_COMPILER_C_O], | ||
2056 | [m4_require([_LT_DECL_SED])dnl | ||
2057 | m4_require([_LT_FILEUTILS_DEFAULTS])dnl | ||
2058 | m4_require([_LT_TAG_COMPILER])dnl | ||
2059 | AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], | ||
2060 | [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], | ||
2061 | [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no | ||
2062 | $RM -r conftest 2>/dev/null | ||
2063 | mkdir conftest | ||
2064 | cd conftest | ||
2065 | mkdir out | ||
2066 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | ||
2067 | |||
2068 | lt_compiler_flag="-o out/conftest2.$ac_objext" | ||
2069 | # Insert the option either (1) after the last *FLAGS variable, or | ||
2070 | # (2) before a word containing "conftest.", or (3) at the end. | ||
2071 | # Note that $ac_compile itself does not contain backslashes and begins | ||
2072 | # with a dollar sign (not a hyphen), so the echo should work correctly. | ||
2073 | lt_compile=`echo "$ac_compile" | $SED \ | ||
2074 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | ||
2075 | -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ | ||
2076 | -e 's:$: $lt_compiler_flag:'` | ||
2077 | (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) | ||
2078 | (eval "$lt_compile" 2>out/conftest.err) | ||
2079 | ac_status=$? | ||
2080 | cat out/conftest.err >&AS_MESSAGE_LOG_FD | ||
2081 | echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD | ||
2082 | if (exit $ac_status) && test -s out/conftest2.$ac_objext | ||
2083 | then | ||
2084 | # The compiler can only warn and ignore the option if not recognized | ||
2085 | # So say no if there are warnings | ||
2086 | $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp | ||
2087 | $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 | ||
2088 | if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then | ||
2089 | _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes | ||
2090 | fi | ||
2091 | fi | ||
2092 | chmod u+w . 2>&AS_MESSAGE_LOG_FD | ||
2093 | $RM conftest* | ||
2094 | # SGI C++ compiler will create directory out/ii_files/ for | ||
2095 | # template instantiation | ||
2096 | test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files | ||
2097 | $RM out/* && rmdir out | ||
2098 | cd .. | ||
2099 | $RM -r conftest | ||
2100 | $RM conftest* | ||
2101 | ]) | ||
2102 | _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], | ||
2103 | [Does compiler simultaneously support -c and -o options?]) | ||
2104 | ])# _LT_COMPILER_C_O | ||
2105 | |||
2106 | |||
2107 | # _LT_COMPILER_FILE_LOCKS([TAGNAME]) | ||
2108 | # ---------------------------------- | ||
2109 | # Check to see if we can do hard links to lock some files if needed | ||
2110 | m4_defun([_LT_COMPILER_FILE_LOCKS], | ||
2111 | [m4_require([_LT_ENABLE_LOCK])dnl | ||
2112 | m4_require([_LT_FILEUTILS_DEFAULTS])dnl | ||
2113 | _LT_COMPILER_C_O([$1]) | ||
2114 | |||
2115 | hard_links=nottested | ||
2116 | if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then | ||
2117 | # do not overwrite the value of need_locks provided by the user | ||
2118 | AC_MSG_CHECKING([if we can lock with hard links]) | ||
2119 | hard_links=yes | ||
2120 | $RM conftest* | ||
2121 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | ||
2122 | touch conftest.a | ||
2123 | ln conftest.a conftest.b 2>&5 || hard_links=no | ||
2124 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | ||
2125 | AC_MSG_RESULT([$hard_links]) | ||
2126 | if test no = "$hard_links"; then | ||
2127 | AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) | ||
2128 | need_locks=warn | ||
2129 | fi | ||
2130 | else | ||
2131 | need_locks=no | ||
2132 | fi | ||
2133 | _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) | ||
2134 | ])# _LT_COMPILER_FILE_LOCKS | ||
2135 | |||
2136 | |||
2137 | # _LT_CHECK_OBJDIR | ||
2138 | # ---------------- | ||
2139 | m4_defun([_LT_CHECK_OBJDIR], | ||
2140 | [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], | ||
2141 | [rm -f .libs 2>/dev/null | ||
2142 | mkdir .libs 2>/dev/null | ||
2143 | if test -d .libs; then | ||
2144 | lt_cv_objdir=.libs | ||
2145 | else | ||
2146 | # MS-DOS does not allow filenames that begin with a dot. | ||
2147 | lt_cv_objdir=_libs | ||
2148 | fi | ||
2149 | rmdir .libs 2>/dev/null]) | ||
2150 | objdir=$lt_cv_objdir | ||
2151 | _LT_DECL([], [objdir], [0], | ||
2152 | [The name of the directory that contains temporary libtool files])dnl | ||
2153 | m4_pattern_allow([LT_OBJDIR])dnl | ||
2154 | AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", | ||
2155 | [Define to the sub-directory where libtool stores uninstalled libraries.]) | ||
2156 | ])# _LT_CHECK_OBJDIR | ||
2157 | |||
2158 | |||
2159 | # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) | ||
2160 | # -------------------------------------- | ||
2161 | # Check hardcoding attributes. | ||
2162 | m4_defun([_LT_LINKER_HARDCODE_LIBPATH], | ||
2163 | [AC_MSG_CHECKING([how to hardcode library paths into programs]) | ||
2164 | _LT_TAGVAR(hardcode_action, $1)= | ||
2165 | if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || | ||
2166 | test -n "$_LT_TAGVAR(runpath_var, $1)" || | ||
2167 | test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then | ||
2168 | |||
2169 | # We can hardcode non-existent directories. | ||
2170 | if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && | ||
2171 | # If the only mechanism to avoid hardcoding is shlibpath_var, we | ||
2172 | # have to relink, otherwise we might link with an installed library | ||
2173 | # when we should be linking with a yet-to-be-installed one | ||
2174 | ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && | ||
2175 | test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then | ||
2176 | # Linking always hardcodes the temporary library directory. | ||
2177 | _LT_TAGVAR(hardcode_action, $1)=relink | ||
2178 | else | ||
2179 | # We can link without hardcoding, and we can hardcode nonexisting dirs. | ||
2180 | _LT_TAGVAR(hardcode_action, $1)=immediate | ||
2181 | fi | ||
2182 | else | ||
2183 | # We cannot hardcode anything, or else we can only hardcode existing | ||
2184 | # directories. | ||
2185 | _LT_TAGVAR(hardcode_action, $1)=unsupported | ||
2186 | fi | ||
2187 | AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) | ||
2188 | |||
2189 | if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || | ||
2190 | test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then | ||
2191 | # Fast installation is not supported | ||
2192 | enable_fast_install=no | ||
2193 | elif test yes = "$shlibpath_overrides_runpath" || | ||
2194 | test no = "$enable_shared"; then | ||
2195 | # Fast installation is not necessary | ||
2196 | enable_fast_install=needless | ||
2197 | fi | ||
2198 | _LT_TAGDECL([], [hardcode_action], [0], | ||
2199 | [How to hardcode a shared library path into an executable]) | ||
2200 | ])# _LT_LINKER_HARDCODE_LIBPATH | ||
2201 | |||
2202 | |||
2203 | # _LT_CMD_STRIPLIB | ||
2204 | # ---------------- | ||
2205 | m4_defun([_LT_CMD_STRIPLIB], | ||
2206 | [m4_require([_LT_DECL_EGREP]) | ||
2207 | striplib= | ||
2208 | old_striplib= | ||
2209 | AC_MSG_CHECKING([whether stripping libraries is possible]) | ||
2210 | if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then | ||
2211 | test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" | ||
2212 | test -z "$striplib" && striplib="$STRIP --strip-unneeded" | ||
2213 | AC_MSG_RESULT([yes]) | ||
2214 | else | ||
2215 | # FIXME - insert some real tests, host_os isn't really good enough | ||
2216 | case $host_os in | ||
2217 | darwin*) | ||
2218 | if test -n "$STRIP"; then | ||
2219 | striplib="$STRIP -x" | ||
2220 | old_striplib="$STRIP -S" | ||
2221 | AC_MSG_RESULT([yes]) | ||
2222 | else | ||
2223 | AC_MSG_RESULT([no]) | ||
2224 | fi | ||
2225 | ;; | ||
2226 | *) | ||
2227 | AC_MSG_RESULT([no]) | ||
2228 | ;; | ||
2229 | esac | ||
2230 | fi | ||
2231 | _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) | ||
2232 | _LT_DECL([], [striplib], [1]) | ||
2233 | ])# _LT_CMD_STRIPLIB | ||
2234 | |||
2235 | |||
2236 | # _LT_PREPARE_MUNGE_PATH_LIST | ||
2237 | # --------------------------- | ||
2238 | # Make sure func_munge_path_list() is defined correctly. | ||
2239 | m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], | ||
2240 | [[# func_munge_path_list VARIABLE PATH | ||
2241 | # ----------------------------------- | ||
2242 | # VARIABLE is name of variable containing _space_ separated list of | ||
2243 | # directories to be munged by the contents of PATH, which is string | ||
2244 | # having a format: | ||
2245 | # "DIR[:DIR]:" | ||
2246 | # string "DIR[ DIR]" will be prepended to VARIABLE | ||
2247 | # ":DIR[:DIR]" | ||
2248 | # string "DIR[ DIR]" will be appended to VARIABLE | ||
2249 | # "DIRP[:DIRP]::[DIRA:]DIRA" | ||
2250 | # string "DIRP[ DIRP]" will be prepended to VARIABLE and string | ||
2251 | # "DIRA[ DIRA]" will be appended to VARIABLE | ||
2252 | # "DIR[:DIR]" | ||
2253 | # VARIABLE will be replaced by "DIR[ DIR]" | ||
2254 | func_munge_path_list () | ||
2255 | { | ||
2256 | case x@S|@2 in | ||
2257 | x) | ||
2258 | ;; | ||
2259 | *:) | ||
2260 | eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" | ||
2261 | ;; | ||
2262 | x:*) | ||
2263 | eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" | ||
2264 | ;; | ||
2265 | *::*) | ||
2266 | eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" | ||
2267 | eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" | ||
2268 | ;; | ||
2269 | *) | ||
2270 | eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" | ||
2271 | ;; | ||
2272 | esac | ||
2273 | } | ||
2274 | ]])# _LT_PREPARE_PATH_LIST | ||
2275 | |||
2276 | |||
2277 | # _LT_SYS_DYNAMIC_LINKER([TAG]) | ||
2278 | # ----------------------------- | ||
2279 | # PORTME Fill in your ld.so characteristics | ||
2280 | m4_defun([_LT_SYS_DYNAMIC_LINKER], | ||
2281 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
2282 | m4_require([_LT_DECL_EGREP])dnl | ||
2283 | m4_require([_LT_FILEUTILS_DEFAULTS])dnl | ||
2284 | m4_require([_LT_DECL_OBJDUMP])dnl | ||
2285 | m4_require([_LT_DECL_SED])dnl | ||
2286 | m4_require([_LT_CHECK_SHELL_FEATURES])dnl | ||
2287 | m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl | ||
2288 | AC_MSG_CHECKING([dynamic linker characteristics]) | ||
2289 | m4_if([$1], | ||
2290 | [], [ | ||
2291 | if test yes = "$GCC"; then | ||
2292 | case $host_os in | ||
2293 | darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; | ||
2294 | *) lt_awk_arg='/^libraries:/' ;; | ||
2295 | esac | ||
2296 | case $host_os in | ||
2297 | mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; | ||
2298 | *) lt_sed_strip_eq='s|=/|/|g' ;; | ||
2299 | esac | ||
2300 | lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` | ||
2301 | case $lt_search_path_spec in | ||
2302 | *\;*) | ||
2303 | # if the path contains ";" then we assume it to be the separator | ||
2304 | # otherwise default to the standard path separator (i.e. ":") - it is | ||
2305 | # assumed that no part of a normal pathname contains ";" but that should | ||
2306 | # okay in the real world where ";" in dirpaths is itself problematic. | ||
2307 | lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` | ||
2308 | ;; | ||
2309 | *) | ||
2310 | lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` | ||
2311 | ;; | ||
2312 | esac | ||
2313 | # Ok, now we have the path, separated by spaces, we can step through it | ||
2314 | # and add multilib dir if necessary... | ||
2315 | lt_tmp_lt_search_path_spec= | ||
2316 | lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` | ||
2317 | # ...but if some path component already ends with the multilib dir we assume | ||
2318 | # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). | ||
2319 | case "$lt_multi_os_dir; $lt_search_path_spec " in | ||
2320 | "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) | ||
2321 | lt_multi_os_dir= | ||
2322 | ;; | ||
2323 | esac | ||
2324 | for lt_sys_path in $lt_search_path_spec; do | ||
2325 | if test -d "$lt_sys_path$lt_multi_os_dir"; then | ||
2326 | lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" | ||
2327 | elif test -n "$lt_multi_os_dir"; then | ||
2328 | test -d "$lt_sys_path" && \ | ||
2329 | lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" | ||
2330 | fi | ||
2331 | done | ||
2332 | lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' | ||
2333 | BEGIN {RS = " "; FS = "/|\n";} { | ||
2334 | lt_foo = ""; | ||
2335 | lt_count = 0; | ||
2336 | for (lt_i = NF; lt_i > 0; lt_i--) { | ||
2337 | if ($lt_i != "" && $lt_i != ".") { | ||
2338 | if ($lt_i == "..") { | ||
2339 | lt_count++; | ||
2340 | } else { | ||
2341 | if (lt_count == 0) { | ||
2342 | lt_foo = "/" $lt_i lt_foo; | ||
2343 | } else { | ||
2344 | lt_count--; | ||
2345 | } | ||
2346 | } | ||
2347 | } | ||
2348 | } | ||
2349 | if (lt_foo != "") { lt_freq[[lt_foo]]++; } | ||
2350 | if (lt_freq[[lt_foo]] == 1) { print lt_foo; } | ||
2351 | }'` | ||
2352 | # AWK program above erroneously prepends '/' to C:/dos/paths | ||
2353 | # for these hosts. | ||
2354 | case $host_os in | ||
2355 | mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ | ||
2356 | $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; | ||
2357 | esac | ||
2358 | sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` | ||
2359 | else | ||
2360 | sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" | ||
2361 | fi]) | ||
2362 | library_names_spec= | ||
2363 | libname_spec='lib$name' | ||
2364 | soname_spec= | ||
2365 | shrext_cmds=.so | ||
2366 | postinstall_cmds= | ||
2367 | postuninstall_cmds= | ||
2368 | finish_cmds= | ||
2369 | finish_eval= | ||
2370 | shlibpath_var= | ||
2371 | shlibpath_overrides_runpath=unknown | ||
2372 | version_type=none | ||
2373 | dynamic_linker="$host_os ld.so" | ||
2374 | sys_lib_dlsearch_path_spec="/lib /usr/lib" | ||
2375 | need_lib_prefix=unknown | ||
2376 | hardcode_into_libs=no | ||
2377 | |||
2378 | # when you set need_version to no, make sure it does not cause -set_version | ||
2379 | # flags to be left without arguments | ||
2380 | need_version=unknown | ||
2381 | |||
2382 | AC_ARG_VAR([LT_SYS_LIBRARY_PATH], | ||
2383 | [User-defined run-time library search path.]) | ||
2384 | |||
2385 | case $host_os in | ||
2386 | aix3*) | ||
2387 | version_type=linux # correct to gnu/linux during the next big refactor | ||
2388 | library_names_spec='$libname$release$shared_ext$versuffix $libname.a' | ||
2389 | shlibpath_var=LIBPATH | ||
2390 | |||
2391 | # AIX 3 has no versioning support, so we append a major version to the name. | ||
2392 | soname_spec='$libname$release$shared_ext$major' | ||
2393 | ;; | ||
2394 | |||
2395 | aix[[4-9]]*) | ||
2396 | version_type=linux # correct to gnu/linux during the next big refactor | ||
2397 | need_lib_prefix=no | ||
2398 | need_version=no | ||
2399 | hardcode_into_libs=yes | ||
2400 | if test ia64 = "$host_cpu"; then | ||
2401 | # AIX 5 supports IA64 | ||
2402 | library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' | ||
2403 | shlibpath_var=LD_LIBRARY_PATH | ||
2404 | else | ||
2405 | # With GCC up to 2.95.x, collect2 would create an import file | ||
2406 | # for dependence libraries. The import file would start with | ||
2407 | # the line '#! .'. This would cause the generated library to | ||
2408 | # depend on '.', always an invalid library. This was fixed in | ||
2409 | # development snapshots of GCC prior to 3.0. | ||
2410 | case $host_os in | ||
2411 | aix4 | aix4.[[01]] | aix4.[[01]].*) | ||
2412 | if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' | ||
2413 | echo ' yes ' | ||
2414 | echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then | ||
2415 | : | ||
2416 | else | ||
2417 | can_build_shared=no | ||
2418 | fi | ||
2419 | ;; | ||
2420 | esac | ||
2421 | # Using Import Files as archive members, it is possible to support | ||
2422 | # filename-based versioning of shared library archives on AIX. While | ||
2423 | # this would work for both with and without runtime linking, it will | ||
2424 | # prevent static linking of such archives. So we do filename-based | ||
2425 | # shared library versioning with .so extension only, which is used | ||
2426 | # when both runtime linking and shared linking is enabled. | ||
2427 | # Unfortunately, runtime linking may impact performance, so we do | ||
2428 | # not want this to be the default eventually. Also, we use the | ||
2429 | # versioned .so libs for executables only if there is the -brtl | ||
2430 | # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. | ||
2431 | # To allow for filename-based versioning support, we need to create | ||
2432 | # libNAME.so.V as an archive file, containing: | ||
2433 | # *) an Import File, referring to the versioned filename of the | ||
2434 | # archive as well as the shared archive member, telling the | ||
2435 | # bitwidth (32 or 64) of that shared object, and providing the | ||
2436 | # list of exported symbols of that shared object, eventually | ||
2437 | # decorated with the 'weak' keyword | ||
2438 | # *) the shared object with the F_LOADONLY flag set, to really avoid | ||
2439 | # it being seen by the linker. | ||
2440 | # At run time we better use the real file rather than another symlink, | ||
2441 | # but for link time we create the symlink libNAME.so -> libNAME.so.V | ||
2442 | |||
2443 | case $with_aix_soname,$aix_use_runtimelinking in | ||
2444 | # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct | ||
2445 | # soname into executable. Probably we can add versioning support to | ||
2446 | # collect2, so additional links can be useful in future. | ||
2447 | aix,yes) # traditional libtool | ||
2448 | dynamic_linker='AIX unversionable lib.so' | ||
2449 | # If using run time linking (on AIX 4.2 or later) use lib<name>.so | ||
2450 | # instead of lib<name>.a to let people know that these are not | ||
2451 | # typical AIX shared libraries. | ||
2452 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' | ||
2453 | ;; | ||
2454 | aix,no) # traditional AIX only | ||
2455 | dynamic_linker='AIX lib.a[(]lib.so.V[)]' | ||
2456 | # We preserve .a as extension for shared libraries through AIX4.2 | ||
2457 | # and later when we are not doing run time linking. | ||
2458 | library_names_spec='$libname$release.a $libname.a' | ||
2459 | soname_spec='$libname$release$shared_ext$major' | ||
2460 | ;; | ||
2461 | svr4,*) # full svr4 only | ||
2462 | dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" | ||
2463 | library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' | ||
2464 | # We do not specify a path in Import Files, so LIBPATH fires. | ||
2465 | shlibpath_overrides_runpath=yes | ||
2466 | ;; | ||
2467 | *,yes) # both, prefer svr4 | ||
2468 | dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" | ||
2469 | library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' | ||
2470 | # unpreferred sharedlib libNAME.a needs extra handling | ||
2471 | postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' | ||
2472 | postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' | ||
2473 | # We do not specify a path in Import Files, so LIBPATH fires. | ||
2474 | shlibpath_overrides_runpath=yes | ||
2475 | ;; | ||
2476 | *,no) # both, prefer aix | ||
2477 | dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" | ||
2478 | library_names_spec='$libname$release.a $libname.a' | ||
2479 | soname_spec='$libname$release$shared_ext$major' | ||
2480 | # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling | ||
2481 | postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' | ||
2482 | postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' | ||
2483 | ;; | ||
2484 | esac | ||
2485 | shlibpath_var=LIBPATH | ||
2486 | fi | ||
2487 | ;; | ||
2488 | |||
2489 | amigaos*) | ||
2490 | case $host_cpu in | ||
2491 | powerpc) | ||
2492 | # Since July 2007 AmigaOS4 officially supports .so libraries. | ||
2493 | # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. | ||
2494 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' | ||
2495 | ;; | ||
2496 | m68k) | ||
2497 | library_names_spec='$libname.ixlibrary $libname.a' | ||
2498 | # Create ${libname}_ixlibrary.a entries in /sys/libs. | ||
2499 | finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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' | ||
2500 | ;; | ||
2501 | esac | ||
2502 | ;; | ||
2503 | |||
2504 | beos*) | ||
2505 | library_names_spec='$libname$shared_ext' | ||
2506 | dynamic_linker="$host_os ld.so" | ||
2507 | shlibpath_var=LIBRARY_PATH | ||
2508 | ;; | ||
2509 | |||
2510 | bsdi[[45]]*) | ||
2511 | version_type=linux # correct to gnu/linux during the next big refactor | ||
2512 | need_version=no | ||
2513 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' | ||
2514 | soname_spec='$libname$release$shared_ext$major' | ||
2515 | finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' | ||
2516 | shlibpath_var=LD_LIBRARY_PATH | ||
2517 | sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" | ||
2518 | sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" | ||
2519 | # the default ld.so.conf also contains /usr/contrib/lib and | ||
2520 | # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow | ||
2521 | # libtool to hard-code these into programs | ||
2522 | ;; | ||
2523 | |||
2524 | cygwin* | mingw* | pw32* | cegcc*) | ||
2525 | version_type=windows | ||
2526 | shrext_cmds=.dll | ||
2527 | need_version=no | ||
2528 | need_lib_prefix=no | ||
2529 | |||
2530 | case $GCC,$cc_basename in | ||
2531 | yes,*) | ||
2532 | # gcc | ||
2533 | library_names_spec='$libname.dll.a' | ||
2534 | # DLL is installed to $(libdir)/../bin by postinstall_cmds | ||
2535 | postinstall_cmds='base_file=`basename \$file`~ | ||
2536 | dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ | ||
2537 | dldir=$destdir/`dirname \$dlpath`~ | ||
2538 | test -d \$dldir || mkdir -p \$dldir~ | ||
2539 | $install_prog $dir/$dlname \$dldir/$dlname~ | ||
2540 | chmod a+x \$dldir/$dlname~ | ||
2541 | if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then | ||
2542 | eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; | ||
2543 | fi' | ||
2544 | postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | ||
2545 | dlpath=$dir/\$dldll~ | ||
2546 | $RM \$dlpath' | ||
2547 | shlibpath_overrides_runpath=yes | ||
2548 | |||
2549 | case $host_os in | ||
2550 | cygwin*) | ||
2551 | # Cygwin DLLs use 'cyg' prefix rather than 'lib' | ||
2552 | soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' | ||
2553 | m4_if([$1], [],[ | ||
2554 | sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) | ||
2555 | ;; | ||
2556 | mingw* | cegcc*) | ||
2557 | # MinGW DLLs use traditional 'lib' prefix | ||
2558 | soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' | ||
2559 | ;; | ||
2560 | pw32*) | ||
2561 | # pw32 DLLs use 'pw' prefix rather than 'lib' | ||
2562 | library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' | ||
2563 | ;; | ||
2564 | esac | ||
2565 | dynamic_linker='Win32 ld.exe' | ||
2566 | ;; | ||
2567 | |||
2568 | *,cl*) | ||
2569 | # Native MSVC | ||
2570 | libname_spec='$name' | ||
2571 | soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' | ||
2572 | library_names_spec='$libname.dll.lib' | ||
2573 | |||
2574 | case $build_os in | ||
2575 | mingw*) | ||
2576 | sys_lib_search_path_spec= | ||
2577 | lt_save_ifs=$IFS | ||
2578 | IFS=';' | ||
2579 | for lt_path in $LIB | ||
2580 | do | ||
2581 | IFS=$lt_save_ifs | ||
2582 | # Let DOS variable expansion print the short 8.3 style file name. | ||
2583 | lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` | ||
2584 | sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" | ||
2585 | done | ||
2586 | IFS=$lt_save_ifs | ||
2587 | # Convert to MSYS style. | ||
2588 | sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` | ||
2589 | ;; | ||
2590 | cygwin*) | ||
2591 | # Convert to unix form, then to dos form, then back to unix form | ||
2592 | # but this time dos style (no spaces!) so that the unix form looks | ||
2593 | # like /cygdrive/c/PROGRA~1:/cygdr... | ||
2594 | sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` | ||
2595 | sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` | ||
2596 | sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
2597 | ;; | ||
2598 | *) | ||
2599 | sys_lib_search_path_spec=$LIB | ||
2600 | if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then | ||
2601 | # It is most probably a Windows format PATH. | ||
2602 | sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` | ||
2603 | else | ||
2604 | sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
2605 | fi | ||
2606 | # FIXME: find the short name or the path components, as spaces are | ||
2607 | # common. (e.g. "Program Files" -> "PROGRA~1") | ||
2608 | ;; | ||
2609 | esac | ||
2610 | |||
2611 | # DLL is installed to $(libdir)/../bin by postinstall_cmds | ||
2612 | postinstall_cmds='base_file=`basename \$file`~ | ||
2613 | dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ | ||
2614 | dldir=$destdir/`dirname \$dlpath`~ | ||
2615 | test -d \$dldir || mkdir -p \$dldir~ | ||
2616 | $install_prog $dir/$dlname \$dldir/$dlname' | ||
2617 | postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | ||
2618 | dlpath=$dir/\$dldll~ | ||
2619 | $RM \$dlpath' | ||
2620 | shlibpath_overrides_runpath=yes | ||
2621 | dynamic_linker='Win32 link.exe' | ||
2622 | ;; | ||
2623 | |||
2624 | *) | ||
2625 | # Assume MSVC wrapper | ||
2626 | library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' | ||
2627 | dynamic_linker='Win32 ld.exe' | ||
2628 | ;; | ||
2629 | esac | ||
2630 | # FIXME: first we should search . and the directory the executable is in | ||
2631 | shlibpath_var=PATH | ||
2632 | ;; | ||
2633 | |||
2634 | darwin* | rhapsody*) | ||
2635 | dynamic_linker="$host_os dyld" | ||
2636 | version_type=darwin | ||
2637 | need_lib_prefix=no | ||
2638 | need_version=no | ||
2639 | library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' | ||
2640 | soname_spec='$libname$release$major$shared_ext' | ||
2641 | shlibpath_overrides_runpath=yes | ||
2642 | shlibpath_var=DYLD_LIBRARY_PATH | ||
2643 | shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' | ||
2644 | m4_if([$1], [],[ | ||
2645 | sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) | ||
2646 | sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' | ||
2647 | ;; | ||
2648 | |||
2649 | dgux*) | ||
2650 | version_type=linux # correct to gnu/linux during the next big refactor | ||
2651 | need_lib_prefix=no | ||
2652 | need_version=no | ||
2653 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' | ||
2654 | soname_spec='$libname$release$shared_ext$major' | ||
2655 | shlibpath_var=LD_LIBRARY_PATH | ||
2656 | ;; | ||
2657 | |||
2658 | freebsd* | dragonfly*) | ||
2659 | # DragonFly does not have aout. When/if they implement a new | ||
2660 | # versioning mechanism, adjust this. | ||
2661 | if test -x /usr/bin/objformat; then | ||
2662 | objformat=`/usr/bin/objformat` | ||
2663 | else | ||
2664 | case $host_os in | ||
2665 | freebsd[[23]].*) objformat=aout ;; | ||
2666 | *) objformat=elf ;; | ||
2667 | esac | ||
2668 | fi | ||
2669 | version_type=freebsd-$objformat | ||
2670 | case $version_type in | ||
2671 | freebsd-elf*) | ||
2672 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' | ||
2673 | soname_spec='$libname$release$shared_ext$major' | ||
2674 | need_version=no | ||
2675 | need_lib_prefix=no | ||
2676 | ;; | ||
2677 | freebsd-*) | ||
2678 | library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' | ||
2679 | need_version=yes | ||
2680 | ;; | ||
2681 | esac | ||
2682 | shlibpath_var=LD_LIBRARY_PATH | ||
2683 | case $host_os in | ||
2684 | freebsd2.*) | ||
2685 | shlibpath_overrides_runpath=yes | ||
2686 | ;; | ||
2687 | freebsd3.[[01]]* | freebsdelf3.[[01]]*) | ||
2688 | shlibpath_overrides_runpath=yes | ||
2689 | hardcode_into_libs=yes | ||
2690 | ;; | ||
2691 | freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ | ||
2692 | freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) | ||
2693 | shlibpath_overrides_runpath=no | ||
2694 | hardcode_into_libs=yes | ||
2695 | ;; | ||
2696 | *) # from 4.6 on, and DragonFly | ||
2697 | shlibpath_overrides_runpath=yes | ||
2698 | hardcode_into_libs=yes | ||
2699 | ;; | ||
2700 | esac | ||
2701 | ;; | ||
2702 | |||
2703 | haiku*) | ||
2704 | version_type=linux # correct to gnu/linux during the next big refactor | ||
2705 | need_lib_prefix=no | ||
2706 | need_version=no | ||
2707 | dynamic_linker="$host_os runtime_loader" | ||
2708 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' | ||
2709 | soname_spec='$libname$release$shared_ext$major' | ||
2710 | shlibpath_var=LIBRARY_PATH | ||
2711 | shlibpath_overrides_runpath=no | ||
2712 | sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' | ||
2713 | hardcode_into_libs=yes | ||
2714 | ;; | ||
2715 | |||
2716 | hpux9* | hpux10* | hpux11*) | ||
2717 | # Give a soname corresponding to the major version so that dld.sl refuses to | ||
2718 | # link against other versions. | ||
2719 | version_type=sunos | ||
2720 | need_lib_prefix=no | ||
2721 | need_version=no | ||
2722 | case $host_cpu in | ||
2723 | ia64*) | ||
2724 | shrext_cmds='.so' | ||
2725 | hardcode_into_libs=yes | ||
2726 | dynamic_linker="$host_os dld.so" | ||
2727 | shlibpath_var=LD_LIBRARY_PATH | ||
2728 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | ||
2729 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' | ||
2730 | soname_spec='$libname$release$shared_ext$major' | ||
2731 | if test 32 = "$HPUX_IA64_MODE"; then | ||
2732 | sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" | ||
2733 | sys_lib_dlsearch_path_spec=/usr/lib/hpux32 | ||
2734 | else | ||
2735 | sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" | ||
2736 | sys_lib_dlsearch_path_spec=/usr/lib/hpux64 | ||
2737 | fi | ||
2738 | ;; | ||
2739 | hppa*64*) | ||
2740 | shrext_cmds='.sl' | ||
2741 | hardcode_into_libs=yes | ||
2742 | dynamic_linker="$host_os dld.sl" | ||
2743 | shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH | ||
2744 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | ||
2745 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' | ||
2746 | soname_spec='$libname$release$shared_ext$major' | ||
2747 | sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" | ||
2748 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | ||
2749 | ;; | ||
2750 | *) | ||
2751 | shrext_cmds='.sl' | ||
2752 | dynamic_linker="$host_os dld.sl" | ||
2753 | shlibpath_var=SHLIB_PATH | ||
2754 | shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH | ||
2755 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' | ||
2756 | soname_spec='$libname$release$shared_ext$major' | ||
2757 | ;; | ||
2758 | esac | ||
2759 | # HP-UX runs *really* slowly unless shared libraries are mode 555, ... | ||
2760 | postinstall_cmds='chmod 555 $lib' | ||
2761 | # or fails outright, so override atomically: | ||
2762 | install_override_mode=555 | ||
2763 | ;; | ||
2764 | |||
2765 | interix[[3-9]]*) | ||
2766 | version_type=linux # correct to gnu/linux during the next big refactor | ||
2767 | need_lib_prefix=no | ||
2768 | need_version=no | ||
2769 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' | ||
2770 | soname_spec='$libname$release$shared_ext$major' | ||
2771 | dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' | ||
2772 | shlibpath_var=LD_LIBRARY_PATH | ||
2773 | shlibpath_overrides_runpath=no | ||
2774 | hardcode_into_libs=yes | ||
2775 | ;; | ||
2776 | |||
2777 | irix5* | irix6* | nonstopux*) | ||
2778 | case $host_os in | ||
2779 | nonstopux*) version_type=nonstopux ;; | ||
2780 | *) | ||
2781 | if test yes = "$lt_cv_prog_gnu_ld"; then | ||
2782 | version_type=linux # correct to gnu/linux during the next big refactor | ||
2783 | else | ||
2784 | version_type=irix | ||
2785 | fi ;; | ||
2786 | esac | ||
2787 | need_lib_prefix=no | ||
2788 | need_version=no | ||
2789 | soname_spec='$libname$release$shared_ext$major' | ||
2790 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' | ||
2791 | case $host_os in | ||
2792 | irix5* | nonstopux*) | ||
2793 | libsuff= shlibsuff= | ||
2794 | ;; | ||
2795 | *) | ||
2796 | case $LD in # libtool.m4 will add one of these switches to LD | ||
2797 | *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") | ||
2798 | libsuff= shlibsuff= libmagic=32-bit;; | ||
2799 | *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") | ||
2800 | libsuff=32 shlibsuff=N32 libmagic=N32;; | ||
2801 | *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") | ||
2802 | libsuff=64 shlibsuff=64 libmagic=64-bit;; | ||
2803 | *) libsuff= shlibsuff= libmagic=never-match;; | ||
2804 | esac | ||
2805 | ;; | ||
2806 | esac | ||
2807 | shlibpath_var=LD_LIBRARY${shlibsuff}_PATH | ||
2808 | shlibpath_overrides_runpath=no | ||
2809 | sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" | ||
2810 | sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" | ||
2811 | hardcode_into_libs=yes | ||
2812 | ;; | ||
2813 | |||
2814 | # No shared lib support for Linux oldld, aout, or coff. | ||
2815 | linux*oldld* | linux*aout* | linux*coff*) | ||
2816 | dynamic_linker=no | ||
2817 | ;; | ||
2818 | |||
2819 | linux*android*) | ||
2820 | version_type=none # Android doesn't support versioned libraries. | ||
2821 | need_lib_prefix=no | ||
2822 | need_version=no | ||
2823 | library_names_spec='$libname$release$shared_ext' | ||
2824 | soname_spec='$libname$release$shared_ext' | ||
2825 | finish_cmds= | ||
2826 | shlibpath_var=LD_LIBRARY_PATH | ||
2827 | shlibpath_overrides_runpath=yes | ||
2828 | |||
2829 | # This implies no fast_install, which is unacceptable. | ||
2830 | # Some rework will be needed to allow for fast_install | ||
2831 | # before this can be enabled. | ||
2832 | hardcode_into_libs=yes | ||
2833 | |||
2834 | dynamic_linker='Android linker' | ||
2835 | # Don't embed -rpath directories since the linker doesn't support them. | ||
2836 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
2837 | ;; | ||
2838 | |||
2839 | # This must be glibc/ELF. | ||
2840 | linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) | ||
2841 | version_type=linux # correct to gnu/linux during the next big refactor | ||
2842 | need_lib_prefix=no | ||
2843 | need_version=no | ||
2844 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' | ||
2845 | soname_spec='$libname$release$shared_ext$major' | ||
2846 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' | ||
2847 | shlibpath_var=LD_LIBRARY_PATH | ||
2848 | shlibpath_overrides_runpath=no | ||
2849 | |||
2850 | # Some binutils ld are patched to set DT_RUNPATH | ||
2851 | AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], | ||
2852 | [lt_cv_shlibpath_overrides_runpath=no | ||
2853 | save_LDFLAGS=$LDFLAGS | ||
2854 | save_libdir=$libdir | ||
2855 | eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ | ||
2856 | LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" | ||
2857 | AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], | ||
2858 | [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], | ||
2859 | [lt_cv_shlibpath_overrides_runpath=yes])]) | ||
2860 | LDFLAGS=$save_LDFLAGS | ||
2861 | libdir=$save_libdir | ||
2862 | ]) | ||
2863 | shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath | ||
2864 | |||
2865 | # This implies no fast_install, which is unacceptable. | ||
2866 | # Some rework will be needed to allow for fast_install | ||
2867 | # before this can be enabled. | ||
2868 | hardcode_into_libs=yes | ||
2869 | |||
2870 | # Ideally, we could use ldconfig to report *all* directores which are | ||
2871 | # searched for libraries, however this is still not possible. Aside from not | ||
2872 | # being certain /sbin/ldconfig is available, command | ||
2873 | # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, | ||
2874 | # even though it is searched at run-time. Try to do the best guess by | ||
2875 | # appending ld.so.conf contents (and includes) to the search path. | ||
2876 | if test -f /etc/ld.so.conf; then | ||
2877 | lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` | ||
2878 | sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" | ||
2879 | fi | ||
2880 | |||
2881 | # We used to test for /lib/ld.so.1 and disable shared libraries on | ||
2882 | # powerpc, because MkLinux only supported shared libraries with the | ||
2883 | # GNU dynamic linker. Since this was broken with cross compilers, | ||
2884 | # most powerpc-linux boxes support dynamic linking these days and | ||
2885 | # people can always --disable-shared, the test was removed, and we | ||
2886 | # assume the GNU/Linux dynamic linker is in use. | ||
2887 | dynamic_linker='GNU/Linux ld.so' | ||
2888 | ;; | ||
2889 | |||
2890 | netbsdelf*-gnu) | ||
2891 | version_type=linux | ||
2892 | need_lib_prefix=no | ||
2893 | need_version=no | ||
2894 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
2895 | soname_spec='${libname}${release}${shared_ext}$major' | ||
2896 | shlibpath_var=LD_LIBRARY_PATH | ||
2897 | shlibpath_overrides_runpath=no | ||
2898 | hardcode_into_libs=yes | ||
2899 | dynamic_linker='NetBSD ld.elf_so' | ||
2900 | ;; | ||
2901 | |||
2902 | netbsd*) | ||
2903 | version_type=sunos | ||
2904 | need_lib_prefix=no | ||
2905 | need_version=no | ||
2906 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | ||
2907 | library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' | ||
2908 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | ||
2909 | dynamic_linker='NetBSD (a.out) ld.so' | ||
2910 | else | ||
2911 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' | ||
2912 | soname_spec='$libname$release$shared_ext$major' | ||
2913 | dynamic_linker='NetBSD ld.elf_so' | ||
2914 | fi | ||
2915 | shlibpath_var=LD_LIBRARY_PATH | ||
2916 | shlibpath_overrides_runpath=yes | ||
2917 | hardcode_into_libs=yes | ||
2918 | ;; | ||
2919 | |||
2920 | newsos6) | ||
2921 | version_type=linux # correct to gnu/linux during the next big refactor | ||
2922 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' | ||
2923 | shlibpath_var=LD_LIBRARY_PATH | ||
2924 | shlibpath_overrides_runpath=yes | ||
2925 | ;; | ||
2926 | |||
2927 | *nto* | *qnx*) | ||
2928 | version_type=qnx | ||
2929 | need_lib_prefix=no | ||
2930 | need_version=no | ||
2931 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' | ||
2932 | soname_spec='$libname$release$shared_ext$major' | ||
2933 | shlibpath_var=LD_LIBRARY_PATH | ||
2934 | shlibpath_overrides_runpath=no | ||
2935 | hardcode_into_libs=yes | ||
2936 | dynamic_linker='ldqnx.so' | ||
2937 | ;; | ||
2938 | |||
2939 | openbsd* | bitrig*) | ||
2940 | version_type=sunos | ||
2941 | sys_lib_dlsearch_path_spec=/usr/lib | ||
2942 | need_lib_prefix=no | ||
2943 | if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then | ||
2944 | need_version=no | ||
2945 | else | ||
2946 | need_version=yes | ||
2947 | fi | ||
2948 | library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' | ||
2949 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | ||
2950 | shlibpath_var=LD_LIBRARY_PATH | ||
2951 | shlibpath_overrides_runpath=yes | ||
2952 | ;; | ||
2953 | |||
2954 | os2*) | ||
2955 | libname_spec='$name' | ||
2956 | version_type=windows | ||
2957 | shrext_cmds=.dll | ||
2958 | need_version=no | ||
2959 | need_lib_prefix=no | ||
2960 | # OS/2 can only load a DLL with a base name of 8 characters or less. | ||
2961 | soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; | ||
2962 | v=$($ECHO $release$versuffix | tr -d .-); | ||
2963 | n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); | ||
2964 | $ECHO $n$v`$shared_ext' | ||
2965 | library_names_spec='${libname}_dll.$libext' | ||
2966 | dynamic_linker='OS/2 ld.exe' | ||
2967 | shlibpath_var=BEGINLIBPATH | ||
2968 | sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" | ||
2969 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | ||
2970 | postinstall_cmds='base_file=`basename \$file`~ | ||
2971 | dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ | ||
2972 | dldir=$destdir/`dirname \$dlpath`~ | ||
2973 | test -d \$dldir || mkdir -p \$dldir~ | ||
2974 | $install_prog $dir/$dlname \$dldir/$dlname~ | ||
2975 | chmod a+x \$dldir/$dlname~ | ||
2976 | if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then | ||
2977 | eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; | ||
2978 | fi' | ||
2979 | postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ | ||
2980 | dlpath=$dir/\$dldll~ | ||
2981 | $RM \$dlpath' | ||
2982 | ;; | ||
2983 | |||
2984 | osf3* | osf4* | osf5*) | ||
2985 | version_type=osf | ||
2986 | need_lib_prefix=no | ||
2987 | need_version=no | ||
2988 | soname_spec='$libname$release$shared_ext$major' | ||
2989 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' | ||
2990 | shlibpath_var=LD_LIBRARY_PATH | ||
2991 | sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" | ||
2992 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | ||
2993 | ;; | ||
2994 | |||
2995 | rdos*) | ||
2996 | dynamic_linker=no | ||
2997 | ;; | ||
2998 | |||
2999 | solaris*) | ||
3000 | version_type=linux # correct to gnu/linux during the next big refactor | ||
3001 | need_lib_prefix=no | ||
3002 | need_version=no | ||
3003 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' | ||
3004 | soname_spec='$libname$release$shared_ext$major' | ||
3005 | shlibpath_var=LD_LIBRARY_PATH | ||
3006 | shlibpath_overrides_runpath=yes | ||
3007 | hardcode_into_libs=yes | ||
3008 | # ldd complains unless libraries are executable | ||
3009 | postinstall_cmds='chmod +x $lib' | ||
3010 | ;; | ||
3011 | |||
3012 | sunos4*) | ||
3013 | version_type=sunos | ||
3014 | library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' | ||
3015 | finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' | ||
3016 | shlibpath_var=LD_LIBRARY_PATH | ||
3017 | shlibpath_overrides_runpath=yes | ||
3018 | if test yes = "$with_gnu_ld"; then | ||
3019 | need_lib_prefix=no | ||
3020 | fi | ||
3021 | need_version=yes | ||
3022 | ;; | ||
3023 | |||
3024 | sysv4 | sysv4.3*) | ||
3025 | version_type=linux # correct to gnu/linux during the next big refactor | ||
3026 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' | ||
3027 | soname_spec='$libname$release$shared_ext$major' | ||
3028 | shlibpath_var=LD_LIBRARY_PATH | ||
3029 | case $host_vendor in | ||
3030 | sni) | ||
3031 | shlibpath_overrides_runpath=no | ||
3032 | need_lib_prefix=no | ||
3033 | runpath_var=LD_RUN_PATH | ||
3034 | ;; | ||
3035 | siemens) | ||
3036 | need_lib_prefix=no | ||
3037 | ;; | ||
3038 | motorola) | ||
3039 | need_lib_prefix=no | ||
3040 | need_version=no | ||
3041 | shlibpath_overrides_runpath=no | ||
3042 | sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' | ||
3043 | ;; | ||
3044 | esac | ||
3045 | ;; | ||
3046 | |||
3047 | sysv4*MP*) | ||
3048 | if test -d /usr/nec; then | ||
3049 | version_type=linux # correct to gnu/linux during the next big refactor | ||
3050 | library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' | ||
3051 | soname_spec='$libname$shared_ext.$major' | ||
3052 | shlibpath_var=LD_LIBRARY_PATH | ||
3053 | fi | ||
3054 | ;; | ||
3055 | |||
3056 | sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) | ||
3057 | version_type=sco | ||
3058 | need_lib_prefix=no | ||
3059 | need_version=no | ||
3060 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' | ||
3061 | soname_spec='$libname$release$shared_ext$major' | ||
3062 | shlibpath_var=LD_LIBRARY_PATH | ||
3063 | shlibpath_overrides_runpath=yes | ||
3064 | hardcode_into_libs=yes | ||
3065 | if test yes = "$with_gnu_ld"; then | ||
3066 | sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' | ||
3067 | else | ||
3068 | sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' | ||
3069 | case $host_os in | ||
3070 | sco3.2v5*) | ||
3071 | sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" | ||
3072 | ;; | ||
3073 | esac | ||
3074 | fi | ||
3075 | sys_lib_dlsearch_path_spec='/usr/lib' | ||
3076 | ;; | ||
3077 | |||
3078 | tpf*) | ||
3079 | # TPF is a cross-target only. Preferred cross-host = GNU/Linux. | ||
3080 | version_type=linux # correct to gnu/linux during the next big refactor | ||
3081 | need_lib_prefix=no | ||
3082 | need_version=no | ||
3083 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' | ||
3084 | shlibpath_var=LD_LIBRARY_PATH | ||
3085 | shlibpath_overrides_runpath=no | ||
3086 | hardcode_into_libs=yes | ||
3087 | ;; | ||
3088 | |||
3089 | uts4*) | ||
3090 | version_type=linux # correct to gnu/linux during the next big refactor | ||
3091 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' | ||
3092 | soname_spec='$libname$release$shared_ext$major' | ||
3093 | shlibpath_var=LD_LIBRARY_PATH | ||
3094 | ;; | ||
3095 | |||
3096 | *) | ||
3097 | dynamic_linker=no | ||
3098 | ;; | ||
3099 | esac | ||
3100 | AC_MSG_RESULT([$dynamic_linker]) | ||
3101 | test no = "$dynamic_linker" && can_build_shared=no | ||
3102 | |||
3103 | variables_saved_for_relink="PATH $shlibpath_var $runpath_var" | ||
3104 | if test yes = "$GCC"; then | ||
3105 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" | ||
3106 | fi | ||
3107 | |||
3108 | if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then | ||
3109 | sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec | ||
3110 | fi | ||
3111 | |||
3112 | if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then | ||
3113 | sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec | ||
3114 | fi | ||
3115 | |||
3116 | # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... | ||
3117 | configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec | ||
3118 | |||
3119 | # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code | ||
3120 | func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" | ||
3121 | |||
3122 | # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool | ||
3123 | configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH | ||
3124 | |||
3125 | _LT_DECL([], [variables_saved_for_relink], [1], | ||
3126 | [Variables whose values should be saved in libtool wrapper scripts and | ||
3127 | restored at link time]) | ||
3128 | _LT_DECL([], [need_lib_prefix], [0], | ||
3129 | [Do we need the "lib" prefix for modules?]) | ||
3130 | _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) | ||
3131 | _LT_DECL([], [version_type], [0], [Library versioning type]) | ||
3132 | _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) | ||
3133 | _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) | ||
3134 | _LT_DECL([], [shlibpath_overrides_runpath], [0], | ||
3135 | [Is shlibpath searched before the hard-coded library search path?]) | ||
3136 | _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) | ||
3137 | _LT_DECL([], [library_names_spec], [1], | ||
3138 | [[List of archive names. First name is the real one, the rest are links. | ||
3139 | The last name is the one that the linker finds with -lNAME]]) | ||
3140 | _LT_DECL([], [soname_spec], [1], | ||
3141 | [[The coded name of the library, if different from the real name]]) | ||
3142 | _LT_DECL([], [install_override_mode], [1], | ||
3143 | [Permission mode override for installation of shared libraries]) | ||
3144 | _LT_DECL([], [postinstall_cmds], [2], | ||
3145 | [Command to use after installation of a shared archive]) | ||
3146 | _LT_DECL([], [postuninstall_cmds], [2], | ||
3147 | [Command to use after uninstallation of a shared archive]) | ||
3148 | _LT_DECL([], [finish_cmds], [2], | ||
3149 | [Commands used to finish a libtool library installation in a directory]) | ||
3150 | _LT_DECL([], [finish_eval], [1], | ||
3151 | [[As "finish_cmds", except a single script fragment to be evaled but | ||
3152 | not shown]]) | ||
3153 | _LT_DECL([], [hardcode_into_libs], [0], | ||
3154 | [Whether we should hardcode library paths into libraries]) | ||
3155 | _LT_DECL([], [sys_lib_search_path_spec], [2], | ||
3156 | [Compile-time system search path for libraries]) | ||
3157 | _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], | ||
3158 | [Detected run-time system search path for libraries]) | ||
3159 | _LT_DECL([], [configure_time_lt_sys_library_path], [2], | ||
3160 | [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) | ||
3161 | ])# _LT_SYS_DYNAMIC_LINKER | ||
3162 | |||
3163 | |||
3164 | # _LT_PATH_TOOL_PREFIX(TOOL) | ||
3165 | # -------------------------- | ||
3166 | # find a file program that can recognize shared library | ||
3167 | AC_DEFUN([_LT_PATH_TOOL_PREFIX], | ||
3168 | [m4_require([_LT_DECL_EGREP])dnl | ||
3169 | AC_MSG_CHECKING([for $1]) | ||
3170 | AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, | ||
3171 | [case $MAGIC_CMD in | ||
3172 | [[\\/*] | ?:[\\/]*]) | ||
3173 | lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. | ||
3174 | ;; | ||
3175 | *) | ||
3176 | lt_save_MAGIC_CMD=$MAGIC_CMD | ||
3177 | lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR | ||
3178 | dnl $ac_dummy forces splitting on constant user-supplied paths. | ||
3179 | dnl POSIX.2 word splitting is done only on the output of word expansions, | ||
3180 | dnl not every word. This closes a longstanding sh security hole. | ||
3181 | ac_dummy="m4_if([$2], , $PATH, [$2])" | ||
3182 | for ac_dir in $ac_dummy; do | ||
3183 | IFS=$lt_save_ifs | ||
3184 | test -z "$ac_dir" && ac_dir=. | ||
3185 | if test -f "$ac_dir/$1"; then | ||
3186 | lt_cv_path_MAGIC_CMD=$ac_dir/"$1" | ||
3187 | if test -n "$file_magic_test_file"; then | ||
3188 | case $deplibs_check_method in | ||
3189 | "file_magic "*) | ||
3190 | file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` | ||
3191 | MAGIC_CMD=$lt_cv_path_MAGIC_CMD | ||
3192 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | | ||
3193 | $EGREP "$file_magic_regex" > /dev/null; then | ||
3194 | : | ||
3195 | else | ||
3196 | cat <<_LT_EOF 1>&2 | ||
3197 | |||
3198 | *** Warning: the command libtool uses to detect shared libraries, | ||
3199 | *** $file_magic_cmd, produces output that libtool cannot recognize. | ||
3200 | *** The result is that libtool may fail to recognize shared libraries | ||
3201 | *** as such. This will affect the creation of libtool libraries that | ||
3202 | *** depend on shared libraries, but programs linked with such libtool | ||
3203 | *** libraries will work regardless of this problem. Nevertheless, you | ||
3204 | *** may want to report the problem to your system manager and/or to | ||
3205 | *** bug-libtool@gnu.org | ||
3206 | |||
3207 | _LT_EOF | ||
3208 | fi ;; | ||
3209 | esac | ||
3210 | fi | ||
3211 | break | ||
3212 | fi | ||
3213 | done | ||
3214 | IFS=$lt_save_ifs | ||
3215 | MAGIC_CMD=$lt_save_MAGIC_CMD | ||
3216 | ;; | ||
3217 | esac]) | ||
3218 | MAGIC_CMD=$lt_cv_path_MAGIC_CMD | ||
3219 | if test -n "$MAGIC_CMD"; then | ||
3220 | AC_MSG_RESULT($MAGIC_CMD) | ||
3221 | else | ||
3222 | AC_MSG_RESULT(no) | ||
3223 | fi | ||
3224 | _LT_DECL([], [MAGIC_CMD], [0], | ||
3225 | [Used to examine libraries when file_magic_cmd begins with "file"])dnl | ||
3226 | ])# _LT_PATH_TOOL_PREFIX | ||
3227 | |||
3228 | # Old name: | ||
3229 | AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) | ||
3230 | dnl aclocal-1.4 backwards compatibility: | ||
3231 | dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) | ||
3232 | |||
3233 | |||
3234 | # _LT_PATH_MAGIC | ||
3235 | # -------------- | ||
3236 | # find a file program that can recognize a shared library | ||
3237 | m4_defun([_LT_PATH_MAGIC], | ||
3238 | [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) | ||
3239 | if test -z "$lt_cv_path_MAGIC_CMD"; then | ||
3240 | if test -n "$ac_tool_prefix"; then | ||
3241 | _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) | ||
3242 | else | ||
3243 | MAGIC_CMD=: | ||
3244 | fi | ||
3245 | fi | ||
3246 | ])# _LT_PATH_MAGIC | ||
3247 | |||
3248 | |||
3249 | # LT_PATH_LD | ||
3250 | # ---------- | ||
3251 | # find the pathname to the GNU or non-GNU linker | ||
3252 | AC_DEFUN([LT_PATH_LD], | ||
3253 | [AC_REQUIRE([AC_PROG_CC])dnl | ||
3254 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
3255 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl | ||
3256 | m4_require([_LT_DECL_SED])dnl | ||
3257 | m4_require([_LT_DECL_EGREP])dnl | ||
3258 | m4_require([_LT_PROG_ECHO_BACKSLASH])dnl | ||
3259 | |||
3260 | AC_ARG_WITH([gnu-ld], | ||
3261 | [AS_HELP_STRING([--with-gnu-ld], | ||
3262 | [assume the C compiler uses GNU ld @<:@default=no@:>@])], | ||
3263 | [test no = "$withval" || with_gnu_ld=yes], | ||
3264 | [with_gnu_ld=no])dnl | ||
3265 | |||
3266 | ac_prog=ld | ||
3267 | if test yes = "$GCC"; then | ||
3268 | # Check if gcc -print-prog-name=ld gives a path. | ||
3269 | AC_MSG_CHECKING([for ld used by $CC]) | ||
3270 | case $host in | ||
3271 | *-*-mingw*) | ||
3272 | # gcc leaves a trailing carriage return, which upsets mingw | ||
3273 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | ||
3274 | *) | ||
3275 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | ||
3276 | esac | ||
3277 | case $ac_prog in | ||
3278 | # Accept absolute paths. | ||
3279 | [[\\/]]* | ?:[[\\/]]*) | ||
3280 | re_direlt='/[[^/]][[^/]]*/\.\./' | ||
3281 | # Canonicalize the pathname of ld | ||
3282 | ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` | ||
3283 | while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do | ||
3284 | ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` | ||
3285 | done | ||
3286 | test -z "$LD" && LD=$ac_prog | ||
3287 | ;; | ||
3288 | "") | ||
3289 | # If it fails, then pretend we aren't using GCC. | ||
3290 | ac_prog=ld | ||
3291 | ;; | ||
3292 | *) | ||
3293 | # If it is relative, then search for the first ld in PATH. | ||
3294 | with_gnu_ld=unknown | ||
3295 | ;; | ||
3296 | esac | ||
3297 | elif test yes = "$with_gnu_ld"; then | ||
3298 | AC_MSG_CHECKING([for GNU ld]) | ||
3299 | else | ||
3300 | AC_MSG_CHECKING([for non-GNU ld]) | ||
3301 | fi | ||
3302 | AC_CACHE_VAL(lt_cv_path_LD, | ||
3303 | [if test -z "$LD"; then | ||
3304 | lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR | ||
3305 | for ac_dir in $PATH; do | ||
3306 | IFS=$lt_save_ifs | ||
3307 | test -z "$ac_dir" && ac_dir=. | ||
3308 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | ||
3309 | lt_cv_path_LD=$ac_dir/$ac_prog | ||
3310 | # Check to see if the program is GNU ld. I'd rather use --version, | ||
3311 | # but apparently some variants of GNU ld only accept -v. | ||
3312 | # Break only if it was the GNU/non-GNU ld that we prefer. | ||
3313 | case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in | ||
3314 | *GNU* | *'with BFD'*) | ||
3315 | test no != "$with_gnu_ld" && break | ||
3316 | ;; | ||
3317 | *) | ||
3318 | test yes != "$with_gnu_ld" && break | ||
3319 | ;; | ||
3320 | esac | ||
3321 | fi | ||
3322 | done | ||
3323 | IFS=$lt_save_ifs | ||
3324 | else | ||
3325 | lt_cv_path_LD=$LD # Let the user override the test with a path. | ||
3326 | fi]) | ||
3327 | LD=$lt_cv_path_LD | ||
3328 | if test -n "$LD"; then | ||
3329 | AC_MSG_RESULT($LD) | ||
3330 | else | ||
3331 | AC_MSG_RESULT(no) | ||
3332 | fi | ||
3333 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) | ||
3334 | _LT_PATH_LD_GNU | ||
3335 | AC_SUBST([LD]) | ||
3336 | |||
3337 | _LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) | ||
3338 | ])# LT_PATH_LD | ||
3339 | |||
3340 | # Old names: | ||
3341 | AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) | ||
3342 | AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) | ||
3343 | dnl aclocal-1.4 backwards compatibility: | ||
3344 | dnl AC_DEFUN([AM_PROG_LD], []) | ||
3345 | dnl AC_DEFUN([AC_PROG_LD], []) | ||
3346 | |||
3347 | |||
3348 | # _LT_PATH_LD_GNU | ||
3349 | #- -------------- | ||
3350 | m4_defun([_LT_PATH_LD_GNU], | ||
3351 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, | ||
3352 | [# I'd rather use --version here, but apparently some GNU lds only accept -v. | ||
3353 | case `$LD -v 2>&1 </dev/null` in | ||
3354 | *GNU* | *'with BFD'*) | ||
3355 | lt_cv_prog_gnu_ld=yes | ||
3356 | ;; | ||
3357 | *) | ||
3358 | lt_cv_prog_gnu_ld=no | ||
3359 | ;; | ||
3360 | esac]) | ||
3361 | with_gnu_ld=$lt_cv_prog_gnu_ld | ||
3362 | ])# _LT_PATH_LD_GNU | ||
3363 | |||
3364 | |||
3365 | # _LT_CMD_RELOAD | ||
3366 | # -------------- | ||
3367 | # find reload flag for linker | ||
3368 | # -- PORTME Some linkers may need a different reload flag. | ||
3369 | m4_defun([_LT_CMD_RELOAD], | ||
3370 | [AC_CACHE_CHECK([for $LD option to reload object files], | ||
3371 | lt_cv_ld_reload_flag, | ||
3372 | [lt_cv_ld_reload_flag='-r']) | ||
3373 | reload_flag=$lt_cv_ld_reload_flag | ||
3374 | case $reload_flag in | ||
3375 | "" | " "*) ;; | ||
3376 | *) reload_flag=" $reload_flag" ;; | ||
3377 | esac | ||
3378 | reload_cmds='$LD$reload_flag -o $output$reload_objs' | ||
3379 | case $host_os in | ||
3380 | cygwin* | mingw* | pw32* | cegcc*) | ||
3381 | if test yes != "$GCC"; then | ||
3382 | reload_cmds=false | ||
3383 | fi | ||
3384 | ;; | ||
3385 | darwin*) | ||
3386 | if test yes = "$GCC"; then | ||
3387 | reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' | ||
3388 | else | ||
3389 | reload_cmds='$LD$reload_flag -o $output$reload_objs' | ||
3390 | fi | ||
3391 | ;; | ||
3392 | esac | ||
3393 | _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl | ||
3394 | _LT_TAGDECL([], [reload_cmds], [2])dnl | ||
3395 | ])# _LT_CMD_RELOAD | ||
3396 | |||
3397 | |||
3398 | # _LT_PATH_DD | ||
3399 | # ----------- | ||
3400 | # find a working dd | ||
3401 | m4_defun([_LT_PATH_DD], | ||
3402 | [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], | ||
3403 | [printf 0123456789abcdef0123456789abcdef >conftest.i | ||
3404 | cat conftest.i conftest.i >conftest2.i | ||
3405 | : ${lt_DD:=$DD} | ||
3406 | AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], | ||
3407 | [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then | ||
3408 | cmp -s conftest.i conftest.out \ | ||
3409 | && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: | ||
3410 | fi]) | ||
3411 | rm -f conftest.i conftest2.i conftest.out]) | ||
3412 | ])# _LT_PATH_DD | ||
3413 | |||
3414 | |||
3415 | # _LT_CMD_TRUNCATE | ||
3416 | # ---------------- | ||
3417 | # find command to truncate a binary pipe | ||
3418 | m4_defun([_LT_CMD_TRUNCATE], | ||
3419 | [m4_require([_LT_PATH_DD]) | ||
3420 | AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], | ||
3421 | [printf 0123456789abcdef0123456789abcdef >conftest.i | ||
3422 | cat conftest.i conftest.i >conftest2.i | ||
3423 | lt_cv_truncate_bin= | ||
3424 | if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then | ||
3425 | cmp -s conftest.i conftest.out \ | ||
3426 | && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" | ||
3427 | fi | ||
3428 | rm -f conftest.i conftest2.i conftest.out | ||
3429 | test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) | ||
3430 | _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], | ||
3431 | [Command to truncate a binary pipe]) | ||
3432 | ])# _LT_CMD_TRUNCATE | ||
3433 | |||
3434 | |||
3435 | # _LT_CHECK_MAGIC_METHOD | ||
3436 | # ---------------------- | ||
3437 | # how to check for library dependencies | ||
3438 | # -- PORTME fill in with the dynamic library characteristics | ||
3439 | m4_defun([_LT_CHECK_MAGIC_METHOD], | ||
3440 | [m4_require([_LT_DECL_EGREP]) | ||
3441 | m4_require([_LT_DECL_OBJDUMP]) | ||
3442 | AC_CACHE_CHECK([how to recognize dependent libraries], | ||
3443 | lt_cv_deplibs_check_method, | ||
3444 | [lt_cv_file_magic_cmd='$MAGIC_CMD' | ||
3445 | lt_cv_file_magic_test_file= | ||
3446 | lt_cv_deplibs_check_method='unknown' | ||
3447 | # Need to set the preceding variable on all platforms that support | ||
3448 | # interlibrary dependencies. | ||
3449 | # 'none' -- dependencies not supported. | ||
3450 | # 'unknown' -- same as none, but documents that we really don't know. | ||
3451 | # 'pass_all' -- all dependencies passed with no checks. | ||
3452 | # 'test_compile' -- check by making test program. | ||
3453 | # 'file_magic [[regex]]' -- check by looking for files in library path | ||
3454 | # that responds to the $file_magic_cmd with a given extended regex. | ||
3455 | # If you have 'file' or equivalent on your system and you're not sure | ||
3456 | # whether 'pass_all' will *always* work, you probably want this one. | ||
3457 | |||
3458 | case $host_os in | ||
3459 | aix[[4-9]]*) | ||
3460 | lt_cv_deplibs_check_method=pass_all | ||
3461 | ;; | ||
3462 | |||
3463 | beos*) | ||
3464 | lt_cv_deplibs_check_method=pass_all | ||
3465 | ;; | ||
3466 | |||
3467 | bsdi[[45]]*) | ||
3468 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' | ||
3469 | lt_cv_file_magic_cmd='/usr/bin/file -L' | ||
3470 | lt_cv_file_magic_test_file=/shlib/libc.so | ||
3471 | ;; | ||
3472 | |||
3473 | cygwin*) | ||
3474 | # func_win32_libid is a shell function defined in ltmain.sh | ||
3475 | lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' | ||
3476 | lt_cv_file_magic_cmd='func_win32_libid' | ||
3477 | ;; | ||
3478 | |||
3479 | mingw* | pw32*) | ||
3480 | # Base MSYS/MinGW do not provide the 'file' command needed by | ||
3481 | # func_win32_libid shell function, so use a weaker test based on 'objdump', | ||
3482 | # unless we find 'file', for example because we are cross-compiling. | ||
3483 | if ( file / ) >/dev/null 2>&1; then | ||
3484 | lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' | ||
3485 | lt_cv_file_magic_cmd='func_win32_libid' | ||
3486 | else | ||
3487 | # Keep this pattern in sync with the one in func_win32_libid. | ||
3488 | lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' | ||
3489 | lt_cv_file_magic_cmd='$OBJDUMP -f' | ||
3490 | fi | ||
3491 | ;; | ||
3492 | |||
3493 | cegcc*) | ||
3494 | # use the weaker test based on 'objdump'. See mingw*. | ||
3495 | lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' | ||
3496 | lt_cv_file_magic_cmd='$OBJDUMP -f' | ||
3497 | ;; | ||
3498 | |||
3499 | darwin* | rhapsody*) | ||
3500 | lt_cv_deplibs_check_method=pass_all | ||
3501 | ;; | ||
3502 | |||
3503 | freebsd* | dragonfly*) | ||
3504 | if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then | ||
3505 | case $host_cpu in | ||
3506 | i*86 ) | ||
3507 | # Not sure whether the presence of OpenBSD here was a mistake. | ||
3508 | # Let's accept both of them until this is cleared up. | ||
3509 | lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' | ||
3510 | lt_cv_file_magic_cmd=/usr/bin/file | ||
3511 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` | ||
3512 | ;; | ||
3513 | esac | ||
3514 | else | ||
3515 | lt_cv_deplibs_check_method=pass_all | ||
3516 | fi | ||
3517 | ;; | ||
3518 | |||
3519 | haiku*) | ||
3520 | lt_cv_deplibs_check_method=pass_all | ||
3521 | ;; | ||
3522 | |||
3523 | hpux10.20* | hpux11*) | ||
3524 | lt_cv_file_magic_cmd=/usr/bin/file | ||
3525 | case $host_cpu in | ||
3526 | ia64*) | ||
3527 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' | ||
3528 | lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so | ||
3529 | ;; | ||
3530 | hppa*64*) | ||
3531 | [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] | ||
3532 | lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl | ||
3533 | ;; | ||
3534 | *) | ||
3535 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' | ||
3536 | lt_cv_file_magic_test_file=/usr/lib/libc.sl | ||
3537 | ;; | ||
3538 | esac | ||
3539 | ;; | ||
3540 | |||
3541 | interix[[3-9]]*) | ||
3542 | # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here | ||
3543 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' | ||
3544 | ;; | ||
3545 | |||
3546 | irix5* | irix6* | nonstopux*) | ||
3547 | case $LD in | ||
3548 | *-32|*"-32 ") libmagic=32-bit;; | ||
3549 | *-n32|*"-n32 ") libmagic=N32;; | ||
3550 | *-64|*"-64 ") libmagic=64-bit;; | ||
3551 | *) libmagic=never-match;; | ||
3552 | esac | ||
3553 | lt_cv_deplibs_check_method=pass_all | ||
3554 | ;; | ||
3555 | |||
3556 | # This must be glibc/ELF. | ||
3557 | linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) | ||
3558 | lt_cv_deplibs_check_method=pass_all | ||
3559 | ;; | ||
3560 | |||
3561 | netbsd* | netbsdelf*-gnu) | ||
3562 | if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then | ||
3563 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' | ||
3564 | else | ||
3565 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' | ||
3566 | fi | ||
3567 | ;; | ||
3568 | |||
3569 | newos6*) | ||
3570 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' | ||
3571 | lt_cv_file_magic_cmd=/usr/bin/file | ||
3572 | lt_cv_file_magic_test_file=/usr/lib/libnls.so | ||
3573 | ;; | ||
3574 | |||
3575 | *nto* | *qnx*) | ||
3576 | lt_cv_deplibs_check_method=pass_all | ||
3577 | ;; | ||
3578 | |||
3579 | openbsd* | bitrig*) | ||
3580 | if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then | ||
3581 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' | ||
3582 | else | ||
3583 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' | ||
3584 | fi | ||
3585 | ;; | ||
3586 | |||
3587 | osf3* | osf4* | osf5*) | ||
3588 | lt_cv_deplibs_check_method=pass_all | ||
3589 | ;; | ||
3590 | |||
3591 | rdos*) | ||
3592 | lt_cv_deplibs_check_method=pass_all | ||
3593 | ;; | ||
3594 | |||
3595 | solaris*) | ||
3596 | lt_cv_deplibs_check_method=pass_all | ||
3597 | ;; | ||
3598 | |||
3599 | sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) | ||
3600 | lt_cv_deplibs_check_method=pass_all | ||
3601 | ;; | ||
3602 | |||
3603 | sysv4 | sysv4.3*) | ||
3604 | case $host_vendor in | ||
3605 | motorola) | ||
3606 | 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]]' | ||
3607 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` | ||
3608 | ;; | ||
3609 | ncr) | ||
3610 | lt_cv_deplibs_check_method=pass_all | ||
3611 | ;; | ||
3612 | sequent) | ||
3613 | lt_cv_file_magic_cmd='/bin/file' | ||
3614 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' | ||
3615 | ;; | ||
3616 | sni) | ||
3617 | lt_cv_file_magic_cmd='/bin/file' | ||
3618 | lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" | ||
3619 | lt_cv_file_magic_test_file=/lib/libc.so | ||
3620 | ;; | ||
3621 | siemens) | ||
3622 | lt_cv_deplibs_check_method=pass_all | ||
3623 | ;; | ||
3624 | pc) | ||
3625 | lt_cv_deplibs_check_method=pass_all | ||
3626 | ;; | ||
3627 | esac | ||
3628 | ;; | ||
3629 | |||
3630 | tpf*) | ||
3631 | lt_cv_deplibs_check_method=pass_all | ||
3632 | ;; | ||
3633 | os2*) | ||
3634 | lt_cv_deplibs_check_method=pass_all | ||
3635 | ;; | ||
3636 | esac | ||
3637 | ]) | ||
3638 | |||
3639 | file_magic_glob= | ||
3640 | want_nocaseglob=no | ||
3641 | if test "$build" = "$host"; then | ||
3642 | case $host_os in | ||
3643 | mingw* | pw32*) | ||
3644 | if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then | ||
3645 | want_nocaseglob=yes | ||
3646 | else | ||
3647 | file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` | ||
3648 | fi | ||
3649 | ;; | ||
3650 | esac | ||
3651 | fi | ||
3652 | |||
3653 | file_magic_cmd=$lt_cv_file_magic_cmd | ||
3654 | deplibs_check_method=$lt_cv_deplibs_check_method | ||
3655 | test -z "$deplibs_check_method" && deplibs_check_method=unknown | ||
3656 | |||
3657 | _LT_DECL([], [deplibs_check_method], [1], | ||
3658 | [Method to check whether dependent libraries are shared objects]) | ||
3659 | _LT_DECL([], [file_magic_cmd], [1], | ||
3660 | [Command to use when deplibs_check_method = "file_magic"]) | ||
3661 | _LT_DECL([], [file_magic_glob], [1], | ||
3662 | [How to find potential files when deplibs_check_method = "file_magic"]) | ||
3663 | _LT_DECL([], [want_nocaseglob], [1], | ||
3664 | [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) | ||
3665 | ])# _LT_CHECK_MAGIC_METHOD | ||
3666 | |||
3667 | |||
3668 | # LT_PATH_NM | ||
3669 | # ---------- | ||
3670 | # find the pathname to a BSD- or MS-compatible name lister | ||
3671 | AC_DEFUN([LT_PATH_NM], | ||
3672 | [AC_REQUIRE([AC_PROG_CC])dnl | ||
3673 | AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, | ||
3674 | [if test -n "$NM"; then | ||
3675 | # Let the user override the test. | ||
3676 | lt_cv_path_NM=$NM | ||
3677 | else | ||
3678 | lt_nm_to_check=${ac_tool_prefix}nm | ||
3679 | if test -n "$ac_tool_prefix" && test "$build" = "$host"; then | ||
3680 | lt_nm_to_check="$lt_nm_to_check nm" | ||
3681 | fi | ||
3682 | for lt_tmp_nm in $lt_nm_to_check; do | ||
3683 | lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR | ||
3684 | for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do | ||
3685 | IFS=$lt_save_ifs | ||
3686 | test -z "$ac_dir" && ac_dir=. | ||
3687 | tmp_nm=$ac_dir/$lt_tmp_nm | ||
3688 | if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then | ||
3689 | # Check to see if the nm accepts a BSD-compat flag. | ||
3690 | # Adding the 'sed 1q' prevents false positives on HP-UX, which says: | ||
3691 | # nm: unknown option "B" ignored | ||
3692 | # Tru64's nm complains that /dev/null is an invalid object file | ||
3693 | # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty | ||
3694 | case $build_os in | ||
3695 | mingw*) lt_bad_file=conftest.nm/nofile ;; | ||
3696 | *) lt_bad_file=/dev/null ;; | ||
3697 | esac | ||
3698 | case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in | ||
3699 | *$lt_bad_file* | *'Invalid file or object type'*) | ||
3700 | lt_cv_path_NM="$tmp_nm -B" | ||
3701 | break 2 | ||
3702 | ;; | ||
3703 | *) | ||
3704 | case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in | ||
3705 | */dev/null*) | ||
3706 | lt_cv_path_NM="$tmp_nm -p" | ||
3707 | break 2 | ||
3708 | ;; | ||
3709 | *) | ||
3710 | lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but | ||
3711 | continue # so that we can try to find one that supports BSD flags | ||
3712 | ;; | ||
3713 | esac | ||
3714 | ;; | ||
3715 | esac | ||
3716 | fi | ||
3717 | done | ||
3718 | IFS=$lt_save_ifs | ||
3719 | done | ||
3720 | : ${lt_cv_path_NM=no} | ||
3721 | fi]) | ||
3722 | if test no != "$lt_cv_path_NM"; then | ||
3723 | NM=$lt_cv_path_NM | ||
3724 | else | ||
3725 | # Didn't find any BSD compatible name lister, look for dumpbin. | ||
3726 | if test -n "$DUMPBIN"; then : | ||
3727 | # Let the user override the test. | ||
3728 | else | ||
3729 | AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) | ||
3730 | case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in | ||
3731 | *COFF*) | ||
3732 | DUMPBIN="$DUMPBIN -symbols -headers" | ||
3733 | ;; | ||
3734 | *) | ||
3735 | DUMPBIN=: | ||
3736 | ;; | ||
3737 | esac | ||
3738 | fi | ||
3739 | AC_SUBST([DUMPBIN]) | ||
3740 | if test : != "$DUMPBIN"; then | ||
3741 | NM=$DUMPBIN | ||
3742 | fi | ||
3743 | fi | ||
3744 | test -z "$NM" && NM=nm | ||
3745 | AC_SUBST([NM]) | ||
3746 | _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl | ||
3747 | |||
3748 | AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], | ||
3749 | [lt_cv_nm_interface="BSD nm" | ||
3750 | echo "int some_variable = 0;" > conftest.$ac_ext | ||
3751 | (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) | ||
3752 | (eval "$ac_compile" 2>conftest.err) | ||
3753 | cat conftest.err >&AS_MESSAGE_LOG_FD | ||
3754 | (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) | ||
3755 | (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) | ||
3756 | cat conftest.err >&AS_MESSAGE_LOG_FD | ||
3757 | (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) | ||
3758 | cat conftest.out >&AS_MESSAGE_LOG_FD | ||
3759 | if $GREP 'External.*some_variable' conftest.out > /dev/null; then | ||
3760 | lt_cv_nm_interface="MS dumpbin" | ||
3761 | fi | ||
3762 | rm -f conftest*]) | ||
3763 | ])# LT_PATH_NM | ||
3764 | |||
3765 | # Old names: | ||
3766 | AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) | ||
3767 | AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) | ||
3768 | dnl aclocal-1.4 backwards compatibility: | ||
3769 | dnl AC_DEFUN([AM_PROG_NM], []) | ||
3770 | dnl AC_DEFUN([AC_PROG_NM], []) | ||
3771 | |||
3772 | # _LT_CHECK_SHAREDLIB_FROM_LINKLIB | ||
3773 | # -------------------------------- | ||
3774 | # how to determine the name of the shared library | ||
3775 | # associated with a specific link library. | ||
3776 | # -- PORTME fill in with the dynamic library characteristics | ||
3777 | m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], | ||
3778 | [m4_require([_LT_DECL_EGREP]) | ||
3779 | m4_require([_LT_DECL_OBJDUMP]) | ||
3780 | m4_require([_LT_DECL_DLLTOOL]) | ||
3781 | AC_CACHE_CHECK([how to associate runtime and link libraries], | ||
3782 | lt_cv_sharedlib_from_linklib_cmd, | ||
3783 | [lt_cv_sharedlib_from_linklib_cmd='unknown' | ||
3784 | |||
3785 | case $host_os in | ||
3786 | cygwin* | mingw* | pw32* | cegcc*) | ||
3787 | # two different shell functions defined in ltmain.sh; | ||
3788 | # decide which one to use based on capabilities of $DLLTOOL | ||
3789 | case `$DLLTOOL --help 2>&1` in | ||
3790 | *--identify-strict*) | ||
3791 | lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib | ||
3792 | ;; | ||
3793 | *) | ||
3794 | lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback | ||
3795 | ;; | ||
3796 | esac | ||
3797 | ;; | ||
3798 | *) | ||
3799 | # fallback: assume linklib IS sharedlib | ||
3800 | lt_cv_sharedlib_from_linklib_cmd=$ECHO | ||
3801 | ;; | ||
3802 | esac | ||
3803 | ]) | ||
3804 | sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd | ||
3805 | test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO | ||
3806 | |||
3807 | _LT_DECL([], [sharedlib_from_linklib_cmd], [1], | ||
3808 | [Command to associate shared and link libraries]) | ||
3809 | ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB | ||
3810 | |||
3811 | |||
3812 | # _LT_PATH_MANIFEST_TOOL | ||
3813 | # ---------------------- | ||
3814 | # locate the manifest tool | ||
3815 | m4_defun([_LT_PATH_MANIFEST_TOOL], | ||
3816 | [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) | ||
3817 | test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt | ||
3818 | AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], | ||
3819 | [lt_cv_path_mainfest_tool=no | ||
3820 | echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD | ||
3821 | $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out | ||
3822 | cat conftest.err >&AS_MESSAGE_LOG_FD | ||
3823 | if $GREP 'Manifest Tool' conftest.out > /dev/null; then | ||
3824 | lt_cv_path_mainfest_tool=yes | ||
3825 | fi | ||
3826 | rm -f conftest*]) | ||
3827 | if test yes != "$lt_cv_path_mainfest_tool"; then | ||
3828 | MANIFEST_TOOL=: | ||
3829 | fi | ||
3830 | _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl | ||
3831 | ])# _LT_PATH_MANIFEST_TOOL | ||
3832 | |||
3833 | |||
3834 | # _LT_DLL_DEF_P([FILE]) | ||
3835 | # --------------------- | ||
3836 | # True iff FILE is a Windows DLL '.def' file. | ||
3837 | # Keep in sync with func_dll_def_p in the libtool script | ||
3838 | AC_DEFUN([_LT_DLL_DEF_P], | ||
3839 | [dnl | ||
3840 | test DEF = "`$SED -n dnl | ||
3841 | -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace | ||
3842 | -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments | ||
3843 | -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl | ||
3844 | -e q dnl Only consider the first "real" line | ||
3845 | $1`" dnl | ||
3846 | ])# _LT_DLL_DEF_P | ||
3847 | |||
3848 | |||
3849 | # LT_LIB_M | ||
3850 | # -------- | ||
3851 | # check for math library | ||
3852 | AC_DEFUN([LT_LIB_M], | ||
3853 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
3854 | LIBM= | ||
3855 | case $host in | ||
3856 | *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) | ||
3857 | # These system don't have libm, or don't need it | ||
3858 | ;; | ||
3859 | *-ncr-sysv4.3*) | ||
3860 | AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) | ||
3861 | AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") | ||
3862 | ;; | ||
3863 | *) | ||
3864 | AC_CHECK_LIB(m, cos, LIBM=-lm) | ||
3865 | ;; | ||
3866 | esac | ||
3867 | AC_SUBST([LIBM]) | ||
3868 | ])# LT_LIB_M | ||
3869 | |||
3870 | # Old name: | ||
3871 | AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) | ||
3872 | dnl aclocal-1.4 backwards compatibility: | ||
3873 | dnl AC_DEFUN([AC_CHECK_LIBM], []) | ||
3874 | |||
3875 | |||
3876 | # _LT_COMPILER_NO_RTTI([TAGNAME]) | ||
3877 | # ------------------------------- | ||
3878 | m4_defun([_LT_COMPILER_NO_RTTI], | ||
3879 | [m4_require([_LT_TAG_COMPILER])dnl | ||
3880 | |||
3881 | _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= | ||
3882 | |||
3883 | if test yes = "$GCC"; then | ||
3884 | case $cc_basename in | ||
3885 | nvcc*) | ||
3886 | _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; | ||
3887 | *) | ||
3888 | _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; | ||
3889 | esac | ||
3890 | |||
3891 | _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], | ||
3892 | lt_cv_prog_compiler_rtti_exceptions, | ||
3893 | [-fno-rtti -fno-exceptions], [], | ||
3894 | [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) | ||
3895 | fi | ||
3896 | _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], | ||
3897 | [Compiler flag to turn off builtin functions]) | ||
3898 | ])# _LT_COMPILER_NO_RTTI | ||
3899 | |||
3900 | |||
3901 | # _LT_CMD_GLOBAL_SYMBOLS | ||
3902 | # ---------------------- | ||
3903 | m4_defun([_LT_CMD_GLOBAL_SYMBOLS], | ||
3904 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
3905 | AC_REQUIRE([AC_PROG_CC])dnl | ||
3906 | AC_REQUIRE([AC_PROG_AWK])dnl | ||
3907 | AC_REQUIRE([LT_PATH_NM])dnl | ||
3908 | AC_REQUIRE([LT_PATH_LD])dnl | ||
3909 | m4_require([_LT_DECL_SED])dnl | ||
3910 | m4_require([_LT_DECL_EGREP])dnl | ||
3911 | m4_require([_LT_TAG_COMPILER])dnl | ||
3912 | |||
3913 | # Check for command to grab the raw symbol name followed by C symbol from nm. | ||
3914 | AC_MSG_CHECKING([command to parse $NM output from $compiler object]) | ||
3915 | AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], | ||
3916 | [ | ||
3917 | # These are sane defaults that work on at least a few old systems. | ||
3918 | # [They come from Ultrix. What could be older than Ultrix?!! ;)] | ||
3919 | |||
3920 | # Character class describing NM global symbol codes. | ||
3921 | symcode='[[BCDEGRST]]' | ||
3922 | |||
3923 | # Regexp to match symbols that can be accessed directly from C. | ||
3924 | sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' | ||
3925 | |||
3926 | # Define system-specific variables. | ||
3927 | case $host_os in | ||
3928 | aix*) | ||
3929 | symcode='[[BCDT]]' | ||
3930 | ;; | ||
3931 | cygwin* | mingw* | pw32* | cegcc*) | ||
3932 | symcode='[[ABCDGISTW]]' | ||
3933 | ;; | ||
3934 | hpux*) | ||
3935 | if test ia64 = "$host_cpu"; then | ||
3936 | symcode='[[ABCDEGRST]]' | ||
3937 | fi | ||
3938 | ;; | ||
3939 | irix* | nonstopux*) | ||
3940 | symcode='[[BCDEGRST]]' | ||
3941 | ;; | ||
3942 | osf*) | ||
3943 | symcode='[[BCDEGQRST]]' | ||
3944 | ;; | ||
3945 | solaris*) | ||
3946 | symcode='[[BDRT]]' | ||
3947 | ;; | ||
3948 | sco3.2v5*) | ||
3949 | symcode='[[DT]]' | ||
3950 | ;; | ||
3951 | sysv4.2uw2*) | ||
3952 | symcode='[[DT]]' | ||
3953 | ;; | ||
3954 | sysv5* | sco5v6* | unixware* | OpenUNIX*) | ||
3955 | symcode='[[ABDT]]' | ||
3956 | ;; | ||
3957 | sysv4) | ||
3958 | symcode='[[DFNSTU]]' | ||
3959 | ;; | ||
3960 | esac | ||
3961 | |||
3962 | # If we're using GNU nm, then use its standard symbol codes. | ||
3963 | case `$NM -V 2>&1` in | ||
3964 | *GNU* | *'with BFD'*) | ||
3965 | symcode='[[ABCDGIRSTW]]' ;; | ||
3966 | esac | ||
3967 | |||
3968 | if test "$lt_cv_nm_interface" = "MS dumpbin"; then | ||
3969 | # Gets list of data symbols to import. | ||
3970 | lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" | ||
3971 | # Adjust the below global symbol transforms to fixup imported variables. | ||
3972 | lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" | ||
3973 | lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" | ||
3974 | lt_c_name_lib_hook="\ | ||
3975 | -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ | ||
3976 | -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" | ||
3977 | else | ||
3978 | # Disable hooks by default. | ||
3979 | lt_cv_sys_global_symbol_to_import= | ||
3980 | lt_cdecl_hook= | ||
3981 | lt_c_name_hook= | ||
3982 | lt_c_name_lib_hook= | ||
3983 | fi | ||
3984 | |||
3985 | # Transform an extracted symbol line into a proper C declaration. | ||
3986 | # Some systems (esp. on ia64) link data and code symbols differently, | ||
3987 | # so use this general approach. | ||
3988 | lt_cv_sys_global_symbol_to_cdecl="sed -n"\ | ||
3989 | $lt_cdecl_hook\ | ||
3990 | " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ | ||
3991 | " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" | ||
3992 | |||
3993 | # Transform an extracted symbol line into symbol name and symbol address | ||
3994 | lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ | ||
3995 | $lt_c_name_hook\ | ||
3996 | " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ | ||
3997 | " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" | ||
3998 | |||
3999 | # Transform an extracted symbol line into symbol name with lib prefix and | ||
4000 | # symbol address. | ||
4001 | lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ | ||
4002 | $lt_c_name_lib_hook\ | ||
4003 | " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ | ||
4004 | " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ | ||
4005 | " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" | ||
4006 | |||
4007 | # Handle CRLF in mingw tool chain | ||
4008 | opt_cr= | ||
4009 | case $build_os in | ||
4010 | mingw*) | ||
4011 | opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp | ||
4012 | ;; | ||
4013 | esac | ||
4014 | |||
4015 | # Try without a prefix underscore, then with it. | ||
4016 | for ac_symprfx in "" "_"; do | ||
4017 | |||
4018 | # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. | ||
4019 | symxfrm="\\1 $ac_symprfx\\2 \\2" | ||
4020 | |||
4021 | # Write the raw and C identifiers. | ||
4022 | if test "$lt_cv_nm_interface" = "MS dumpbin"; then | ||
4023 | # Fake it for dumpbin and say T for any non-static function, | ||
4024 | # D for any global variable and I for any imported variable. | ||
4025 | # Also find C++ and __fastcall symbols from MSVC++, | ||
4026 | # which start with @ or ?. | ||
4027 | lt_cv_sys_global_symbol_pipe="$AWK ['"\ | ||
4028 | " {last_section=section; section=\$ 3};"\ | ||
4029 | " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ | ||
4030 | " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ | ||
4031 | " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ | ||
4032 | " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ | ||
4033 | " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ | ||
4034 | " \$ 0!~/External *\|/{next};"\ | ||
4035 | " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ | ||
4036 | " {if(hide[section]) next};"\ | ||
4037 | " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ | ||
4038 | " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ | ||
4039 | " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ | ||
4040 | " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ | ||
4041 | " ' prfx=^$ac_symprfx]" | ||
4042 | else | ||
4043 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" | ||
4044 | fi | ||
4045 | lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" | ||
4046 | |||
4047 | # Check to see that the pipe works correctly. | ||
4048 | pipe_works=no | ||
4049 | |||
4050 | rm -f conftest* | ||
4051 | cat > conftest.$ac_ext <<_LT_EOF | ||
4052 | #ifdef __cplusplus | ||
4053 | extern "C" { | ||
4054 | #endif | ||
4055 | char nm_test_var; | ||
4056 | void nm_test_func(void); | ||
4057 | void nm_test_func(void){} | ||
4058 | #ifdef __cplusplus | ||
4059 | } | ||
4060 | #endif | ||
4061 | int main(){nm_test_var='a';nm_test_func();return(0);} | ||
4062 | _LT_EOF | ||
4063 | |||
4064 | if AC_TRY_EVAL(ac_compile); then | ||
4065 | # Now try to grab the symbols. | ||
4066 | nlist=conftest.nm | ||
4067 | if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then | ||
4068 | # Try sorting and uniquifying the output. | ||
4069 | if sort "$nlist" | uniq > "$nlist"T; then | ||
4070 | mv -f "$nlist"T "$nlist" | ||
4071 | else | ||
4072 | rm -f "$nlist"T | ||
4073 | fi | ||
4074 | |||
4075 | # Make sure that we snagged all the symbols we need. | ||
4076 | if $GREP ' nm_test_var$' "$nlist" >/dev/null; then | ||
4077 | if $GREP ' nm_test_func$' "$nlist" >/dev/null; then | ||
4078 | cat <<_LT_EOF > conftest.$ac_ext | ||
4079 | /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ | ||
4080 | #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE | ||
4081 | /* DATA imports from DLLs on WIN32 can't be const, because runtime | ||
4082 | relocations are performed -- see ld's documentation on pseudo-relocs. */ | ||
4083 | # define LT@&t@_DLSYM_CONST | ||
4084 | #elif defined __osf__ | ||
4085 | /* This system does not cope well with relocations in const data. */ | ||
4086 | # define LT@&t@_DLSYM_CONST | ||
4087 | #else | ||
4088 | # define LT@&t@_DLSYM_CONST const | ||
4089 | #endif | ||
4090 | |||
4091 | #ifdef __cplusplus | ||
4092 | extern "C" { | ||
4093 | #endif | ||
4094 | |||
4095 | _LT_EOF | ||
4096 | # Now generate the symbol file. | ||
4097 | eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' | ||
4098 | |||
4099 | cat <<_LT_EOF >> conftest.$ac_ext | ||
4100 | |||
4101 | /* The mapping between symbol names and symbols. */ | ||
4102 | LT@&t@_DLSYM_CONST struct { | ||
4103 | const char *name; | ||
4104 | void *address; | ||
4105 | } | ||
4106 | lt__PROGRAM__LTX_preloaded_symbols[[]] = | ||
4107 | { | ||
4108 | { "@PROGRAM@", (void *) 0 }, | ||
4109 | _LT_EOF | ||
4110 | $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext | ||
4111 | cat <<\_LT_EOF >> conftest.$ac_ext | ||
4112 | {0, (void *) 0} | ||
4113 | }; | ||
4114 | |||
4115 | /* This works around a problem in FreeBSD linker */ | ||
4116 | #ifdef FREEBSD_WORKAROUND | ||
4117 | static const void *lt_preloaded_setup() { | ||
4118 | return lt__PROGRAM__LTX_preloaded_symbols; | ||
4119 | } | ||
4120 | #endif | ||
4121 | |||
4122 | #ifdef __cplusplus | ||
4123 | } | ||
4124 | #endif | ||
4125 | _LT_EOF | ||
4126 | # Now try linking the two files. | ||
4127 | mv conftest.$ac_objext conftstm.$ac_objext | ||
4128 | lt_globsym_save_LIBS=$LIBS | ||
4129 | lt_globsym_save_CFLAGS=$CFLAGS | ||
4130 | LIBS=conftstm.$ac_objext | ||
4131 | CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" | ||
4132 | if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then | ||
4133 | pipe_works=yes | ||
4134 | fi | ||
4135 | LIBS=$lt_globsym_save_LIBS | ||
4136 | CFLAGS=$lt_globsym_save_CFLAGS | ||
4137 | else | ||
4138 | echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD | ||
4139 | fi | ||
4140 | else | ||
4141 | echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD | ||
4142 | fi | ||
4143 | else | ||
4144 | echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD | ||
4145 | fi | ||
4146 | else | ||
4147 | echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD | ||
4148 | cat conftest.$ac_ext >&5 | ||
4149 | fi | ||
4150 | rm -rf conftest* conftst* | ||
4151 | |||
4152 | # Do not use the global_symbol_pipe unless it works. | ||
4153 | if test yes = "$pipe_works"; then | ||
4154 | break | ||
4155 | else | ||
4156 | lt_cv_sys_global_symbol_pipe= | ||
4157 | fi | ||
4158 | done | ||
4159 | ]) | ||
4160 | if test -z "$lt_cv_sys_global_symbol_pipe"; then | ||
4161 | lt_cv_sys_global_symbol_to_cdecl= | ||
4162 | fi | ||
4163 | if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then | ||
4164 | AC_MSG_RESULT(failed) | ||
4165 | else | ||
4166 | AC_MSG_RESULT(ok) | ||
4167 | fi | ||
4168 | |||
4169 | # Response file support. | ||
4170 | if test "$lt_cv_nm_interface" = "MS dumpbin"; then | ||
4171 | nm_file_list_spec='@' | ||
4172 | elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then | ||
4173 | nm_file_list_spec='@' | ||
4174 | fi | ||
4175 | |||
4176 | _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], | ||
4177 | [Take the output of nm and produce a listing of raw symbols and C names]) | ||
4178 | _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], | ||
4179 | [Transform the output of nm in a proper C declaration]) | ||
4180 | _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], | ||
4181 | [Transform the output of nm into a list of symbols to manually relocate]) | ||
4182 | _LT_DECL([global_symbol_to_c_name_address], | ||
4183 | [lt_cv_sys_global_symbol_to_c_name_address], [1], | ||
4184 | [Transform the output of nm in a C name address pair]) | ||
4185 | _LT_DECL([global_symbol_to_c_name_address_lib_prefix], | ||
4186 | [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], | ||
4187 | [Transform the output of nm in a C name address pair when lib prefix is needed]) | ||
4188 | _LT_DECL([nm_interface], [lt_cv_nm_interface], [1], | ||
4189 | [The name lister interface]) | ||
4190 | _LT_DECL([], [nm_file_list_spec], [1], | ||
4191 | [Specify filename containing input files for $NM]) | ||
4192 | ]) # _LT_CMD_GLOBAL_SYMBOLS | ||
4193 | |||
4194 | |||
4195 | # _LT_COMPILER_PIC([TAGNAME]) | ||
4196 | # --------------------------- | ||
4197 | m4_defun([_LT_COMPILER_PIC], | ||
4198 | [m4_require([_LT_TAG_COMPILER])dnl | ||
4199 | _LT_TAGVAR(lt_prog_compiler_wl, $1)= | ||
4200 | _LT_TAGVAR(lt_prog_compiler_pic, $1)= | ||
4201 | _LT_TAGVAR(lt_prog_compiler_static, $1)= | ||
4202 | |||
4203 | m4_if([$1], [CXX], [ | ||
4204 | # C++ specific cases for pic, static, wl, etc. | ||
4205 | if test yes = "$GXX"; then | ||
4206 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4207 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | ||
4208 | |||
4209 | case $host_os in | ||
4210 | aix*) | ||
4211 | # All AIX code is PIC. | ||
4212 | if test ia64 = "$host_cpu"; then | ||
4213 | # AIX 5 now supports IA64 processor | ||
4214 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4215 | fi | ||
4216 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
4217 | ;; | ||
4218 | |||
4219 | amigaos*) | ||
4220 | case $host_cpu in | ||
4221 | powerpc) | ||
4222 | # see comment about AmigaOS4 .so support | ||
4223 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
4224 | ;; | ||
4225 | m68k) | ||
4226 | # FIXME: we need at least 68020 code to build shared libraries, but | ||
4227 | # adding the '-m68020' flag to GCC prevents building anything better, | ||
4228 | # like '-m68040'. | ||
4229 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' | ||
4230 | ;; | ||
4231 | esac | ||
4232 | ;; | ||
4233 | |||
4234 | beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) | ||
4235 | # PIC is the default for these OSes. | ||
4236 | ;; | ||
4237 | mingw* | cygwin* | os2* | pw32* | cegcc*) | ||
4238 | # This hack is so that the source file can tell whether it is being | ||
4239 | # built for inclusion in a dll (and should export symbols for example). | ||
4240 | # Although the cygwin gcc ignores -fPIC, still need this for old-style | ||
4241 | # (--disable-auto-import) libraries | ||
4242 | m4_if([$1], [GCJ], [], | ||
4243 | [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) | ||
4244 | case $host_os in | ||
4245 | os2*) | ||
4246 | _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' | ||
4247 | ;; | ||
4248 | esac | ||
4249 | ;; | ||
4250 | darwin* | rhapsody*) | ||
4251 | # PIC is the default on this platform | ||
4252 | # Common symbols not allowed in MH_DYLIB files | ||
4253 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' | ||
4254 | ;; | ||
4255 | *djgpp*) | ||
4256 | # DJGPP does not support shared libraries at all | ||
4257 | _LT_TAGVAR(lt_prog_compiler_pic, $1)= | ||
4258 | ;; | ||
4259 | haiku*) | ||
4260 | # PIC is the default for Haiku. | ||
4261 | # The "-static" flag exists, but is broken. | ||
4262 | _LT_TAGVAR(lt_prog_compiler_static, $1)= | ||
4263 | ;; | ||
4264 | interix[[3-9]]*) | ||
4265 | # Interix 3.x gcc -fpic/-fPIC options generate broken code. | ||
4266 | # Instead, we relocate shared libraries at runtime. | ||
4267 | ;; | ||
4268 | sysv4*MP*) | ||
4269 | if test -d /usr/nec; then | ||
4270 | _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic | ||
4271 | fi | ||
4272 | ;; | ||
4273 | hpux*) | ||
4274 | # PIC is the default for 64-bit PA HP-UX, but not for 32-bit | ||
4275 | # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag | ||
4276 | # sets the default TLS model and affects inlining. | ||
4277 | case $host_cpu in | ||
4278 | hppa*64*) | ||
4279 | ;; | ||
4280 | *) | ||
4281 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
4282 | ;; | ||
4283 | esac | ||
4284 | ;; | ||
4285 | *qnx* | *nto*) | ||
4286 | # QNX uses GNU C++, but need to define -shared option too, otherwise | ||
4287 | # it will coredump. | ||
4288 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' | ||
4289 | ;; | ||
4290 | *) | ||
4291 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
4292 | ;; | ||
4293 | esac | ||
4294 | else | ||
4295 | case $host_os in | ||
4296 | aix[[4-9]]*) | ||
4297 | # All AIX code is PIC. | ||
4298 | if test ia64 = "$host_cpu"; then | ||
4299 | # AIX 5 now supports IA64 processor | ||
4300 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4301 | else | ||
4302 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' | ||
4303 | fi | ||
4304 | ;; | ||
4305 | chorus*) | ||
4306 | case $cc_basename in | ||
4307 | cxch68*) | ||
4308 | # Green Hills C++ Compiler | ||
4309 | # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" | ||
4310 | ;; | ||
4311 | esac | ||
4312 | ;; | ||
4313 | mingw* | cygwin* | os2* | pw32* | cegcc*) | ||
4314 | # This hack is so that the source file can tell whether it is being | ||
4315 | # built for inclusion in a dll (and should export symbols for example). | ||
4316 | m4_if([$1], [GCJ], [], | ||
4317 | [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) | ||
4318 | ;; | ||
4319 | dgux*) | ||
4320 | case $cc_basename in | ||
4321 | ec++*) | ||
4322 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
4323 | ;; | ||
4324 | ghcx*) | ||
4325 | # Green Hills C++ Compiler | ||
4326 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | ||
4327 | ;; | ||
4328 | *) | ||
4329 | ;; | ||
4330 | esac | ||
4331 | ;; | ||
4332 | freebsd* | dragonfly*) | ||
4333 | # FreeBSD uses GNU C++ | ||
4334 | ;; | ||
4335 | hpux9* | hpux10* | hpux11*) | ||
4336 | case $cc_basename in | ||
4337 | CC*) | ||
4338 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4339 | _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' | ||
4340 | if test ia64 != "$host_cpu"; then | ||
4341 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' | ||
4342 | fi | ||
4343 | ;; | ||
4344 | aCC*) | ||
4345 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4346 | _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' | ||
4347 | case $host_cpu in | ||
4348 | hppa*64*|ia64*) | ||
4349 | # +Z the default | ||
4350 | ;; | ||
4351 | *) | ||
4352 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' | ||
4353 | ;; | ||
4354 | esac | ||
4355 | ;; | ||
4356 | *) | ||
4357 | ;; | ||
4358 | esac | ||
4359 | ;; | ||
4360 | interix*) | ||
4361 | # This is c89, which is MS Visual C++ (no shared libs) | ||
4362 | # Anyone wants to do a port? | ||
4363 | ;; | ||
4364 | irix5* | irix6* | nonstopux*) | ||
4365 | case $cc_basename in | ||
4366 | CC*) | ||
4367 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4368 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | ||
4369 | # CC pic flag -KPIC is the default. | ||
4370 | ;; | ||
4371 | *) | ||
4372 | ;; | ||
4373 | esac | ||
4374 | ;; | ||
4375 | linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) | ||
4376 | case $cc_basename in | ||
4377 | KCC*) | ||
4378 | # KAI C++ Compiler | ||
4379 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' | ||
4380 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
4381 | ;; | ||
4382 | ecpc* ) | ||
4383 | # old Intel C++ for x86_64, which still supported -KPIC. | ||
4384 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4385 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
4386 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | ||
4387 | ;; | ||
4388 | icpc* ) | ||
4389 | # Intel C++, used to be incompatible with GCC. | ||
4390 | # ICC 10 doesn't accept -KPIC any more. | ||
4391 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4392 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
4393 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | ||
4394 | ;; | ||
4395 | pgCC* | pgcpp*) | ||
4396 | # Portland Group C++ compiler | ||
4397 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4398 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' | ||
4399 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4400 | ;; | ||
4401 | cxx*) | ||
4402 | # Compaq C++ | ||
4403 | # Make sure the PIC flag is empty. It appears that all Alpha | ||
4404 | # Linux and Compaq Tru64 Unix objects are PIC. | ||
4405 | _LT_TAGVAR(lt_prog_compiler_pic, $1)= | ||
4406 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | ||
4407 | ;; | ||
4408 | xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) | ||
4409 | # IBM XL 8.0, 9.0 on PPC and BlueGene | ||
4410 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4411 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' | ||
4412 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' | ||
4413 | ;; | ||
4414 | *) | ||
4415 | case `$CC -V 2>&1 | sed 5q` in | ||
4416 | *Sun\ C*) | ||
4417 | # Sun C++ 5.9 | ||
4418 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
4419 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4420 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' | ||
4421 | ;; | ||
4422 | esac | ||
4423 | ;; | ||
4424 | esac | ||
4425 | ;; | ||
4426 | lynxos*) | ||
4427 | ;; | ||
4428 | m88k*) | ||
4429 | ;; | ||
4430 | mvs*) | ||
4431 | case $cc_basename in | ||
4432 | cxx*) | ||
4433 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' | ||
4434 | ;; | ||
4435 | *) | ||
4436 | ;; | ||
4437 | esac | ||
4438 | ;; | ||
4439 | netbsd* | netbsdelf*-gnu) | ||
4440 | ;; | ||
4441 | *qnx* | *nto*) | ||
4442 | # QNX uses GNU C++, but need to define -shared option too, otherwise | ||
4443 | # it will coredump. | ||
4444 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' | ||
4445 | ;; | ||
4446 | osf3* | osf4* | osf5*) | ||
4447 | case $cc_basename in | ||
4448 | KCC*) | ||
4449 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' | ||
4450 | ;; | ||
4451 | RCC*) | ||
4452 | # Rational C++ 2.4.1 | ||
4453 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | ||
4454 | ;; | ||
4455 | cxx*) | ||
4456 | # Digital/Compaq C++ | ||
4457 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4458 | # Make sure the PIC flag is empty. It appears that all Alpha | ||
4459 | # Linux and Compaq Tru64 Unix objects are PIC. | ||
4460 | _LT_TAGVAR(lt_prog_compiler_pic, $1)= | ||
4461 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | ||
4462 | ;; | ||
4463 | *) | ||
4464 | ;; | ||
4465 | esac | ||
4466 | ;; | ||
4467 | psos*) | ||
4468 | ;; | ||
4469 | solaris*) | ||
4470 | case $cc_basename in | ||
4471 | CC* | sunCC*) | ||
4472 | # Sun C++ 4.2, 5.x and Centerline C++ | ||
4473 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
4474 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4475 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' | ||
4476 | ;; | ||
4477 | gcx*) | ||
4478 | # Green Hills C++ Compiler | ||
4479 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' | ||
4480 | ;; | ||
4481 | *) | ||
4482 | ;; | ||
4483 | esac | ||
4484 | ;; | ||
4485 | sunos4*) | ||
4486 | case $cc_basename in | ||
4487 | CC*) | ||
4488 | # Sun C++ 4.x | ||
4489 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | ||
4490 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4491 | ;; | ||
4492 | lcc*) | ||
4493 | # Lucid | ||
4494 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | ||
4495 | ;; | ||
4496 | *) | ||
4497 | ;; | ||
4498 | esac | ||
4499 | ;; | ||
4500 | sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) | ||
4501 | case $cc_basename in | ||
4502 | CC*) | ||
4503 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4504 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
4505 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4506 | ;; | ||
4507 | esac | ||
4508 | ;; | ||
4509 | tandem*) | ||
4510 | case $cc_basename in | ||
4511 | NCC*) | ||
4512 | # NonStop-UX NCC 3.20 | ||
4513 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
4514 | ;; | ||
4515 | *) | ||
4516 | ;; | ||
4517 | esac | ||
4518 | ;; | ||
4519 | vxworks*) | ||
4520 | ;; | ||
4521 | *) | ||
4522 | _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | ||
4523 | ;; | ||
4524 | esac | ||
4525 | fi | ||
4526 | ], | ||
4527 | [ | ||
4528 | if test yes = "$GCC"; then | ||
4529 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4530 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | ||
4531 | |||
4532 | case $host_os in | ||
4533 | aix*) | ||
4534 | # All AIX code is PIC. | ||
4535 | if test ia64 = "$host_cpu"; then | ||
4536 | # AIX 5 now supports IA64 processor | ||
4537 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4538 | fi | ||
4539 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
4540 | ;; | ||
4541 | |||
4542 | amigaos*) | ||
4543 | case $host_cpu in | ||
4544 | powerpc) | ||
4545 | # see comment about AmigaOS4 .so support | ||
4546 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
4547 | ;; | ||
4548 | m68k) | ||
4549 | # FIXME: we need at least 68020 code to build shared libraries, but | ||
4550 | # adding the '-m68020' flag to GCC prevents building anything better, | ||
4551 | # like '-m68040'. | ||
4552 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' | ||
4553 | ;; | ||
4554 | esac | ||
4555 | ;; | ||
4556 | |||
4557 | beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) | ||
4558 | # PIC is the default for these OSes. | ||
4559 | ;; | ||
4560 | |||
4561 | mingw* | cygwin* | pw32* | os2* | cegcc*) | ||
4562 | # This hack is so that the source file can tell whether it is being | ||
4563 | # built for inclusion in a dll (and should export symbols for example). | ||
4564 | # Although the cygwin gcc ignores -fPIC, still need this for old-style | ||
4565 | # (--disable-auto-import) libraries | ||
4566 | m4_if([$1], [GCJ], [], | ||
4567 | [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) | ||
4568 | case $host_os in | ||
4569 | os2*) | ||
4570 | _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' | ||
4571 | ;; | ||
4572 | esac | ||
4573 | ;; | ||
4574 | |||
4575 | darwin* | rhapsody*) | ||
4576 | # PIC is the default on this platform | ||
4577 | # Common symbols not allowed in MH_DYLIB files | ||
4578 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' | ||
4579 | ;; | ||
4580 | |||
4581 | haiku*) | ||
4582 | # PIC is the default for Haiku. | ||
4583 | # The "-static" flag exists, but is broken. | ||
4584 | _LT_TAGVAR(lt_prog_compiler_static, $1)= | ||
4585 | ;; | ||
4586 | |||
4587 | hpux*) | ||
4588 | # PIC is the default for 64-bit PA HP-UX, but not for 32-bit | ||
4589 | # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag | ||
4590 | # sets the default TLS model and affects inlining. | ||
4591 | case $host_cpu in | ||
4592 | hppa*64*) | ||
4593 | # +Z the default | ||
4594 | ;; | ||
4595 | *) | ||
4596 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
4597 | ;; | ||
4598 | esac | ||
4599 | ;; | ||
4600 | |||
4601 | interix[[3-9]]*) | ||
4602 | # Interix 3.x gcc -fpic/-fPIC options generate broken code. | ||
4603 | # Instead, we relocate shared libraries at runtime. | ||
4604 | ;; | ||
4605 | |||
4606 | msdosdjgpp*) | ||
4607 | # Just because we use GCC doesn't mean we suddenly get shared libraries | ||
4608 | # on systems that don't support them. | ||
4609 | _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | ||
4610 | enable_shared=no | ||
4611 | ;; | ||
4612 | |||
4613 | *nto* | *qnx*) | ||
4614 | # QNX uses GNU C++, but need to define -shared option too, otherwise | ||
4615 | # it will coredump. | ||
4616 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' | ||
4617 | ;; | ||
4618 | |||
4619 | sysv4*MP*) | ||
4620 | if test -d /usr/nec; then | ||
4621 | _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic | ||
4622 | fi | ||
4623 | ;; | ||
4624 | |||
4625 | *) | ||
4626 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
4627 | ;; | ||
4628 | esac | ||
4629 | |||
4630 | case $cc_basename in | ||
4631 | nvcc*) # Cuda Compiler Driver 2.2 | ||
4632 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' | ||
4633 | if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then | ||
4634 | _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" | ||
4635 | fi | ||
4636 | ;; | ||
4637 | esac | ||
4638 | else | ||
4639 | # PORTME Check for flag to pass linker flags through the system compiler. | ||
4640 | case $host_os in | ||
4641 | aix*) | ||
4642 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4643 | if test ia64 = "$host_cpu"; then | ||
4644 | # AIX 5 now supports IA64 processor | ||
4645 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4646 | else | ||
4647 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' | ||
4648 | fi | ||
4649 | ;; | ||
4650 | |||
4651 | darwin* | rhapsody*) | ||
4652 | # PIC is the default on this platform | ||
4653 | # Common symbols not allowed in MH_DYLIB files | ||
4654 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' | ||
4655 | case $cc_basename in | ||
4656 | nagfor*) | ||
4657 | # NAG Fortran compiler | ||
4658 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' | ||
4659 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' | ||
4660 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4661 | ;; | ||
4662 | esac | ||
4663 | ;; | ||
4664 | |||
4665 | mingw* | cygwin* | pw32* | os2* | cegcc*) | ||
4666 | # This hack is so that the source file can tell whether it is being | ||
4667 | # built for inclusion in a dll (and should export symbols for example). | ||
4668 | m4_if([$1], [GCJ], [], | ||
4669 | [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) | ||
4670 | case $host_os in | ||
4671 | os2*) | ||
4672 | _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' | ||
4673 | ;; | ||
4674 | esac | ||
4675 | ;; | ||
4676 | |||
4677 | hpux9* | hpux10* | hpux11*) | ||
4678 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4679 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but | ||
4680 | # not for PA HP-UX. | ||
4681 | case $host_cpu in | ||
4682 | hppa*64*|ia64*) | ||
4683 | # +Z the default | ||
4684 | ;; | ||
4685 | *) | ||
4686 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' | ||
4687 | ;; | ||
4688 | esac | ||
4689 | # Is there a better lt_prog_compiler_static that works with the bundled CC? | ||
4690 | _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' | ||
4691 | ;; | ||
4692 | |||
4693 | irix5* | irix6* | nonstopux*) | ||
4694 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4695 | # PIC (with -KPIC) is the default. | ||
4696 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | ||
4697 | ;; | ||
4698 | |||
4699 | linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) | ||
4700 | case $cc_basename in | ||
4701 | # old Intel for x86_64, which still supported -KPIC. | ||
4702 | ecc*) | ||
4703 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4704 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
4705 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | ||
4706 | ;; | ||
4707 | # icc used to be incompatible with GCC. | ||
4708 | # ICC 10 doesn't accept -KPIC any more. | ||
4709 | icc* | ifort*) | ||
4710 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4711 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
4712 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | ||
4713 | ;; | ||
4714 | # Lahey Fortran 8.1. | ||
4715 | lf95*) | ||
4716 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4717 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' | ||
4718 | _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' | ||
4719 | ;; | ||
4720 | nagfor*) | ||
4721 | # NAG Fortran compiler | ||
4722 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' | ||
4723 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' | ||
4724 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4725 | ;; | ||
4726 | tcc*) | ||
4727 | # Fabrice Bellard et al's Tiny C Compiler | ||
4728 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4729 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
4730 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | ||
4731 | ;; | ||
4732 | pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) | ||
4733 | # Portland Group compilers (*not* the Pentium gcc compiler, | ||
4734 | # which looks to be a dead project) | ||
4735 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4736 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' | ||
4737 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4738 | ;; | ||
4739 | ccc*) | ||
4740 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4741 | # All Alpha code is PIC. | ||
4742 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | ||
4743 | ;; | ||
4744 | xl* | bgxl* | bgf* | mpixl*) | ||
4745 | # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene | ||
4746 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4747 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' | ||
4748 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' | ||
4749 | ;; | ||
4750 | *) | ||
4751 | case `$CC -V 2>&1 | sed 5q` in | ||
4752 | *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) | ||
4753 | # Sun Fortran 8.3 passes all unrecognized flags to the linker | ||
4754 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
4755 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4756 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='' | ||
4757 | ;; | ||
4758 | *Sun\ F* | *Sun*Fortran*) | ||
4759 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
4760 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4761 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' | ||
4762 | ;; | ||
4763 | *Sun\ C*) | ||
4764 | # Sun C 5.9 | ||
4765 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
4766 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4767 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4768 | ;; | ||
4769 | *Intel*\ [[CF]]*Compiler*) | ||
4770 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4771 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
4772 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' | ||
4773 | ;; | ||
4774 | *Portland\ Group*) | ||
4775 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4776 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' | ||
4777 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4778 | ;; | ||
4779 | esac | ||
4780 | ;; | ||
4781 | esac | ||
4782 | ;; | ||
4783 | |||
4784 | newsos6) | ||
4785 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
4786 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4787 | ;; | ||
4788 | |||
4789 | *nto* | *qnx*) | ||
4790 | # QNX uses GNU C++, but need to define -shared option too, otherwise | ||
4791 | # it will coredump. | ||
4792 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' | ||
4793 | ;; | ||
4794 | |||
4795 | osf3* | osf4* | osf5*) | ||
4796 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4797 | # All OSF/1 code is PIC. | ||
4798 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | ||
4799 | ;; | ||
4800 | |||
4801 | rdos*) | ||
4802 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | ||
4803 | ;; | ||
4804 | |||
4805 | solaris*) | ||
4806 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
4807 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4808 | case $cc_basename in | ||
4809 | f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) | ||
4810 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; | ||
4811 | *) | ||
4812 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; | ||
4813 | esac | ||
4814 | ;; | ||
4815 | |||
4816 | sunos4*) | ||
4817 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' | ||
4818 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' | ||
4819 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4820 | ;; | ||
4821 | |||
4822 | sysv4 | sysv4.2uw2* | sysv4.3*) | ||
4823 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4824 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
4825 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4826 | ;; | ||
4827 | |||
4828 | sysv4*MP*) | ||
4829 | if test -d /usr/nec; then | ||
4830 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' | ||
4831 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4832 | fi | ||
4833 | ;; | ||
4834 | |||
4835 | sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) | ||
4836 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4837 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
4838 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4839 | ;; | ||
4840 | |||
4841 | unicos*) | ||
4842 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4843 | _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | ||
4844 | ;; | ||
4845 | |||
4846 | uts4*) | ||
4847 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | ||
4848 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4849 | ;; | ||
4850 | |||
4851 | *) | ||
4852 | _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | ||
4853 | ;; | ||
4854 | esac | ||
4855 | fi | ||
4856 | ]) | ||
4857 | case $host_os in | ||
4858 | # For platforms that do not support PIC, -DPIC is meaningless: | ||
4859 | *djgpp*) | ||
4860 | _LT_TAGVAR(lt_prog_compiler_pic, $1)= | ||
4861 | ;; | ||
4862 | *) | ||
4863 | _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" | ||
4864 | ;; | ||
4865 | esac | ||
4866 | |||
4867 | AC_CACHE_CHECK([for $compiler option to produce PIC], | ||
4868 | [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], | ||
4869 | [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) | ||
4870 | _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) | ||
4871 | |||
4872 | # | ||
4873 | # Check to make sure the PIC flag actually works. | ||
4874 | # | ||
4875 | if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then | ||
4876 | _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], | ||
4877 | [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], | ||
4878 | [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], | ||
4879 | [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in | ||
4880 | "" | " "*) ;; | ||
4881 | *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; | ||
4882 | esac], | ||
4883 | [_LT_TAGVAR(lt_prog_compiler_pic, $1)= | ||
4884 | _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) | ||
4885 | fi | ||
4886 | _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], | ||
4887 | [Additional compiler flags for building library objects]) | ||
4888 | |||
4889 | _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], | ||
4890 | [How to pass a linker flag through the compiler]) | ||
4891 | # | ||
4892 | # Check to make sure the static flag actually works. | ||
4893 | # | ||
4894 | wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" | ||
4895 | _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], | ||
4896 | _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), | ||
4897 | $lt_tmp_static_flag, | ||
4898 | [], | ||
4899 | [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) | ||
4900 | _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], | ||
4901 | [Compiler flag to prevent dynamic linking]) | ||
4902 | ])# _LT_COMPILER_PIC | ||
4903 | |||
4904 | |||
4905 | # _LT_LINKER_SHLIBS([TAGNAME]) | ||
4906 | # ---------------------------- | ||
4907 | # See if the linker supports building shared libraries. | ||
4908 | m4_defun([_LT_LINKER_SHLIBS], | ||
4909 | [AC_REQUIRE([LT_PATH_LD])dnl | ||
4910 | AC_REQUIRE([LT_PATH_NM])dnl | ||
4911 | m4_require([_LT_PATH_MANIFEST_TOOL])dnl | ||
4912 | m4_require([_LT_FILEUTILS_DEFAULTS])dnl | ||
4913 | m4_require([_LT_DECL_EGREP])dnl | ||
4914 | m4_require([_LT_DECL_SED])dnl | ||
4915 | m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl | ||
4916 | m4_require([_LT_TAG_COMPILER])dnl | ||
4917 | AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) | ||
4918 | m4_if([$1], [CXX], [ | ||
4919 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | ||
4920 | _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] | ||
4921 | case $host_os in | ||
4922 | aix[[4-9]]*) | ||
4923 | # If we're using GNU nm, then we don't want the "-C" option. | ||
4924 | # -C means demangle to GNU nm, but means don't demangle to AIX nm. | ||
4925 | # Without the "-l" option, or with the "-B" option, AIX nm treats | ||
4926 | # weak defined symbols like other global defined symbols, whereas | ||
4927 | # GNU nm marks them as "W". | ||
4928 | # While the 'weak' keyword is ignored in the Export File, we need | ||
4929 | # it in the Import File for the 'aix-soname' feature, so we have | ||
4930 | # to replace the "-B" option with "-P" for AIX nm. | ||
4931 | if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then | ||
4932 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' | ||
4933 | else | ||
4934 | _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' | ||
4935 | fi | ||
4936 | ;; | ||
4937 | pw32*) | ||
4938 | _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds | ||
4939 | ;; | ||
4940 | cygwin* | mingw* | cegcc*) | ||
4941 | case $cc_basename in | ||
4942 | cl*) | ||
4943 | _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' | ||
4944 | ;; | ||
4945 | *) | ||
4946 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' | ||
4947 | _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] | ||
4948 | ;; | ||
4949 | esac | ||
4950 | ;; | ||
4951 | linux* | k*bsd*-gnu | gnu*) | ||
4952 | _LT_TAGVAR(link_all_deplibs, $1)=no | ||
4953 | ;; | ||
4954 | *) | ||
4955 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | ||
4956 | ;; | ||
4957 | esac | ||
4958 | ], [ | ||
4959 | runpath_var= | ||
4960 | _LT_TAGVAR(allow_undefined_flag, $1)= | ||
4961 | _LT_TAGVAR(always_export_symbols, $1)=no | ||
4962 | _LT_TAGVAR(archive_cmds, $1)= | ||
4963 | _LT_TAGVAR(archive_expsym_cmds, $1)= | ||
4964 | _LT_TAGVAR(compiler_needs_object, $1)=no | ||
4965 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no | ||
4966 | _LT_TAGVAR(export_dynamic_flag_spec, $1)= | ||
4967 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | ||
4968 | _LT_TAGVAR(hardcode_automatic, $1)=no | ||
4969 | _LT_TAGVAR(hardcode_direct, $1)=no | ||
4970 | _LT_TAGVAR(hardcode_direct_absolute, $1)=no | ||
4971 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= | ||
4972 | _LT_TAGVAR(hardcode_libdir_separator, $1)= | ||
4973 | _LT_TAGVAR(hardcode_minus_L, $1)=no | ||
4974 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported | ||
4975 | _LT_TAGVAR(inherit_rpath, $1)=no | ||
4976 | _LT_TAGVAR(link_all_deplibs, $1)=unknown | ||
4977 | _LT_TAGVAR(module_cmds, $1)= | ||
4978 | _LT_TAGVAR(module_expsym_cmds, $1)= | ||
4979 | _LT_TAGVAR(old_archive_from_new_cmds, $1)= | ||
4980 | _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= | ||
4981 | _LT_TAGVAR(thread_safe_flag_spec, $1)= | ||
4982 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | ||
4983 | # include_expsyms should be a list of space-separated symbols to be *always* | ||
4984 | # included in the symbol list | ||
4985 | _LT_TAGVAR(include_expsyms, $1)= | ||
4986 | # exclude_expsyms can be an extended regexp of symbols to exclude | ||
4987 | # it will be wrapped by ' (' and ')$', so one must not match beginning or | ||
4988 | # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', | ||
4989 | # as well as any symbol that contains 'd'. | ||
4990 | _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] | ||
4991 | # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out | ||
4992 | # platforms (ab)use it in PIC code, but their linkers get confused if | ||
4993 | # the symbol is explicitly referenced. Since portable code cannot | ||
4994 | # rely on this symbol name, it's probably fine to never include it in | ||
4995 | # preloaded symbol tables. | ||
4996 | # Exclude shared library initialization/finalization symbols. | ||
4997 | dnl Note also adjust exclude_expsyms for C++ above. | ||
4998 | extract_expsyms_cmds= | ||
4999 | |||
5000 | case $host_os in | ||
5001 | cygwin* | mingw* | pw32* | cegcc*) | ||
5002 | # FIXME: the MSVC++ port hasn't been tested in a loooong time | ||
5003 | # When not using gcc, we currently assume that we are using | ||
5004 | # Microsoft Visual C++. | ||
5005 | if test yes != "$GCC"; then | ||
5006 | with_gnu_ld=no | ||
5007 | fi | ||
5008 | ;; | ||
5009 | interix*) | ||
5010 | # we just hope/assume this is gcc and not c89 (= MSVC++) | ||
5011 | with_gnu_ld=yes | ||
5012 | ;; | ||
5013 | openbsd* | bitrig*) | ||
5014 | with_gnu_ld=no | ||
5015 | ;; | ||
5016 | linux* | k*bsd*-gnu | gnu*) | ||
5017 | _LT_TAGVAR(link_all_deplibs, $1)=no | ||
5018 | ;; | ||
5019 | esac | ||
5020 | |||
5021 | _LT_TAGVAR(ld_shlibs, $1)=yes | ||
5022 | |||
5023 | # On some targets, GNU ld is compatible enough with the native linker | ||
5024 | # that we're better off using the native interface for both. | ||
5025 | lt_use_gnu_ld_interface=no | ||
5026 | if test yes = "$with_gnu_ld"; then | ||
5027 | case $host_os in | ||
5028 | aix*) | ||
5029 | # The AIX port of GNU ld has always aspired to compatibility | ||
5030 | # with the native linker. However, as the warning in the GNU ld | ||
5031 | # block says, versions before 2.19.5* couldn't really create working | ||
5032 | # shared libraries, regardless of the interface used. | ||
5033 | case `$LD -v 2>&1` in | ||
5034 | *\ \(GNU\ Binutils\)\ 2.19.5*) ;; | ||
5035 | *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; | ||
5036 | *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; | ||
5037 | *) | ||
5038 | lt_use_gnu_ld_interface=yes | ||
5039 | ;; | ||
5040 | esac | ||
5041 | ;; | ||
5042 | *) | ||
5043 | lt_use_gnu_ld_interface=yes | ||
5044 | ;; | ||
5045 | esac | ||
5046 | fi | ||
5047 | |||
5048 | if test yes = "$lt_use_gnu_ld_interface"; then | ||
5049 | # If archive_cmds runs LD, not CC, wlarc should be empty | ||
5050 | wlarc='$wl' | ||
5051 | |||
5052 | # Set some defaults for GNU ld with shared library support. These | ||
5053 | # are reset later if shared libraries are not supported. Putting them | ||
5054 | # here allows them to be overridden if necessary. | ||
5055 | runpath_var=LD_RUN_PATH | ||
5056 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' | ||
5057 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' | ||
5058 | # ancient GNU ld didn't support --whole-archive et. al. | ||
5059 | if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then | ||
5060 | _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' | ||
5061 | else | ||
5062 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | ||
5063 | fi | ||
5064 | supports_anon_versioning=no | ||
5065 | case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in | ||
5066 | *GNU\ gold*) supports_anon_versioning=yes ;; | ||
5067 | *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 | ||
5068 | *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... | ||
5069 | *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... | ||
5070 | *\ 2.11.*) ;; # other 2.11 versions | ||
5071 | *) supports_anon_versioning=yes ;; | ||
5072 | esac | ||
5073 | |||
5074 | # See if GNU ld supports shared libraries. | ||
5075 | case $host_os in | ||
5076 | aix[[3-9]]*) | ||
5077 | # On AIX/PPC, the GNU linker is very broken | ||
5078 | if test ia64 != "$host_cpu"; then | ||
5079 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
5080 | cat <<_LT_EOF 1>&2 | ||
5081 | |||
5082 | *** Warning: the GNU linker, at least up to release 2.19, is reported | ||
5083 | *** to be unable to reliably create shared libraries on AIX. | ||
5084 | *** Therefore, libtool is disabling shared libraries support. If you | ||
5085 | *** really care for shared libraries, you may want to install binutils | ||
5086 | *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. | ||
5087 | *** You will then need to restart the configuration process. | ||
5088 | |||
5089 | _LT_EOF | ||
5090 | fi | ||
5091 | ;; | ||
5092 | |||
5093 | amigaos*) | ||
5094 | case $host_cpu in | ||
5095 | powerpc) | ||
5096 | # see comment about AmigaOS4 .so support | ||
5097 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' | ||
5098 | _LT_TAGVAR(archive_expsym_cmds, $1)='' | ||
5099 | ;; | ||
5100 | m68k) | ||
5101 | _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' | ||
5102 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
5103 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
5104 | ;; | ||
5105 | esac | ||
5106 | ;; | ||
5107 | |||
5108 | beos*) | ||
5109 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | ||
5110 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
5111 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc | ||
5112 | # support --undefined. This deserves some investigation. FIXME | ||
5113 | _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' | ||
5114 | else | ||
5115 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
5116 | fi | ||
5117 | ;; | ||
5118 | |||
5119 | cygwin* | mingw* | pw32* | cegcc*) | ||
5120 | # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, | ||
5121 | # as there is no search path for DLLs. | ||
5122 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
5123 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' | ||
5124 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
5125 | _LT_TAGVAR(always_export_symbols, $1)=no | ||
5126 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | ||
5127 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' | ||
5128 | _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] | ||
5129 | |||
5130 | if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then | ||
5131 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | ||
5132 | # If the export-symbols file already is a .def file, use it as | ||
5133 | # is; otherwise, prepend EXPORTS... | ||
5134 | _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then | ||
5135 | cp $export_symbols $output_objdir/$soname.def; | ||
5136 | else | ||
5137 | echo EXPORTS > $output_objdir/$soname.def; | ||
5138 | cat $export_symbols >> $output_objdir/$soname.def; | ||
5139 | fi~ | ||
5140 | $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | ||
5141 | else | ||
5142 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
5143 | fi | ||
5144 | ;; | ||
5145 | |||
5146 | haiku*) | ||
5147 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' | ||
5148 | _LT_TAGVAR(link_all_deplibs, $1)=yes | ||
5149 | ;; | ||
5150 | |||
5151 | os2*) | ||
5152 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
5153 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
5154 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
5155 | shrext_cmds=.dll | ||
5156 | _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ | ||
5157 | $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ | ||
5158 | $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ | ||
5159 | $ECHO EXPORTS >> $output_objdir/$libname.def~ | ||
5160 | emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ | ||
5161 | $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ | ||
5162 | emximp -o $lib $output_objdir/$libname.def' | ||
5163 | _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ | ||
5164 | $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ | ||
5165 | $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ | ||
5166 | $ECHO EXPORTS >> $output_objdir/$libname.def~ | ||
5167 | prefix_cmds="$SED"~ | ||
5168 | if test EXPORTS = "`$SED 1q $export_symbols`"; then | ||
5169 | prefix_cmds="$prefix_cmds -e 1d"; | ||
5170 | fi~ | ||
5171 | prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ | ||
5172 | cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ | ||
5173 | $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ | ||
5174 | emximp -o $lib $output_objdir/$libname.def' | ||
5175 | _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' | ||
5176 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | ||
5177 | ;; | ||
5178 | |||
5179 | interix[[3-9]]*) | ||
5180 | _LT_TAGVAR(hardcode_direct, $1)=no | ||
5181 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5182 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' | ||
5183 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' | ||
5184 | # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. | ||
5185 | # Instead, shared libraries are loaded at an image base (0x10000000 by | ||
5186 | # default) and relocated if they conflict, which is a slow very memory | ||
5187 | # consuming and fragmenting process. To avoid this, we pick a random, | ||
5188 | # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link | ||
5189 | # time. Moving up from 0x10000000 also allows more sbrk(2) space. | ||
5190 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | ||
5191 | _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | ||
5192 | ;; | ||
5193 | |||
5194 | gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) | ||
5195 | tmp_diet=no | ||
5196 | if test linux-dietlibc = "$host_os"; then | ||
5197 | case $cc_basename in | ||
5198 | diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) | ||
5199 | esac | ||
5200 | fi | ||
5201 | if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ | ||
5202 | && test no = "$tmp_diet" | ||
5203 | then | ||
5204 | tmp_addflag=' $pic_flag' | ||
5205 | tmp_sharedflag='-shared' | ||
5206 | case $cc_basename,$host_cpu in | ||
5207 | pgcc*) # Portland Group C compiler | ||
5208 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' | ||
5209 | tmp_addflag=' $pic_flag' | ||
5210 | ;; | ||
5211 | pgf77* | pgf90* | pgf95* | pgfortran*) | ||
5212 | # Portland Group f77 and f90 compilers | ||
5213 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' | ||
5214 | tmp_addflag=' $pic_flag -Mnomain' ;; | ||
5215 | ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 | ||
5216 | tmp_addflag=' -i_dynamic' ;; | ||
5217 | efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 | ||
5218 | tmp_addflag=' -i_dynamic -nofor_main' ;; | ||
5219 | ifc* | ifort*) # Intel Fortran compiler | ||
5220 | tmp_addflag=' -nofor_main' ;; | ||
5221 | lf95*) # Lahey Fortran 8.1 | ||
5222 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | ||
5223 | tmp_sharedflag='--shared' ;; | ||
5224 | nagfor*) # NAGFOR 5.3 | ||
5225 | tmp_sharedflag='-Wl,-shared' ;; | ||
5226 | xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) | ||
5227 | tmp_sharedflag='-qmkshrobj' | ||
5228 | tmp_addflag= ;; | ||
5229 | nvcc*) # Cuda Compiler Driver 2.2 | ||
5230 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' | ||
5231 | _LT_TAGVAR(compiler_needs_object, $1)=yes | ||
5232 | ;; | ||
5233 | esac | ||
5234 | case `$CC -V 2>&1 | sed 5q` in | ||
5235 | *Sun\ C*) # Sun C 5.9 | ||
5236 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' | ||
5237 | _LT_TAGVAR(compiler_needs_object, $1)=yes | ||
5238 | tmp_sharedflag='-G' ;; | ||
5239 | *Sun\ F*) # Sun Fortran 8.3 | ||
5240 | tmp_sharedflag='-G' ;; | ||
5241 | esac | ||
5242 | _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' | ||
5243 | |||
5244 | if test yes = "$supports_anon_versioning"; then | ||
5245 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ | ||
5246 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | ||
5247 | echo "local: *; };" >> $output_objdir/$libname.ver~ | ||
5248 | $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' | ||
5249 | fi | ||
5250 | |||
5251 | case $cc_basename in | ||
5252 | tcc*) | ||
5253 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' | ||
5254 | ;; | ||
5255 | xlf* | bgf* | bgxlf* | mpixlf*) | ||
5256 | # IBM XL Fortran 10.1 on PPC cannot create shared libs itself | ||
5257 | _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' | ||
5258 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' | ||
5259 | _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' | ||
5260 | if test yes = "$supports_anon_versioning"; then | ||
5261 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ | ||
5262 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | ||
5263 | echo "local: *; };" >> $output_objdir/$libname.ver~ | ||
5264 | $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' | ||
5265 | fi | ||
5266 | ;; | ||
5267 | esac | ||
5268 | else | ||
5269 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
5270 | fi | ||
5271 | ;; | ||
5272 | |||
5273 | netbsd* | netbsdelf*-gnu) | ||
5274 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | ||
5275 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' | ||
5276 | wlarc= | ||
5277 | else | ||
5278 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' | ||
5279 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' | ||
5280 | fi | ||
5281 | ;; | ||
5282 | |||
5283 | solaris*) | ||
5284 | if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then | ||
5285 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
5286 | cat <<_LT_EOF 1>&2 | ||
5287 | |||
5288 | *** Warning: The releases 2.8.* of the GNU linker cannot reliably | ||
5289 | *** create shared libraries on Solaris systems. Therefore, libtool | ||
5290 | *** is disabling shared libraries support. We urge you to upgrade GNU | ||
5291 | *** binutils to release 2.9.1 or newer. Another option is to modify | ||
5292 | *** your PATH or compiler configuration so that the native linker is | ||
5293 | *** used, and then restart. | ||
5294 | |||
5295 | _LT_EOF | ||
5296 | elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | ||
5297 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' | ||
5298 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' | ||
5299 | else | ||
5300 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
5301 | fi | ||
5302 | ;; | ||
5303 | |||
5304 | sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) | ||
5305 | case `$LD -v 2>&1` in | ||
5306 | *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) | ||
5307 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
5308 | cat <<_LT_EOF 1>&2 | ||
5309 | |||
5310 | *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot | ||
5311 | *** reliably create shared libraries on SCO systems. Therefore, libtool | ||
5312 | *** is disabling shared libraries support. We urge you to upgrade GNU | ||
5313 | *** binutils to release 2.16.91.0.3 or newer. Another option is to modify | ||
5314 | *** your PATH or compiler configuration so that the native linker is | ||
5315 | *** used, and then restart. | ||
5316 | |||
5317 | _LT_EOF | ||
5318 | ;; | ||
5319 | *) | ||
5320 | # For security reasons, it is highly recommended that you always | ||
5321 | # use absolute paths for naming shared libraries, and exclude the | ||
5322 | # DT_RUNPATH tag from executables and libraries. But doing so | ||
5323 | # requires that you compile everything twice, which is a pain. | ||
5324 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | ||
5325 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' | ||
5326 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' | ||
5327 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' | ||
5328 | else | ||
5329 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
5330 | fi | ||
5331 | ;; | ||
5332 | esac | ||
5333 | ;; | ||
5334 | |||
5335 | sunos4*) | ||
5336 | _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' | ||
5337 | wlarc= | ||
5338 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
5339 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5340 | ;; | ||
5341 | |||
5342 | *) | ||
5343 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | ||
5344 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' | ||
5345 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' | ||
5346 | else | ||
5347 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
5348 | fi | ||
5349 | ;; | ||
5350 | esac | ||
5351 | |||
5352 | if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then | ||
5353 | runpath_var= | ||
5354 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= | ||
5355 | _LT_TAGVAR(export_dynamic_flag_spec, $1)= | ||
5356 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | ||
5357 | fi | ||
5358 | else | ||
5359 | # PORTME fill in a description of your system's linker (not GNU ld) | ||
5360 | case $host_os in | ||
5361 | aix3*) | ||
5362 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
5363 | _LT_TAGVAR(always_export_symbols, $1)=yes | ||
5364 | _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' | ||
5365 | # Note: this linker hardcodes the directories in LIBPATH if there | ||
5366 | # are no directories specified by -L. | ||
5367 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
5368 | if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then | ||
5369 | # Neither direct hardcoding nor static linking is supported with a | ||
5370 | # broken collect2. | ||
5371 | _LT_TAGVAR(hardcode_direct, $1)=unsupported | ||
5372 | fi | ||
5373 | ;; | ||
5374 | |||
5375 | aix[[4-9]]*) | ||
5376 | if test ia64 = "$host_cpu"; then | ||
5377 | # On IA64, the linker does run time linking by default, so we don't | ||
5378 | # have to do anything special. | ||
5379 | aix_use_runtimelinking=no | ||
5380 | exp_sym_flag='-Bexport' | ||
5381 | no_entry_flag= | ||
5382 | else | ||
5383 | # If we're using GNU nm, then we don't want the "-C" option. | ||
5384 | # -C means demangle to GNU nm, but means don't demangle to AIX nm. | ||
5385 | # Without the "-l" option, or with the "-B" option, AIX nm treats | ||
5386 | # weak defined symbols like other global defined symbols, whereas | ||
5387 | # GNU nm marks them as "W". | ||
5388 | # While the 'weak' keyword is ignored in the Export File, we need | ||
5389 | # it in the Import File for the 'aix-soname' feature, so we have | ||
5390 | # to replace the "-B" option with "-P" for AIX nm. | ||
5391 | if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then | ||
5392 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' | ||
5393 | else | ||
5394 | _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' | ||
5395 | fi | ||
5396 | aix_use_runtimelinking=no | ||
5397 | |||
5398 | # Test if we are trying to use run time linking or normal | ||
5399 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we | ||
5400 | # have runtime linking enabled, and use it for executables. | ||
5401 | # For shared libraries, we enable/disable runtime linking | ||
5402 | # depending on the kind of the shared library created - | ||
5403 | # when "with_aix_soname,aix_use_runtimelinking" is: | ||
5404 | # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables | ||
5405 | # "aix,yes" lib.so shared, rtl:yes, for executables | ||
5406 | # lib.a static archive | ||
5407 | # "both,no" lib.so.V(shr.o) shared, rtl:yes | ||
5408 | # lib.a(lib.so.V) shared, rtl:no, for executables | ||
5409 | # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables | ||
5410 | # lib.a(lib.so.V) shared, rtl:no | ||
5411 | # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables | ||
5412 | # lib.a static archive | ||
5413 | case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) | ||
5414 | for ld_flag in $LDFLAGS; do | ||
5415 | if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then | ||
5416 | aix_use_runtimelinking=yes | ||
5417 | break | ||
5418 | fi | ||
5419 | done | ||
5420 | if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then | ||
5421 | # With aix-soname=svr4, we create the lib.so.V shared archives only, | ||
5422 | # so we don't have lib.a shared libs to link our executables. | ||
5423 | # We have to force runtime linking in this case. | ||
5424 | aix_use_runtimelinking=yes | ||
5425 | LDFLAGS="$LDFLAGS -Wl,-brtl" | ||
5426 | fi | ||
5427 | ;; | ||
5428 | esac | ||
5429 | |||
5430 | exp_sym_flag='-bexport' | ||
5431 | no_entry_flag='-bnoentry' | ||
5432 | fi | ||
5433 | |||
5434 | # When large executables or shared objects are built, AIX ld can | ||
5435 | # have problems creating the table of contents. If linking a library | ||
5436 | # or program results in "error TOC overflow" add -mminimal-toc to | ||
5437 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | ||
5438 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | ||
5439 | |||
5440 | _LT_TAGVAR(archive_cmds, $1)='' | ||
5441 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
5442 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | ||
5443 | _LT_TAGVAR(hardcode_libdir_separator, $1)=':' | ||
5444 | _LT_TAGVAR(link_all_deplibs, $1)=yes | ||
5445 | _LT_TAGVAR(file_list_spec, $1)='$wl-f,' | ||
5446 | case $with_aix_soname,$aix_use_runtimelinking in | ||
5447 | aix,*) ;; # traditional, no import file | ||
5448 | svr4,* | *,yes) # use import file | ||
5449 | # The Import File defines what to hardcode. | ||
5450 | _LT_TAGVAR(hardcode_direct, $1)=no | ||
5451 | _LT_TAGVAR(hardcode_direct_absolute, $1)=no | ||
5452 | ;; | ||
5453 | esac | ||
5454 | |||
5455 | if test yes = "$GCC"; then | ||
5456 | case $host_os in aix4.[[012]]|aix4.[[012]].*) | ||
5457 | # We only want to do this on AIX 4.2 and lower, the check | ||
5458 | # below for broken collect2 doesn't work under 4.3+ | ||
5459 | collect2name=`$CC -print-prog-name=collect2` | ||
5460 | if test -f "$collect2name" && | ||
5461 | strings "$collect2name" | $GREP resolve_lib_name >/dev/null | ||
5462 | then | ||
5463 | # We have reworked collect2 | ||
5464 | : | ||
5465 | else | ||
5466 | # We have old collect2 | ||
5467 | _LT_TAGVAR(hardcode_direct, $1)=unsupported | ||
5468 | # It fails to find uninstalled libraries when the uninstalled | ||
5469 | # path is not listed in the libpath. Setting hardcode_minus_L | ||
5470 | # to unsupported forces relinking | ||
5471 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
5472 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
5473 | _LT_TAGVAR(hardcode_libdir_separator, $1)= | ||
5474 | fi | ||
5475 | ;; | ||
5476 | esac | ||
5477 | shared_flag='-shared' | ||
5478 | if test yes = "$aix_use_runtimelinking"; then | ||
5479 | shared_flag="$shared_flag "'$wl-G' | ||
5480 | fi | ||
5481 | # Need to ensure runtime linking is disabled for the traditional | ||
5482 | # shared library, or the linker may eventually find shared libraries | ||
5483 | # /with/ Import File - we do not want to mix them. | ||
5484 | shared_flag_aix='-shared' | ||
5485 | shared_flag_svr4='-shared $wl-G' | ||
5486 | else | ||
5487 | # not using gcc | ||
5488 | if test ia64 = "$host_cpu"; then | ||
5489 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release | ||
5490 | # chokes on -Wl,-G. The following line is correct: | ||
5491 | shared_flag='-G' | ||
5492 | else | ||
5493 | if test yes = "$aix_use_runtimelinking"; then | ||
5494 | shared_flag='$wl-G' | ||
5495 | else | ||
5496 | shared_flag='$wl-bM:SRE' | ||
5497 | fi | ||
5498 | shared_flag_aix='$wl-bM:SRE' | ||
5499 | shared_flag_svr4='$wl-G' | ||
5500 | fi | ||
5501 | fi | ||
5502 | |||
5503 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' | ||
5504 | # It seems that -bexpall does not export symbols beginning with | ||
5505 | # underscore (_), so it is better to generate a list of symbols to export. | ||
5506 | _LT_TAGVAR(always_export_symbols, $1)=yes | ||
5507 | if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then | ||
5508 | # Warning - without using the other runtime loading flags (-brtl), | ||
5509 | # -berok will link without error, but may produce a broken library. | ||
5510 | _LT_TAGVAR(allow_undefined_flag, $1)='-berok' | ||
5511 | # Determine the default libpath from the value encoded in an | ||
5512 | # empty executable. | ||
5513 | _LT_SYS_MODULE_PATH_AIX([$1]) | ||
5514 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" | ||
5515 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag | ||
5516 | else | ||
5517 | if test ia64 = "$host_cpu"; then | ||
5518 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' | ||
5519 | _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" | ||
5520 | _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" | ||
5521 | else | ||
5522 | # Determine the default libpath from the value encoded in an | ||
5523 | # empty executable. | ||
5524 | _LT_SYS_MODULE_PATH_AIX([$1]) | ||
5525 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" | ||
5526 | # Warning - without using the other run time loading flags, | ||
5527 | # -berok will link without error, but may produce a broken library. | ||
5528 | _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' | ||
5529 | _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' | ||
5530 | if test yes = "$with_gnu_ld"; then | ||
5531 | # We only use this code for GNU lds that support --whole-archive. | ||
5532 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' | ||
5533 | else | ||
5534 | # Exported symbols can be pulled into shared objects from archives | ||
5535 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' | ||
5536 | fi | ||
5537 | _LT_TAGVAR(archive_cmds_need_lc, $1)=yes | ||
5538 | _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' | ||
5539 | # -brtl affects multiple linker settings, -berok does not and is overridden later | ||
5540 | compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' | ||
5541 | if test svr4 != "$with_aix_soname"; then | ||
5542 | # This is similar to how AIX traditionally builds its shared libraries. | ||
5543 | _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' | ||
5544 | fi | ||
5545 | if test aix != "$with_aix_soname"; then | ||
5546 | _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' | ||
5547 | else | ||
5548 | # used by -dlpreopen to get the symbols | ||
5549 | _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' | ||
5550 | fi | ||
5551 | _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' | ||
5552 | fi | ||
5553 | fi | ||
5554 | ;; | ||
5555 | |||
5556 | amigaos*) | ||
5557 | case $host_cpu in | ||
5558 | powerpc) | ||
5559 | # see comment about AmigaOS4 .so support | ||
5560 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' | ||
5561 | _LT_TAGVAR(archive_expsym_cmds, $1)='' | ||
5562 | ;; | ||
5563 | m68k) | ||
5564 | _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' | ||
5565 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
5566 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
5567 | ;; | ||
5568 | esac | ||
5569 | ;; | ||
5570 | |||
5571 | bsdi[[45]]*) | ||
5572 | _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic | ||
5573 | ;; | ||
5574 | |||
5575 | cygwin* | mingw* | pw32* | cegcc*) | ||
5576 | # When not using gcc, we currently assume that we are using | ||
5577 | # Microsoft Visual C++. | ||
5578 | # hardcode_libdir_flag_spec is actually meaningless, as there is | ||
5579 | # no search path for DLLs. | ||
5580 | case $cc_basename in | ||
5581 | cl*) | ||
5582 | # Native MSVC | ||
5583 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' | ||
5584 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
5585 | _LT_TAGVAR(always_export_symbols, $1)=yes | ||
5586 | _LT_TAGVAR(file_list_spec, $1)='@' | ||
5587 | # Tell ltmain to make .lib files, not .a files. | ||
5588 | libext=lib | ||
5589 | # Tell ltmain to make .dll files, not .so files. | ||
5590 | shrext_cmds=.dll | ||
5591 | # FIXME: Setting linknames here is a bad hack. | ||
5592 | _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' | ||
5593 | _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then | ||
5594 | cp "$export_symbols" "$output_objdir/$soname.def"; | ||
5595 | echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; | ||
5596 | else | ||
5597 | $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; | ||
5598 | fi~ | ||
5599 | $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ | ||
5600 | linknames=' | ||
5601 | # The linker will not automatically build a static lib if we build a DLL. | ||
5602 | # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' | ||
5603 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | ||
5604 | _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' | ||
5605 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' | ||
5606 | # Don't use ranlib | ||
5607 | _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' | ||
5608 | _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ | ||
5609 | lt_tool_outputfile="@TOOL_OUTPUT@"~ | ||
5610 | case $lt_outputfile in | ||
5611 | *.exe|*.EXE) ;; | ||
5612 | *) | ||
5613 | lt_outputfile=$lt_outputfile.exe | ||
5614 | lt_tool_outputfile=$lt_tool_outputfile.exe | ||
5615 | ;; | ||
5616 | esac~ | ||
5617 | if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then | ||
5618 | $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; | ||
5619 | $RM "$lt_outputfile.manifest"; | ||
5620 | fi' | ||
5621 | ;; | ||
5622 | *) | ||
5623 | # Assume MSVC wrapper | ||
5624 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' | ||
5625 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
5626 | # Tell ltmain to make .lib files, not .a files. | ||
5627 | libext=lib | ||
5628 | # Tell ltmain to make .dll files, not .so files. | ||
5629 | shrext_cmds=.dll | ||
5630 | # FIXME: Setting linknames here is a bad hack. | ||
5631 | _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' | ||
5632 | # The linker will automatically build a .lib file if we build a DLL. | ||
5633 | _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' | ||
5634 | # FIXME: Should let the user specify the lib program. | ||
5635 | _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' | ||
5636 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | ||
5637 | ;; | ||
5638 | esac | ||
5639 | ;; | ||
5640 | |||
5641 | darwin* | rhapsody*) | ||
5642 | _LT_DARWIN_LINKER_FEATURES($1) | ||
5643 | ;; | ||
5644 | |||
5645 | dgux*) | ||
5646 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
5647 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
5648 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5649 | ;; | ||
5650 | |||
5651 | # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor | ||
5652 | # support. Future versions do this automatically, but an explicit c++rt0.o | ||
5653 | # does not break anything, and helps significantly (at the cost of a little | ||
5654 | # extra space). | ||
5655 | freebsd2.2*) | ||
5656 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' | ||
5657 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | ||
5658 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
5659 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5660 | ;; | ||
5661 | |||
5662 | # Unfortunately, older versions of FreeBSD 2 do not have this feature. | ||
5663 | freebsd2.*) | ||
5664 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | ||
5665 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
5666 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
5667 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5668 | ;; | ||
5669 | |||
5670 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. | ||
5671 | freebsd* | dragonfly*) | ||
5672 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | ||
5673 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | ||
5674 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
5675 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5676 | ;; | ||
5677 | |||
5678 | hpux9*) | ||
5679 | if test yes = "$GCC"; then | ||
5680 | _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' | ||
5681 | else | ||
5682 | _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' | ||
5683 | fi | ||
5684 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' | ||
5685 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
5686 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
5687 | |||
5688 | # hardcode_minus_L: Not really in the search PATH, | ||
5689 | # but as the default location of the library. | ||
5690 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
5691 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' | ||
5692 | ;; | ||
5693 | |||
5694 | hpux10*) | ||
5695 | if test yes,no = "$GCC,$with_gnu_ld"; then | ||
5696 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
5697 | else | ||
5698 | _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' | ||
5699 | fi | ||
5700 | if test no = "$with_gnu_ld"; then | ||
5701 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' | ||
5702 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
5703 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
5704 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | ||
5705 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' | ||
5706 | # hardcode_minus_L: Not really in the search PATH, | ||
5707 | # but as the default location of the library. | ||
5708 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
5709 | fi | ||
5710 | ;; | ||
5711 | |||
5712 | hpux11*) | ||
5713 | if test yes,no = "$GCC,$with_gnu_ld"; then | ||
5714 | case $host_cpu in | ||
5715 | hppa*64*) | ||
5716 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
5717 | ;; | ||
5718 | ia64*) | ||
5719 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | ||
5720 | ;; | ||
5721 | *) | ||
5722 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
5723 | ;; | ||
5724 | esac | ||
5725 | else | ||
5726 | case $host_cpu in | ||
5727 | hppa*64*) | ||
5728 | _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
5729 | ;; | ||
5730 | ia64*) | ||
5731 | _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' | ||
5732 | ;; | ||
5733 | *) | ||
5734 | m4_if($1, [], [ | ||
5735 | # Older versions of the 11.00 compiler do not understand -b yet | ||
5736 | # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) | ||
5737 | _LT_LINKER_OPTION([if $CC understands -b], | ||
5738 | _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], | ||
5739 | [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], | ||
5740 | [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], | ||
5741 | [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) | ||
5742 | ;; | ||
5743 | esac | ||
5744 | fi | ||
5745 | if test no = "$with_gnu_ld"; then | ||
5746 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' | ||
5747 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
5748 | |||
5749 | case $host_cpu in | ||
5750 | hppa*64*|ia64*) | ||
5751 | _LT_TAGVAR(hardcode_direct, $1)=no | ||
5752 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5753 | ;; | ||
5754 | *) | ||
5755 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
5756 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | ||
5757 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' | ||
5758 | |||
5759 | # hardcode_minus_L: Not really in the search PATH, | ||
5760 | # but as the default location of the library. | ||
5761 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
5762 | ;; | ||
5763 | esac | ||
5764 | fi | ||
5765 | ;; | ||
5766 | |||
5767 | irix5* | irix6* | nonstopux*) | ||
5768 | if test yes = "$GCC"; then | ||
5769 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' | ||
5770 | # Try to use the -exported_symbol ld option, if it does not | ||
5771 | # work, assume that -exports_file does not work either and | ||
5772 | # implicitly export all symbols. | ||
5773 | # This should be the same for all languages, so no per-tag cache variable. | ||
5774 | AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], | ||
5775 | [lt_cv_irix_exported_symbol], | ||
5776 | [save_LDFLAGS=$LDFLAGS | ||
5777 | LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" | ||
5778 | AC_LINK_IFELSE( | ||
5779 | [AC_LANG_SOURCE( | ||
5780 | [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], | ||
5781 | [C++], [[int foo (void) { return 0; }]], | ||
5782 | [Fortran 77], [[ | ||
5783 | subroutine foo | ||
5784 | end]], | ||
5785 | [Fortran], [[ | ||
5786 | subroutine foo | ||
5787 | end]])])], | ||
5788 | [lt_cv_irix_exported_symbol=yes], | ||
5789 | [lt_cv_irix_exported_symbol=no]) | ||
5790 | LDFLAGS=$save_LDFLAGS]) | ||
5791 | if test yes = "$lt_cv_irix_exported_symbol"; then | ||
5792 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' | ||
5793 | fi | ||
5794 | _LT_TAGVAR(link_all_deplibs, $1)=no | ||
5795 | else | ||
5796 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' | ||
5797 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' | ||
5798 | fi | ||
5799 | _LT_TAGVAR(archive_cmds_need_lc, $1)='no' | ||
5800 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' | ||
5801 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
5802 | _LT_TAGVAR(inherit_rpath, $1)=yes | ||
5803 | _LT_TAGVAR(link_all_deplibs, $1)=yes | ||
5804 | ;; | ||
5805 | |||
5806 | linux*) | ||
5807 | case $cc_basename in | ||
5808 | tcc*) | ||
5809 | # Fabrice Bellard et al's Tiny C Compiler | ||
5810 | _LT_TAGVAR(ld_shlibs, $1)=yes | ||
5811 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | ||
5812 | ;; | ||
5813 | esac | ||
5814 | ;; | ||
5815 | |||
5816 | netbsd* | netbsdelf*-gnu) | ||
5817 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | ||
5818 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out | ||
5819 | else | ||
5820 | _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF | ||
5821 | fi | ||
5822 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | ||
5823 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
5824 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5825 | ;; | ||
5826 | |||
5827 | newsos6) | ||
5828 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
5829 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
5830 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' | ||
5831 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
5832 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5833 | ;; | ||
5834 | |||
5835 | *nto* | *qnx*) | ||
5836 | ;; | ||
5837 | |||
5838 | openbsd* | bitrig*) | ||
5839 | if test -f /usr/libexec/ld.so; then | ||
5840 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
5841 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5842 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | ||
5843 | if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then | ||
5844 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | ||
5845 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' | ||
5846 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' | ||
5847 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' | ||
5848 | else | ||
5849 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | ||
5850 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' | ||
5851 | fi | ||
5852 | else | ||
5853 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
5854 | fi | ||
5855 | ;; | ||
5856 | |||
5857 | os2*) | ||
5858 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
5859 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
5860 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
5861 | shrext_cmds=.dll | ||
5862 | _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ | ||
5863 | $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ | ||
5864 | $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ | ||
5865 | $ECHO EXPORTS >> $output_objdir/$libname.def~ | ||
5866 | emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ | ||
5867 | $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ | ||
5868 | emximp -o $lib $output_objdir/$libname.def' | ||
5869 | _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ | ||
5870 | $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ | ||
5871 | $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ | ||
5872 | $ECHO EXPORTS >> $output_objdir/$libname.def~ | ||
5873 | prefix_cmds="$SED"~ | ||
5874 | if test EXPORTS = "`$SED 1q $export_symbols`"; then | ||
5875 | prefix_cmds="$prefix_cmds -e 1d"; | ||
5876 | fi~ | ||
5877 | prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ | ||
5878 | cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ | ||
5879 | $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ | ||
5880 | emximp -o $lib $output_objdir/$libname.def' | ||
5881 | _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' | ||
5882 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | ||
5883 | ;; | ||
5884 | |||
5885 | osf3*) | ||
5886 | if test yes = "$GCC"; then | ||
5887 | _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' | ||
5888 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' | ||
5889 | else | ||
5890 | _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' | ||
5891 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' | ||
5892 | fi | ||
5893 | _LT_TAGVAR(archive_cmds_need_lc, $1)='no' | ||
5894 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' | ||
5895 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
5896 | ;; | ||
5897 | |||
5898 | osf4* | osf5*) # as osf3* with the addition of -msym flag | ||
5899 | if test yes = "$GCC"; then | ||
5900 | _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' | ||
5901 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' | ||
5902 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' | ||
5903 | else | ||
5904 | _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' | ||
5905 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' | ||
5906 | _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ | ||
5907 | $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' | ||
5908 | |||
5909 | # Both c and cxx compiler support -rpath directly | ||
5910 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' | ||
5911 | fi | ||
5912 | _LT_TAGVAR(archive_cmds_need_lc, $1)='no' | ||
5913 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
5914 | ;; | ||
5915 | |||
5916 | solaris*) | ||
5917 | _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' | ||
5918 | if test yes = "$GCC"; then | ||
5919 | wlarc='$wl' | ||
5920 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
5921 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | ||
5922 | $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' | ||
5923 | else | ||
5924 | case `$CC -V 2>&1` in | ||
5925 | *"Compilers 5.0"*) | ||
5926 | wlarc='' | ||
5927 | _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
5928 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | ||
5929 | $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' | ||
5930 | ;; | ||
5931 | *) | ||
5932 | wlarc='$wl' | ||
5933 | _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' | ||
5934 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | ||
5935 | $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' | ||
5936 | ;; | ||
5937 | esac | ||
5938 | fi | ||
5939 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | ||
5940 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5941 | case $host_os in | ||
5942 | solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; | ||
5943 | *) | ||
5944 | # The compiler driver will combine and reorder linker options, | ||
5945 | # but understands '-z linker_flag'. GCC discards it without '$wl', | ||
5946 | # but is careful enough not to reorder. | ||
5947 | # Supported since Solaris 2.6 (maybe 2.5.1?) | ||
5948 | if test yes = "$GCC"; then | ||
5949 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' | ||
5950 | else | ||
5951 | _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' | ||
5952 | fi | ||
5953 | ;; | ||
5954 | esac | ||
5955 | _LT_TAGVAR(link_all_deplibs, $1)=yes | ||
5956 | ;; | ||
5957 | |||
5958 | sunos4*) | ||
5959 | if test sequent = "$host_vendor"; then | ||
5960 | # Use $CC to link under sequent, because it throws in some extra .o | ||
5961 | # files that make .init and .fini sections work. | ||
5962 | _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' | ||
5963 | else | ||
5964 | _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' | ||
5965 | fi | ||
5966 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
5967 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
5968 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
5969 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5970 | ;; | ||
5971 | |||
5972 | sysv4) | ||
5973 | case $host_vendor in | ||
5974 | sni) | ||
5975 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
5976 | _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? | ||
5977 | ;; | ||
5978 | siemens) | ||
5979 | ## LD is ld it makes a PLAMLIB | ||
5980 | ## CC just makes a GrossModule. | ||
5981 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' | ||
5982 | _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' | ||
5983 | _LT_TAGVAR(hardcode_direct, $1)=no | ||
5984 | ;; | ||
5985 | motorola) | ||
5986 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
5987 | _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie | ||
5988 | ;; | ||
5989 | esac | ||
5990 | runpath_var='LD_RUN_PATH' | ||
5991 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5992 | ;; | ||
5993 | |||
5994 | sysv4.3*) | ||
5995 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
5996 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5997 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' | ||
5998 | ;; | ||
5999 | |||
6000 | sysv4*MP*) | ||
6001 | if test -d /usr/nec; then | ||
6002 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
6003 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
6004 | runpath_var=LD_RUN_PATH | ||
6005 | hardcode_runpath_var=yes | ||
6006 | _LT_TAGVAR(ld_shlibs, $1)=yes | ||
6007 | fi | ||
6008 | ;; | ||
6009 | |||
6010 | sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) | ||
6011 | _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' | ||
6012 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
6013 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
6014 | runpath_var='LD_RUN_PATH' | ||
6015 | |||
6016 | if test yes = "$GCC"; then | ||
6017 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
6018 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
6019 | else | ||
6020 | _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
6021 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
6022 | fi | ||
6023 | ;; | ||
6024 | |||
6025 | sysv5* | sco3.2v5* | sco5v6*) | ||
6026 | # Note: We CANNOT use -z defs as we might desire, because we do not | ||
6027 | # link with -lc, and that would cause any symbols used from libc to | ||
6028 | # always be unresolved, which means just about no library would | ||
6029 | # ever link correctly. If we're not using GNU ld we use -z text | ||
6030 | # though, which does catch some bad symbols but isn't as heavy-handed | ||
6031 | # as -z defs. | ||
6032 | _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' | ||
6033 | _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' | ||
6034 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
6035 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
6036 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' | ||
6037 | _LT_TAGVAR(hardcode_libdir_separator, $1)=':' | ||
6038 | _LT_TAGVAR(link_all_deplibs, $1)=yes | ||
6039 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' | ||
6040 | runpath_var='LD_RUN_PATH' | ||
6041 | |||
6042 | if test yes = "$GCC"; then | ||
6043 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
6044 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
6045 | else | ||
6046 | _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
6047 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
6048 | fi | ||
6049 | ;; | ||
6050 | |||
6051 | uts4*) | ||
6052 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
6053 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
6054 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
6055 | ;; | ||
6056 | |||
6057 | *) | ||
6058 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
6059 | ;; | ||
6060 | esac | ||
6061 | |||
6062 | if test sni = "$host_vendor"; then | ||
6063 | case $host in | ||
6064 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | ||
6065 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' | ||
6066 | ;; | ||
6067 | esac | ||
6068 | fi | ||
6069 | fi | ||
6070 | ]) | ||
6071 | AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) | ||
6072 | test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no | ||
6073 | |||
6074 | _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld | ||
6075 | |||
6076 | _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl | ||
6077 | _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl | ||
6078 | _LT_DECL([], [extract_expsyms_cmds], [2], | ||
6079 | [The commands to extract the exported symbol list from a shared archive]) | ||
6080 | |||
6081 | # | ||
6082 | # Do we need to explicitly link libc? | ||
6083 | # | ||
6084 | case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in | ||
6085 | x|xyes) | ||
6086 | # Assume -lc should be added | ||
6087 | _LT_TAGVAR(archive_cmds_need_lc, $1)=yes | ||
6088 | |||
6089 | if test yes,yes = "$GCC,$enable_shared"; then | ||
6090 | case $_LT_TAGVAR(archive_cmds, $1) in | ||
6091 | *'~'*) | ||
6092 | # FIXME: we may have to deal with multi-command sequences. | ||
6093 | ;; | ||
6094 | '$CC '*) | ||
6095 | # Test whether the compiler implicitly links with -lc since on some | ||
6096 | # systems, -lgcc has to come before -lc. If gcc already passes -lc | ||
6097 | # to ld, don't add -lc before -lgcc. | ||
6098 | AC_CACHE_CHECK([whether -lc should be explicitly linked in], | ||
6099 | [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), | ||
6100 | [$RM conftest* | ||
6101 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext | ||
6102 | |||
6103 | if AC_TRY_EVAL(ac_compile) 2>conftest.err; then | ||
6104 | soname=conftest | ||
6105 | lib=conftest | ||
6106 | libobjs=conftest.$ac_objext | ||
6107 | deplibs= | ||
6108 | wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) | ||
6109 | pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) | ||
6110 | compiler_flags=-v | ||
6111 | linker_flags=-v | ||
6112 | verstring= | ||
6113 | output_objdir=. | ||
6114 | libname=conftest | ||
6115 | lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) | ||
6116 | _LT_TAGVAR(allow_undefined_flag, $1)= | ||
6117 | if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) | ||
6118 | then | ||
6119 | lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
6120 | else | ||
6121 | lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes | ||
6122 | fi | ||
6123 | _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag | ||
6124 | else | ||
6125 | cat conftest.err 1>&5 | ||
6126 | fi | ||
6127 | $RM conftest* | ||
6128 | ]) | ||
6129 | _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) | ||
6130 | ;; | ||
6131 | esac | ||
6132 | fi | ||
6133 | ;; | ||
6134 | esac | ||
6135 | |||
6136 | _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], | ||
6137 | [Whether or not to add -lc for building shared libraries]) | ||
6138 | _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], | ||
6139 | [enable_shared_with_static_runtimes], [0], | ||
6140 | [Whether or not to disallow shared libs when runtime libs are static]) | ||
6141 | _LT_TAGDECL([], [export_dynamic_flag_spec], [1], | ||
6142 | [Compiler flag to allow reflexive dlopens]) | ||
6143 | _LT_TAGDECL([], [whole_archive_flag_spec], [1], | ||
6144 | [Compiler flag to generate shared objects directly from archives]) | ||
6145 | _LT_TAGDECL([], [compiler_needs_object], [1], | ||
6146 | [Whether the compiler copes with passing no objects directly]) | ||
6147 | _LT_TAGDECL([], [old_archive_from_new_cmds], [2], | ||
6148 | [Create an old-style archive from a shared archive]) | ||
6149 | _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], | ||
6150 | [Create a temporary old-style archive to link instead of a shared archive]) | ||
6151 | _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) | ||
6152 | _LT_TAGDECL([], [archive_expsym_cmds], [2]) | ||
6153 | _LT_TAGDECL([], [module_cmds], [2], | ||
6154 | [Commands used to build a loadable module if different from building | ||
6155 | a shared archive.]) | ||
6156 | _LT_TAGDECL([], [module_expsym_cmds], [2]) | ||
6157 | _LT_TAGDECL([], [with_gnu_ld], [1], | ||
6158 | [Whether we are building with GNU ld or not]) | ||
6159 | _LT_TAGDECL([], [allow_undefined_flag], [1], | ||
6160 | [Flag that allows shared libraries with undefined symbols to be built]) | ||
6161 | _LT_TAGDECL([], [no_undefined_flag], [1], | ||
6162 | [Flag that enforces no undefined symbols]) | ||
6163 | _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], | ||
6164 | [Flag to hardcode $libdir into a binary during linking. | ||
6165 | This must work even if $libdir does not exist]) | ||
6166 | _LT_TAGDECL([], [hardcode_libdir_separator], [1], | ||
6167 | [Whether we need a single "-rpath" flag with a separated argument]) | ||
6168 | _LT_TAGDECL([], [hardcode_direct], [0], | ||
6169 | [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes | ||
6170 | DIR into the resulting binary]) | ||
6171 | _LT_TAGDECL([], [hardcode_direct_absolute], [0], | ||
6172 | [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes | ||
6173 | DIR into the resulting binary and the resulting library dependency is | ||
6174 | "absolute", i.e impossible to change by setting $shlibpath_var if the | ||
6175 | library is relocated]) | ||
6176 | _LT_TAGDECL([], [hardcode_minus_L], [0], | ||
6177 | [Set to "yes" if using the -LDIR flag during linking hardcodes DIR | ||
6178 | into the resulting binary]) | ||
6179 | _LT_TAGDECL([], [hardcode_shlibpath_var], [0], | ||
6180 | [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR | ||
6181 | into the resulting binary]) | ||
6182 | _LT_TAGDECL([], [hardcode_automatic], [0], | ||
6183 | [Set to "yes" if building a shared library automatically hardcodes DIR | ||
6184 | into the library and all subsequent libraries and executables linked | ||
6185 | against it]) | ||
6186 | _LT_TAGDECL([], [inherit_rpath], [0], | ||
6187 | [Set to yes if linker adds runtime paths of dependent libraries | ||
6188 | to runtime path list]) | ||
6189 | _LT_TAGDECL([], [link_all_deplibs], [0], | ||
6190 | [Whether libtool must link a program against all its dependency libraries]) | ||
6191 | _LT_TAGDECL([], [always_export_symbols], [0], | ||
6192 | [Set to "yes" if exported symbols are required]) | ||
6193 | _LT_TAGDECL([], [export_symbols_cmds], [2], | ||
6194 | [The commands to list exported symbols]) | ||
6195 | _LT_TAGDECL([], [exclude_expsyms], [1], | ||
6196 | [Symbols that should not be listed in the preloaded symbols]) | ||
6197 | _LT_TAGDECL([], [include_expsyms], [1], | ||
6198 | [Symbols that must always be exported]) | ||
6199 | _LT_TAGDECL([], [prelink_cmds], [2], | ||
6200 | [Commands necessary for linking programs (against libraries) with templates]) | ||
6201 | _LT_TAGDECL([], [postlink_cmds], [2], | ||
6202 | [Commands necessary for finishing linking programs]) | ||
6203 | _LT_TAGDECL([], [file_list_spec], [1], | ||
6204 | [Specify filename containing input files]) | ||
6205 | dnl FIXME: Not yet implemented | ||
6206 | dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], | ||
6207 | dnl [Compiler flag to generate thread safe objects]) | ||
6208 | ])# _LT_LINKER_SHLIBS | ||
6209 | |||
6210 | |||
6211 | # _LT_LANG_C_CONFIG([TAG]) | ||
6212 | # ------------------------ | ||
6213 | # Ensure that the configuration variables for a C compiler are suitably | ||
6214 | # defined. These variables are subsequently used by _LT_CONFIG to write | ||
6215 | # the compiler configuration to 'libtool'. | ||
6216 | m4_defun([_LT_LANG_C_CONFIG], | ||
6217 | [m4_require([_LT_DECL_EGREP])dnl | ||
6218 | lt_save_CC=$CC | ||
6219 | AC_LANG_PUSH(C) | ||
6220 | |||
6221 | # Source file extension for C test sources. | ||
6222 | ac_ext=c | ||
6223 | |||
6224 | # Object file extension for compiled C test sources. | ||
6225 | objext=o | ||
6226 | _LT_TAGVAR(objext, $1)=$objext | ||
6227 | |||
6228 | # Code to be used in simple compile tests | ||
6229 | lt_simple_compile_test_code="int some_variable = 0;" | ||
6230 | |||
6231 | # Code to be used in simple link tests | ||
6232 | lt_simple_link_test_code='int main(){return(0);}' | ||
6233 | |||
6234 | _LT_TAG_COMPILER | ||
6235 | # Save the default compiler, since it gets overwritten when the other | ||
6236 | # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. | ||
6237 | compiler_DEFAULT=$CC | ||
6238 | |||
6239 | # save warnings/boilerplate of simple test code | ||
6240 | _LT_COMPILER_BOILERPLATE | ||
6241 | _LT_LINKER_BOILERPLATE | ||
6242 | |||
6243 | ## CAVEAT EMPTOR: | ||
6244 | ## There is no encapsulation within the following macros, do not change | ||
6245 | ## the running order or otherwise move them around unless you know exactly | ||
6246 | ## what you are doing... | ||
6247 | if test -n "$compiler"; then | ||
6248 | _LT_COMPILER_NO_RTTI($1) | ||
6249 | _LT_COMPILER_PIC($1) | ||
6250 | _LT_COMPILER_C_O($1) | ||
6251 | _LT_COMPILER_FILE_LOCKS($1) | ||
6252 | _LT_LINKER_SHLIBS($1) | ||
6253 | _LT_SYS_DYNAMIC_LINKER($1) | ||
6254 | _LT_LINKER_HARDCODE_LIBPATH($1) | ||
6255 | LT_SYS_DLOPEN_SELF | ||
6256 | _LT_CMD_STRIPLIB | ||
6257 | |||
6258 | # Report what library types will actually be built | ||
6259 | AC_MSG_CHECKING([if libtool supports shared libraries]) | ||
6260 | AC_MSG_RESULT([$can_build_shared]) | ||
6261 | |||
6262 | AC_MSG_CHECKING([whether to build shared libraries]) | ||
6263 | test no = "$can_build_shared" && enable_shared=no | ||
6264 | |||
6265 | # On AIX, shared libraries and static libraries use the same namespace, and | ||
6266 | # are all built from PIC. | ||
6267 | case $host_os in | ||
6268 | aix3*) | ||
6269 | test yes = "$enable_shared" && enable_static=no | ||
6270 | if test -n "$RANLIB"; then | ||
6271 | archive_cmds="$archive_cmds~\$RANLIB \$lib" | ||
6272 | postinstall_cmds='$RANLIB $lib' | ||
6273 | fi | ||
6274 | ;; | ||
6275 | |||
6276 | aix[[4-9]]*) | ||
6277 | if test ia64 != "$host_cpu"; then | ||
6278 | case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in | ||
6279 | yes,aix,yes) ;; # shared object as lib.so file only | ||
6280 | yes,svr4,*) ;; # shared object as lib.so archive member only | ||
6281 | yes,*) enable_static=no ;; # shared object in lib.a archive as well | ||
6282 | esac | ||
6283 | fi | ||
6284 | ;; | ||
6285 | esac | ||
6286 | AC_MSG_RESULT([$enable_shared]) | ||
6287 | |||
6288 | AC_MSG_CHECKING([whether to build static libraries]) | ||
6289 | # Make sure either enable_shared or enable_static is yes. | ||
6290 | test yes = "$enable_shared" || enable_static=yes | ||
6291 | AC_MSG_RESULT([$enable_static]) | ||
6292 | |||
6293 | _LT_CONFIG($1) | ||
6294 | fi | ||
6295 | AC_LANG_POP | ||
6296 | CC=$lt_save_CC | ||
6297 | ])# _LT_LANG_C_CONFIG | ||
6298 | |||
6299 | |||
6300 | # _LT_LANG_CXX_CONFIG([TAG]) | ||
6301 | # -------------------------- | ||
6302 | # Ensure that the configuration variables for a C++ compiler are suitably | ||
6303 | # defined. These variables are subsequently used by _LT_CONFIG to write | ||
6304 | # the compiler configuration to 'libtool'. | ||
6305 | m4_defun([_LT_LANG_CXX_CONFIG], | ||
6306 | [m4_require([_LT_FILEUTILS_DEFAULTS])dnl | ||
6307 | m4_require([_LT_DECL_EGREP])dnl | ||
6308 | m4_require([_LT_PATH_MANIFEST_TOOL])dnl | ||
6309 | if test -n "$CXX" && ( test no != "$CXX" && | ||
6310 | ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || | ||
6311 | (test g++ != "$CXX"))); then | ||
6312 | AC_PROG_CXXCPP | ||
6313 | else | ||
6314 | _lt_caught_CXX_error=yes | ||
6315 | fi | ||
6316 | |||
6317 | AC_LANG_PUSH(C++) | ||
6318 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
6319 | _LT_TAGVAR(allow_undefined_flag, $1)= | ||
6320 | _LT_TAGVAR(always_export_symbols, $1)=no | ||
6321 | _LT_TAGVAR(archive_expsym_cmds, $1)= | ||
6322 | _LT_TAGVAR(compiler_needs_object, $1)=no | ||
6323 | _LT_TAGVAR(export_dynamic_flag_spec, $1)= | ||
6324 | _LT_TAGVAR(hardcode_direct, $1)=no | ||
6325 | _LT_TAGVAR(hardcode_direct_absolute, $1)=no | ||
6326 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= | ||
6327 | _LT_TAGVAR(hardcode_libdir_separator, $1)= | ||
6328 | _LT_TAGVAR(hardcode_minus_L, $1)=no | ||
6329 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported | ||
6330 | _LT_TAGVAR(hardcode_automatic, $1)=no | ||
6331 | _LT_TAGVAR(inherit_rpath, $1)=no | ||
6332 | _LT_TAGVAR(module_cmds, $1)= | ||
6333 | _LT_TAGVAR(module_expsym_cmds, $1)= | ||
6334 | _LT_TAGVAR(link_all_deplibs, $1)=unknown | ||
6335 | _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | ||
6336 | _LT_TAGVAR(reload_flag, $1)=$reload_flag | ||
6337 | _LT_TAGVAR(reload_cmds, $1)=$reload_cmds | ||
6338 | _LT_TAGVAR(no_undefined_flag, $1)= | ||
6339 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | ||
6340 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no | ||
6341 | |||
6342 | # Source file extension for C++ test sources. | ||
6343 | ac_ext=cpp | ||
6344 | |||
6345 | # Object file extension for compiled C++ test sources. | ||
6346 | objext=o | ||
6347 | _LT_TAGVAR(objext, $1)=$objext | ||
6348 | |||
6349 | # No sense in running all these tests if we already determined that | ||
6350 | # the CXX compiler isn't working. Some variables (like enable_shared) | ||
6351 | # are currently assumed to apply to all compilers on this platform, | ||
6352 | # and will be corrupted by setting them based on a non-working compiler. | ||
6353 | if test yes != "$_lt_caught_CXX_error"; then | ||
6354 | # Code to be used in simple compile tests | ||
6355 | lt_simple_compile_test_code="int some_variable = 0;" | ||
6356 | |||
6357 | # Code to be used in simple link tests | ||
6358 | lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' | ||
6359 | |||
6360 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | ||
6361 | _LT_TAG_COMPILER | ||
6362 | |||
6363 | # save warnings/boilerplate of simple test code | ||
6364 | _LT_COMPILER_BOILERPLATE | ||
6365 | _LT_LINKER_BOILERPLATE | ||
6366 | |||
6367 | # Allow CC to be a program name with arguments. | ||
6368 | lt_save_CC=$CC | ||
6369 | lt_save_CFLAGS=$CFLAGS | ||
6370 | lt_save_LD=$LD | ||
6371 | lt_save_GCC=$GCC | ||
6372 | GCC=$GXX | ||
6373 | lt_save_with_gnu_ld=$with_gnu_ld | ||
6374 | lt_save_path_LD=$lt_cv_path_LD | ||
6375 | if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then | ||
6376 | lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx | ||
6377 | else | ||
6378 | $as_unset lt_cv_prog_gnu_ld | ||
6379 | fi | ||
6380 | if test -n "${lt_cv_path_LDCXX+set}"; then | ||
6381 | lt_cv_path_LD=$lt_cv_path_LDCXX | ||
6382 | else | ||
6383 | $as_unset lt_cv_path_LD | ||
6384 | fi | ||
6385 | test -z "${LDCXX+set}" || LD=$LDCXX | ||
6386 | CC=${CXX-"c++"} | ||
6387 | CFLAGS=$CXXFLAGS | ||
6388 | compiler=$CC | ||
6389 | _LT_TAGVAR(compiler, $1)=$CC | ||
6390 | _LT_CC_BASENAME([$compiler]) | ||
6391 | |||
6392 | if test -n "$compiler"; then | ||
6393 | # We don't want -fno-exception when compiling C++ code, so set the | ||
6394 | # no_builtin_flag separately | ||
6395 | if test yes = "$GXX"; then | ||
6396 | _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' | ||
6397 | else | ||
6398 | _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= | ||
6399 | fi | ||
6400 | |||
6401 | if test yes = "$GXX"; then | ||
6402 | # Set up default GNU C++ configuration | ||
6403 | |||
6404 | LT_PATH_LD | ||
6405 | |||
6406 | # Check if GNU C++ uses GNU ld as the underlying linker, since the | ||
6407 | # archiving commands below assume that GNU ld is being used. | ||
6408 | if test yes = "$with_gnu_ld"; then | ||
6409 | _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' | ||
6410 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' | ||
6411 | |||
6412 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' | ||
6413 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' | ||
6414 | |||
6415 | # If archive_cmds runs LD, not CC, wlarc should be empty | ||
6416 | # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to | ||
6417 | # investigate it a little bit more. (MM) | ||
6418 | wlarc='$wl' | ||
6419 | |||
6420 | # ancient GNU ld didn't support --whole-archive et. al. | ||
6421 | if eval "`$CC -print-prog-name=ld` --help 2>&1" | | ||
6422 | $GREP 'no-whole-archive' > /dev/null; then | ||
6423 | _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' | ||
6424 | else | ||
6425 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | ||
6426 | fi | ||
6427 | else | ||
6428 | with_gnu_ld=no | ||
6429 | wlarc= | ||
6430 | |||
6431 | # A generic and very simple default shared library creation | ||
6432 | # command for GNU C++ for the case where it uses the native | ||
6433 | # linker, instead of GNU ld. If possible, this setting should | ||
6434 | # overridden to take advantage of the native linker features on | ||
6435 | # the platform it is being used on. | ||
6436 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' | ||
6437 | fi | ||
6438 | |||
6439 | # Commands to make compiler produce verbose output that lists | ||
6440 | # what "hidden" libraries, object files and flags are used when | ||
6441 | # linking a shared library. | ||
6442 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | ||
6443 | |||
6444 | else | ||
6445 | GXX=no | ||
6446 | with_gnu_ld=no | ||
6447 | wlarc= | ||
6448 | fi | ||
6449 | |||
6450 | # PORTME: fill in a description of your system's C++ link characteristics | ||
6451 | AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) | ||
6452 | _LT_TAGVAR(ld_shlibs, $1)=yes | ||
6453 | case $host_os in | ||
6454 | aix3*) | ||
6455 | # FIXME: insert proper C++ library support | ||
6456 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
6457 | ;; | ||
6458 | aix[[4-9]]*) | ||
6459 | if test ia64 = "$host_cpu"; then | ||
6460 | # On IA64, the linker does run time linking by default, so we don't | ||
6461 | # have to do anything special. | ||
6462 | aix_use_runtimelinking=no | ||
6463 | exp_sym_flag='-Bexport' | ||
6464 | no_entry_flag= | ||
6465 | else | ||
6466 | aix_use_runtimelinking=no | ||
6467 | |||
6468 | # Test if we are trying to use run time linking or normal | ||
6469 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we | ||
6470 | # have runtime linking enabled, and use it for executables. | ||
6471 | # For shared libraries, we enable/disable runtime linking | ||
6472 | # depending on the kind of the shared library created - | ||
6473 | # when "with_aix_soname,aix_use_runtimelinking" is: | ||
6474 | # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables | ||
6475 | # "aix,yes" lib.so shared, rtl:yes, for executables | ||
6476 | # lib.a static archive | ||
6477 | # "both,no" lib.so.V(shr.o) shared, rtl:yes | ||
6478 | # lib.a(lib.so.V) shared, rtl:no, for executables | ||
6479 | # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables | ||
6480 | # lib.a(lib.so.V) shared, rtl:no | ||
6481 | # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables | ||
6482 | # lib.a static archive | ||
6483 | case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) | ||
6484 | for ld_flag in $LDFLAGS; do | ||
6485 | case $ld_flag in | ||
6486 | *-brtl*) | ||
6487 | aix_use_runtimelinking=yes | ||
6488 | break | ||
6489 | ;; | ||
6490 | esac | ||
6491 | done | ||
6492 | if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then | ||
6493 | # With aix-soname=svr4, we create the lib.so.V shared archives only, | ||
6494 | # so we don't have lib.a shared libs to link our executables. | ||
6495 | # We have to force runtime linking in this case. | ||
6496 | aix_use_runtimelinking=yes | ||
6497 | LDFLAGS="$LDFLAGS -Wl,-brtl" | ||
6498 | fi | ||
6499 | ;; | ||
6500 | esac | ||
6501 | |||
6502 | exp_sym_flag='-bexport' | ||
6503 | no_entry_flag='-bnoentry' | ||
6504 | fi | ||
6505 | |||
6506 | # When large executables or shared objects are built, AIX ld can | ||
6507 | # have problems creating the table of contents. If linking a library | ||
6508 | # or program results in "error TOC overflow" add -mminimal-toc to | ||
6509 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | ||
6510 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | ||
6511 | |||
6512 | _LT_TAGVAR(archive_cmds, $1)='' | ||
6513 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
6514 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | ||
6515 | _LT_TAGVAR(hardcode_libdir_separator, $1)=':' | ||
6516 | _LT_TAGVAR(link_all_deplibs, $1)=yes | ||
6517 | _LT_TAGVAR(file_list_spec, $1)='$wl-f,' | ||
6518 | case $with_aix_soname,$aix_use_runtimelinking in | ||
6519 | aix,*) ;; # no import file | ||
6520 | svr4,* | *,yes) # use import file | ||
6521 | # The Import File defines what to hardcode. | ||
6522 | _LT_TAGVAR(hardcode_direct, $1)=no | ||
6523 | _LT_TAGVAR(hardcode_direct_absolute, $1)=no | ||
6524 | ;; | ||
6525 | esac | ||
6526 | |||
6527 | if test yes = "$GXX"; then | ||
6528 | case $host_os in aix4.[[012]]|aix4.[[012]].*) | ||
6529 | # We only want to do this on AIX 4.2 and lower, the check | ||
6530 | # below for broken collect2 doesn't work under 4.3+ | ||
6531 | collect2name=`$CC -print-prog-name=collect2` | ||
6532 | if test -f "$collect2name" && | ||
6533 | strings "$collect2name" | $GREP resolve_lib_name >/dev/null | ||
6534 | then | ||
6535 | # We have reworked collect2 | ||
6536 | : | ||
6537 | else | ||
6538 | # We have old collect2 | ||
6539 | _LT_TAGVAR(hardcode_direct, $1)=unsupported | ||
6540 | # It fails to find uninstalled libraries when the uninstalled | ||
6541 | # path is not listed in the libpath. Setting hardcode_minus_L | ||
6542 | # to unsupported forces relinking | ||
6543 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
6544 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
6545 | _LT_TAGVAR(hardcode_libdir_separator, $1)= | ||
6546 | fi | ||
6547 | esac | ||
6548 | shared_flag='-shared' | ||
6549 | if test yes = "$aix_use_runtimelinking"; then | ||
6550 | shared_flag=$shared_flag' $wl-G' | ||
6551 | fi | ||
6552 | # Need to ensure runtime linking is disabled for the traditional | ||
6553 | # shared library, or the linker may eventually find shared libraries | ||
6554 | # /with/ Import File - we do not want to mix them. | ||
6555 | shared_flag_aix='-shared' | ||
6556 | shared_flag_svr4='-shared $wl-G' | ||
6557 | else | ||
6558 | # not using gcc | ||
6559 | if test ia64 = "$host_cpu"; then | ||
6560 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release | ||
6561 | # chokes on -Wl,-G. The following line is correct: | ||
6562 | shared_flag='-G' | ||
6563 | else | ||
6564 | if test yes = "$aix_use_runtimelinking"; then | ||
6565 | shared_flag='$wl-G' | ||
6566 | else | ||
6567 | shared_flag='$wl-bM:SRE' | ||
6568 | fi | ||
6569 | shared_flag_aix='$wl-bM:SRE' | ||
6570 | shared_flag_svr4='$wl-G' | ||
6571 | fi | ||
6572 | fi | ||
6573 | |||
6574 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' | ||
6575 | # It seems that -bexpall does not export symbols beginning with | ||
6576 | # underscore (_), so it is better to generate a list of symbols to | ||
6577 | # export. | ||
6578 | _LT_TAGVAR(always_export_symbols, $1)=yes | ||
6579 | if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then | ||
6580 | # Warning - without using the other runtime loading flags (-brtl), | ||
6581 | # -berok will link without error, but may produce a broken library. | ||
6582 | # The "-G" linker flag allows undefined symbols. | ||
6583 | _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' | ||
6584 | # Determine the default libpath from the value encoded in an empty | ||
6585 | # executable. | ||
6586 | _LT_SYS_MODULE_PATH_AIX([$1]) | ||
6587 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" | ||
6588 | |||
6589 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag | ||
6590 | else | ||
6591 | if test ia64 = "$host_cpu"; then | ||
6592 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' | ||
6593 | _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" | ||
6594 | _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" | ||
6595 | else | ||
6596 | # Determine the default libpath from the value encoded in an | ||
6597 | # empty executable. | ||
6598 | _LT_SYS_MODULE_PATH_AIX([$1]) | ||
6599 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" | ||
6600 | # Warning - without using the other run time loading flags, | ||
6601 | # -berok will link without error, but may produce a broken library. | ||
6602 | _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' | ||
6603 | _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' | ||
6604 | if test yes = "$with_gnu_ld"; then | ||
6605 | # We only use this code for GNU lds that support --whole-archive. | ||
6606 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' | ||
6607 | else | ||
6608 | # Exported symbols can be pulled into shared objects from archives | ||
6609 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' | ||
6610 | fi | ||
6611 | _LT_TAGVAR(archive_cmds_need_lc, $1)=yes | ||
6612 | _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' | ||
6613 | # -brtl affects multiple linker settings, -berok does not and is overridden later | ||
6614 | compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' | ||
6615 | if test svr4 != "$with_aix_soname"; then | ||
6616 | # This is similar to how AIX traditionally builds its shared | ||
6617 | # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. | ||
6618 | _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' | ||
6619 | fi | ||
6620 | if test aix != "$with_aix_soname"; then | ||
6621 | _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' | ||
6622 | else | ||
6623 | # used by -dlpreopen to get the symbols | ||
6624 | _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' | ||
6625 | fi | ||
6626 | _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' | ||
6627 | fi | ||
6628 | fi | ||
6629 | ;; | ||
6630 | |||
6631 | beos*) | ||
6632 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then | ||
6633 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
6634 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc | ||
6635 | # support --undefined. This deserves some investigation. FIXME | ||
6636 | _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' | ||
6637 | else | ||
6638 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
6639 | fi | ||
6640 | ;; | ||
6641 | |||
6642 | chorus*) | ||
6643 | case $cc_basename in | ||
6644 | *) | ||
6645 | # FIXME: insert proper C++ library support | ||
6646 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
6647 | ;; | ||
6648 | esac | ||
6649 | ;; | ||
6650 | |||
6651 | cygwin* | mingw* | pw32* | cegcc*) | ||
6652 | case $GXX,$cc_basename in | ||
6653 | ,cl* | no,cl*) | ||
6654 | # Native MSVC | ||
6655 | # hardcode_libdir_flag_spec is actually meaningless, as there is | ||
6656 | # no search path for DLLs. | ||
6657 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' | ||
6658 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
6659 | _LT_TAGVAR(always_export_symbols, $1)=yes | ||
6660 | _LT_TAGVAR(file_list_spec, $1)='@' | ||
6661 | # Tell ltmain to make .lib files, not .a files. | ||
6662 | libext=lib | ||
6663 | # Tell ltmain to make .dll files, not .so files. | ||
6664 | shrext_cmds=.dll | ||
6665 | # FIXME: Setting linknames here is a bad hack. | ||
6666 | _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' | ||
6667 | _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then | ||
6668 | cp "$export_symbols" "$output_objdir/$soname.def"; | ||
6669 | echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; | ||
6670 | else | ||
6671 | $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; | ||
6672 | fi~ | ||
6673 | $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ | ||
6674 | linknames=' | ||
6675 | # The linker will not automatically build a static lib if we build a DLL. | ||
6676 | # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' | ||
6677 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | ||
6678 | # Don't use ranlib | ||
6679 | _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' | ||
6680 | _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ | ||
6681 | lt_tool_outputfile="@TOOL_OUTPUT@"~ | ||
6682 | case $lt_outputfile in | ||
6683 | *.exe|*.EXE) ;; | ||
6684 | *) | ||
6685 | lt_outputfile=$lt_outputfile.exe | ||
6686 | lt_tool_outputfile=$lt_tool_outputfile.exe | ||
6687 | ;; | ||
6688 | esac~ | ||
6689 | func_to_tool_file "$lt_outputfile"~ | ||
6690 | if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then | ||
6691 | $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; | ||
6692 | $RM "$lt_outputfile.manifest"; | ||
6693 | fi' | ||
6694 | ;; | ||
6695 | *) | ||
6696 | # g++ | ||
6697 | # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, | ||
6698 | # as there is no search path for DLLs. | ||
6699 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
6700 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' | ||
6701 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
6702 | _LT_TAGVAR(always_export_symbols, $1)=no | ||
6703 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | ||
6704 | |||
6705 | if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then | ||
6706 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | ||
6707 | # If the export-symbols file already is a .def file, use it as | ||
6708 | # is; otherwise, prepend EXPORTS... | ||
6709 | _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then | ||
6710 | cp $export_symbols $output_objdir/$soname.def; | ||
6711 | else | ||
6712 | echo EXPORTS > $output_objdir/$soname.def; | ||
6713 | cat $export_symbols >> $output_objdir/$soname.def; | ||
6714 | fi~ | ||
6715 | $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' | ||
6716 | else | ||
6717 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
6718 | fi | ||
6719 | ;; | ||
6720 | esac | ||
6721 | ;; | ||
6722 | darwin* | rhapsody*) | ||
6723 | _LT_DARWIN_LINKER_FEATURES($1) | ||
6724 | ;; | ||
6725 | |||
6726 | os2*) | ||
6727 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
6728 | _LT_TAGVAR(hardcode_minus_L, $1)=yes | ||
6729 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
6730 | shrext_cmds=.dll | ||
6731 | _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ | ||
6732 | $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ | ||
6733 | $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ | ||
6734 | $ECHO EXPORTS >> $output_objdir/$libname.def~ | ||
6735 | emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ | ||
6736 | $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ | ||
6737 | emximp -o $lib $output_objdir/$libname.def' | ||
6738 | _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ | ||
6739 | $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ | ||
6740 | $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ | ||
6741 | $ECHO EXPORTS >> $output_objdir/$libname.def~ | ||
6742 | prefix_cmds="$SED"~ | ||
6743 | if test EXPORTS = "`$SED 1q $export_symbols`"; then | ||
6744 | prefix_cmds="$prefix_cmds -e 1d"; | ||
6745 | fi~ | ||
6746 | prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ | ||
6747 | cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ | ||
6748 | $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ | ||
6749 | emximp -o $lib $output_objdir/$libname.def' | ||
6750 | _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' | ||
6751 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | ||
6752 | ;; | ||
6753 | |||
6754 | dgux*) | ||
6755 | case $cc_basename in | ||
6756 | ec++*) | ||
6757 | # FIXME: insert proper C++ library support | ||
6758 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
6759 | ;; | ||
6760 | ghcx*) | ||
6761 | # Green Hills C++ Compiler | ||
6762 | # FIXME: insert proper C++ library support | ||
6763 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
6764 | ;; | ||
6765 | *) | ||
6766 | # FIXME: insert proper C++ library support | ||
6767 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
6768 | ;; | ||
6769 | esac | ||
6770 | ;; | ||
6771 | |||
6772 | freebsd2.*) | ||
6773 | # C++ shared libraries reported to be fairly broken before | ||
6774 | # switch to ELF | ||
6775 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
6776 | ;; | ||
6777 | |||
6778 | freebsd-elf*) | ||
6779 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
6780 | ;; | ||
6781 | |||
6782 | freebsd* | dragonfly*) | ||
6783 | # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF | ||
6784 | # conventions | ||
6785 | _LT_TAGVAR(ld_shlibs, $1)=yes | ||
6786 | ;; | ||
6787 | |||
6788 | haiku*) | ||
6789 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' | ||
6790 | _LT_TAGVAR(link_all_deplibs, $1)=yes | ||
6791 | ;; | ||
6792 | |||
6793 | hpux9*) | ||
6794 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' | ||
6795 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
6796 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' | ||
6797 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
6798 | _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, | ||
6799 | # but as the default | ||
6800 | # location of the library. | ||
6801 | |||
6802 | case $cc_basename in | ||
6803 | CC*) | ||
6804 | # FIXME: insert proper C++ library support | ||
6805 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
6806 | ;; | ||
6807 | aCC*) | ||
6808 | _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' | ||
6809 | # Commands to make compiler produce verbose output that lists | ||
6810 | # what "hidden" libraries, object files and flags are used when | ||
6811 | # linking a shared library. | ||
6812 | # | ||
6813 | # There doesn't appear to be a way to prevent this compiler from | ||
6814 | # explicitly linking system object files so we need to strip them | ||
6815 | # from the output so that they don't get included in the library | ||
6816 | # dependencies. | ||
6817 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' | ||
6818 | ;; | ||
6819 | *) | ||
6820 | if test yes = "$GXX"; then | ||
6821 | _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' | ||
6822 | else | ||
6823 | # FIXME: insert proper C++ library support | ||
6824 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
6825 | fi | ||
6826 | ;; | ||
6827 | esac | ||
6828 | ;; | ||
6829 | |||
6830 | hpux10*|hpux11*) | ||
6831 | if test no = "$with_gnu_ld"; then | ||
6832 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' | ||
6833 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
6834 | |||
6835 | case $host_cpu in | ||
6836 | hppa*64*|ia64*) | ||
6837 | ;; | ||
6838 | *) | ||
6839 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' | ||
6840 | ;; | ||
6841 | esac | ||
6842 | fi | ||
6843 | case $host_cpu in | ||
6844 | hppa*64*|ia64*) | ||
6845 | _LT_TAGVAR(hardcode_direct, $1)=no | ||
6846 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
6847 | ;; | ||
6848 | *) | ||
6849 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
6850 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | ||
6851 | _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, | ||
6852 | # but as the default | ||
6853 | # location of the library. | ||
6854 | ;; | ||
6855 | esac | ||
6856 | |||
6857 | case $cc_basename in | ||
6858 | CC*) | ||
6859 | # FIXME: insert proper C++ library support | ||
6860 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
6861 | ;; | ||
6862 | aCC*) | ||
6863 | case $host_cpu in | ||
6864 | hppa*64*) | ||
6865 | _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
6866 | ;; | ||
6867 | ia64*) | ||
6868 | _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
6869 | ;; | ||
6870 | *) | ||
6871 | _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
6872 | ;; | ||
6873 | esac | ||
6874 | # Commands to make compiler produce verbose output that lists | ||
6875 | # what "hidden" libraries, object files and flags are used when | ||
6876 | # linking a shared library. | ||
6877 | # | ||
6878 | # There doesn't appear to be a way to prevent this compiler from | ||
6879 | # explicitly linking system object files so we need to strip them | ||
6880 | # from the output so that they don't get included in the library | ||
6881 | # dependencies. | ||
6882 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' | ||
6883 | ;; | ||
6884 | *) | ||
6885 | if test yes = "$GXX"; then | ||
6886 | if test no = "$with_gnu_ld"; then | ||
6887 | case $host_cpu in | ||
6888 | hppa*64*) | ||
6889 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
6890 | ;; | ||
6891 | ia64*) | ||
6892 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
6893 | ;; | ||
6894 | *) | ||
6895 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
6896 | ;; | ||
6897 | esac | ||
6898 | fi | ||
6899 | else | ||
6900 | # FIXME: insert proper C++ library support | ||
6901 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
6902 | fi | ||
6903 | ;; | ||
6904 | esac | ||
6905 | ;; | ||
6906 | |||
6907 | interix[[3-9]]*) | ||
6908 | _LT_TAGVAR(hardcode_direct, $1)=no | ||
6909 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
6910 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' | ||
6911 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' | ||
6912 | # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. | ||
6913 | # Instead, shared libraries are loaded at an image base (0x10000000 by | ||
6914 | # default) and relocated if they conflict, which is a slow very memory | ||
6915 | # consuming and fragmenting process. To avoid this, we pick a random, | ||
6916 | # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link | ||
6917 | # time. Moving up from 0x10000000 also allows more sbrk(2) space. | ||
6918 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | ||
6919 | _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' | ||
6920 | ;; | ||
6921 | irix5* | irix6*) | ||
6922 | case $cc_basename in | ||
6923 | CC*) | ||
6924 | # SGI C++ | ||
6925 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' | ||
6926 | |||
6927 | # Archives containing C++ object files must be created using | ||
6928 | # "CC -ar", where "CC" is the IRIX C++ compiler. This is | ||
6929 | # necessary to make sure instantiated templates are included | ||
6930 | # in the archive. | ||
6931 | _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' | ||
6932 | ;; | ||
6933 | *) | ||
6934 | if test yes = "$GXX"; then | ||
6935 | if test no = "$with_gnu_ld"; then | ||
6936 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' | ||
6937 | else | ||
6938 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' | ||
6939 | fi | ||
6940 | fi | ||
6941 | _LT_TAGVAR(link_all_deplibs, $1)=yes | ||
6942 | ;; | ||
6943 | esac | ||
6944 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' | ||
6945 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
6946 | _LT_TAGVAR(inherit_rpath, $1)=yes | ||
6947 | ;; | ||
6948 | |||
6949 | linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) | ||
6950 | case $cc_basename in | ||
6951 | KCC*) | ||
6952 | # Kuck and Associates, Inc. (KAI) C++ Compiler | ||
6953 | |||
6954 | # KCC will only create a shared library if the output file | ||
6955 | # ends with ".so" (or ".sl" for HP-UX), so rename the library | ||
6956 | # to its proper name (with version) after linking. | ||
6957 | _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' | ||
6958 | _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' | ||
6959 | # Commands to make compiler produce verbose output that lists | ||
6960 | # what "hidden" libraries, object files and flags are used when | ||
6961 | # linking a shared library. | ||
6962 | # | ||
6963 | # There doesn't appear to be a way to prevent this compiler from | ||
6964 | # explicitly linking system object files so we need to strip them | ||
6965 | # from the output so that they don't get included in the library | ||
6966 | # dependencies. | ||
6967 | output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' | ||
6968 | |||
6969 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' | ||
6970 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' | ||
6971 | |||
6972 | # Archives containing C++ object files must be created using | ||
6973 | # "CC -Bstatic", where "CC" is the KAI C++ compiler. | ||
6974 | _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' | ||
6975 | ;; | ||
6976 | icpc* | ecpc* ) | ||
6977 | # Intel C++ | ||
6978 | with_gnu_ld=yes | ||
6979 | # version 8.0 and above of icpc choke on multiply defined symbols | ||
6980 | # if we add $predep_objects and $postdep_objects, however 7.1 and | ||
6981 | # earlier do not add the objects themselves. | ||
6982 | case `$CC -V 2>&1` in | ||
6983 | *"Version 7."*) | ||
6984 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' | ||
6985 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' | ||
6986 | ;; | ||
6987 | *) # Version 8.0 or newer | ||
6988 | tmp_idyn= | ||
6989 | case $host_cpu in | ||
6990 | ia64*) tmp_idyn=' -i_dynamic';; | ||
6991 | esac | ||
6992 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' | ||
6993 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' | ||
6994 | ;; | ||
6995 | esac | ||
6996 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
6997 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' | ||
6998 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' | ||
6999 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' | ||
7000 | ;; | ||
7001 | pgCC* | pgcpp*) | ||
7002 | # Portland Group C++ compiler | ||
7003 | case `$CC -V` in | ||
7004 | *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) | ||
7005 | _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ | ||
7006 | rm -rf $tpldir~ | ||
7007 | $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ | ||
7008 | compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' | ||
7009 | _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ | ||
7010 | rm -rf $tpldir~ | ||
7011 | $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ | ||
7012 | $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ | ||
7013 | $RANLIB $oldlib' | ||
7014 | _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ | ||
7015 | rm -rf $tpldir~ | ||
7016 | $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ | ||
7017 | $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' | ||
7018 | _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ | ||
7019 | rm -rf $tpldir~ | ||
7020 | $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ | ||
7021 | $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' | ||
7022 | ;; | ||
7023 | *) # Version 6 and above use weak symbols | ||
7024 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' | ||
7025 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' | ||
7026 | ;; | ||
7027 | esac | ||
7028 | |||
7029 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' | ||
7030 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' | ||
7031 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' | ||
7032 | ;; | ||
7033 | cxx*) | ||
7034 | # Compaq C++ | ||
7035 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' | ||
7036 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' | ||
7037 | |||
7038 | runpath_var=LD_RUN_PATH | ||
7039 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' | ||
7040 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
7041 | |||
7042 | # Commands to make compiler produce verbose output that lists | ||
7043 | # what "hidden" libraries, object files and flags are used when | ||
7044 | # linking a shared library. | ||
7045 | # | ||
7046 | # There doesn't appear to be a way to prevent this compiler from | ||
7047 | # explicitly linking system object files so we need to strip them | ||
7048 | # from the output so that they don't get included in the library | ||
7049 | # dependencies. | ||
7050 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' | ||
7051 | ;; | ||
7052 | xl* | mpixl* | bgxl*) | ||
7053 | # IBM XL 8.0 on PPC, with GNU ld | ||
7054 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' | ||
7055 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' | ||
7056 | _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' | ||
7057 | if test yes = "$supports_anon_versioning"; then | ||
7058 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ | ||
7059 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | ||
7060 | echo "local: *; };" >> $output_objdir/$libname.ver~ | ||
7061 | $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' | ||
7062 | fi | ||
7063 | ;; | ||
7064 | *) | ||
7065 | case `$CC -V 2>&1 | sed 5q` in | ||
7066 | *Sun\ C*) | ||
7067 | # Sun C++ 5.9 | ||
7068 | _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' | ||
7069 | _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
7070 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' | ||
7071 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | ||
7072 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' | ||
7073 | _LT_TAGVAR(compiler_needs_object, $1)=yes | ||
7074 | |||
7075 | # Not sure whether something based on | ||
7076 | # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | ||
7077 | # would be better. | ||
7078 | output_verbose_link_cmd='func_echo_all' | ||
7079 | |||
7080 | # Archives containing C++ object files must be created using | ||
7081 | # "CC -xar", where "CC" is the Sun C++ compiler. This is | ||
7082 | # necessary to make sure instantiated templates are included | ||
7083 | # in the archive. | ||
7084 | _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' | ||
7085 | ;; | ||
7086 | esac | ||
7087 | ;; | ||
7088 | esac | ||
7089 | ;; | ||
7090 | |||
7091 | lynxos*) | ||
7092 | # FIXME: insert proper C++ library support | ||
7093 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
7094 | ;; | ||
7095 | |||
7096 | m88k*) | ||
7097 | # FIXME: insert proper C++ library support | ||
7098 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
7099 | ;; | ||
7100 | |||
7101 | mvs*) | ||
7102 | case $cc_basename in | ||
7103 | cxx*) | ||
7104 | # FIXME: insert proper C++ library support | ||
7105 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
7106 | ;; | ||
7107 | *) | ||
7108 | # FIXME: insert proper C++ library support | ||
7109 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
7110 | ;; | ||
7111 | esac | ||
7112 | ;; | ||
7113 | |||
7114 | netbsd*) | ||
7115 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then | ||
7116 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' | ||
7117 | wlarc= | ||
7118 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | ||
7119 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
7120 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
7121 | fi | ||
7122 | # Workaround some broken pre-1.5 toolchains | ||
7123 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' | ||
7124 | ;; | ||
7125 | |||
7126 | *nto* | *qnx*) | ||
7127 | _LT_TAGVAR(ld_shlibs, $1)=yes | ||
7128 | ;; | ||
7129 | |||
7130 | openbsd* | bitrig*) | ||
7131 | if test -f /usr/libexec/ld.so; then | ||
7132 | _LT_TAGVAR(hardcode_direct, $1)=yes | ||
7133 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
7134 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes | ||
7135 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' | ||
7136 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' | ||
7137 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then | ||
7138 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' | ||
7139 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' | ||
7140 | _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' | ||
7141 | fi | ||
7142 | output_verbose_link_cmd=func_echo_all | ||
7143 | else | ||
7144 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
7145 | fi | ||
7146 | ;; | ||
7147 | |||
7148 | osf3* | osf4* | osf5*) | ||
7149 | case $cc_basename in | ||
7150 | KCC*) | ||
7151 | # Kuck and Associates, Inc. (KAI) C++ Compiler | ||
7152 | |||
7153 | # KCC will only create a shared library if the output file | ||
7154 | # ends with ".so" (or ".sl" for HP-UX), so rename the library | ||
7155 | # to its proper name (with version) after linking. | ||
7156 | _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' | ||
7157 | |||
7158 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' | ||
7159 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
7160 | |||
7161 | # Archives containing C++ object files must be created using | ||
7162 | # the KAI C++ compiler. | ||
7163 | case $host in | ||
7164 | osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; | ||
7165 | *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; | ||
7166 | esac | ||
7167 | ;; | ||
7168 | RCC*) | ||
7169 | # Rational C++ 2.4.1 | ||
7170 | # FIXME: insert proper C++ library support | ||
7171 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
7172 | ;; | ||
7173 | cxx*) | ||
7174 | case $host in | ||
7175 | osf3*) | ||
7176 | _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' | ||
7177 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' | ||
7178 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' | ||
7179 | ;; | ||
7180 | *) | ||
7181 | _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' | ||
7182 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' | ||
7183 | _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ | ||
7184 | echo "-hidden">> $lib.exp~ | ||
7185 | $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ | ||
7186 | $RM $lib.exp' | ||
7187 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' | ||
7188 | ;; | ||
7189 | esac | ||
7190 | |||
7191 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
7192 | |||
7193 | # Commands to make compiler produce verbose output that lists | ||
7194 | # what "hidden" libraries, object files and flags are used when | ||
7195 | # linking a shared library. | ||
7196 | # | ||
7197 | # There doesn't appear to be a way to prevent this compiler from | ||
7198 | # explicitly linking system object files so we need to strip them | ||
7199 | # from the output so that they don't get included in the library | ||
7200 | # dependencies. | ||
7201 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' | ||
7202 | ;; | ||
7203 | *) | ||
7204 | if test yes,no = "$GXX,$with_gnu_ld"; then | ||
7205 | _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' | ||
7206 | case $host in | ||
7207 | osf3*) | ||
7208 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' | ||
7209 | ;; | ||
7210 | *) | ||
7211 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' | ||
7212 | ;; | ||
7213 | esac | ||
7214 | |||
7215 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' | ||
7216 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: | ||
7217 | |||
7218 | # Commands to make compiler produce verbose output that lists | ||
7219 | # what "hidden" libraries, object files and flags are used when | ||
7220 | # linking a shared library. | ||
7221 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | ||
7222 | |||
7223 | else | ||
7224 | # FIXME: insert proper C++ library support | ||
7225 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
7226 | fi | ||
7227 | ;; | ||
7228 | esac | ||
7229 | ;; | ||
7230 | |||
7231 | psos*) | ||
7232 | # FIXME: insert proper C++ library support | ||
7233 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
7234 | ;; | ||
7235 | |||
7236 | sunos4*) | ||
7237 | case $cc_basename in | ||
7238 | CC*) | ||
7239 | # Sun C++ 4.x | ||
7240 | # FIXME: insert proper C++ library support | ||
7241 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
7242 | ;; | ||
7243 | lcc*) | ||
7244 | # Lucid | ||
7245 | # FIXME: insert proper C++ library support | ||
7246 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
7247 | ;; | ||
7248 | *) | ||
7249 | # FIXME: insert proper C++ library support | ||
7250 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
7251 | ;; | ||
7252 | esac | ||
7253 | ;; | ||
7254 | |||
7255 | solaris*) | ||
7256 | case $cc_basename in | ||
7257 | CC* | sunCC*) | ||
7258 | # Sun C++ 4.2, 5.x and Centerline C++ | ||
7259 | _LT_TAGVAR(archive_cmds_need_lc,$1)=yes | ||
7260 | _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' | ||
7261 | _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
7262 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | ||
7263 | $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' | ||
7264 | |||
7265 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | ||
7266 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
7267 | case $host_os in | ||
7268 | solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; | ||
7269 | *) | ||
7270 | # The compiler driver will combine and reorder linker options, | ||
7271 | # but understands '-z linker_flag'. | ||
7272 | # Supported since Solaris 2.6 (maybe 2.5.1?) | ||
7273 | _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' | ||
7274 | ;; | ||
7275 | esac | ||
7276 | _LT_TAGVAR(link_all_deplibs, $1)=yes | ||
7277 | |||
7278 | output_verbose_link_cmd='func_echo_all' | ||
7279 | |||
7280 | # Archives containing C++ object files must be created using | ||
7281 | # "CC -xar", where "CC" is the Sun C++ compiler. This is | ||
7282 | # necessary to make sure instantiated templates are included | ||
7283 | # in the archive. | ||
7284 | _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' | ||
7285 | ;; | ||
7286 | gcx*) | ||
7287 | # Green Hills C++ Compiler | ||
7288 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' | ||
7289 | |||
7290 | # The C++ compiler must be used to create the archive. | ||
7291 | _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' | ||
7292 | ;; | ||
7293 | *) | ||
7294 | # GNU C++ compiler with Solaris linker | ||
7295 | if test yes,no = "$GXX,$with_gnu_ld"; then | ||
7296 | _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' | ||
7297 | if $CC --version | $GREP -v '^2\.7' > /dev/null; then | ||
7298 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' | ||
7299 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | ||
7300 | $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' | ||
7301 | |||
7302 | # Commands to make compiler produce verbose output that lists | ||
7303 | # what "hidden" libraries, object files and flags are used when | ||
7304 | # linking a shared library. | ||
7305 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | ||
7306 | else | ||
7307 | # g++ 2.7 appears to require '-G' NOT '-shared' on this | ||
7308 | # platform. | ||
7309 | _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' | ||
7310 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ | ||
7311 | $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' | ||
7312 | |||
7313 | # Commands to make compiler produce verbose output that lists | ||
7314 | # what "hidden" libraries, object files and flags are used when | ||
7315 | # linking a shared library. | ||
7316 | output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' | ||
7317 | fi | ||
7318 | |||
7319 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' | ||
7320 | case $host_os in | ||
7321 | solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; | ||
7322 | *) | ||
7323 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' | ||
7324 | ;; | ||
7325 | esac | ||
7326 | fi | ||
7327 | ;; | ||
7328 | esac | ||
7329 | ;; | ||
7330 | |||
7331 | sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) | ||
7332 | _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' | ||
7333 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
7334 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
7335 | runpath_var='LD_RUN_PATH' | ||
7336 | |||
7337 | case $cc_basename in | ||
7338 | CC*) | ||
7339 | _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
7340 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
7341 | ;; | ||
7342 | *) | ||
7343 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
7344 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
7345 | ;; | ||
7346 | esac | ||
7347 | ;; | ||
7348 | |||
7349 | sysv5* | sco3.2v5* | sco5v6*) | ||
7350 | # Note: We CANNOT use -z defs as we might desire, because we do not | ||
7351 | # link with -lc, and that would cause any symbols used from libc to | ||
7352 | # always be unresolved, which means just about no library would | ||
7353 | # ever link correctly. If we're not using GNU ld we use -z text | ||
7354 | # though, which does catch some bad symbols but isn't as heavy-handed | ||
7355 | # as -z defs. | ||
7356 | _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' | ||
7357 | _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' | ||
7358 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
7359 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
7360 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' | ||
7361 | _LT_TAGVAR(hardcode_libdir_separator, $1)=':' | ||
7362 | _LT_TAGVAR(link_all_deplibs, $1)=yes | ||
7363 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' | ||
7364 | runpath_var='LD_RUN_PATH' | ||
7365 | |||
7366 | case $cc_basename in | ||
7367 | CC*) | ||
7368 | _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
7369 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
7370 | _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ | ||
7371 | '"$_LT_TAGVAR(old_archive_cmds, $1)" | ||
7372 | _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ | ||
7373 | '"$_LT_TAGVAR(reload_cmds, $1)" | ||
7374 | ;; | ||
7375 | *) | ||
7376 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
7377 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
7378 | ;; | ||
7379 | esac | ||
7380 | ;; | ||
7381 | |||
7382 | tandem*) | ||
7383 | case $cc_basename in | ||
7384 | NCC*) | ||
7385 | # NonStop-UX NCC 3.20 | ||
7386 | # FIXME: insert proper C++ library support | ||
7387 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
7388 | ;; | ||
7389 | *) | ||
7390 | # FIXME: insert proper C++ library support | ||
7391 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
7392 | ;; | ||
7393 | esac | ||
7394 | ;; | ||
7395 | |||
7396 | vxworks*) | ||
7397 | # FIXME: insert proper C++ library support | ||
7398 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
7399 | ;; | ||
7400 | |||
7401 | *) | ||
7402 | # FIXME: insert proper C++ library support | ||
7403 | _LT_TAGVAR(ld_shlibs, $1)=no | ||
7404 | ;; | ||
7405 | esac | ||
7406 | |||
7407 | AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) | ||
7408 | test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no | ||
7409 | |||
7410 | _LT_TAGVAR(GCC, $1)=$GXX | ||
7411 | _LT_TAGVAR(LD, $1)=$LD | ||
7412 | |||
7413 | ## CAVEAT EMPTOR: | ||
7414 | ## There is no encapsulation within the following macros, do not change | ||
7415 | ## the running order or otherwise move them around unless you know exactly | ||
7416 | ## what you are doing... | ||
7417 | _LT_SYS_HIDDEN_LIBDEPS($1) | ||
7418 | _LT_COMPILER_PIC($1) | ||
7419 | _LT_COMPILER_C_O($1) | ||
7420 | _LT_COMPILER_FILE_LOCKS($1) | ||
7421 | _LT_LINKER_SHLIBS($1) | ||
7422 | _LT_SYS_DYNAMIC_LINKER($1) | ||
7423 | _LT_LINKER_HARDCODE_LIBPATH($1) | ||
7424 | |||
7425 | _LT_CONFIG($1) | ||
7426 | fi # test -n "$compiler" | ||
7427 | |||
7428 | CC=$lt_save_CC | ||
7429 | CFLAGS=$lt_save_CFLAGS | ||
7430 | LDCXX=$LD | ||
7431 | LD=$lt_save_LD | ||
7432 | GCC=$lt_save_GCC | ||
7433 | with_gnu_ld=$lt_save_with_gnu_ld | ||
7434 | lt_cv_path_LDCXX=$lt_cv_path_LD | ||
7435 | lt_cv_path_LD=$lt_save_path_LD | ||
7436 | lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld | ||
7437 | lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld | ||
7438 | fi # test yes != "$_lt_caught_CXX_error" | ||
7439 | |||
7440 | AC_LANG_POP | ||
7441 | ])# _LT_LANG_CXX_CONFIG | ||
7442 | |||
7443 | |||
7444 | # _LT_FUNC_STRIPNAME_CNF | ||
7445 | # ---------------------- | ||
7446 | # func_stripname_cnf prefix suffix name | ||
7447 | # strip PREFIX and SUFFIX off of NAME. | ||
7448 | # PREFIX and SUFFIX must not contain globbing or regex special | ||
7449 | # characters, hashes, percent signs, but SUFFIX may contain a leading | ||
7450 | # dot (in which case that matches only a dot). | ||
7451 | # | ||
7452 | # This function is identical to the (non-XSI) version of func_stripname, | ||
7453 | # except this one can be used by m4 code that may be executed by configure, | ||
7454 | # rather than the libtool script. | ||
7455 | m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl | ||
7456 | AC_REQUIRE([_LT_DECL_SED]) | ||
7457 | AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) | ||
7458 | func_stripname_cnf () | ||
7459 | { | ||
7460 | case @S|@2 in | ||
7461 | .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; | ||
7462 | *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; | ||
7463 | esac | ||
7464 | } # func_stripname_cnf | ||
7465 | ])# _LT_FUNC_STRIPNAME_CNF | ||
7466 | |||
7467 | |||
7468 | # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) | ||
7469 | # --------------------------------- | ||
7470 | # Figure out "hidden" library dependencies from verbose | ||
7471 | # compiler output when linking a shared library. | ||
7472 | # Parse the compiler output and extract the necessary | ||
7473 | # objects, libraries and library flags. | ||
7474 | m4_defun([_LT_SYS_HIDDEN_LIBDEPS], | ||
7475 | [m4_require([_LT_FILEUTILS_DEFAULTS])dnl | ||
7476 | AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl | ||
7477 | # Dependencies to place before and after the object being linked: | ||
7478 | _LT_TAGVAR(predep_objects, $1)= | ||
7479 | _LT_TAGVAR(postdep_objects, $1)= | ||
7480 | _LT_TAGVAR(predeps, $1)= | ||
7481 | _LT_TAGVAR(postdeps, $1)= | ||
7482 | _LT_TAGVAR(compiler_lib_search_path, $1)= | ||
7483 | |||
7484 | dnl we can't use the lt_simple_compile_test_code here, | ||
7485 | dnl because it contains code intended for an executable, | ||
7486 | dnl not a library. It's possible we should let each | ||
7487 | dnl tag define a new lt_????_link_test_code variable, | ||
7488 | dnl but it's only used here... | ||
7489 | m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF | ||
7490 | int a; | ||
7491 | void foo (void) { a = 0; } | ||
7492 | _LT_EOF | ||
7493 | ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF | ||
7494 | class Foo | ||
7495 | { | ||
7496 | public: | ||
7497 | Foo (void) { a = 0; } | ||
7498 | private: | ||
7499 | int a; | ||
7500 | }; | ||
7501 | _LT_EOF | ||
7502 | ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF | ||
7503 | subroutine foo | ||
7504 | implicit none | ||
7505 | integer*4 a | ||
7506 | a=0 | ||
7507 | return | ||
7508 | end | ||
7509 | _LT_EOF | ||
7510 | ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF | ||
7511 | subroutine foo | ||
7512 | implicit none | ||
7513 | integer a | ||
7514 | a=0 | ||
7515 | return | ||
7516 | end | ||
7517 | _LT_EOF | ||
7518 | ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF | ||
7519 | public class foo { | ||
7520 | private int a; | ||
7521 | public void bar (void) { | ||
7522 | a = 0; | ||
7523 | } | ||
7524 | }; | ||
7525 | _LT_EOF | ||
7526 | ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF | ||
7527 | package foo | ||
7528 | func foo() { | ||
7529 | } | ||
7530 | _LT_EOF | ||
7531 | ]) | ||
7532 | |||
7533 | _lt_libdeps_save_CFLAGS=$CFLAGS | ||
7534 | case "$CC $CFLAGS " in #( | ||
7535 | *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; | ||
7536 | *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; | ||
7537 | *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; | ||
7538 | esac | ||
7539 | |||
7540 | dnl Parse the compiler output and extract the necessary | ||
7541 | dnl objects, libraries and library flags. | ||
7542 | if AC_TRY_EVAL(ac_compile); then | ||
7543 | # Parse the compiler output and extract the necessary | ||
7544 | # objects, libraries and library flags. | ||
7545 | |||
7546 | # Sentinel used to keep track of whether or not we are before | ||
7547 | # the conftest object file. | ||
7548 | pre_test_object_deps_done=no | ||
7549 | |||
7550 | for p in `eval "$output_verbose_link_cmd"`; do | ||
7551 | case $prev$p in | ||
7552 | |||
7553 | -L* | -R* | -l*) | ||
7554 | # Some compilers place space between "-{L,R}" and the path. | ||
7555 | # Remove the space. | ||
7556 | if test x-L = "$p" || | ||
7557 | test x-R = "$p"; then | ||
7558 | prev=$p | ||
7559 | continue | ||
7560 | fi | ||
7561 | |||
7562 | # Expand the sysroot to ease extracting the directories later. | ||
7563 | if test -z "$prev"; then | ||
7564 | case $p in | ||
7565 | -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; | ||
7566 | -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; | ||
7567 | -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; | ||
7568 | esac | ||
7569 | fi | ||
7570 | case $p in | ||
7571 | =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; | ||
7572 | esac | ||
7573 | if test no = "$pre_test_object_deps_done"; then | ||
7574 | case $prev in | ||
7575 | -L | -R) | ||
7576 | # Internal compiler library paths should come after those | ||
7577 | # provided the user. The postdeps already come after the | ||
7578 | # user supplied libs so there is no need to process them. | ||
7579 | if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then | ||
7580 | _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p | ||
7581 | else | ||
7582 | _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" | ||
7583 | fi | ||
7584 | ;; | ||
7585 | # The "-l" case would never come before the object being | ||
7586 | # linked, so don't bother handling this case. | ||
7587 | esac | ||
7588 | else | ||
7589 | if test -z "$_LT_TAGVAR(postdeps, $1)"; then | ||
7590 | _LT_TAGVAR(postdeps, $1)=$prev$p | ||
7591 | else | ||
7592 | _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" | ||
7593 | fi | ||
7594 | fi | ||
7595 | prev= | ||
7596 | ;; | ||
7597 | |||
7598 | *.lto.$objext) ;; # Ignore GCC LTO objects | ||
7599 | *.$objext) | ||
7600 | # This assumes that the test object file only shows up | ||
7601 | # once in the compiler output. | ||
7602 | if test "$p" = "conftest.$objext"; then | ||
7603 | pre_test_object_deps_done=yes | ||
7604 | continue | ||
7605 | fi | ||
7606 | |||
7607 | if test no = "$pre_test_object_deps_done"; then | ||
7608 | if test -z "$_LT_TAGVAR(predep_objects, $1)"; then | ||
7609 | _LT_TAGVAR(predep_objects, $1)=$p | ||
7610 | else | ||
7611 | _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" | ||
7612 | fi | ||
7613 | else | ||
7614 | if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then | ||
7615 | _LT_TAGVAR(postdep_objects, $1)=$p | ||
7616 | else | ||
7617 | _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" | ||
7618 | fi | ||
7619 | fi | ||
7620 | ;; | ||
7621 | |||
7622 | *) ;; # Ignore the rest. | ||
7623 | |||
7624 | esac | ||
7625 | done | ||
7626 | |||
7627 | # Clean up. | ||
7628 | rm -f a.out a.exe | ||
7629 | else | ||
7630 | echo "libtool.m4: error: problem compiling $1 test program" | ||
7631 | fi | ||
7632 | |||
7633 | $RM -f confest.$objext | ||
7634 | CFLAGS=$_lt_libdeps_save_CFLAGS | ||
7635 | |||
7636 | # PORTME: override above test on systems where it is broken | ||
7637 | m4_if([$1], [CXX], | ||
7638 | [case $host_os in | ||
7639 | interix[[3-9]]*) | ||
7640 | # Interix 3.5 installs completely hosed .la files for C++, so rather than | ||
7641 | # hack all around it, let's just trust "g++" to DTRT. | ||
7642 | _LT_TAGVAR(predep_objects,$1)= | ||
7643 | _LT_TAGVAR(postdep_objects,$1)= | ||
7644 | _LT_TAGVAR(postdeps,$1)= | ||
7645 | ;; | ||
7646 | esac | ||
7647 | ]) | ||
7648 | |||
7649 | case " $_LT_TAGVAR(postdeps, $1) " in | ||
7650 | *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; | ||
7651 | esac | ||
7652 | _LT_TAGVAR(compiler_lib_search_dirs, $1)= | ||
7653 | if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then | ||
7654 | _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` | ||
7655 | fi | ||
7656 | _LT_TAGDECL([], [compiler_lib_search_dirs], [1], | ||
7657 | [The directories searched by this compiler when creating a shared library]) | ||
7658 | _LT_TAGDECL([], [predep_objects], [1], | ||
7659 | [Dependencies to place before and after the objects being linked to | ||
7660 | create a shared library]) | ||
7661 | _LT_TAGDECL([], [postdep_objects], [1]) | ||
7662 | _LT_TAGDECL([], [predeps], [1]) | ||
7663 | _LT_TAGDECL([], [postdeps], [1]) | ||
7664 | _LT_TAGDECL([], [compiler_lib_search_path], [1], | ||
7665 | [The library search path used internally by the compiler when linking | ||
7666 | a shared library]) | ||
7667 | ])# _LT_SYS_HIDDEN_LIBDEPS | ||
7668 | |||
7669 | |||
7670 | # _LT_LANG_F77_CONFIG([TAG]) | ||
7671 | # -------------------------- | ||
7672 | # Ensure that the configuration variables for a Fortran 77 compiler are | ||
7673 | # suitably defined. These variables are subsequently used by _LT_CONFIG | ||
7674 | # to write the compiler configuration to 'libtool'. | ||
7675 | m4_defun([_LT_LANG_F77_CONFIG], | ||
7676 | [AC_LANG_PUSH(Fortran 77) | ||
7677 | if test -z "$F77" || test no = "$F77"; then | ||
7678 | _lt_disable_F77=yes | ||
7679 | fi | ||
7680 | |||
7681 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
7682 | _LT_TAGVAR(allow_undefined_flag, $1)= | ||
7683 | _LT_TAGVAR(always_export_symbols, $1)=no | ||
7684 | _LT_TAGVAR(archive_expsym_cmds, $1)= | ||
7685 | _LT_TAGVAR(export_dynamic_flag_spec, $1)= | ||
7686 | _LT_TAGVAR(hardcode_direct, $1)=no | ||
7687 | _LT_TAGVAR(hardcode_direct_absolute, $1)=no | ||
7688 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= | ||
7689 | _LT_TAGVAR(hardcode_libdir_separator, $1)= | ||
7690 | _LT_TAGVAR(hardcode_minus_L, $1)=no | ||
7691 | _LT_TAGVAR(hardcode_automatic, $1)=no | ||
7692 | _LT_TAGVAR(inherit_rpath, $1)=no | ||
7693 | _LT_TAGVAR(module_cmds, $1)= | ||
7694 | _LT_TAGVAR(module_expsym_cmds, $1)= | ||
7695 | _LT_TAGVAR(link_all_deplibs, $1)=unknown | ||
7696 | _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | ||
7697 | _LT_TAGVAR(reload_flag, $1)=$reload_flag | ||
7698 | _LT_TAGVAR(reload_cmds, $1)=$reload_cmds | ||
7699 | _LT_TAGVAR(no_undefined_flag, $1)= | ||
7700 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | ||
7701 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no | ||
7702 | |||
7703 | # Source file extension for f77 test sources. | ||
7704 | ac_ext=f | ||
7705 | |||
7706 | # Object file extension for compiled f77 test sources. | ||
7707 | objext=o | ||
7708 | _LT_TAGVAR(objext, $1)=$objext | ||
7709 | |||
7710 | # No sense in running all these tests if we already determined that | ||
7711 | # the F77 compiler isn't working. Some variables (like enable_shared) | ||
7712 | # are currently assumed to apply to all compilers on this platform, | ||
7713 | # and will be corrupted by setting them based on a non-working compiler. | ||
7714 | if test yes != "$_lt_disable_F77"; then | ||
7715 | # Code to be used in simple compile tests | ||
7716 | lt_simple_compile_test_code="\ | ||
7717 | subroutine t | ||
7718 | return | ||
7719 | end | ||
7720 | " | ||
7721 | |||
7722 | # Code to be used in simple link tests | ||
7723 | lt_simple_link_test_code="\ | ||
7724 | program t | ||
7725 | end | ||
7726 | " | ||
7727 | |||
7728 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | ||
7729 | _LT_TAG_COMPILER | ||
7730 | |||
7731 | # save warnings/boilerplate of simple test code | ||
7732 | _LT_COMPILER_BOILERPLATE | ||
7733 | _LT_LINKER_BOILERPLATE | ||
7734 | |||
7735 | # Allow CC to be a program name with arguments. | ||
7736 | lt_save_CC=$CC | ||
7737 | lt_save_GCC=$GCC | ||
7738 | lt_save_CFLAGS=$CFLAGS | ||
7739 | CC=${F77-"f77"} | ||
7740 | CFLAGS=$FFLAGS | ||
7741 | compiler=$CC | ||
7742 | _LT_TAGVAR(compiler, $1)=$CC | ||
7743 | _LT_CC_BASENAME([$compiler]) | ||
7744 | GCC=$G77 | ||
7745 | if test -n "$compiler"; then | ||
7746 | AC_MSG_CHECKING([if libtool supports shared libraries]) | ||
7747 | AC_MSG_RESULT([$can_build_shared]) | ||
7748 | |||
7749 | AC_MSG_CHECKING([whether to build shared libraries]) | ||
7750 | test no = "$can_build_shared" && enable_shared=no | ||
7751 | |||
7752 | # On AIX, shared libraries and static libraries use the same namespace, and | ||
7753 | # are all built from PIC. | ||
7754 | case $host_os in | ||
7755 | aix3*) | ||
7756 | test yes = "$enable_shared" && enable_static=no | ||
7757 | if test -n "$RANLIB"; then | ||
7758 | archive_cmds="$archive_cmds~\$RANLIB \$lib" | ||
7759 | postinstall_cmds='$RANLIB $lib' | ||
7760 | fi | ||
7761 | ;; | ||
7762 | aix[[4-9]]*) | ||
7763 | if test ia64 != "$host_cpu"; then | ||
7764 | case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in | ||
7765 | yes,aix,yes) ;; # shared object as lib.so file only | ||
7766 | yes,svr4,*) ;; # shared object as lib.so archive member only | ||
7767 | yes,*) enable_static=no ;; # shared object in lib.a archive as well | ||
7768 | esac | ||
7769 | fi | ||
7770 | ;; | ||
7771 | esac | ||
7772 | AC_MSG_RESULT([$enable_shared]) | ||
7773 | |||
7774 | AC_MSG_CHECKING([whether to build static libraries]) | ||
7775 | # Make sure either enable_shared or enable_static is yes. | ||
7776 | test yes = "$enable_shared" || enable_static=yes | ||
7777 | AC_MSG_RESULT([$enable_static]) | ||
7778 | |||
7779 | _LT_TAGVAR(GCC, $1)=$G77 | ||
7780 | _LT_TAGVAR(LD, $1)=$LD | ||
7781 | |||
7782 | ## CAVEAT EMPTOR: | ||
7783 | ## There is no encapsulation within the following macros, do not change | ||
7784 | ## the running order or otherwise move them around unless you know exactly | ||
7785 | ## what you are doing... | ||
7786 | _LT_COMPILER_PIC($1) | ||
7787 | _LT_COMPILER_C_O($1) | ||
7788 | _LT_COMPILER_FILE_LOCKS($1) | ||
7789 | _LT_LINKER_SHLIBS($1) | ||
7790 | _LT_SYS_DYNAMIC_LINKER($1) | ||
7791 | _LT_LINKER_HARDCODE_LIBPATH($1) | ||
7792 | |||
7793 | _LT_CONFIG($1) | ||
7794 | fi # test -n "$compiler" | ||
7795 | |||
7796 | GCC=$lt_save_GCC | ||
7797 | CC=$lt_save_CC | ||
7798 | CFLAGS=$lt_save_CFLAGS | ||
7799 | fi # test yes != "$_lt_disable_F77" | ||
7800 | |||
7801 | AC_LANG_POP | ||
7802 | ])# _LT_LANG_F77_CONFIG | ||
7803 | |||
7804 | |||
7805 | # _LT_LANG_FC_CONFIG([TAG]) | ||
7806 | # ------------------------- | ||
7807 | # Ensure that the configuration variables for a Fortran compiler are | ||
7808 | # suitably defined. These variables are subsequently used by _LT_CONFIG | ||
7809 | # to write the compiler configuration to 'libtool'. | ||
7810 | m4_defun([_LT_LANG_FC_CONFIG], | ||
7811 | [AC_LANG_PUSH(Fortran) | ||
7812 | |||
7813 | if test -z "$FC" || test no = "$FC"; then | ||
7814 | _lt_disable_FC=yes | ||
7815 | fi | ||
7816 | |||
7817 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
7818 | _LT_TAGVAR(allow_undefined_flag, $1)= | ||
7819 | _LT_TAGVAR(always_export_symbols, $1)=no | ||
7820 | _LT_TAGVAR(archive_expsym_cmds, $1)= | ||
7821 | _LT_TAGVAR(export_dynamic_flag_spec, $1)= | ||
7822 | _LT_TAGVAR(hardcode_direct, $1)=no | ||
7823 | _LT_TAGVAR(hardcode_direct_absolute, $1)=no | ||
7824 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= | ||
7825 | _LT_TAGVAR(hardcode_libdir_separator, $1)= | ||
7826 | _LT_TAGVAR(hardcode_minus_L, $1)=no | ||
7827 | _LT_TAGVAR(hardcode_automatic, $1)=no | ||
7828 | _LT_TAGVAR(inherit_rpath, $1)=no | ||
7829 | _LT_TAGVAR(module_cmds, $1)= | ||
7830 | _LT_TAGVAR(module_expsym_cmds, $1)= | ||
7831 | _LT_TAGVAR(link_all_deplibs, $1)=unknown | ||
7832 | _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | ||
7833 | _LT_TAGVAR(reload_flag, $1)=$reload_flag | ||
7834 | _LT_TAGVAR(reload_cmds, $1)=$reload_cmds | ||
7835 | _LT_TAGVAR(no_undefined_flag, $1)= | ||
7836 | _LT_TAGVAR(whole_archive_flag_spec, $1)= | ||
7837 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no | ||
7838 | |||
7839 | # Source file extension for fc test sources. | ||
7840 | ac_ext=${ac_fc_srcext-f} | ||
7841 | |||
7842 | # Object file extension for compiled fc test sources. | ||
7843 | objext=o | ||
7844 | _LT_TAGVAR(objext, $1)=$objext | ||
7845 | |||
7846 | # No sense in running all these tests if we already determined that | ||
7847 | # the FC compiler isn't working. Some variables (like enable_shared) | ||
7848 | # are currently assumed to apply to all compilers on this platform, | ||
7849 | # and will be corrupted by setting them based on a non-working compiler. | ||
7850 | if test yes != "$_lt_disable_FC"; then | ||
7851 | # Code to be used in simple compile tests | ||
7852 | lt_simple_compile_test_code="\ | ||
7853 | subroutine t | ||
7854 | return | ||
7855 | end | ||
7856 | " | ||
7857 | |||
7858 | # Code to be used in simple link tests | ||
7859 | lt_simple_link_test_code="\ | ||
7860 | program t | ||
7861 | end | ||
7862 | " | ||
7863 | |||
7864 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | ||
7865 | _LT_TAG_COMPILER | ||
7866 | |||
7867 | # save warnings/boilerplate of simple test code | ||
7868 | _LT_COMPILER_BOILERPLATE | ||
7869 | _LT_LINKER_BOILERPLATE | ||
7870 | |||
7871 | # Allow CC to be a program name with arguments. | ||
7872 | lt_save_CC=$CC | ||
7873 | lt_save_GCC=$GCC | ||
7874 | lt_save_CFLAGS=$CFLAGS | ||
7875 | CC=${FC-"f95"} | ||
7876 | CFLAGS=$FCFLAGS | ||
7877 | compiler=$CC | ||
7878 | GCC=$ac_cv_fc_compiler_gnu | ||
7879 | |||
7880 | _LT_TAGVAR(compiler, $1)=$CC | ||
7881 | _LT_CC_BASENAME([$compiler]) | ||
7882 | |||
7883 | if test -n "$compiler"; then | ||
7884 | AC_MSG_CHECKING([if libtool supports shared libraries]) | ||
7885 | AC_MSG_RESULT([$can_build_shared]) | ||
7886 | |||
7887 | AC_MSG_CHECKING([whether to build shared libraries]) | ||
7888 | test no = "$can_build_shared" && enable_shared=no | ||
7889 | |||
7890 | # On AIX, shared libraries and static libraries use the same namespace, and | ||
7891 | # are all built from PIC. | ||
7892 | case $host_os in | ||
7893 | aix3*) | ||
7894 | test yes = "$enable_shared" && enable_static=no | ||
7895 | if test -n "$RANLIB"; then | ||
7896 | archive_cmds="$archive_cmds~\$RANLIB \$lib" | ||
7897 | postinstall_cmds='$RANLIB $lib' | ||
7898 | fi | ||
7899 | ;; | ||
7900 | aix[[4-9]]*) | ||
7901 | if test ia64 != "$host_cpu"; then | ||
7902 | case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in | ||
7903 | yes,aix,yes) ;; # shared object as lib.so file only | ||
7904 | yes,svr4,*) ;; # shared object as lib.so archive member only | ||
7905 | yes,*) enable_static=no ;; # shared object in lib.a archive as well | ||
7906 | esac | ||
7907 | fi | ||
7908 | ;; | ||
7909 | esac | ||
7910 | AC_MSG_RESULT([$enable_shared]) | ||
7911 | |||
7912 | AC_MSG_CHECKING([whether to build static libraries]) | ||
7913 | # Make sure either enable_shared or enable_static is yes. | ||
7914 | test yes = "$enable_shared" || enable_static=yes | ||
7915 | AC_MSG_RESULT([$enable_static]) | ||
7916 | |||
7917 | _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu | ||
7918 | _LT_TAGVAR(LD, $1)=$LD | ||
7919 | |||
7920 | ## CAVEAT EMPTOR: | ||
7921 | ## There is no encapsulation within the following macros, do not change | ||
7922 | ## the running order or otherwise move them around unless you know exactly | ||
7923 | ## what you are doing... | ||
7924 | _LT_SYS_HIDDEN_LIBDEPS($1) | ||
7925 | _LT_COMPILER_PIC($1) | ||
7926 | _LT_COMPILER_C_O($1) | ||
7927 | _LT_COMPILER_FILE_LOCKS($1) | ||
7928 | _LT_LINKER_SHLIBS($1) | ||
7929 | _LT_SYS_DYNAMIC_LINKER($1) | ||
7930 | _LT_LINKER_HARDCODE_LIBPATH($1) | ||
7931 | |||
7932 | _LT_CONFIG($1) | ||
7933 | fi # test -n "$compiler" | ||
7934 | |||
7935 | GCC=$lt_save_GCC | ||
7936 | CC=$lt_save_CC | ||
7937 | CFLAGS=$lt_save_CFLAGS | ||
7938 | fi # test yes != "$_lt_disable_FC" | ||
7939 | |||
7940 | AC_LANG_POP | ||
7941 | ])# _LT_LANG_FC_CONFIG | ||
7942 | |||
7943 | |||
7944 | # _LT_LANG_GCJ_CONFIG([TAG]) | ||
7945 | # -------------------------- | ||
7946 | # Ensure that the configuration variables for the GNU Java Compiler compiler | ||
7947 | # are suitably defined. These variables are subsequently used by _LT_CONFIG | ||
7948 | # to write the compiler configuration to 'libtool'. | ||
7949 | m4_defun([_LT_LANG_GCJ_CONFIG], | ||
7950 | [AC_REQUIRE([LT_PROG_GCJ])dnl | ||
7951 | AC_LANG_SAVE | ||
7952 | |||
7953 | # Source file extension for Java test sources. | ||
7954 | ac_ext=java | ||
7955 | |||
7956 | # Object file extension for compiled Java test sources. | ||
7957 | objext=o | ||
7958 | _LT_TAGVAR(objext, $1)=$objext | ||
7959 | |||
7960 | # Code to be used in simple compile tests | ||
7961 | lt_simple_compile_test_code="class foo {}" | ||
7962 | |||
7963 | # Code to be used in simple link tests | ||
7964 | lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' | ||
7965 | |||
7966 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | ||
7967 | _LT_TAG_COMPILER | ||
7968 | |||
7969 | # save warnings/boilerplate of simple test code | ||
7970 | _LT_COMPILER_BOILERPLATE | ||
7971 | _LT_LINKER_BOILERPLATE | ||
7972 | |||
7973 | # Allow CC to be a program name with arguments. | ||
7974 | lt_save_CC=$CC | ||
7975 | lt_save_CFLAGS=$CFLAGS | ||
7976 | lt_save_GCC=$GCC | ||
7977 | GCC=yes | ||
7978 | CC=${GCJ-"gcj"} | ||
7979 | CFLAGS=$GCJFLAGS | ||
7980 | compiler=$CC | ||
7981 | _LT_TAGVAR(compiler, $1)=$CC | ||
7982 | _LT_TAGVAR(LD, $1)=$LD | ||
7983 | _LT_CC_BASENAME([$compiler]) | ||
7984 | |||
7985 | # GCJ did not exist at the time GCC didn't implicitly link libc in. | ||
7986 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
7987 | |||
7988 | _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | ||
7989 | _LT_TAGVAR(reload_flag, $1)=$reload_flag | ||
7990 | _LT_TAGVAR(reload_cmds, $1)=$reload_cmds | ||
7991 | |||
7992 | ## CAVEAT EMPTOR: | ||
7993 | ## There is no encapsulation within the following macros, do not change | ||
7994 | ## the running order or otherwise move them around unless you know exactly | ||
7995 | ## what you are doing... | ||
7996 | if test -n "$compiler"; then | ||
7997 | _LT_COMPILER_NO_RTTI($1) | ||
7998 | _LT_COMPILER_PIC($1) | ||
7999 | _LT_COMPILER_C_O($1) | ||
8000 | _LT_COMPILER_FILE_LOCKS($1) | ||
8001 | _LT_LINKER_SHLIBS($1) | ||
8002 | _LT_LINKER_HARDCODE_LIBPATH($1) | ||
8003 | |||
8004 | _LT_CONFIG($1) | ||
8005 | fi | ||
8006 | |||
8007 | AC_LANG_RESTORE | ||
8008 | |||
8009 | GCC=$lt_save_GCC | ||
8010 | CC=$lt_save_CC | ||
8011 | CFLAGS=$lt_save_CFLAGS | ||
8012 | ])# _LT_LANG_GCJ_CONFIG | ||
8013 | |||
8014 | |||
8015 | # _LT_LANG_GO_CONFIG([TAG]) | ||
8016 | # -------------------------- | ||
8017 | # Ensure that the configuration variables for the GNU Go compiler | ||
8018 | # are suitably defined. These variables are subsequently used by _LT_CONFIG | ||
8019 | # to write the compiler configuration to 'libtool'. | ||
8020 | m4_defun([_LT_LANG_GO_CONFIG], | ||
8021 | [AC_REQUIRE([LT_PROG_GO])dnl | ||
8022 | AC_LANG_SAVE | ||
8023 | |||
8024 | # Source file extension for Go test sources. | ||
8025 | ac_ext=go | ||
8026 | |||
8027 | # Object file extension for compiled Go test sources. | ||
8028 | objext=o | ||
8029 | _LT_TAGVAR(objext, $1)=$objext | ||
8030 | |||
8031 | # Code to be used in simple compile tests | ||
8032 | lt_simple_compile_test_code="package main; func main() { }" | ||
8033 | |||
8034 | # Code to be used in simple link tests | ||
8035 | lt_simple_link_test_code='package main; func main() { }' | ||
8036 | |||
8037 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | ||
8038 | _LT_TAG_COMPILER | ||
8039 | |||
8040 | # save warnings/boilerplate of simple test code | ||
8041 | _LT_COMPILER_BOILERPLATE | ||
8042 | _LT_LINKER_BOILERPLATE | ||
8043 | |||
8044 | # Allow CC to be a program name with arguments. | ||
8045 | lt_save_CC=$CC | ||
8046 | lt_save_CFLAGS=$CFLAGS | ||
8047 | lt_save_GCC=$GCC | ||
8048 | GCC=yes | ||
8049 | CC=${GOC-"gccgo"} | ||
8050 | CFLAGS=$GOFLAGS | ||
8051 | compiler=$CC | ||
8052 | _LT_TAGVAR(compiler, $1)=$CC | ||
8053 | _LT_TAGVAR(LD, $1)=$LD | ||
8054 | _LT_CC_BASENAME([$compiler]) | ||
8055 | |||
8056 | # Go did not exist at the time GCC didn't implicitly link libc in. | ||
8057 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no | ||
8058 | |||
8059 | _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | ||
8060 | _LT_TAGVAR(reload_flag, $1)=$reload_flag | ||
8061 | _LT_TAGVAR(reload_cmds, $1)=$reload_cmds | ||
8062 | |||
8063 | ## CAVEAT EMPTOR: | ||
8064 | ## There is no encapsulation within the following macros, do not change | ||
8065 | ## the running order or otherwise move them around unless you know exactly | ||
8066 | ## what you are doing... | ||
8067 | if test -n "$compiler"; then | ||
8068 | _LT_COMPILER_NO_RTTI($1) | ||
8069 | _LT_COMPILER_PIC($1) | ||
8070 | _LT_COMPILER_C_O($1) | ||
8071 | _LT_COMPILER_FILE_LOCKS($1) | ||
8072 | _LT_LINKER_SHLIBS($1) | ||
8073 | _LT_LINKER_HARDCODE_LIBPATH($1) | ||
8074 | |||
8075 | _LT_CONFIG($1) | ||
8076 | fi | ||
8077 | |||
8078 | AC_LANG_RESTORE | ||
8079 | |||
8080 | GCC=$lt_save_GCC | ||
8081 | CC=$lt_save_CC | ||
8082 | CFLAGS=$lt_save_CFLAGS | ||
8083 | ])# _LT_LANG_GO_CONFIG | ||
8084 | |||
8085 | |||
8086 | # _LT_LANG_RC_CONFIG([TAG]) | ||
8087 | # ------------------------- | ||
8088 | # Ensure that the configuration variables for the Windows resource compiler | ||
8089 | # are suitably defined. These variables are subsequently used by _LT_CONFIG | ||
8090 | # to write the compiler configuration to 'libtool'. | ||
8091 | m4_defun([_LT_LANG_RC_CONFIG], | ||
8092 | [AC_REQUIRE([LT_PROG_RC])dnl | ||
8093 | AC_LANG_SAVE | ||
8094 | |||
8095 | # Source file extension for RC test sources. | ||
8096 | ac_ext=rc | ||
8097 | |||
8098 | # Object file extension for compiled RC test sources. | ||
8099 | objext=o | ||
8100 | _LT_TAGVAR(objext, $1)=$objext | ||
8101 | |||
8102 | # Code to be used in simple compile tests | ||
8103 | lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' | ||
8104 | |||
8105 | # Code to be used in simple link tests | ||
8106 | lt_simple_link_test_code=$lt_simple_compile_test_code | ||
8107 | |||
8108 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | ||
8109 | _LT_TAG_COMPILER | ||
8110 | |||
8111 | # save warnings/boilerplate of simple test code | ||
8112 | _LT_COMPILER_BOILERPLATE | ||
8113 | _LT_LINKER_BOILERPLATE | ||
8114 | |||
8115 | # Allow CC to be a program name with arguments. | ||
8116 | lt_save_CC=$CC | ||
8117 | lt_save_CFLAGS=$CFLAGS | ||
8118 | lt_save_GCC=$GCC | ||
8119 | GCC= | ||
8120 | CC=${RC-"windres"} | ||
8121 | CFLAGS= | ||
8122 | compiler=$CC | ||
8123 | _LT_TAGVAR(compiler, $1)=$CC | ||
8124 | _LT_CC_BASENAME([$compiler]) | ||
8125 | _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes | ||
8126 | |||
8127 | if test -n "$compiler"; then | ||
8128 | : | ||
8129 | _LT_CONFIG($1) | ||
8130 | fi | ||
8131 | |||
8132 | GCC=$lt_save_GCC | ||
8133 | AC_LANG_RESTORE | ||
8134 | CC=$lt_save_CC | ||
8135 | CFLAGS=$lt_save_CFLAGS | ||
8136 | ])# _LT_LANG_RC_CONFIG | ||
8137 | |||
8138 | |||
8139 | # LT_PROG_GCJ | ||
8140 | # ----------- | ||
8141 | AC_DEFUN([LT_PROG_GCJ], | ||
8142 | [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], | ||
8143 | [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], | ||
8144 | [AC_CHECK_TOOL(GCJ, gcj,) | ||
8145 | test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" | ||
8146 | AC_SUBST(GCJFLAGS)])])[]dnl | ||
8147 | ]) | ||
8148 | |||
8149 | # Old name: | ||
8150 | AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) | ||
8151 | dnl aclocal-1.4 backwards compatibility: | ||
8152 | dnl AC_DEFUN([LT_AC_PROG_GCJ], []) | ||
8153 | |||
8154 | |||
8155 | # LT_PROG_GO | ||
8156 | # ---------- | ||
8157 | AC_DEFUN([LT_PROG_GO], | ||
8158 | [AC_CHECK_TOOL(GOC, gccgo,) | ||
8159 | ]) | ||
8160 | |||
8161 | |||
8162 | # LT_PROG_RC | ||
8163 | # ---------- | ||
8164 | AC_DEFUN([LT_PROG_RC], | ||
8165 | [AC_CHECK_TOOL(RC, windres,) | ||
8166 | ]) | ||
8167 | |||
8168 | # Old name: | ||
8169 | AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) | ||
8170 | dnl aclocal-1.4 backwards compatibility: | ||
8171 | dnl AC_DEFUN([LT_AC_PROG_RC], []) | ||
8172 | |||
8173 | |||
8174 | # _LT_DECL_EGREP | ||
8175 | # -------------- | ||
8176 | # If we don't have a new enough Autoconf to choose the best grep | ||
8177 | # available, choose the one first in the user's PATH. | ||
8178 | m4_defun([_LT_DECL_EGREP], | ||
8179 | [AC_REQUIRE([AC_PROG_EGREP])dnl | ||
8180 | AC_REQUIRE([AC_PROG_FGREP])dnl | ||
8181 | test -z "$GREP" && GREP=grep | ||
8182 | _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) | ||
8183 | _LT_DECL([], [EGREP], [1], [An ERE matcher]) | ||
8184 | _LT_DECL([], [FGREP], [1], [A literal string matcher]) | ||
8185 | dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too | ||
8186 | AC_SUBST([GREP]) | ||
8187 | ]) | ||
8188 | |||
8189 | |||
8190 | # _LT_DECL_OBJDUMP | ||
8191 | # -------------- | ||
8192 | # If we don't have a new enough Autoconf to choose the best objdump | ||
8193 | # available, choose the one first in the user's PATH. | ||
8194 | m4_defun([_LT_DECL_OBJDUMP], | ||
8195 | [AC_CHECK_TOOL(OBJDUMP, objdump, false) | ||
8196 | test -z "$OBJDUMP" && OBJDUMP=objdump | ||
8197 | _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) | ||
8198 | AC_SUBST([OBJDUMP]) | ||
8199 | ]) | ||
8200 | |||
8201 | # _LT_DECL_DLLTOOL | ||
8202 | # ---------------- | ||
8203 | # Ensure DLLTOOL variable is set. | ||
8204 | m4_defun([_LT_DECL_DLLTOOL], | ||
8205 | [AC_CHECK_TOOL(DLLTOOL, dlltool, false) | ||
8206 | test -z "$DLLTOOL" && DLLTOOL=dlltool | ||
8207 | _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) | ||
8208 | AC_SUBST([DLLTOOL]) | ||
8209 | ]) | ||
8210 | |||
8211 | # _LT_DECL_SED | ||
8212 | # ------------ | ||
8213 | # Check for a fully-functional sed program, that truncates | ||
8214 | # as few characters as possible. Prefer GNU sed if found. | ||
8215 | m4_defun([_LT_DECL_SED], | ||
8216 | [AC_PROG_SED | ||
8217 | test -z "$SED" && SED=sed | ||
8218 | Xsed="$SED -e 1s/^X//" | ||
8219 | _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) | ||
8220 | _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], | ||
8221 | [Sed that helps us avoid accidentally triggering echo(1) options like -n]) | ||
8222 | ])# _LT_DECL_SED | ||
8223 | |||
8224 | m4_ifndef([AC_PROG_SED], [ | ||
8225 | ############################################################ | ||
8226 | # NOTE: This macro has been submitted for inclusion into # | ||
8227 | # GNU Autoconf as AC_PROG_SED. When it is available in # | ||
8228 | # a released version of Autoconf we should remove this # | ||
8229 | # macro and use it instead. # | ||
8230 | ############################################################ | ||
8231 | |||
8232 | m4_defun([AC_PROG_SED], | ||
8233 | [AC_MSG_CHECKING([for a sed that does not truncate output]) | ||
8234 | AC_CACHE_VAL(lt_cv_path_SED, | ||
8235 | [# Loop through the user's path and test for sed and gsed. | ||
8236 | # Then use that list of sed's as ones to test for truncation. | ||
8237 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
8238 | for as_dir in $PATH | ||
8239 | do | ||
8240 | IFS=$as_save_IFS | ||
8241 | test -z "$as_dir" && as_dir=. | ||
8242 | for lt_ac_prog in sed gsed; do | ||
8243 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
8244 | if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then | ||
8245 | lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" | ||
8246 | fi | ||
8247 | done | ||
8248 | done | ||
8249 | done | ||
8250 | IFS=$as_save_IFS | ||
8251 | lt_ac_max=0 | ||
8252 | lt_ac_count=0 | ||
8253 | # Add /usr/xpg4/bin/sed as it is typically found on Solaris | ||
8254 | # along with /bin/sed that truncates output. | ||
8255 | for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do | ||
8256 | test ! -f "$lt_ac_sed" && continue | ||
8257 | cat /dev/null > conftest.in | ||
8258 | lt_ac_count=0 | ||
8259 | echo $ECHO_N "0123456789$ECHO_C" >conftest.in | ||
8260 | # Check for GNU sed and select it if it is found. | ||
8261 | if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then | ||
8262 | lt_cv_path_SED=$lt_ac_sed | ||
8263 | break | ||
8264 | fi | ||
8265 | while true; do | ||
8266 | cat conftest.in conftest.in >conftest.tmp | ||
8267 | mv conftest.tmp conftest.in | ||
8268 | cp conftest.in conftest.nl | ||
8269 | echo >>conftest.nl | ||
8270 | $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break | ||
8271 | cmp -s conftest.out conftest.nl || break | ||
8272 | # 10000 chars as input seems more than enough | ||
8273 | test 10 -lt "$lt_ac_count" && break | ||
8274 | lt_ac_count=`expr $lt_ac_count + 1` | ||
8275 | if test "$lt_ac_count" -gt "$lt_ac_max"; then | ||
8276 | lt_ac_max=$lt_ac_count | ||
8277 | lt_cv_path_SED=$lt_ac_sed | ||
8278 | fi | ||
8279 | done | ||
8280 | done | ||
8281 | ]) | ||
8282 | SED=$lt_cv_path_SED | ||
8283 | AC_SUBST([SED]) | ||
8284 | AC_MSG_RESULT([$SED]) | ||
8285 | ])#AC_PROG_SED | ||
8286 | ])#m4_ifndef | ||
8287 | |||
8288 | # Old name: | ||
8289 | AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) | ||
8290 | dnl aclocal-1.4 backwards compatibility: | ||
8291 | dnl AC_DEFUN([LT_AC_PROG_SED], []) | ||
8292 | |||
8293 | |||
8294 | # _LT_CHECK_SHELL_FEATURES | ||
8295 | # ------------------------ | ||
8296 | # Find out whether the shell is Bourne or XSI compatible, | ||
8297 | # or has some other useful features. | ||
8298 | m4_defun([_LT_CHECK_SHELL_FEATURES], | ||
8299 | [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then | ||
8300 | lt_unset=unset | ||
8301 | else | ||
8302 | lt_unset=false | ||
8303 | fi | ||
8304 | _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl | ||
8305 | |||
8306 | # test EBCDIC or ASCII | ||
8307 | case `echo X|tr X '\101'` in | ||
8308 | A) # ASCII based system | ||
8309 | # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr | ||
8310 | lt_SP2NL='tr \040 \012' | ||
8311 | lt_NL2SP='tr \015\012 \040\040' | ||
8312 | ;; | ||
8313 | *) # EBCDIC based system | ||
8314 | lt_SP2NL='tr \100 \n' | ||
8315 | lt_NL2SP='tr \r\n \100\100' | ||
8316 | ;; | ||
8317 | esac | ||
8318 | _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl | ||
8319 | _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl | ||
8320 | ])# _LT_CHECK_SHELL_FEATURES | ||
8321 | |||
8322 | |||
8323 | # _LT_PATH_CONVERSION_FUNCTIONS | ||
8324 | # ----------------------------- | ||
8325 | # Determine what file name conversion functions should be used by | ||
8326 | # func_to_host_file (and, implicitly, by func_to_host_path). These are needed | ||
8327 | # for certain cross-compile configurations and native mingw. | ||
8328 | m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], | ||
8329 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
8330 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl | ||
8331 | AC_MSG_CHECKING([how to convert $build file names to $host format]) | ||
8332 | AC_CACHE_VAL(lt_cv_to_host_file_cmd, | ||
8333 | [case $host in | ||
8334 | *-*-mingw* ) | ||
8335 | case $build in | ||
8336 | *-*-mingw* ) # actually msys | ||
8337 | lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 | ||
8338 | ;; | ||
8339 | *-*-cygwin* ) | ||
8340 | lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 | ||
8341 | ;; | ||
8342 | * ) # otherwise, assume *nix | ||
8343 | lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 | ||
8344 | ;; | ||
8345 | esac | ||
8346 | ;; | ||
8347 | *-*-cygwin* ) | ||
8348 | case $build in | ||
8349 | *-*-mingw* ) # actually msys | ||
8350 | lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin | ||
8351 | ;; | ||
8352 | *-*-cygwin* ) | ||
8353 | lt_cv_to_host_file_cmd=func_convert_file_noop | ||
8354 | ;; | ||
8355 | * ) # otherwise, assume *nix | ||
8356 | lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin | ||
8357 | ;; | ||
8358 | esac | ||
8359 | ;; | ||
8360 | * ) # unhandled hosts (and "normal" native builds) | ||
8361 | lt_cv_to_host_file_cmd=func_convert_file_noop | ||
8362 | ;; | ||
8363 | esac | ||
8364 | ]) | ||
8365 | to_host_file_cmd=$lt_cv_to_host_file_cmd | ||
8366 | AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) | ||
8367 | _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], | ||
8368 | [0], [convert $build file names to $host format])dnl | ||
8369 | |||
8370 | AC_MSG_CHECKING([how to convert $build file names to toolchain format]) | ||
8371 | AC_CACHE_VAL(lt_cv_to_tool_file_cmd, | ||
8372 | [#assume ordinary cross tools, or native build. | ||
8373 | lt_cv_to_tool_file_cmd=func_convert_file_noop | ||
8374 | case $host in | ||
8375 | *-*-mingw* ) | ||
8376 | case $build in | ||
8377 | *-*-mingw* ) # actually msys | ||
8378 | lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 | ||
8379 | ;; | ||
8380 | esac | ||
8381 | ;; | ||
8382 | esac | ||
8383 | ]) | ||
8384 | to_tool_file_cmd=$lt_cv_to_tool_file_cmd | ||
8385 | AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) | ||
8386 | _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], | ||
8387 | [0], [convert $build files to toolchain format])dnl | ||
8388 | ])# _LT_PATH_CONVERSION_FUNCTIONS | ||
diff --git a/m4/lock.m4 b/m4/lock.m4 new file mode 100644 index 00000000..9da8465e --- /dev/null +++ b/m4/lock.m4 | |||
@@ -0,0 +1,37 @@ | |||
1 | # lock.m4 serial 10 (gettext-0.18) | ||
2 | dnl Copyright (C) 2005-2010 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | dnl From Bruno Haible. | ||
8 | |||
9 | AC_DEFUN([gl_LOCK], | ||
10 | [ | ||
11 | AC_REQUIRE([gl_THREADLIB]) | ||
12 | if test "$gl_threads_api" = posix; then | ||
13 | # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the | ||
14 | # pthread_rwlock_* functions. | ||
15 | AC_CHECK_TYPE([pthread_rwlock_t], | ||
16 | [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1], | ||
17 | [Define if the POSIX multithreading library has read/write locks.])], | ||
18 | [], | ||
19 | [#include <pthread.h>]) | ||
20 | # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. | ||
21 | AC_TRY_COMPILE([#include <pthread.h>], | ||
22 | [#if __FreeBSD__ == 4 | ||
23 | error "No, in FreeBSD 4.0 recursive mutexes actually don't work." | ||
24 | #else | ||
25 | int x = (int)PTHREAD_MUTEX_RECURSIVE; | ||
26 | return !x; | ||
27 | #endif], | ||
28 | [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1], | ||
29 | [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])]) | ||
30 | fi | ||
31 | gl_PREREQ_LOCK | ||
32 | ]) | ||
33 | |||
34 | # Prerequisites of lib/lock.c. | ||
35 | AC_DEFUN([gl_PREREQ_LOCK], [ | ||
36 | AC_REQUIRE([AC_C_INLINE]) | ||
37 | ]) | ||
diff --git a/m4/longlong.m4 b/m4/longlong.m4 new file mode 100644 index 00000000..cca3c1a9 --- /dev/null +++ b/m4/longlong.m4 | |||
@@ -0,0 +1,106 @@ | |||
1 | # longlong.m4 serial 14 | ||
2 | dnl Copyright (C) 1999-2007, 2009-2010 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | dnl From Paul Eggert. | ||
8 | |||
9 | # Define HAVE_LONG_LONG_INT if 'long long int' works. | ||
10 | # This fixes a bug in Autoconf 2.61, but can be removed once we | ||
11 | # assume 2.62 everywhere. | ||
12 | |||
13 | # Note: If the type 'long long int' exists but is only 32 bits large | ||
14 | # (as on some very old compilers), HAVE_LONG_LONG_INT will not be | ||
15 | # defined. In this case you can treat 'long long int' like 'long int'. | ||
16 | |||
17 | AC_DEFUN([AC_TYPE_LONG_LONG_INT], | ||
18 | [ | ||
19 | AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], | ||
20 | [AC_LINK_IFELSE( | ||
21 | [_AC_TYPE_LONG_LONG_SNIPPET], | ||
22 | [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. | ||
23 | dnl If cross compiling, assume the bug isn't important, since | ||
24 | dnl nobody cross compiles for this platform as far as we know. | ||
25 | AC_RUN_IFELSE( | ||
26 | [AC_LANG_PROGRAM( | ||
27 | [[@%:@include <limits.h> | ||
28 | @%:@ifndef LLONG_MAX | ||
29 | @%:@ define HALF \ | ||
30 | (1LL << (sizeof (long long int) * CHAR_BIT - 2)) | ||
31 | @%:@ define LLONG_MAX (HALF - 1 + HALF) | ||
32 | @%:@endif]], | ||
33 | [[long long int n = 1; | ||
34 | int i; | ||
35 | for (i = 0; ; i++) | ||
36 | { | ||
37 | long long int m = n << i; | ||
38 | if (m >> i != n) | ||
39 | return 1; | ||
40 | if (LLONG_MAX / 2 < m) | ||
41 | break; | ||
42 | } | ||
43 | return 0;]])], | ||
44 | [ac_cv_type_long_long_int=yes], | ||
45 | [ac_cv_type_long_long_int=no], | ||
46 | [ac_cv_type_long_long_int=yes])], | ||
47 | [ac_cv_type_long_long_int=no])]) | ||
48 | if test $ac_cv_type_long_long_int = yes; then | ||
49 | AC_DEFINE([HAVE_LONG_LONG_INT], [1], | ||
50 | [Define to 1 if the system has the type `long long int'.]) | ||
51 | fi | ||
52 | ]) | ||
53 | |||
54 | # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. | ||
55 | # This fixes a bug in Autoconf 2.61, but can be removed once we | ||
56 | # assume 2.62 everywhere. | ||
57 | |||
58 | # Note: If the type 'unsigned long long int' exists but is only 32 bits | ||
59 | # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT | ||
60 | # will not be defined. In this case you can treat 'unsigned long long int' | ||
61 | # like 'unsigned long int'. | ||
62 | |||
63 | AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], | ||
64 | [ | ||
65 | AC_CACHE_CHECK([for unsigned long long int], | ||
66 | [ac_cv_type_unsigned_long_long_int], | ||
67 | [AC_LINK_IFELSE( | ||
68 | [_AC_TYPE_LONG_LONG_SNIPPET], | ||
69 | [ac_cv_type_unsigned_long_long_int=yes], | ||
70 | [ac_cv_type_unsigned_long_long_int=no])]) | ||
71 | if test $ac_cv_type_unsigned_long_long_int = yes; then | ||
72 | AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], | ||
73 | [Define to 1 if the system has the type `unsigned long long int'.]) | ||
74 | fi | ||
75 | ]) | ||
76 | |||
77 | # Expands to a C program that can be used to test for simultaneous support | ||
78 | # of 'long long' and 'unsigned long long'. We don't want to say that | ||
79 | # 'long long' is available if 'unsigned long long' is not, or vice versa, | ||
80 | # because too many programs rely on the symmetry between signed and unsigned | ||
81 | # integer types (excluding 'bool'). | ||
82 | AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], | ||
83 | [ | ||
84 | AC_LANG_PROGRAM( | ||
85 | [[/* For now, do not test the preprocessor; as of 2007 there are too many | ||
86 | implementations with broken preprocessors. Perhaps this can | ||
87 | be revisited in 2012. In the meantime, code should not expect | ||
88 | #if to work with literals wider than 32 bits. */ | ||
89 | /* Test literals. */ | ||
90 | long long int ll = 9223372036854775807ll; | ||
91 | long long int nll = -9223372036854775807LL; | ||
92 | unsigned long long int ull = 18446744073709551615ULL; | ||
93 | /* Test constant expressions. */ | ||
94 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | ||
95 | ? 1 : -1)]; | ||
96 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 | ||
97 | ? 1 : -1)]; | ||
98 | int i = 63;]], | ||
99 | [[/* Test availability of runtime routines for shift and division. */ | ||
100 | long long int llmax = 9223372036854775807ll; | ||
101 | unsigned long long int ullmax = 18446744073709551615ull; | ||
102 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | ||
103 | | (llmax / ll) | (llmax % ll) | ||
104 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | ||
105 | | (ullmax / ull) | (ullmax % ull));]]) | ||
106 | ]) | ||
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4 new file mode 100644 index 00000000..94b08297 --- /dev/null +++ b/m4/ltoptions.m4 | |||
@@ -0,0 +1,437 @@ | |||
1 | # Helper functions for option handling. -*- Autoconf -*- | ||
2 | # | ||
3 | # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software | ||
4 | # Foundation, Inc. | ||
5 | # Written by Gary V. Vaughan, 2004 | ||
6 | # | ||
7 | # This file is free software; the Free Software Foundation gives | ||
8 | # unlimited permission to copy and/or distribute it, with or without | ||
9 | # modifications, as long as this notice is preserved. | ||
10 | |||
11 | # serial 8 ltoptions.m4 | ||
12 | |||
13 | # This is to help aclocal find these macros, as it can't see m4_define. | ||
14 | AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) | ||
15 | |||
16 | |||
17 | # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) | ||
18 | # ------------------------------------------ | ||
19 | m4_define([_LT_MANGLE_OPTION], | ||
20 | [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) | ||
21 | |||
22 | |||
23 | # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) | ||
24 | # --------------------------------------- | ||
25 | # Set option OPTION-NAME for macro MACRO-NAME, and if there is a | ||
26 | # matching handler defined, dispatch to it. Other OPTION-NAMEs are | ||
27 | # saved as a flag. | ||
28 | m4_define([_LT_SET_OPTION], | ||
29 | [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl | ||
30 | m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), | ||
31 | _LT_MANGLE_DEFUN([$1], [$2]), | ||
32 | [m4_warning([Unknown $1 option '$2'])])[]dnl | ||
33 | ]) | ||
34 | |||
35 | |||
36 | # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) | ||
37 | # ------------------------------------------------------------ | ||
38 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. | ||
39 | m4_define([_LT_IF_OPTION], | ||
40 | [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) | ||
41 | |||
42 | |||
43 | # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) | ||
44 | # ------------------------------------------------------- | ||
45 | # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME | ||
46 | # are set. | ||
47 | m4_define([_LT_UNLESS_OPTIONS], | ||
48 | [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), | ||
49 | [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), | ||
50 | [m4_define([$0_found])])])[]dnl | ||
51 | m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 | ||
52 | ])[]dnl | ||
53 | ]) | ||
54 | |||
55 | |||
56 | # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) | ||
57 | # ---------------------------------------- | ||
58 | # OPTION-LIST is a space-separated list of Libtool options associated | ||
59 | # with MACRO-NAME. If any OPTION has a matching handler declared with | ||
60 | # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about | ||
61 | # the unknown option and exit. | ||
62 | m4_defun([_LT_SET_OPTIONS], | ||
63 | [# Set options | ||
64 | m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), | ||
65 | [_LT_SET_OPTION([$1], _LT_Option)]) | ||
66 | |||
67 | m4_if([$1],[LT_INIT],[ | ||
68 | dnl | ||
69 | dnl Simply set some default values (i.e off) if boolean options were not | ||
70 | dnl specified: | ||
71 | _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no | ||
72 | ]) | ||
73 | _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no | ||
74 | ]) | ||
75 | dnl | ||
76 | dnl If no reference was made to various pairs of opposing options, then | ||
77 | dnl we run the default mode handler for the pair. For example, if neither | ||
78 | dnl 'shared' nor 'disable-shared' was passed, we enable building of shared | ||
79 | dnl archives by default: | ||
80 | _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) | ||
81 | _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) | ||
82 | _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) | ||
83 | _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], | ||
84 | [_LT_ENABLE_FAST_INSTALL]) | ||
85 | _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], | ||
86 | [_LT_WITH_AIX_SONAME([aix])]) | ||
87 | ]) | ||
88 | ])# _LT_SET_OPTIONS | ||
89 | |||
90 | |||
91 | ## --------------------------------- ## | ||
92 | ## Macros to handle LT_INIT options. ## | ||
93 | ## --------------------------------- ## | ||
94 | |||
95 | # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) | ||
96 | # ----------------------------------------- | ||
97 | m4_define([_LT_MANGLE_DEFUN], | ||
98 | [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) | ||
99 | |||
100 | |||
101 | # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) | ||
102 | # ----------------------------------------------- | ||
103 | m4_define([LT_OPTION_DEFINE], | ||
104 | [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl | ||
105 | ])# LT_OPTION_DEFINE | ||
106 | |||
107 | |||
108 | # dlopen | ||
109 | # ------ | ||
110 | LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes | ||
111 | ]) | ||
112 | |||
113 | AU_DEFUN([AC_LIBTOOL_DLOPEN], | ||
114 | [_LT_SET_OPTION([LT_INIT], [dlopen]) | ||
115 | AC_DIAGNOSE([obsolete], | ||
116 | [$0: Remove this warning and the call to _LT_SET_OPTION when you | ||
117 | put the 'dlopen' option into LT_INIT's first parameter.]) | ||
118 | ]) | ||
119 | |||
120 | dnl aclocal-1.4 backwards compatibility: | ||
121 | dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) | ||
122 | |||
123 | |||
124 | # win32-dll | ||
125 | # --------- | ||
126 | # Declare package support for building win32 dll's. | ||
127 | LT_OPTION_DEFINE([LT_INIT], [win32-dll], | ||
128 | [enable_win32_dll=yes | ||
129 | |||
130 | case $host in | ||
131 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) | ||
132 | AC_CHECK_TOOL(AS, as, false) | ||
133 | AC_CHECK_TOOL(DLLTOOL, dlltool, false) | ||
134 | AC_CHECK_TOOL(OBJDUMP, objdump, false) | ||
135 | ;; | ||
136 | esac | ||
137 | |||
138 | test -z "$AS" && AS=as | ||
139 | _LT_DECL([], [AS], [1], [Assembler program])dnl | ||
140 | |||
141 | test -z "$DLLTOOL" && DLLTOOL=dlltool | ||
142 | _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl | ||
143 | |||
144 | test -z "$OBJDUMP" && OBJDUMP=objdump | ||
145 | _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl | ||
146 | ])# win32-dll | ||
147 | |||
148 | AU_DEFUN([AC_LIBTOOL_WIN32_DLL], | ||
149 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
150 | _LT_SET_OPTION([LT_INIT], [win32-dll]) | ||
151 | AC_DIAGNOSE([obsolete], | ||
152 | [$0: Remove this warning and the call to _LT_SET_OPTION when you | ||
153 | put the 'win32-dll' option into LT_INIT's first parameter.]) | ||
154 | ]) | ||
155 | |||
156 | dnl aclocal-1.4 backwards compatibility: | ||
157 | dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) | ||
158 | |||
159 | |||
160 | # _LT_ENABLE_SHARED([DEFAULT]) | ||
161 | # ---------------------------- | ||
162 | # implement the --enable-shared flag, and supports the 'shared' and | ||
163 | # 'disable-shared' LT_INIT options. | ||
164 | # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. | ||
165 | m4_define([_LT_ENABLE_SHARED], | ||
166 | [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl | ||
167 | AC_ARG_ENABLE([shared], | ||
168 | [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], | ||
169 | [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], | ||
170 | [p=${PACKAGE-default} | ||
171 | case $enableval in | ||
172 | yes) enable_shared=yes ;; | ||
173 | no) enable_shared=no ;; | ||
174 | *) | ||
175 | enable_shared=no | ||
176 | # Look at the argument we got. We use all the common list separators. | ||
177 | lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, | ||
178 | for pkg in $enableval; do | ||
179 | IFS=$lt_save_ifs | ||
180 | if test "X$pkg" = "X$p"; then | ||
181 | enable_shared=yes | ||
182 | fi | ||
183 | done | ||
184 | IFS=$lt_save_ifs | ||
185 | ;; | ||
186 | esac], | ||
187 | [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) | ||
188 | |||
189 | _LT_DECL([build_libtool_libs], [enable_shared], [0], | ||
190 | [Whether or not to build shared libraries]) | ||
191 | ])# _LT_ENABLE_SHARED | ||
192 | |||
193 | LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) | ||
194 | LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) | ||
195 | |||
196 | # Old names: | ||
197 | AC_DEFUN([AC_ENABLE_SHARED], | ||
198 | [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) | ||
199 | ]) | ||
200 | |||
201 | AC_DEFUN([AC_DISABLE_SHARED], | ||
202 | [_LT_SET_OPTION([LT_INIT], [disable-shared]) | ||
203 | ]) | ||
204 | |||
205 | AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) | ||
206 | AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) | ||
207 | |||
208 | dnl aclocal-1.4 backwards compatibility: | ||
209 | dnl AC_DEFUN([AM_ENABLE_SHARED], []) | ||
210 | dnl AC_DEFUN([AM_DISABLE_SHARED], []) | ||
211 | |||
212 | |||
213 | |||
214 | # _LT_ENABLE_STATIC([DEFAULT]) | ||
215 | # ---------------------------- | ||
216 | # implement the --enable-static flag, and support the 'static' and | ||
217 | # 'disable-static' LT_INIT options. | ||
218 | # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. | ||
219 | m4_define([_LT_ENABLE_STATIC], | ||
220 | [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl | ||
221 | AC_ARG_ENABLE([static], | ||
222 | [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], | ||
223 | [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], | ||
224 | [p=${PACKAGE-default} | ||
225 | case $enableval in | ||
226 | yes) enable_static=yes ;; | ||
227 | no) enable_static=no ;; | ||
228 | *) | ||
229 | enable_static=no | ||
230 | # Look at the argument we got. We use all the common list separators. | ||
231 | lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, | ||
232 | for pkg in $enableval; do | ||
233 | IFS=$lt_save_ifs | ||
234 | if test "X$pkg" = "X$p"; then | ||
235 | enable_static=yes | ||
236 | fi | ||
237 | done | ||
238 | IFS=$lt_save_ifs | ||
239 | ;; | ||
240 | esac], | ||
241 | [enable_static=]_LT_ENABLE_STATIC_DEFAULT) | ||
242 | |||
243 | _LT_DECL([build_old_libs], [enable_static], [0], | ||
244 | [Whether or not to build static libraries]) | ||
245 | ])# _LT_ENABLE_STATIC | ||
246 | |||
247 | LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) | ||
248 | LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) | ||
249 | |||
250 | # Old names: | ||
251 | AC_DEFUN([AC_ENABLE_STATIC], | ||
252 | [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) | ||
253 | ]) | ||
254 | |||
255 | AC_DEFUN([AC_DISABLE_STATIC], | ||
256 | [_LT_SET_OPTION([LT_INIT], [disable-static]) | ||
257 | ]) | ||
258 | |||
259 | AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) | ||
260 | AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) | ||
261 | |||
262 | dnl aclocal-1.4 backwards compatibility: | ||
263 | dnl AC_DEFUN([AM_ENABLE_STATIC], []) | ||
264 | dnl AC_DEFUN([AM_DISABLE_STATIC], []) | ||
265 | |||
266 | |||
267 | |||
268 | # _LT_ENABLE_FAST_INSTALL([DEFAULT]) | ||
269 | # ---------------------------------- | ||
270 | # implement the --enable-fast-install flag, and support the 'fast-install' | ||
271 | # and 'disable-fast-install' LT_INIT options. | ||
272 | # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. | ||
273 | m4_define([_LT_ENABLE_FAST_INSTALL], | ||
274 | [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl | ||
275 | AC_ARG_ENABLE([fast-install], | ||
276 | [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], | ||
277 | [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], | ||
278 | [p=${PACKAGE-default} | ||
279 | case $enableval in | ||
280 | yes) enable_fast_install=yes ;; | ||
281 | no) enable_fast_install=no ;; | ||
282 | *) | ||
283 | enable_fast_install=no | ||
284 | # Look at the argument we got. We use all the common list separators. | ||
285 | lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, | ||
286 | for pkg in $enableval; do | ||
287 | IFS=$lt_save_ifs | ||
288 | if test "X$pkg" = "X$p"; then | ||
289 | enable_fast_install=yes | ||
290 | fi | ||
291 | done | ||
292 | IFS=$lt_save_ifs | ||
293 | ;; | ||
294 | esac], | ||
295 | [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) | ||
296 | |||
297 | _LT_DECL([fast_install], [enable_fast_install], [0], | ||
298 | [Whether or not to optimize for fast installation])dnl | ||
299 | ])# _LT_ENABLE_FAST_INSTALL | ||
300 | |||
301 | LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) | ||
302 | LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) | ||
303 | |||
304 | # Old names: | ||
305 | AU_DEFUN([AC_ENABLE_FAST_INSTALL], | ||
306 | [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) | ||
307 | AC_DIAGNOSE([obsolete], | ||
308 | [$0: Remove this warning and the call to _LT_SET_OPTION when you put | ||
309 | the 'fast-install' option into LT_INIT's first parameter.]) | ||
310 | ]) | ||
311 | |||
312 | AU_DEFUN([AC_DISABLE_FAST_INSTALL], | ||
313 | [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) | ||
314 | AC_DIAGNOSE([obsolete], | ||
315 | [$0: Remove this warning and the call to _LT_SET_OPTION when you put | ||
316 | the 'disable-fast-install' option into LT_INIT's first parameter.]) | ||
317 | ]) | ||
318 | |||
319 | dnl aclocal-1.4 backwards compatibility: | ||
320 | dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) | ||
321 | dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) | ||
322 | |||
323 | |||
324 | # _LT_WITH_AIX_SONAME([DEFAULT]) | ||
325 | # ---------------------------------- | ||
326 | # implement the --with-aix-soname flag, and support the `aix-soname=aix' | ||
327 | # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT | ||
328 | # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. | ||
329 | m4_define([_LT_WITH_AIX_SONAME], | ||
330 | [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl | ||
331 | shared_archive_member_spec= | ||
332 | case $host,$enable_shared in | ||
333 | power*-*-aix[[5-9]]*,yes) | ||
334 | AC_MSG_CHECKING([which variant of shared library versioning to provide]) | ||
335 | AC_ARG_WITH([aix-soname], | ||
336 | [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], | ||
337 | [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], | ||
338 | [case $withval in | ||
339 | aix|svr4|both) | ||
340 | ;; | ||
341 | *) | ||
342 | AC_MSG_ERROR([Unknown argument to --with-aix-soname]) | ||
343 | ;; | ||
344 | esac | ||
345 | lt_cv_with_aix_soname=$with_aix_soname], | ||
346 | [AC_CACHE_VAL([lt_cv_with_aix_soname], | ||
347 | [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) | ||
348 | with_aix_soname=$lt_cv_with_aix_soname]) | ||
349 | AC_MSG_RESULT([$with_aix_soname]) | ||
350 | if test aix != "$with_aix_soname"; then | ||
351 | # For the AIX way of multilib, we name the shared archive member | ||
352 | # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', | ||
353 | # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. | ||
354 | # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, | ||
355 | # the AIX toolchain works better with OBJECT_MODE set (default 32). | ||
356 | if test 64 = "${OBJECT_MODE-32}"; then | ||
357 | shared_archive_member_spec=shr_64 | ||
358 | else | ||
359 | shared_archive_member_spec=shr | ||
360 | fi | ||
361 | fi | ||
362 | ;; | ||
363 | *) | ||
364 | with_aix_soname=aix | ||
365 | ;; | ||
366 | esac | ||
367 | |||
368 | _LT_DECL([], [shared_archive_member_spec], [0], | ||
369 | [Shared archive member basename, for filename based shared library versioning on AIX])dnl | ||
370 | ])# _LT_WITH_AIX_SONAME | ||
371 | |||
372 | LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) | ||
373 | LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) | ||
374 | LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) | ||
375 | |||
376 | |||
377 | # _LT_WITH_PIC([MODE]) | ||
378 | # -------------------- | ||
379 | # implement the --with-pic flag, and support the 'pic-only' and 'no-pic' | ||
380 | # LT_INIT options. | ||
381 | # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. | ||
382 | m4_define([_LT_WITH_PIC], | ||
383 | [AC_ARG_WITH([pic], | ||
384 | [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], | ||
385 | [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], | ||
386 | [lt_p=${PACKAGE-default} | ||
387 | case $withval in | ||
388 | yes|no) pic_mode=$withval ;; | ||
389 | *) | ||
390 | pic_mode=default | ||
391 | # Look at the argument we got. We use all the common list separators. | ||
392 | lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, | ||
393 | for lt_pkg in $withval; do | ||
394 | IFS=$lt_save_ifs | ||
395 | if test "X$lt_pkg" = "X$lt_p"; then | ||
396 | pic_mode=yes | ||
397 | fi | ||
398 | done | ||
399 | IFS=$lt_save_ifs | ||
400 | ;; | ||
401 | esac], | ||
402 | [pic_mode=m4_default([$1], [default])]) | ||
403 | |||
404 | _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl | ||
405 | ])# _LT_WITH_PIC | ||
406 | |||
407 | LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) | ||
408 | LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) | ||
409 | |||
410 | # Old name: | ||
411 | AU_DEFUN([AC_LIBTOOL_PICMODE], | ||
412 | [_LT_SET_OPTION([LT_INIT], [pic-only]) | ||
413 | AC_DIAGNOSE([obsolete], | ||
414 | [$0: Remove this warning and the call to _LT_SET_OPTION when you | ||
415 | put the 'pic-only' option into LT_INIT's first parameter.]) | ||
416 | ]) | ||
417 | |||
418 | dnl aclocal-1.4 backwards compatibility: | ||
419 | dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) | ||
420 | |||
421 | ## ----------------- ## | ||
422 | ## LTDL_INIT Options ## | ||
423 | ## ----------------- ## | ||
424 | |||
425 | m4_define([_LTDL_MODE], []) | ||
426 | LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], | ||
427 | [m4_define([_LTDL_MODE], [nonrecursive])]) | ||
428 | LT_OPTION_DEFINE([LTDL_INIT], [recursive], | ||
429 | [m4_define([_LTDL_MODE], [recursive])]) | ||
430 | LT_OPTION_DEFINE([LTDL_INIT], [subproject], | ||
431 | [m4_define([_LTDL_MODE], [subproject])]) | ||
432 | |||
433 | m4_define([_LTDL_TYPE], []) | ||
434 | LT_OPTION_DEFINE([LTDL_INIT], [installable], | ||
435 | [m4_define([_LTDL_TYPE], [installable])]) | ||
436 | LT_OPTION_DEFINE([LTDL_INIT], [convenience], | ||
437 | [m4_define([_LTDL_TYPE], [convenience])]) | ||
diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4 new file mode 100644 index 00000000..48bc9344 --- /dev/null +++ b/m4/ltsugar.m4 | |||
@@ -0,0 +1,124 @@ | |||
1 | # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- | ||
2 | # | ||
3 | # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software | ||
4 | # Foundation, Inc. | ||
5 | # Written by Gary V. Vaughan, 2004 | ||
6 | # | ||
7 | # This file is free software; the Free Software Foundation gives | ||
8 | # unlimited permission to copy and/or distribute it, with or without | ||
9 | # modifications, as long as this notice is preserved. | ||
10 | |||
11 | # serial 6 ltsugar.m4 | ||
12 | |||
13 | # This is to help aclocal find these macros, as it can't see m4_define. | ||
14 | AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) | ||
15 | |||
16 | |||
17 | # lt_join(SEP, ARG1, [ARG2...]) | ||
18 | # ----------------------------- | ||
19 | # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their | ||
20 | # associated separator. | ||
21 | # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier | ||
22 | # versions in m4sugar had bugs. | ||
23 | m4_define([lt_join], | ||
24 | [m4_if([$#], [1], [], | ||
25 | [$#], [2], [[$2]], | ||
26 | [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) | ||
27 | m4_define([_lt_join], | ||
28 | [m4_if([$#$2], [2], [], | ||
29 | [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) | ||
30 | |||
31 | |||
32 | # lt_car(LIST) | ||
33 | # lt_cdr(LIST) | ||
34 | # ------------ | ||
35 | # Manipulate m4 lists. | ||
36 | # These macros are necessary as long as will still need to support | ||
37 | # Autoconf-2.59, which quotes differently. | ||
38 | m4_define([lt_car], [[$1]]) | ||
39 | m4_define([lt_cdr], | ||
40 | [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], | ||
41 | [$#], 1, [], | ||
42 | [m4_dquote(m4_shift($@))])]) | ||
43 | m4_define([lt_unquote], $1) | ||
44 | |||
45 | |||
46 | # lt_append(MACRO-NAME, STRING, [SEPARATOR]) | ||
47 | # ------------------------------------------ | ||
48 | # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. | ||
49 | # Note that neither SEPARATOR nor STRING are expanded; they are appended | ||
50 | # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). | ||
51 | # No SEPARATOR is output if MACRO-NAME was previously undefined (different | ||
52 | # than defined and empty). | ||
53 | # | ||
54 | # This macro is needed until we can rely on Autoconf 2.62, since earlier | ||
55 | # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. | ||
56 | m4_define([lt_append], | ||
57 | [m4_define([$1], | ||
58 | m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) | ||
59 | |||
60 | |||
61 | |||
62 | # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) | ||
63 | # ---------------------------------------------------------- | ||
64 | # Produce a SEP delimited list of all paired combinations of elements of | ||
65 | # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list | ||
66 | # has the form PREFIXmINFIXSUFFIXn. | ||
67 | # Needed until we can rely on m4_combine added in Autoconf 2.62. | ||
68 | m4_define([lt_combine], | ||
69 | [m4_if(m4_eval([$# > 3]), [1], | ||
70 | [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl | ||
71 | [[m4_foreach([_Lt_prefix], [$2], | ||
72 | [m4_foreach([_Lt_suffix], | ||
73 | ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, | ||
74 | [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) | ||
75 | |||
76 | |||
77 | # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) | ||
78 | # ----------------------------------------------------------------------- | ||
79 | # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited | ||
80 | # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. | ||
81 | m4_define([lt_if_append_uniq], | ||
82 | [m4_ifdef([$1], | ||
83 | [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], | ||
84 | [lt_append([$1], [$2], [$3])$4], | ||
85 | [$5])], | ||
86 | [lt_append([$1], [$2], [$3])$4])]) | ||
87 | |||
88 | |||
89 | # lt_dict_add(DICT, KEY, VALUE) | ||
90 | # ----------------------------- | ||
91 | m4_define([lt_dict_add], | ||
92 | [m4_define([$1($2)], [$3])]) | ||
93 | |||
94 | |||
95 | # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) | ||
96 | # -------------------------------------------- | ||
97 | m4_define([lt_dict_add_subkey], | ||
98 | [m4_define([$1($2:$3)], [$4])]) | ||
99 | |||
100 | |||
101 | # lt_dict_fetch(DICT, KEY, [SUBKEY]) | ||
102 | # ---------------------------------- | ||
103 | m4_define([lt_dict_fetch], | ||
104 | [m4_ifval([$3], | ||
105 | m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), | ||
106 | m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) | ||
107 | |||
108 | |||
109 | # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) | ||
110 | # ----------------------------------------------------------------- | ||
111 | m4_define([lt_if_dict_fetch], | ||
112 | [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], | ||
113 | [$5], | ||
114 | [$6])]) | ||
115 | |||
116 | |||
117 | # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) | ||
118 | # -------------------------------------------------------------- | ||
119 | m4_define([lt_dict_filter], | ||
120 | [m4_if([$5], [], [], | ||
121 | [lt_join(m4_quote(m4_default([$4], [[, ]])), | ||
122 | lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), | ||
123 | [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl | ||
124 | ]) | ||
diff --git a/m4/ltversion.m4 b/m4/ltversion.m4 new file mode 100644 index 00000000..fa04b52a --- /dev/null +++ b/m4/ltversion.m4 | |||
@@ -0,0 +1,23 @@ | |||
1 | # ltversion.m4 -- version numbers -*- Autoconf -*- | ||
2 | # | ||
3 | # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. | ||
4 | # Written by Scott James Remnant, 2004 | ||
5 | # | ||
6 | # This file is free software; the Free Software Foundation gives | ||
7 | # unlimited permission to copy and/or distribute it, with or without | ||
8 | # modifications, as long as this notice is preserved. | ||
9 | |||
10 | # @configure_input@ | ||
11 | |||
12 | # serial 4179 ltversion.m4 | ||
13 | # This file is part of GNU Libtool | ||
14 | |||
15 | m4_define([LT_PACKAGE_VERSION], [2.4.6]) | ||
16 | m4_define([LT_PACKAGE_REVISION], [2.4.6]) | ||
17 | |||
18 | AC_DEFUN([LTVERSION_VERSION], | ||
19 | [macro_version='2.4.6' | ||
20 | macro_revision='2.4.6' | ||
21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) | ||
22 | _LT_DECL(, macro_revision, 0) | ||
23 | ]) | ||
diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4 new file mode 100644 index 00000000..c6b26f88 --- /dev/null +++ b/m4/lt~obsolete.m4 | |||
@@ -0,0 +1,99 @@ | |||
1 | # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- | ||
2 | # | ||
3 | # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software | ||
4 | # Foundation, Inc. | ||
5 | # Written by Scott James Remnant, 2004. | ||
6 | # | ||
7 | # This file is free software; the Free Software Foundation gives | ||
8 | # unlimited permission to copy and/or distribute it, with or without | ||
9 | # modifications, as long as this notice is preserved. | ||
10 | |||
11 | # serial 5 lt~obsolete.m4 | ||
12 | |||
13 | # These exist entirely to fool aclocal when bootstrapping libtool. | ||
14 | # | ||
15 | # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), | ||
16 | # which have later been changed to m4_define as they aren't part of the | ||
17 | # exported API, or moved to Autoconf or Automake where they belong. | ||
18 | # | ||
19 | # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN | ||
20 | # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us | ||
21 | # using a macro with the same name in our local m4/libtool.m4 it'll | ||
22 | # pull the old libtool.m4 in (it doesn't see our shiny new m4_define | ||
23 | # and doesn't know about Autoconf macros at all.) | ||
24 | # | ||
25 | # So we provide this file, which has a silly filename so it's always | ||
26 | # included after everything else. This provides aclocal with the | ||
27 | # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything | ||
28 | # because those macros already exist, or will be overwritten later. | ||
29 | # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. | ||
30 | # | ||
31 | # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. | ||
32 | # Yes, that means every name once taken will need to remain here until | ||
33 | # we give up compatibility with versions before 1.7, at which point | ||
34 | # we need to keep only those names which we still refer to. | ||
35 | |||
36 | # This is to help aclocal find these macros, as it can't see m4_define. | ||
37 | AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) | ||
38 | |||
39 | m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) | ||
40 | m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) | ||
41 | m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) | ||
42 | m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) | ||
43 | m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) | ||
44 | m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) | ||
45 | m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) | ||
46 | m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) | ||
47 | m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) | ||
48 | m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) | ||
49 | m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) | ||
50 | m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) | ||
51 | m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) | ||
52 | m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) | ||
53 | m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) | ||
54 | m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) | ||
55 | m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) | ||
56 | m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) | ||
57 | m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) | ||
58 | m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) | ||
59 | m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) | ||
60 | m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) | ||
61 | m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) | ||
62 | m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) | ||
63 | m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) | ||
64 | m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) | ||
65 | m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) | ||
66 | m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) | ||
67 | m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) | ||
68 | m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) | ||
69 | m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) | ||
70 | m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) | ||
71 | m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) | ||
72 | m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) | ||
73 | m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) | ||
74 | m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) | ||
75 | m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) | ||
76 | m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) | ||
77 | m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) | ||
78 | m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) | ||
79 | m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) | ||
80 | m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) | ||
81 | m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) | ||
82 | m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) | ||
83 | m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) | ||
84 | m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) | ||
85 | m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) | ||
86 | m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) | ||
87 | m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) | ||
88 | m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) | ||
89 | m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) | ||
90 | m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) | ||
91 | m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) | ||
92 | m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) | ||
93 | m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) | ||
94 | m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) | ||
95 | m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) | ||
96 | m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) | ||
97 | m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) | ||
98 | m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) | ||
99 | m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) | ||
diff --git a/m4/nls.m4 b/m4/nls.m4 new file mode 100644 index 00000000..afdb9cac --- /dev/null +++ b/m4/nls.m4 | |||
@@ -0,0 +1,32 @@ | |||
1 | # nls.m4 serial 5 (gettext-0.18) | ||
2 | dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software | ||
3 | dnl 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 | dnl | ||
8 | dnl This file can be used in projects which are not available under | ||
9 | dnl the GNU General Public License or the GNU Library General Public | ||
10 | dnl License but which still want to provide support for the GNU gettext | ||
11 | dnl functionality. | ||
12 | dnl Please note that the actual code of the GNU gettext library is covered | ||
13 | dnl by the GNU Library General Public License, and the rest of the GNU | ||
14 | dnl gettext package is covered by the GNU General Public License. | ||
15 | dnl They are *not* in the public domain. | ||
16 | |||
17 | dnl Authors: | ||
18 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. | ||
19 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. | ||
20 | |||
21 | AC_PREREQ([2.50]) | ||
22 | |||
23 | AC_DEFUN([AM_NLS], | ||
24 | [ | ||
25 | AC_MSG_CHECKING([whether NLS is requested]) | ||
26 | dnl Default is enabled NLS | ||
27 | AC_ARG_ENABLE([nls], | ||
28 | [ --disable-nls do not use Native Language Support], | ||
29 | USE_NLS=$enableval, USE_NLS=yes) | ||
30 | AC_MSG_RESULT([$USE_NLS]) | ||
31 | AC_SUBST([USE_NLS]) | ||
32 | ]) | ||
diff --git a/m4/po.m4 b/m4/po.m4 new file mode 100644 index 00000000..c5a2f6bf --- /dev/null +++ b/m4/po.m4 | |||
@@ -0,0 +1,453 @@ | |||
1 | # po.m4 serial 24 (gettext-0.19) | ||
2 | dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | dnl | ||
7 | dnl This file can be used in projects which are not available under | ||
8 | dnl the GNU General Public License or the GNU Library General Public | ||
9 | dnl License but which still want to provide support for the GNU gettext | ||
10 | dnl functionality. | ||
11 | dnl Please note that the actual code of the GNU gettext library is covered | ||
12 | dnl by the GNU Library General Public License, and the rest of the GNU | ||
13 | dnl gettext package is covered by the GNU General Public License. | ||
14 | dnl They are *not* in the public domain. | ||
15 | |||
16 | dnl Authors: | ||
17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. | ||
18 | dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. | ||
19 | |||
20 | AC_PREREQ([2.60]) | ||
21 | |||
22 | dnl Checks for all prerequisites of the po subdirectory. | ||
23 | AC_DEFUN([AM_PO_SUBDIRS], | ||
24 | [ | ||
25 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl | ||
26 | AC_REQUIRE([AC_PROG_INSTALL])dnl | ||
27 | AC_REQUIRE([AC_PROG_MKDIR_P])dnl | ||
28 | AC_REQUIRE([AC_PROG_SED])dnl | ||
29 | AC_REQUIRE([AM_NLS])dnl | ||
30 | |||
31 | dnl Release version of the gettext macros. This is used to ensure that | ||
32 | dnl the gettext macros and po/Makefile.in.in are in sync. | ||
33 | AC_SUBST([GETTEXT_MACRO_VERSION], [0.19]) | ||
34 | |||
35 | dnl Perform the following tests also if --disable-nls has been given, | ||
36 | dnl because they are needed for "make dist" to work. | ||
37 | |||
38 | dnl Search for GNU msgfmt in the PATH. | ||
39 | dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. | ||
40 | dnl The second test excludes FreeBSD msgfmt. | ||
41 | AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, | ||
42 | [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && | ||
43 | (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], | ||
44 | :) | ||
45 | AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) | ||
46 | |||
47 | dnl Test whether it is GNU msgfmt >= 0.15. | ||
48 | changequote(,)dnl | ||
49 | case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in | ||
50 | '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; | ||
51 | *) MSGFMT_015=$MSGFMT ;; | ||
52 | esac | ||
53 | changequote([,])dnl | ||
54 | AC_SUBST([MSGFMT_015]) | ||
55 | changequote(,)dnl | ||
56 | case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in | ||
57 | '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; | ||
58 | *) GMSGFMT_015=$GMSGFMT ;; | ||
59 | esac | ||
60 | changequote([,])dnl | ||
61 | AC_SUBST([GMSGFMT_015]) | ||
62 | |||
63 | dnl Search for GNU xgettext 0.12 or newer in the PATH. | ||
64 | dnl The first test excludes Solaris xgettext and early GNU xgettext versions. | ||
65 | dnl The second test excludes FreeBSD xgettext. | ||
66 | AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, | ||
67 | [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && | ||
68 | (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], | ||
69 | :) | ||
70 | dnl Remove leftover from FreeBSD xgettext call. | ||
71 | rm -f messages.po | ||
72 | |||
73 | dnl Test whether it is GNU xgettext >= 0.15. | ||
74 | changequote(,)dnl | ||
75 | case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in | ||
76 | '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; | ||
77 | *) XGETTEXT_015=$XGETTEXT ;; | ||
78 | esac | ||
79 | changequote([,])dnl | ||
80 | AC_SUBST([XGETTEXT_015]) | ||
81 | |||
82 | dnl Search for GNU msgmerge 0.11 or newer in the PATH. | ||
83 | AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, | ||
84 | [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) | ||
85 | |||
86 | dnl Installation directories. | ||
87 | dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we | ||
88 | dnl have to define it here, so that it can be used in po/Makefile. | ||
89 | test -n "$localedir" || localedir='${datadir}/locale' | ||
90 | AC_SUBST([localedir]) | ||
91 | |||
92 | dnl Support for AM_XGETTEXT_OPTION. | ||
93 | test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= | ||
94 | AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) | ||
95 | |||
96 | AC_CONFIG_COMMANDS([po-directories], [[ | ||
97 | for ac_file in $CONFIG_FILES; do | ||
98 | # Support "outfile[:infile[:infile...]]" | ||
99 | case "$ac_file" in | ||
100 | *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | ||
101 | esac | ||
102 | # PO directories have a Makefile.in generated from Makefile.in.in. | ||
103 | case "$ac_file" in */Makefile.in) | ||
104 | # Adjust a relative srcdir. | ||
105 | ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` | ||
106 | ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` | ||
107 | ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` | ||
108 | # In autoconf-2.13 it is called $ac_given_srcdir. | ||
109 | # In autoconf-2.50 it is called $srcdir. | ||
110 | test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" | ||
111 | case "$ac_given_srcdir" in | ||
112 | .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; | ||
113 | /*) top_srcdir="$ac_given_srcdir" ;; | ||
114 | *) top_srcdir="$ac_dots$ac_given_srcdir" ;; | ||
115 | esac | ||
116 | # Treat a directory as a PO directory if and only if it has a | ||
117 | # POTFILES.in file. This allows packages to have multiple PO | ||
118 | # directories under different names or in different locations. | ||
119 | if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then | ||
120 | rm -f "$ac_dir/POTFILES" | ||
121 | test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" | ||
122 | gt_tab=`printf '\t'` | ||
123 | cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" | ||
124 | POMAKEFILEDEPS="POTFILES.in" | ||
125 | # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend | ||
126 | # on $ac_dir but don't depend on user-specified configuration | ||
127 | # parameters. | ||
128 | if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then | ||
129 | # The LINGUAS file contains the set of available languages. | ||
130 | if test -n "$OBSOLETE_ALL_LINGUAS"; then | ||
131 | test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" | ||
132 | fi | ||
133 | ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` | ||
134 | # Hide the ALL_LINGUAS assignment from automake < 1.5. | ||
135 | eval 'ALL_LINGUAS''=$ALL_LINGUAS_' | ||
136 | POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" | ||
137 | else | ||
138 | # The set of available languages was given in configure.in. | ||
139 | # Hide the ALL_LINGUAS assignment from automake < 1.5. | ||
140 | eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' | ||
141 | fi | ||
142 | # Compute POFILES | ||
143 | # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) | ||
144 | # Compute UPDATEPOFILES | ||
145 | # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) | ||
146 | # Compute DUMMYPOFILES | ||
147 | # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) | ||
148 | # Compute GMOFILES | ||
149 | # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) | ||
150 | case "$ac_given_srcdir" in | ||
151 | .) srcdirpre= ;; | ||
152 | *) srcdirpre='$(srcdir)/' ;; | ||
153 | esac | ||
154 | POFILES= | ||
155 | UPDATEPOFILES= | ||
156 | DUMMYPOFILES= | ||
157 | GMOFILES= | ||
158 | for lang in $ALL_LINGUAS; do | ||
159 | POFILES="$POFILES $srcdirpre$lang.po" | ||
160 | UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" | ||
161 | DUMMYPOFILES="$DUMMYPOFILES $lang.nop" | ||
162 | GMOFILES="$GMOFILES $srcdirpre$lang.gmo" | ||
163 | done | ||
164 | # CATALOGS depends on both $ac_dir and the user's LINGUAS | ||
165 | # environment variable. | ||
166 | INST_LINGUAS= | ||
167 | if test -n "$ALL_LINGUAS"; then | ||
168 | for presentlang in $ALL_LINGUAS; do | ||
169 | useit=no | ||
170 | if test "%UNSET%" != "$LINGUAS"; then | ||
171 | desiredlanguages="$LINGUAS" | ||
172 | else | ||
173 | desiredlanguages="$ALL_LINGUAS" | ||
174 | fi | ||
175 | for desiredlang in $desiredlanguages; do | ||
176 | # Use the presentlang catalog if desiredlang is | ||
177 | # a. equal to presentlang, or | ||
178 | # b. a variant of presentlang (because in this case, | ||
179 | # presentlang can be used as a fallback for messages | ||
180 | # which are not translated in the desiredlang catalog). | ||
181 | case "$desiredlang" in | ||
182 | "$presentlang"*) useit=yes;; | ||
183 | esac | ||
184 | done | ||
185 | if test $useit = yes; then | ||
186 | INST_LINGUAS="$INST_LINGUAS $presentlang" | ||
187 | fi | ||
188 | done | ||
189 | fi | ||
190 | CATALOGS= | ||
191 | if test -n "$INST_LINGUAS"; then | ||
192 | for lang in $INST_LINGUAS; do | ||
193 | CATALOGS="$CATALOGS $lang.gmo" | ||
194 | done | ||
195 | fi | ||
196 | test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" | ||
197 | sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" | ||
198 | for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do | ||
199 | if test -f "$f"; then | ||
200 | case "$f" in | ||
201 | *.orig | *.bak | *~) ;; | ||
202 | *) cat "$f" >> "$ac_dir/Makefile" ;; | ||
203 | esac | ||
204 | fi | ||
205 | done | ||
206 | fi | ||
207 | ;; | ||
208 | esac | ||
209 | done]], | ||
210 | [# Capture the value of obsolete ALL_LINGUAS because we need it to compute | ||
211 | # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it | ||
212 | # from automake < 1.5. | ||
213 | eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' | ||
214 | # Capture the value of LINGUAS because we need it to compute CATALOGS. | ||
215 | LINGUAS="${LINGUAS-%UNSET%}" | ||
216 | ]) | ||
217 | ]) | ||
218 | |||
219 | dnl Postprocesses a Makefile in a directory containing PO files. | ||
220 | AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], | ||
221 | [ | ||
222 | # When this code is run, in config.status, two variables have already been | ||
223 | # set: | ||
224 | # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, | ||
225 | # - LINGUAS is the value of the environment variable LINGUAS at configure | ||
226 | # time. | ||
227 | |||
228 | changequote(,)dnl | ||
229 | # Adjust a relative srcdir. | ||
230 | ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` | ||
231 | ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` | ||
232 | ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` | ||
233 | # In autoconf-2.13 it is called $ac_given_srcdir. | ||
234 | # In autoconf-2.50 it is called $srcdir. | ||
235 | test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" | ||
236 | case "$ac_given_srcdir" in | ||
237 | .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; | ||
238 | /*) top_srcdir="$ac_given_srcdir" ;; | ||
239 | *) top_srcdir="$ac_dots$ac_given_srcdir" ;; | ||
240 | esac | ||
241 | |||
242 | # Find a way to echo strings without interpreting backslash. | ||
243 | if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then | ||
244 | gt_echo='echo' | ||
245 | else | ||
246 | if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then | ||
247 | gt_echo='printf %s\n' | ||
248 | else | ||
249 | echo_func () { | ||
250 | cat <<EOT | ||
251 | $* | ||
252 | EOT | ||
253 | } | ||
254 | gt_echo='echo_func' | ||
255 | fi | ||
256 | fi | ||
257 | |||
258 | # A sed script that extracts the value of VARIABLE from a Makefile. | ||
259 | tab=`printf '\t'` | ||
260 | sed_x_variable=' | ||
261 | # Test if the hold space is empty. | ||
262 | x | ||
263 | s/P/P/ | ||
264 | x | ||
265 | ta | ||
266 | # Yes it was empty. Look if we have the expected variable definition. | ||
267 | /^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{ | ||
268 | # Seen the first line of the variable definition. | ||
269 | s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=// | ||
270 | ba | ||
271 | } | ||
272 | bd | ||
273 | :a | ||
274 | # Here we are processing a line from the variable definition. | ||
275 | # Remove comment, more precisely replace it with a space. | ||
276 | s/#.*$/ / | ||
277 | # See if the line ends in a backslash. | ||
278 | tb | ||
279 | :b | ||
280 | s/\\$// | ||
281 | # Print the line, without the trailing backslash. | ||
282 | p | ||
283 | tc | ||
284 | # There was no trailing backslash. The end of the variable definition is | ||
285 | # reached. Clear the hold space. | ||
286 | s/^.*$// | ||
287 | x | ||
288 | bd | ||
289 | :c | ||
290 | # A trailing backslash means that the variable definition continues in the | ||
291 | # next line. Put a nonempty string into the hold space to indicate this. | ||
292 | s/^.*$/P/ | ||
293 | x | ||
294 | :d | ||
295 | ' | ||
296 | changequote([,])dnl | ||
297 | |||
298 | # Set POTFILES to the value of the Makefile variable POTFILES. | ||
299 | sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'` | ||
300 | POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"` | ||
301 | # Compute POTFILES_DEPS as | ||
302 | # $(foreach file, $(POTFILES), $(top_srcdir)/$(file)) | ||
303 | POTFILES_DEPS= | ||
304 | for file in $POTFILES; do | ||
305 | POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file" | ||
306 | done | ||
307 | POMAKEFILEDEPS="" | ||
308 | |||
309 | if test -n "$OBSOLETE_ALL_LINGUAS"; then | ||
310 | test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" | ||
311 | fi | ||
312 | if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then | ||
313 | # The LINGUAS file contains the set of available languages. | ||
314 | ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` | ||
315 | POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" | ||
316 | else | ||
317 | # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS. | ||
318 | sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'` | ||
319 | ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"` | ||
320 | fi | ||
321 | # Hide the ALL_LINGUAS assignment from automake < 1.5. | ||
322 | eval 'ALL_LINGUAS''=$ALL_LINGUAS_' | ||
323 | # Compute POFILES | ||
324 | # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) | ||
325 | # Compute UPDATEPOFILES | ||
326 | # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) | ||
327 | # Compute DUMMYPOFILES | ||
328 | # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) | ||
329 | # Compute GMOFILES | ||
330 | # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) | ||
331 | # Compute PROPERTIESFILES | ||
332 | # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties) | ||
333 | # Compute CLASSFILES | ||
334 | # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class) | ||
335 | # Compute QMFILES | ||
336 | # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm) | ||
337 | # Compute MSGFILES | ||
338 | # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg) | ||
339 | # Compute RESOURCESDLLFILES | ||
340 | # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll) | ||
341 | case "$ac_given_srcdir" in | ||
342 | .) srcdirpre= ;; | ||
343 | *) srcdirpre='$(srcdir)/' ;; | ||
344 | esac | ||
345 | POFILES= | ||
346 | UPDATEPOFILES= | ||
347 | DUMMYPOFILES= | ||
348 | GMOFILES= | ||
349 | PROPERTIESFILES= | ||
350 | CLASSFILES= | ||
351 | QMFILES= | ||
352 | MSGFILES= | ||
353 | RESOURCESDLLFILES= | ||
354 | for lang in $ALL_LINGUAS; do | ||
355 | POFILES="$POFILES $srcdirpre$lang.po" | ||
356 | UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" | ||
357 | DUMMYPOFILES="$DUMMYPOFILES $lang.nop" | ||
358 | GMOFILES="$GMOFILES $srcdirpre$lang.gmo" | ||
359 | PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties" | ||
360 | CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class" | ||
361 | QMFILES="$QMFILES $srcdirpre$lang.qm" | ||
362 | frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` | ||
363 | MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg" | ||
364 | frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` | ||
365 | RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll" | ||
366 | done | ||
367 | # CATALOGS depends on both $ac_dir and the user's LINGUAS | ||
368 | # environment variable. | ||
369 | INST_LINGUAS= | ||
370 | if test -n "$ALL_LINGUAS"; then | ||
371 | for presentlang in $ALL_LINGUAS; do | ||
372 | useit=no | ||
373 | if test "%UNSET%" != "$LINGUAS"; then | ||
374 | desiredlanguages="$LINGUAS" | ||
375 | else | ||
376 | desiredlanguages="$ALL_LINGUAS" | ||
377 | fi | ||
378 | for desiredlang in $desiredlanguages; do | ||
379 | # Use the presentlang catalog if desiredlang is | ||
380 | # a. equal to presentlang, or | ||
381 | # b. a variant of presentlang (because in this case, | ||
382 | # presentlang can be used as a fallback for messages | ||
383 | # which are not translated in the desiredlang catalog). | ||
384 | case "$desiredlang" in | ||
385 | "$presentlang"*) useit=yes;; | ||
386 | esac | ||
387 | done | ||
388 | if test $useit = yes; then | ||
389 | INST_LINGUAS="$INST_LINGUAS $presentlang" | ||
390 | fi | ||
391 | done | ||
392 | fi | ||
393 | CATALOGS= | ||
394 | JAVACATALOGS= | ||
395 | QTCATALOGS= | ||
396 | TCLCATALOGS= | ||
397 | CSHARPCATALOGS= | ||
398 | if test -n "$INST_LINGUAS"; then | ||
399 | for lang in $INST_LINGUAS; do | ||
400 | CATALOGS="$CATALOGS $lang.gmo" | ||
401 | JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties" | ||
402 | QTCATALOGS="$QTCATALOGS $lang.qm" | ||
403 | frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` | ||
404 | TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg" | ||
405 | frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` | ||
406 | CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll" | ||
407 | done | ||
408 | fi | ||
409 | |||
410 | sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp" | ||
411 | tab=`printf '\t'` | ||
412 | if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then | ||
413 | # Add dependencies that cannot be formulated as a simple suffix rule. | ||
414 | for lang in $ALL_LINGUAS; do | ||
415 | frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` | ||
416 | cat >> "$ac_file.tmp" <<EOF | ||
417 | $frobbedlang.msg: $lang.po | ||
418 | ${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \ | ||
419 | ${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } | ||
420 | EOF | ||
421 | done | ||
422 | fi | ||
423 | if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then | ||
424 | # Add dependencies that cannot be formulated as a simple suffix rule. | ||
425 | for lang in $ALL_LINGUAS; do | ||
426 | frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` | ||
427 | cat >> "$ac_file.tmp" <<EOF | ||
428 | $frobbedlang/\$(DOMAIN).resources.dll: $lang.po | ||
429 | ${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \ | ||
430 | ${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } | ||
431 | EOF | ||
432 | done | ||
433 | fi | ||
434 | if test -n "$POMAKEFILEDEPS"; then | ||
435 | cat >> "$ac_file.tmp" <<EOF | ||
436 | Makefile: $POMAKEFILEDEPS | ||
437 | EOF | ||
438 | fi | ||
439 | mv "$ac_file.tmp" "$ac_file" | ||
440 | ]) | ||
441 | |||
442 | dnl Initializes the accumulator used by AM_XGETTEXT_OPTION. | ||
443 | AC_DEFUN([AM_XGETTEXT_OPTION_INIT], | ||
444 | [ | ||
445 | XGETTEXT_EXTRA_OPTIONS= | ||
446 | ]) | ||
447 | |||
448 | dnl Registers an option to be passed to xgettext in the po subdirectory. | ||
449 | AC_DEFUN([AM_XGETTEXT_OPTION], | ||
450 | [ | ||
451 | AC_REQUIRE([AM_XGETTEXT_OPTION_INIT]) | ||
452 | XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1" | ||
453 | ]) | ||
diff --git a/m4/printf-posix.m4 b/m4/printf-posix.m4 new file mode 100644 index 00000000..1eacf95a --- /dev/null +++ b/m4/printf-posix.m4 | |||
@@ -0,0 +1,45 @@ | |||
1 | # printf-posix.m4 serial 5 (gettext-0.18) | ||
2 | dnl Copyright (C) 2003, 2007, 2009-2010 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | dnl From Bruno Haible. | ||
8 | dnl Test whether the printf() function supports POSIX/XSI format strings with | ||
9 | dnl positions. | ||
10 | |||
11 | AC_DEFUN([gt_PRINTF_POSIX], | ||
12 | [ | ||
13 | AC_REQUIRE([AC_PROG_CC]) | ||
14 | AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings], | ||
15 | gt_cv_func_printf_posix, | ||
16 | [ | ||
17 | AC_TRY_RUN([ | ||
18 | #include <stdio.h> | ||
19 | #include <string.h> | ||
20 | /* The string "%2$d %1$d", with dollar characters protected from the shell's | ||
21 | dollar expansion (possibly an autoconf bug). */ | ||
22 | static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; | ||
23 | static char buf[100]; | ||
24 | int main () | ||
25 | { | ||
26 | sprintf (buf, format, 33, 55); | ||
27 | return (strcmp (buf, "55 33") != 0); | ||
28 | }], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no, | ||
29 | [ | ||
30 | AC_EGREP_CPP([notposix], [ | ||
31 | #if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ | ||
32 | notposix | ||
33 | #endif | ||
34 | ], | ||
35 | [gt_cv_func_printf_posix="guessing no"], | ||
36 | [gt_cv_func_printf_posix="guessing yes"]) | ||
37 | ]) | ||
38 | ]) | ||
39 | case $gt_cv_func_printf_posix in | ||
40 | *yes) | ||
41 | AC_DEFINE([HAVE_POSIX_PRINTF], [1], | ||
42 | [Define if your printf() function supports format strings with positions.]) | ||
43 | ;; | ||
44 | esac | ||
45 | ]) | ||
diff --git a/m4/progtest.m4 b/m4/progtest.m4 new file mode 100644 index 00000000..9ace7c34 --- /dev/null +++ b/m4/progtest.m4 | |||
@@ -0,0 +1,91 @@ | |||
1 | # progtest.m4 serial 7 (gettext-0.18.2) | ||
2 | dnl Copyright (C) 1996-2003, 2005, 2008-2016 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | dnl | ||
7 | dnl This file can be used in projects which are not available under | ||
8 | dnl the GNU General Public License or the GNU Library General Public | ||
9 | dnl License but which still want to provide support for the GNU gettext | ||
10 | dnl functionality. | ||
11 | dnl Please note that the actual code of the GNU gettext library is covered | ||
12 | dnl by the GNU Library General Public License, and the rest of the GNU | ||
13 | dnl gettext package is covered by the GNU General Public License. | ||
14 | dnl They are *not* in the public domain. | ||
15 | |||
16 | dnl Authors: | ||
17 | dnl Ulrich Drepper <drepper@cygnus.com>, 1996. | ||
18 | |||
19 | AC_PREREQ([2.50]) | ||
20 | |||
21 | # Search path for a program which passes the given test. | ||
22 | |||
23 | dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, | ||
24 | dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) | ||
25 | AC_DEFUN([AM_PATH_PROG_WITH_TEST], | ||
26 | [ | ||
27 | # Prepare PATH_SEPARATOR. | ||
28 | # The user is always right. | ||
29 | if test "${PATH_SEPARATOR+set}" != set; then | ||
30 | # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which | ||
31 | # contains only /bin. Note that ksh looks also at the FPATH variable, | ||
32 | # so we have to set that as well for the test. | ||
33 | PATH_SEPARATOR=: | ||
34 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ | ||
35 | && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ | ||
36 | || PATH_SEPARATOR=';' | ||
37 | } | ||
38 | fi | ||
39 | |||
40 | # Find out how to test for executable files. Don't use a zero-byte file, | ||
41 | # as systems may use methods other than mode bits to determine executability. | ||
42 | cat >conf$$.file <<_ASEOF | ||
43 | #! /bin/sh | ||
44 | exit 0 | ||
45 | _ASEOF | ||
46 | chmod +x conf$$.file | ||
47 | if test -x conf$$.file >/dev/null 2>&1; then | ||
48 | ac_executable_p="test -x" | ||
49 | else | ||
50 | ac_executable_p="test -f" | ||
51 | fi | ||
52 | rm -f conf$$.file | ||
53 | |||
54 | # Extract the first word of "$2", so it can be a program name with args. | ||
55 | set dummy $2; ac_word=[$]2 | ||
56 | AC_MSG_CHECKING([for $ac_word]) | ||
57 | AC_CACHE_VAL([ac_cv_path_$1], | ||
58 | [case "[$]$1" in | ||
59 | [[\\/]]* | ?:[[\\/]]*) | ||
60 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path. | ||
61 | ;; | ||
62 | *) | ||
63 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR | ||
64 | for ac_dir in ifelse([$5], , $PATH, [$5]); do | ||
65 | IFS="$ac_save_IFS" | ||
66 | test -z "$ac_dir" && ac_dir=. | ||
67 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
68 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | ||
69 | echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD | ||
70 | if [$3]; then | ||
71 | ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" | ||
72 | break 2 | ||
73 | fi | ||
74 | fi | ||
75 | done | ||
76 | done | ||
77 | IFS="$ac_save_IFS" | ||
78 | dnl If no 4th arg is given, leave the cache variable unset, | ||
79 | dnl so AC_PATH_PROGS will keep looking. | ||
80 | ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" | ||
81 | ])dnl | ||
82 | ;; | ||
83 | esac])dnl | ||
84 | $1="$ac_cv_path_$1" | ||
85 | if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then | ||
86 | AC_MSG_RESULT([$][$1]) | ||
87 | else | ||
88 | AC_MSG_RESULT([no]) | ||
89 | fi | ||
90 | AC_SUBST([$1])dnl | ||
91 | ]) | ||
diff --git a/m4/size_max.m4 b/m4/size_max.m4 new file mode 100644 index 00000000..ce992db1 --- /dev/null +++ b/m4/size_max.m4 | |||
@@ -0,0 +1,75 @@ | |||
1 | # size_max.m4 serial 9 | ||
2 | dnl Copyright (C) 2003, 2005-2006, 2008-2010 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | dnl From Bruno Haible. | ||
8 | |||
9 | AC_DEFUN([gl_SIZE_MAX], | ||
10 | [ | ||
11 | AC_CHECK_HEADERS([stdint.h]) | ||
12 | dnl First test whether the system already has SIZE_MAX. | ||
13 | AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [ | ||
14 | gl_cv_size_max= | ||
15 | AC_EGREP_CPP([Found it], [ | ||
16 | #include <limits.h> | ||
17 | #if HAVE_STDINT_H | ||
18 | #include <stdint.h> | ||
19 | #endif | ||
20 | #ifdef SIZE_MAX | ||
21 | Found it | ||
22 | #endif | ||
23 | ], [gl_cv_size_max=yes]) | ||
24 | if test -z "$gl_cv_size_max"; then | ||
25 | dnl Define it ourselves. Here we assume that the type 'size_t' is not wider | ||
26 | dnl than the type 'unsigned long'. Try hard to find a definition that can | ||
27 | dnl be used in a preprocessor #if, i.e. doesn't contain a cast. | ||
28 | AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1], | ||
29 | [#include <stddef.h> | ||
30 | #include <limits.h>], [size_t_bits_minus_1=]) | ||
31 | AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)], | ||
32 | [#include <stddef.h>], [fits_in_uint=]) | ||
33 | if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then | ||
34 | if test $fits_in_uint = 1; then | ||
35 | dnl Even though SIZE_MAX fits in an unsigned int, it must be of type | ||
36 | dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. | ||
37 | AC_TRY_COMPILE([#include <stddef.h> | ||
38 | extern size_t foo; | ||
39 | extern unsigned long foo; | ||
40 | ], [], [fits_in_uint=0]) | ||
41 | fi | ||
42 | dnl We cannot use 'expr' to simplify this expression, because 'expr' | ||
43 | dnl works only with 'long' integers in the host environment, while we | ||
44 | dnl might be cross-compiling from a 32-bit platform to a 64-bit platform. | ||
45 | if test $fits_in_uint = 1; then | ||
46 | gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" | ||
47 | else | ||
48 | gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" | ||
49 | fi | ||
50 | else | ||
51 | dnl Shouldn't happen, but who knows... | ||
52 | gl_cv_size_max='((size_t)~(size_t)0)' | ||
53 | fi | ||
54 | fi | ||
55 | ]) | ||
56 | if test "$gl_cv_size_max" != yes; then | ||
57 | AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], | ||
58 | [Define as the maximum value of type 'size_t', if the system doesn't define it.]) | ||
59 | fi | ||
60 | dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after | ||
61 | dnl <stdint.h>. Remember that the #undef in AH_VERBATIM gets replaced with | ||
62 | dnl #define by AC_DEFINE_UNQUOTED. | ||
63 | AH_VERBATIM([SIZE_MAX], | ||
64 | [/* Define as the maximum value of type 'size_t', if the system doesn't define | ||
65 | it. */ | ||
66 | #ifndef SIZE_MAX | ||
67 | # undef SIZE_MAX | ||
68 | #endif]) | ||
69 | ]) | ||
70 | |||
71 | dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. | ||
72 | dnl Remove this when we can assume autoconf >= 2.61. | ||
73 | m4_ifdef([AC_COMPUTE_INT], [], [ | ||
74 | AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) | ||
75 | ]) | ||
diff --git a/m4/stdint_h.m4 b/m4/stdint_h.m4 new file mode 100644 index 00000000..b8e3c6cc --- /dev/null +++ b/m4/stdint_h.m4 | |||
@@ -0,0 +1,26 @@ | |||
1 | # stdint_h.m4 serial 8 | ||
2 | dnl Copyright (C) 1997-2004, 2006, 2008-2010 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | dnl From Paul Eggert. | ||
8 | |||
9 | # Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists, | ||
10 | # doesn't clash with <sys/types.h>, and declares uintmax_t. | ||
11 | |||
12 | AC_DEFUN([gl_AC_HEADER_STDINT_H], | ||
13 | [ | ||
14 | AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h], | ||
15 | [AC_TRY_COMPILE( | ||
16 | [#include <sys/types.h> | ||
17 | #include <stdint.h>], | ||
18 | [uintmax_t i = (uintmax_t) -1; return !i;], | ||
19 | [gl_cv_header_stdint_h=yes], | ||
20 | [gl_cv_header_stdint_h=no])]) | ||
21 | if test $gl_cv_header_stdint_h = yes; then | ||
22 | AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1], | ||
23 | [Define if <stdint.h> exists, doesn't clash with <sys/types.h>, | ||
24 | and declares uintmax_t. ]) | ||
25 | fi | ||
26 | ]) | ||
diff --git a/m4/threadlib.m4 b/m4/threadlib.m4 new file mode 100644 index 00000000..05cc4ffa --- /dev/null +++ b/m4/threadlib.m4 | |||
@@ -0,0 +1,347 @@ | |||
1 | # threadlib.m4 serial 5 (gettext-0.18) | ||
2 | dnl Copyright (C) 2005-2010 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | dnl From Bruno Haible. | ||
8 | |||
9 | dnl gl_THREADLIB | ||
10 | dnl ------------ | ||
11 | dnl Tests for a multithreading library to be used. | ||
12 | dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS, | ||
13 | dnl USE_PTH_THREADS, USE_WIN32_THREADS | ||
14 | dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use | ||
15 | dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with | ||
16 | dnl libtool). | ||
17 | dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for | ||
18 | dnl programs that really need multithread functionality. The difference | ||
19 | dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak | ||
20 | dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread". | ||
21 | dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for | ||
22 | dnl multithread-safe programs. | ||
23 | |||
24 | AC_DEFUN([gl_THREADLIB_EARLY], | ||
25 | [ | ||
26 | AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) | ||
27 | ]) | ||
28 | |||
29 | dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once. | ||
30 | |||
31 | AC_DEFUN([gl_THREADLIB_EARLY_BODY], | ||
32 | [ | ||
33 | dnl Ordering constraints: This macro modifies CPPFLAGS in a way that | ||
34 | dnl influences the result of the autoconf tests that test for *_unlocked | ||
35 | dnl declarations, on AIX 5 at least. Therefore it must come early. | ||
36 | AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl | ||
37 | AC_BEFORE([$0], [gl_ARGP])dnl | ||
38 | |||
39 | AC_REQUIRE([AC_CANONICAL_HOST]) | ||
40 | dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems. | ||
41 | dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes | ||
42 | dnl AC_GNU_SOURCE. | ||
43 | m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], | ||
44 | [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], | ||
45 | [AC_REQUIRE([AC_GNU_SOURCE])]) | ||
46 | dnl Check for multithreading. | ||
47 | m4_divert_text([DEFAULTS], [gl_use_threads_default=]) | ||
48 | AC_ARG_ENABLE([threads], | ||
49 | AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API]) | ||
50 | AC_HELP_STRING([--disable-threads], [build without multithread safety]), | ||
51 | [gl_use_threads=$enableval], | ||
52 | [if test -n "$gl_use_threads_default"; then | ||
53 | gl_use_threads="$gl_use_threads_default" | ||
54 | else | ||
55 | changequote(,)dnl | ||
56 | case "$host_os" in | ||
57 | dnl Disable multithreading by default on OSF/1, because it interferes | ||
58 | dnl with fork()/exec(): When msgexec is linked with -lpthread, its | ||
59 | dnl child process gets an endless segmentation fault inside execvp(). | ||
60 | dnl Disable multithreading by default on Cygwin 1.5.x, because it has | ||
61 | dnl bugs that lead to endless loops or crashes. See | ||
62 | dnl <http://cygwin.com/ml/cygwin/2009-08/msg00283.html>. | ||
63 | osf*) gl_use_threads=no ;; | ||
64 | cygwin*) | ||
65 | case `uname -r` in | ||
66 | 1.[0-5].*) gl_use_threads=no ;; | ||
67 | *) gl_use_threads=yes ;; | ||
68 | esac | ||
69 | ;; | ||
70 | *) gl_use_threads=yes ;; | ||
71 | esac | ||
72 | changequote([,])dnl | ||
73 | fi | ||
74 | ]) | ||
75 | if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then | ||
76 | # For using <pthread.h>: | ||
77 | case "$host_os" in | ||
78 | osf*) | ||
79 | # On OSF/1, the compiler needs the flag -D_REENTRANT so that it | ||
80 | # groks <pthread.h>. cc also understands the flag -pthread, but | ||
81 | # we don't use it because 1. gcc-2.95 doesn't understand -pthread, | ||
82 | # 2. putting a flag into CPPFLAGS that has an effect on the linker | ||
83 | # causes the AC_TRY_LINK test below to succeed unexpectedly, | ||
84 | # leading to wrong values of LIBTHREAD and LTLIBTHREAD. | ||
85 | CPPFLAGS="$CPPFLAGS -D_REENTRANT" | ||
86 | ;; | ||
87 | esac | ||
88 | # Some systems optimize for single-threaded programs by default, and | ||
89 | # need special flags to disable these optimizations. For example, the | ||
90 | # definition of 'errno' in <errno.h>. | ||
91 | case "$host_os" in | ||
92 | aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; | ||
93 | solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; | ||
94 | esac | ||
95 | fi | ||
96 | ]) | ||
97 | |||
98 | dnl The guts of gl_THREADLIB. Needs to be expanded only once. | ||
99 | |||
100 | AC_DEFUN([gl_THREADLIB_BODY], | ||
101 | [ | ||
102 | AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) | ||
103 | gl_threads_api=none | ||
104 | LIBTHREAD= | ||
105 | LTLIBTHREAD= | ||
106 | LIBMULTITHREAD= | ||
107 | LTLIBMULTITHREAD= | ||
108 | if test "$gl_use_threads" != no; then | ||
109 | dnl Check whether the compiler and linker support weak declarations. | ||
110 | AC_CACHE_CHECK([whether imported symbols can be declared weak], | ||
111 | [gl_cv_have_weak], | ||
112 | [gl_cv_have_weak=no | ||
113 | dnl First, test whether the compiler accepts it syntactically. | ||
114 | AC_TRY_LINK([extern void xyzzy (); | ||
115 | #pragma weak xyzzy], [xyzzy();], [gl_cv_have_weak=maybe]) | ||
116 | if test $gl_cv_have_weak = maybe; then | ||
117 | dnl Second, test whether it actually works. On Cygwin 1.7.2, with | ||
118 | dnl gcc 4.3, symbols declared weak always evaluate to the address 0. | ||
119 | AC_TRY_RUN([ | ||
120 | #include <stdio.h> | ||
121 | #pragma weak fputs | ||
122 | int main () | ||
123 | { | ||
124 | return (fputs == NULL); | ||
125 | }], [gl_cv_have_weak=yes], [gl_cv_have_weak=no], | ||
126 | [dnl When cross-compiling, assume that only ELF platforms support | ||
127 | dnl weak symbols. | ||
128 | AC_EGREP_CPP([Extensible Linking Format], | ||
129 | [#ifdef __ELF__ | ||
130 | Extensible Linking Format | ||
131 | #endif | ||
132 | ], | ||
133 | [gl_cv_have_weak="guessing yes"], | ||
134 | [gl_cv_have_weak="guessing no"]) | ||
135 | ]) | ||
136 | fi | ||
137 | ]) | ||
138 | if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then | ||
139 | # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that | ||
140 | # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY. | ||
141 | AC_CHECK_HEADER([pthread.h], | ||
142 | [gl_have_pthread_h=yes], [gl_have_pthread_h=no]) | ||
143 | if test "$gl_have_pthread_h" = yes; then | ||
144 | # Other possible tests: | ||
145 | # -lpthreads (FSU threads, PCthreads) | ||
146 | # -lgthreads | ||
147 | gl_have_pthread= | ||
148 | # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist | ||
149 | # in libc. IRIX 6.5 has the first one in both libc and libpthread, but | ||
150 | # the second one only in libpthread, and lock.c needs it. | ||
151 | AC_TRY_LINK([#include <pthread.h>], | ||
152 | [pthread_mutex_lock((pthread_mutex_t*)0); | ||
153 | pthread_mutexattr_init((pthread_mutexattr_t*)0);], | ||
154 | [gl_have_pthread=yes]) | ||
155 | # Test for libpthread by looking for pthread_kill. (Not pthread_self, | ||
156 | # since it is defined as a macro on OSF/1.) | ||
157 | if test -n "$gl_have_pthread"; then | ||
158 | # The program links fine without libpthread. But it may actually | ||
159 | # need to link with libpthread in order to create multiple threads. | ||
160 | AC_CHECK_LIB([pthread], [pthread_kill], | ||
161 | [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread | ||
162 | # On Solaris and HP-UX, most pthread functions exist also in libc. | ||
163 | # Therefore pthread_in_use() needs to actually try to create a | ||
164 | # thread: pthread_create from libc will fail, whereas | ||
165 | # pthread_create will actually create a thread. | ||
166 | case "$host_os" in | ||
167 | solaris* | hpux*) | ||
168 | AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1], | ||
169 | [Define if the pthread_in_use() detection is hard.]) | ||
170 | esac | ||
171 | ]) | ||
172 | else | ||
173 | # Some library is needed. Try libpthread and libc_r. | ||
174 | AC_CHECK_LIB([pthread], [pthread_kill], | ||
175 | [gl_have_pthread=yes | ||
176 | LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread | ||
177 | LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread]) | ||
178 | if test -z "$gl_have_pthread"; then | ||
179 | # For FreeBSD 4. | ||
180 | AC_CHECK_LIB([c_r], [pthread_kill], | ||
181 | [gl_have_pthread=yes | ||
182 | LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r | ||
183 | LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r]) | ||
184 | fi | ||
185 | fi | ||
186 | if test -n "$gl_have_pthread"; then | ||
187 | gl_threads_api=posix | ||
188 | AC_DEFINE([USE_POSIX_THREADS], [1], | ||
189 | [Define if the POSIX multithreading library can be used.]) | ||
190 | if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then | ||
191 | if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then | ||
192 | AC_DEFINE([USE_POSIX_THREADS_WEAK], [1], | ||
193 | [Define if references to the POSIX multithreading library should be made weak.]) | ||
194 | LIBTHREAD= | ||
195 | LTLIBTHREAD= | ||
196 | fi | ||
197 | fi | ||
198 | fi | ||
199 | fi | ||
200 | fi | ||
201 | if test -z "$gl_have_pthread"; then | ||
202 | if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then | ||
203 | gl_have_solaristhread= | ||
204 | gl_save_LIBS="$LIBS" | ||
205 | LIBS="$LIBS -lthread" | ||
206 | AC_TRY_LINK([#include <thread.h> | ||
207 | #include <synch.h>], | ||
208 | [thr_self();], | ||
209 | [gl_have_solaristhread=yes]) | ||
210 | LIBS="$gl_save_LIBS" | ||
211 | if test -n "$gl_have_solaristhread"; then | ||
212 | gl_threads_api=solaris | ||
213 | LIBTHREAD=-lthread | ||
214 | LTLIBTHREAD=-lthread | ||
215 | LIBMULTITHREAD="$LIBTHREAD" | ||
216 | LTLIBMULTITHREAD="$LTLIBTHREAD" | ||
217 | AC_DEFINE([USE_SOLARIS_THREADS], [1], | ||
218 | [Define if the old Solaris multithreading library can be used.]) | ||
219 | if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then | ||
220 | AC_DEFINE([USE_SOLARIS_THREADS_WEAK], [1], | ||
221 | [Define if references to the old Solaris multithreading library should be made weak.]) | ||
222 | LIBTHREAD= | ||
223 | LTLIBTHREAD= | ||
224 | fi | ||
225 | fi | ||
226 | fi | ||
227 | fi | ||
228 | if test "$gl_use_threads" = pth; then | ||
229 | gl_save_CPPFLAGS="$CPPFLAGS" | ||
230 | AC_LIB_LINKFLAGS([pth]) | ||
231 | gl_have_pth= | ||
232 | gl_save_LIBS="$LIBS" | ||
233 | LIBS="$LIBS -lpth" | ||
234 | AC_TRY_LINK([#include <pth.h>], [pth_self();], [gl_have_pth=yes]) | ||
235 | LIBS="$gl_save_LIBS" | ||
236 | if test -n "$gl_have_pth"; then | ||
237 | gl_threads_api=pth | ||
238 | LIBTHREAD="$LIBPTH" | ||
239 | LTLIBTHREAD="$LTLIBPTH" | ||
240 | LIBMULTITHREAD="$LIBTHREAD" | ||
241 | LTLIBMULTITHREAD="$LTLIBTHREAD" | ||
242 | AC_DEFINE([USE_PTH_THREADS], [1], | ||
243 | [Define if the GNU Pth multithreading library can be used.]) | ||
244 | if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then | ||
245 | if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then | ||
246 | AC_DEFINE([USE_PTH_THREADS_WEAK], [1], | ||
247 | [Define if references to the GNU Pth multithreading library should be made weak.]) | ||
248 | LIBTHREAD= | ||
249 | LTLIBTHREAD= | ||
250 | fi | ||
251 | fi | ||
252 | else | ||
253 | CPPFLAGS="$gl_save_CPPFLAGS" | ||
254 | fi | ||
255 | fi | ||
256 | if test -z "$gl_have_pthread"; then | ||
257 | if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then | ||
258 | if { case "$host_os" in | ||
259 | mingw*) true;; | ||
260 | *) false;; | ||
261 | esac | ||
262 | }; then | ||
263 | gl_threads_api=win32 | ||
264 | AC_DEFINE([USE_WIN32_THREADS], [1], | ||
265 | [Define if the Win32 multithreading API can be used.]) | ||
266 | fi | ||
267 | fi | ||
268 | fi | ||
269 | fi | ||
270 | AC_MSG_CHECKING([for multithread API to use]) | ||
271 | AC_MSG_RESULT([$gl_threads_api]) | ||
272 | AC_SUBST([LIBTHREAD]) | ||
273 | AC_SUBST([LTLIBTHREAD]) | ||
274 | AC_SUBST([LIBMULTITHREAD]) | ||
275 | AC_SUBST([LTLIBMULTITHREAD]) | ||
276 | ]) | ||
277 | |||
278 | AC_DEFUN([gl_THREADLIB], | ||
279 | [ | ||
280 | AC_REQUIRE([gl_THREADLIB_EARLY]) | ||
281 | AC_REQUIRE([gl_THREADLIB_BODY]) | ||
282 | ]) | ||
283 | |||
284 | |||
285 | dnl gl_DISABLE_THREADS | ||
286 | dnl ------------------ | ||
287 | dnl Sets the gl_THREADLIB default so that threads are not used by default. | ||
288 | dnl The user can still override it at installation time, by using the | ||
289 | dnl configure option '--enable-threads'. | ||
290 | |||
291 | AC_DEFUN([gl_DISABLE_THREADS], [ | ||
292 | m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no]) | ||
293 | ]) | ||
294 | |||
295 | |||
296 | dnl Survey of platforms: | ||
297 | dnl | ||
298 | dnl Platform Available Compiler Supports test-lock | ||
299 | dnl flavours option weak result | ||
300 | dnl --------------- --------- --------- -------- --------- | ||
301 | dnl Linux 2.4/glibc posix -lpthread Y OK | ||
302 | dnl | ||
303 | dnl GNU Hurd/glibc posix | ||
304 | dnl | ||
305 | dnl FreeBSD 5.3 posix -lc_r Y | ||
306 | dnl posix -lkse ? Y | ||
307 | dnl posix -lpthread ? Y | ||
308 | dnl posix -lthr Y | ||
309 | dnl | ||
310 | dnl FreeBSD 5.2 posix -lc_r Y | ||
311 | dnl posix -lkse Y | ||
312 | dnl posix -lthr Y | ||
313 | dnl | ||
314 | dnl FreeBSD 4.0,4.10 posix -lc_r Y OK | ||
315 | dnl | ||
316 | dnl NetBSD 1.6 -- | ||
317 | dnl | ||
318 | dnl OpenBSD 3.4 posix -lpthread Y OK | ||
319 | dnl | ||
320 | dnl MacOS X 10.[123] posix -lpthread Y OK | ||
321 | dnl | ||
322 | dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK | ||
323 | dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK | ||
324 | dnl | ||
325 | dnl HP-UX 11 posix -lpthread N (cc) OK | ||
326 | dnl Y (gcc) | ||
327 | dnl | ||
328 | dnl IRIX 6.5 posix -lpthread Y 0.5 | ||
329 | dnl | ||
330 | dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK | ||
331 | dnl | ||
332 | dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK | ||
333 | dnl -lpthread (gcc) Y | ||
334 | dnl | ||
335 | dnl Cygwin posix -lpthread Y OK | ||
336 | dnl | ||
337 | dnl Any of the above pth -lpth 0.0 | ||
338 | dnl | ||
339 | dnl Mingw win32 N OK | ||
340 | dnl | ||
341 | dnl BeOS 5 -- | ||
342 | dnl | ||
343 | dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is | ||
344 | dnl turned off: | ||
345 | dnl OK if all three tests terminate OK, | ||
346 | dnl 0.5 if the first test terminates OK but the second one loops endlessly, | ||
347 | dnl 0.0 if the first test already loops endlessly. | ||
diff --git a/m4/uintmax_t.m4 b/m4/uintmax_t.m4 new file mode 100644 index 00000000..03b51bcf --- /dev/null +++ b/m4/uintmax_t.m4 | |||
@@ -0,0 +1,30 @@ | |||
1 | # uintmax_t.m4 serial 12 | ||
2 | dnl Copyright (C) 1997-2004, 2007-2010 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | dnl From Paul Eggert. | ||
8 | |||
9 | AC_PREREQ([2.13]) | ||
10 | |||
11 | # Define uintmax_t to 'unsigned long' or 'unsigned long long' | ||
12 | # if it is not already defined in <stdint.h> or <inttypes.h>. | ||
13 | |||
14 | AC_DEFUN([gl_AC_TYPE_UINTMAX_T], | ||
15 | [ | ||
16 | AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) | ||
17 | AC_REQUIRE([gl_AC_HEADER_STDINT_H]) | ||
18 | if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then | ||
19 | AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) | ||
20 | test $ac_cv_type_unsigned_long_long_int = yes \ | ||
21 | && ac_type='unsigned long long' \ | ||
22 | || ac_type='unsigned long' | ||
23 | AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type], | ||
24 | [Define to unsigned long or unsigned long long | ||
25 | if <stdint.h> and <inttypes.h> don't define.]) | ||
26 | else | ||
27 | AC_DEFINE([HAVE_UINTMAX_T], [1], | ||
28 | [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.]) | ||
29 | fi | ||
30 | ]) | ||
diff --git a/m4/visibility.m4 b/m4/visibility.m4 new file mode 100644 index 00000000..077c4765 --- /dev/null +++ b/m4/visibility.m4 | |||
@@ -0,0 +1,74 @@ | |||
1 | # visibility.m4 serial 3 (gettext-0.18) | ||
2 | dnl Copyright (C) 2005, 2008-2010 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | dnl From Bruno Haible. | ||
8 | |||
9 | dnl Tests whether the compiler supports the command-line option | ||
10 | dnl -fvisibility=hidden and the function and variable attributes | ||
11 | dnl __attribute__((__visibility__("hidden"))) and | ||
12 | dnl __attribute__((__visibility__("default"))). | ||
13 | dnl Does *not* test for __visibility__("protected") - which has tricky | ||
14 | dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on | ||
15 | dnl MacOS X. | ||
16 | dnl Does *not* test for __visibility__("internal") - which has processor | ||
17 | dnl dependent semantics. | ||
18 | dnl Does *not* test for #pragma GCC visibility push(hidden) - which is | ||
19 | dnl "really only recommended for legacy code". | ||
20 | dnl Set the variable CFLAG_VISIBILITY. | ||
21 | dnl Defines and sets the variable HAVE_VISIBILITY. | ||
22 | |||
23 | AC_DEFUN([gl_VISIBILITY], | ||
24 | [ | ||
25 | AC_REQUIRE([AC_PROG_CC]) | ||
26 | CFLAG_VISIBILITY= | ||
27 | HAVE_VISIBILITY=0 | ||
28 | if test -n "$GCC"; then | ||
29 | dnl First, check whether -Werror can be added to the command line, or | ||
30 | dnl whether it leads to an error because of some other option that the | ||
31 | dnl user has put into $CC $CFLAGS $CPPFLAGS. | ||
32 | AC_MSG_CHECKING([whether the -Werror option is usable]) | ||
33 | AC_CACHE_VAL([gl_cv_cc_vis_werror], [ | ||
34 | gl_save_CFLAGS="$CFLAGS" | ||
35 | CFLAGS="$CFLAGS -Werror" | ||
36 | AC_TRY_COMPILE([], [], | ||
37 | [gl_cv_cc_vis_werror=yes], | ||
38 | [gl_cv_cc_vis_werror=no]) | ||
39 | CFLAGS="$gl_save_CFLAGS"]) | ||
40 | AC_MSG_RESULT([$gl_cv_cc_vis_werror]) | ||
41 | dnl Now check whether visibility declarations are supported. | ||
42 | AC_MSG_CHECKING([for simple visibility declarations]) | ||
43 | AC_CACHE_VAL([gl_cv_cc_visibility], [ | ||
44 | gl_save_CFLAGS="$CFLAGS" | ||
45 | CFLAGS="$CFLAGS -fvisibility=hidden" | ||
46 | dnl We use the option -Werror and a function dummyfunc, because on some | ||
47 | dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning | ||
48 | dnl "visibility attribute not supported in this configuration; ignored" | ||
49 | dnl at the first function definition in every compilation unit, and we | ||
50 | dnl don't want to use the option in this case. | ||
51 | if test $gl_cv_cc_vis_werror = yes; then | ||
52 | CFLAGS="$CFLAGS -Werror" | ||
53 | fi | ||
54 | AC_TRY_COMPILE( | ||
55 | [extern __attribute__((__visibility__("hidden"))) int hiddenvar; | ||
56 | extern __attribute__((__visibility__("default"))) int exportedvar; | ||
57 | extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); | ||
58 | extern __attribute__((__visibility__("default"))) int exportedfunc (void); | ||
59 | void dummyfunc (void) {}], | ||
60 | [], | ||
61 | [gl_cv_cc_visibility=yes], | ||
62 | [gl_cv_cc_visibility=no]) | ||
63 | CFLAGS="$gl_save_CFLAGS"]) | ||
64 | AC_MSG_RESULT([$gl_cv_cc_visibility]) | ||
65 | if test $gl_cv_cc_visibility = yes; then | ||
66 | CFLAG_VISIBILITY="-fvisibility=hidden" | ||
67 | HAVE_VISIBILITY=1 | ||
68 | fi | ||
69 | fi | ||
70 | AC_SUBST([CFLAG_VISIBILITY]) | ||
71 | AC_SUBST([HAVE_VISIBILITY]) | ||
72 | AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY], | ||
73 | [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.]) | ||
74 | ]) | ||
diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4 new file mode 100644 index 00000000..ed804e66 --- /dev/null +++ b/m4/wchar_t.m4 | |||
@@ -0,0 +1,20 @@ | |||
1 | # wchar_t.m4 serial 3 (gettext-0.18) | ||
2 | dnl Copyright (C) 2002-2003, 2008-2010 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | dnl From Bruno Haible. | ||
8 | dnl Test whether <stddef.h> has the 'wchar_t' type. | ||
9 | dnl Prerequisite: AC_PROG_CC | ||
10 | |||
11 | AC_DEFUN([gt_TYPE_WCHAR_T], | ||
12 | [ | ||
13 | AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], | ||
14 | [AC_TRY_COMPILE([#include <stddef.h> | ||
15 | wchar_t foo = (wchar_t)'\0';], , | ||
16 | [gt_cv_c_wchar_t=yes], [gt_cv_c_wchar_t=no])]) | ||
17 | if test $gt_cv_c_wchar_t = yes; then | ||
18 | AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) | ||
19 | fi | ||
20 | ]) | ||
diff --git a/m4/wint_t.m4 b/m4/wint_t.m4 new file mode 100644 index 00000000..a6c7d15c --- /dev/null +++ b/m4/wint_t.m4 | |||
@@ -0,0 +1,28 @@ | |||
1 | # wint_t.m4 serial 4 (gettext-0.18) | ||
2 | dnl Copyright (C) 2003, 2007-2010 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | dnl From Bruno Haible. | ||
8 | dnl Test whether <wchar.h> has the 'wint_t' type. | ||
9 | dnl Prerequisite: AC_PROG_CC | ||
10 | |||
11 | AC_DEFUN([gt_TYPE_WINT_T], | ||
12 | [ | ||
13 | AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t], | ||
14 | [AC_TRY_COMPILE([ | ||
15 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | ||
16 | <wchar.h>. | ||
17 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included | ||
18 | before <wchar.h>. */ | ||
19 | #include <stddef.h> | ||
20 | #include <stdio.h> | ||
21 | #include <time.h> | ||
22 | #include <wchar.h> | ||
23 | wint_t foo = (wchar_t)'\0';], , | ||
24 | [gt_cv_c_wint_t=yes], [gt_cv_c_wint_t=no])]) | ||
25 | if test $gt_cv_c_wint_t = yes; then | ||
26 | AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.]) | ||
27 | fi | ||
28 | ]) | ||
diff --git a/m4/xsize.m4 b/m4/xsize.m4 new file mode 100644 index 00000000..b653693a --- /dev/null +++ b/m4/xsize.m4 | |||
@@ -0,0 +1,13 @@ | |||
1 | # xsize.m4 serial 4 | ||
2 | dnl Copyright (C) 2003-2004, 2008-2010 Free Software Foundation, Inc. | ||
3 | dnl This file is free software; the Free Software Foundation | ||
4 | dnl gives unlimited permission to copy and/or distribute it, | ||
5 | dnl with or without modifications, as long as this notice is preserved. | ||
6 | |||
7 | AC_DEFUN([gl_XSIZE], | ||
8 | [ | ||
9 | dnl Prerequisites of lib/xsize.h. | ||
10 | AC_REQUIRE([gl_SIZE_MAX]) | ||
11 | AC_REQUIRE([AC_C_INLINE]) | ||
12 | AC_CHECK_HEADERS([stdint.h]) | ||
13 | ]) | ||