Adding debian version 0.3.6.3-1.
[debian/lxpanel.git] / aclocal.m4
CommitLineData
ee4883d4 1# generated automatically by aclocal 1.10 -*- Autoconf -*-
6cc5e1a6
DB
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
ee4883d4 4# 2005, 2006 Free Software Foundation, Inc.
6cc5e1a6
DB
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
ee4883d4
DB
14m4_if(m4_PACKAGE_VERSION, [2.61],,
15[m4_fatal([this file was generated for autoconf 2.61.
16You have another version of autoconf. If you want to use that,
17you should regenerate the build system entirely.], [63])])
6cc5e1a6 18
ee4883d4
DB
19# gettext.m4 serial 59 (gettext-0.16.1)
20dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
6cc5e1a6
DB
21dnl This file is free software; the Free Software Foundation
22dnl gives unlimited permission to copy and/or distribute it,
23dnl with or without modifications, as long as this notice is preserved.
24dnl
25dnl This file can can be used in projects which are not available under
26dnl the GNU General Public License or the GNU Library General Public
27dnl License but which still want to provide support for the GNU gettext
28dnl functionality.
29dnl Please note that the actual code of the GNU gettext library is covered
30dnl by the GNU Library General Public License, and the rest of the GNU
31dnl gettext package package is covered by the GNU General Public License.
32dnl They are *not* in the public domain.
33
34dnl Authors:
35dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
36dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006.
37
38dnl Macro to add for using GNU gettext.
39
40dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
41dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
42dnl default (if it is not specified or empty) is 'no-libtool'.
43dnl INTLSYMBOL should be 'external' for packages with no intl directory,
44dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
45dnl If INTLSYMBOL is 'use-libtool', then a libtool library
46dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
47dnl depending on --{enable,disable}-{shared,static} and on the presence of
48dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
49dnl $(top_builddir)/intl/libintl.a will be created.
50dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
51dnl implementations (in libc or libintl) without the ngettext() function
52dnl will be ignored. If NEEDSYMBOL is specified and is
53dnl 'need-formatstring-macros', then GNU gettext implementations that don't
54dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
55dnl INTLDIR is used to find the intl libraries. If empty,
56dnl the value `$(top_builddir)/intl/' is used.
57dnl
58dnl The result of the configuration is one of three cases:
59dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
60dnl and used.
61dnl Catalog format: GNU --> install in $(datadir)
62dnl Catalog extension: .mo after installation, .gmo in source tree
63dnl 2) GNU gettext has been found in the system's C library.
64dnl Catalog format: GNU --> install in $(datadir)
65dnl Catalog extension: .mo after installation, .gmo in source tree
66dnl 3) No internationalization, always use English msgid.
67dnl Catalog format: none
68dnl Catalog extension: none
69dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
70dnl The use of .gmo is historical (it was needed to avoid overwriting the
71dnl GNU format catalogs when building on a platform with an X/Open gettext),
72dnl but we keep it in order not to force irrelevant filename changes on the
73dnl maintainers.
74dnl
75AC_DEFUN([AM_GNU_GETTEXT],
76[
77 dnl Argument checking.
78 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
79 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
80])])])])])
81 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
82 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
83])])])])
84 define([gt_included_intl],
85 ifelse([$1], [external],
86 ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
87 [yes]))
88 define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
89 gt_NEEDS_INIT
90 AM_GNU_GETTEXT_NEED([$2])
91
92 AC_REQUIRE([AM_PO_SUBDIRS])dnl
93 ifelse(gt_included_intl, yes, [
94 AC_REQUIRE([AM_INTL_SUBDIR])dnl
95 ])
96
97 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
98 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
99 AC_REQUIRE([AC_LIB_RPATH])
100
101 dnl Sometimes libintl requires libiconv, so first search for libiconv.
102 dnl Ideally we would do this search only after the
103 dnl if test "$USE_NLS" = "yes"; then
104 dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
105 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
106 dnl the configure script would need to contain the same shell code
107 dnl again, outside any 'if'. There are two solutions:
108 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
109 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
110 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
111 dnl documented, we avoid it.
112 ifelse(gt_included_intl, yes, , [
113 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
114 ])
115
116 dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
117 gt_INTL_MACOSX
118
119 dnl Set USE_NLS.
120 AC_REQUIRE([AM_NLS])
121
122 ifelse(gt_included_intl, yes, [
123 BUILD_INCLUDED_LIBINTL=no
124 USE_INCLUDED_LIBINTL=no
125 ])
126 LIBINTL=
127 LTLIBINTL=
128 POSUB=
129
130 dnl Add a version number to the cache macros.
131 case " $gt_needs " in
132 *" need-formatstring-macros "*) gt_api_version=3 ;;
133 *" need-ngettext "*) gt_api_version=2 ;;
134 *) gt_api_version=1 ;;
135 esac
136 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
137 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
138
139 dnl If we use NLS figure out what method
140 if test "$USE_NLS" = "yes"; then
141 gt_use_preinstalled_gnugettext=no
142 ifelse(gt_included_intl, yes, [
143 AC_MSG_CHECKING([whether included gettext is requested])
144 AC_ARG_WITH(included-gettext,
145 [ --with-included-gettext use the GNU gettext library included here],
146 nls_cv_force_use_gnu_gettext=$withval,
147 nls_cv_force_use_gnu_gettext=no)
148 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
149
150 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
151 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
152 ])
153 dnl User does not insist on using GNU NLS library. Figure out what
154 dnl to use. If GNU gettext is available we use this. Else we have
155 dnl to fall back to GNU NLS library.
156
157 if test $gt_api_version -ge 3; then
158 gt_revision_test_code='
159#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
160#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
161#endif
162changequote(,)dnl
163typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
164changequote([,])dnl
165'
166 else
167 gt_revision_test_code=
168 fi
169 if test $gt_api_version -ge 2; then
170 gt_expression_test_code=' + * ngettext ("", "", 0)'
171 else
172 gt_expression_test_code=
173 fi
174
175 AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
176 [AC_TRY_LINK([#include <libintl.h>
177$gt_revision_test_code
178extern int _nl_msg_cat_cntr;
179extern int *_nl_domain_bindings;],
180 [bindtextdomain ("", "");
181return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
182 [eval "$gt_func_gnugettext_libc=yes"],
183 [eval "$gt_func_gnugettext_libc=no"])])
184
185 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
186 dnl Sometimes libintl requires libiconv, so first search for libiconv.
187 ifelse(gt_included_intl, yes, , [
188 AM_ICONV_LINK
189 ])
190 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
191 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
192 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
193 dnl even if libiconv doesn't exist.
194 AC_LIB_LINKFLAGS_BODY([intl])
195 AC_CACHE_CHECK([for GNU gettext in libintl],
196 [$gt_func_gnugettext_libintl],
197 [gt_save_CPPFLAGS="$CPPFLAGS"
198 CPPFLAGS="$CPPFLAGS $INCINTL"
199 gt_save_LIBS="$LIBS"
200 LIBS="$LIBS $LIBINTL"
201 dnl Now see whether libintl exists and does not depend on libiconv.
202 AC_TRY_LINK([#include <libintl.h>
203$gt_revision_test_code
204extern int _nl_msg_cat_cntr;
205extern
206#ifdef __cplusplus
207"C"
208#endif
209const char *_nl_expand_alias (const char *);],
210 [bindtextdomain ("", "");
211return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
212 [eval "$gt_func_gnugettext_libintl=yes"],
213 [eval "$gt_func_gnugettext_libintl=no"])
214 dnl Now see whether libintl exists and depends on libiconv.
215 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
216 LIBS="$LIBS $LIBICONV"
217 AC_TRY_LINK([#include <libintl.h>
218$gt_revision_test_code
219extern int _nl_msg_cat_cntr;
220extern
221#ifdef __cplusplus
222"C"
223#endif
224const char *_nl_expand_alias (const char *);],
225 [bindtextdomain ("", "");
226return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
227 [LIBINTL="$LIBINTL $LIBICONV"
228 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
229 eval "$gt_func_gnugettext_libintl=yes"
230 ])
231 fi
232 CPPFLAGS="$gt_save_CPPFLAGS"
233 LIBS="$gt_save_LIBS"])
234 fi
235
236 dnl If an already present or preinstalled GNU gettext() is found,
237 dnl use it. But if this macro is used in GNU gettext, and GNU
238 dnl gettext is already preinstalled in libintl, we update this
239 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
240 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
241 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
242 && test "$PACKAGE" != gettext-runtime \
243 && test "$PACKAGE" != gettext-tools; }; then
244 gt_use_preinstalled_gnugettext=yes
245 else
246 dnl Reset the values set by searching for libintl.
247 LIBINTL=
248 LTLIBINTL=
249 INCINTL=
250 fi
251
252 ifelse(gt_included_intl, yes, [
253 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
254 dnl GNU gettext is not found in the C library.
255 dnl Fall back on included GNU gettext library.
256 nls_cv_use_gnu_gettext=yes
257 fi
258 fi
259
260 if test "$nls_cv_use_gnu_gettext" = "yes"; then
261 dnl Mark actions used to generate GNU NLS library.
262 BUILD_INCLUDED_LIBINTL=yes
263 USE_INCLUDED_LIBINTL=yes
264 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
265 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
266 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
267 fi
268
269 CATOBJEXT=
270 if test "$gt_use_preinstalled_gnugettext" = "yes" \
271 || test "$nls_cv_use_gnu_gettext" = "yes"; then
272 dnl Mark actions to use GNU gettext tools.
273 CATOBJEXT=.gmo
274 fi
275 ])
276
277 if test -n "$INTL_MACOSX_LIBS"; then
278 if test "$gt_use_preinstalled_gnugettext" = "yes" \
279 || test "$nls_cv_use_gnu_gettext" = "yes"; then
280 dnl Some extra flags are needed during linking.
281 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
282 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
283 fi
284 fi
285
286 if test "$gt_use_preinstalled_gnugettext" = "yes" \
287 || test "$nls_cv_use_gnu_gettext" = "yes"; then
288 AC_DEFINE(ENABLE_NLS, 1,
289 [Define to 1 if translation of program messages to the user's native language
290 is requested.])
291 else
292 USE_NLS=no
293 fi
294 fi
295
296 AC_MSG_CHECKING([whether to use NLS])
297 AC_MSG_RESULT([$USE_NLS])
298 if test "$USE_NLS" = "yes"; then
299 AC_MSG_CHECKING([where the gettext function comes from])
300 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
301 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
302 gt_source="external libintl"
303 else
304 gt_source="libc"
305 fi
306 else
307 gt_source="included intl directory"
308 fi
309 AC_MSG_RESULT([$gt_source])
310 fi
311
312 if test "$USE_NLS" = "yes"; then
313
314 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
315 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
316 AC_MSG_CHECKING([how to link with libintl])
317 AC_MSG_RESULT([$LIBINTL])
318 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
319 fi
320
321 dnl For backward compatibility. Some packages may be using this.
322 AC_DEFINE(HAVE_GETTEXT, 1,
323 [Define if the GNU gettext() function is already present or preinstalled.])
324 AC_DEFINE(HAVE_DCGETTEXT, 1,
325 [Define if the GNU dcgettext() function is already present or preinstalled.])
326 fi
327
328 dnl We need to process the po/ directory.
329 POSUB=po
330 fi
331
332 ifelse(gt_included_intl, yes, [
333 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
334 dnl to 'yes' because some of the testsuite requires it.
335 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
336 BUILD_INCLUDED_LIBINTL=yes
337 fi
338
339 dnl Make all variables we use known to autoconf.
340 AC_SUBST(BUILD_INCLUDED_LIBINTL)
341 AC_SUBST(USE_INCLUDED_LIBINTL)
342 AC_SUBST(CATOBJEXT)
343
344 dnl For backward compatibility. Some configure.ins may be using this.
345 nls_cv_header_intl=
346 nls_cv_header_libgt=
347
348 dnl For backward compatibility. Some Makefiles may be using this.
349 DATADIRNAME=share
350 AC_SUBST(DATADIRNAME)
351
352 dnl For backward compatibility. Some Makefiles may be using this.
353 INSTOBJEXT=.mo
354 AC_SUBST(INSTOBJEXT)
355
356 dnl For backward compatibility. Some Makefiles may be using this.
357 GENCAT=gencat
358 AC_SUBST(GENCAT)
359
360 dnl For backward compatibility. Some Makefiles may be using this.
361 INTLOBJS=
362 if test "$USE_INCLUDED_LIBINTL" = yes; then
363 INTLOBJS="\$(GETTOBJS)"
364 fi
365 AC_SUBST(INTLOBJS)
366
367 dnl Enable libtool support if the surrounding package wishes it.
368 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
369 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
370 ])
371
372 dnl For backward compatibility. Some Makefiles may be using this.
373 INTLLIBS="$LIBINTL"
374 AC_SUBST(INTLLIBS)
375
376 dnl Make all documented variables known to autoconf.
377 AC_SUBST(LIBINTL)
378 AC_SUBST(LTLIBINTL)
379 AC_SUBST(POSUB)
380])
381
382
ee4883d4
DB
383dnl Checks for special options needed on MacOS X.
384dnl Defines INTL_MACOSX_LIBS.
385AC_DEFUN([gt_INTL_MACOSX],
386[
387 dnl Check for API introduced in MacOS X 10.2.
388 AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
389 gt_cv_func_CFPreferencesCopyAppValue,
390 [gt_save_LIBS="$LIBS"
391 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
392 AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
393 [CFPreferencesCopyAppValue(NULL, NULL)],
394 [gt_cv_func_CFPreferencesCopyAppValue=yes],
395 [gt_cv_func_CFPreferencesCopyAppValue=no])
396 LIBS="$gt_save_LIBS"])
397 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
398 AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
399 [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
400 fi
401 dnl Check for API introduced in MacOS X 10.3.
402 AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
403 [gt_save_LIBS="$LIBS"
404 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
405 AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
406 [gt_cv_func_CFLocaleCopyCurrent=yes],
407 [gt_cv_func_CFLocaleCopyCurrent=no])
408 LIBS="$gt_save_LIBS"])
409 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
410 AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
411 [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
412 fi
413 INTL_MACOSX_LIBS=
414 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
415 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
416 fi
417 AC_SUBST([INTL_MACOSX_LIBS])
418])
419
420
6cc5e1a6
DB
421dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
422m4_define([gt_NEEDS_INIT],
423[
424 m4_divert_text([DEFAULTS], [gt_needs=])
425 m4_define([gt_NEEDS_INIT], [])
426])
427
428
429dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
430AC_DEFUN([AM_GNU_GETTEXT_NEED],
431[
432 m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
433])
434
435
436dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
437AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
438
439# Copyright (C) 1995-2002 Free Software Foundation, Inc.
440# Copyright (C) 2001-2003,2004 Red Hat, Inc.
441#
442# This file is free software, distributed under the terms of the GNU
443# General Public License. As a special exception to the GNU General
444# Public License, this file may be distributed as part of a program
445# that contains a configuration script generated by Autoconf, under
446# the same distribution terms as the rest of that program.
447#
448# This file can be copied and used freely without restrictions. It can
449# be used in projects which are not available under the GNU Public License
450# but which still want to provide support for the GNU gettext functionality.
451#
452# Macro to add for using GNU gettext.
453# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
454#
455# Modified to never use included libintl.
456# Owen Taylor <otaylor@redhat.com>, 12/15/1998
457#
458# Major rework to remove unused code
459# Owen Taylor <otaylor@redhat.com>, 12/11/2002
460#
461# Added better handling of ALL_LINGUAS from GNU gettext version
462# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
463#
464# Modified to require ngettext
465# Matthias Clasen <mclasen@redhat.com> 08/06/2004
466#
467# We need this here as well, since someone might use autoconf-2.5x
468# to configure GLib then an older version to configure a package
469# using AM_GLIB_GNU_GETTEXT
470AC_PREREQ(2.53)
471
472dnl
473dnl We go to great lengths to make sure that aclocal won't
474dnl try to pull in the installed version of these macros
475dnl when running aclocal in the glib directory.
476dnl
477m4_copy([AC_DEFUN],[glib_DEFUN])
478m4_copy([AC_REQUIRE],[glib_REQUIRE])
479dnl
480dnl At the end, if we're not within glib, we'll define the public
481dnl definitions in terms of our private definitions.
482dnl
483
484# GLIB_LC_MESSAGES
485#--------------------
486glib_DEFUN([GLIB_LC_MESSAGES],
487 [AC_CHECK_HEADERS([locale.h])
488 if test $ac_cv_header_locale_h = yes; then
489 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
490 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
491 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
492 if test $am_cv_val_LC_MESSAGES = yes; then
493 AC_DEFINE(HAVE_LC_MESSAGES, 1,
494 [Define if your <locale.h> file defines LC_MESSAGES.])
495 fi
496 fi])
497
498# GLIB_PATH_PROG_WITH_TEST
499#----------------------------
500dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
501dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
502glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
503[# Extract the first word of "$2", so it can be a program name with args.
504set dummy $2; ac_word=[$]2
505AC_MSG_CHECKING([for $ac_word])
506AC_CACHE_VAL(ac_cv_path_$1,
507[case "[$]$1" in
508 /*)
509 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
510 ;;
511 *)
512 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
513 for ac_dir in ifelse([$5], , $PATH, [$5]); do
514 test -z "$ac_dir" && ac_dir=.
515 if test -f $ac_dir/$ac_word; then
516 if [$3]; then
517 ac_cv_path_$1="$ac_dir/$ac_word"
518 break
519 fi
520 fi
521 done
522 IFS="$ac_save_ifs"
523dnl If no 4th arg is given, leave the cache variable unset,
524dnl so AC_PATH_PROGS will keep looking.
525ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
526])dnl
527 ;;
528esac])dnl
529$1="$ac_cv_path_$1"
530if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
531 AC_MSG_RESULT([$]$1)
532else
533 AC_MSG_RESULT(no)
534fi
535AC_SUBST($1)dnl
536])
537
538# GLIB_WITH_NLS
539#-----------------
540glib_DEFUN([GLIB_WITH_NLS],
541 dnl NLS is obligatory
ee4883d4
DB
542 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
543 USE_NLS=yes
6cc5e1a6
DB
544 AC_SUBST(USE_NLS)
545
546 gt_cv_have_gettext=no
547
548 CATOBJEXT=NONE
549 XGETTEXT=:
550 INTLLIBS=
551
552 AC_CHECK_HEADER(libintl.h,
553 [gt_cv_func_dgettext_libintl="no"
554 libintl_extra_libs=""
555
556 #
557 # First check in libc
558 #
559 AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
560 [AC_TRY_LINK([
561#include <libintl.h>
562],
563 [return !ngettext ("","", 1)],
564 gt_cv_func_ngettext_libc=yes,
565 gt_cv_func_ngettext_libc=no)
566 ])
567
568 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
569 AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
570 [AC_TRY_LINK([
571#include <libintl.h>
572],
573 [return !dgettext ("","")],
574 gt_cv_func_dgettext_libc=yes,
575 gt_cv_func_dgettext_libc=no)
576 ])
577 fi
578
579 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
580 AC_CHECK_FUNCS(bind_textdomain_codeset)
581 fi
582
583 #
584 # If we don't have everything we want, check in libintl
585 #
586 if test "$gt_cv_func_dgettext_libc" != "yes" \
587 || test "$gt_cv_func_ngettext_libc" != "yes" \
588 || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
589
590 AC_CHECK_LIB(intl, bindtextdomain,
591 [AC_CHECK_LIB(intl, ngettext,
592 [AC_CHECK_LIB(intl, dgettext,
593 gt_cv_func_dgettext_libintl=yes)])])
594
595 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
596 AC_MSG_CHECKING([if -liconv is needed to use gettext])
597 AC_MSG_RESULT([])
598 AC_CHECK_LIB(intl, ngettext,
599 [AC_CHECK_LIB(intl, dcgettext,
600 [gt_cv_func_dgettext_libintl=yes
601 libintl_extra_libs=-liconv],
602 :,-liconv)],
603 :,-liconv)
604 fi
605
606 #
607 # If we found libintl, then check in it for bind_textdomain_codeset();
608 # we'll prefer libc if neither have bind_textdomain_codeset(),
609 # and both have dgettext and ngettext
610 #
611 if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
612 glib_save_LIBS="$LIBS"
613 LIBS="$LIBS -lintl $libintl_extra_libs"
614 unset ac_cv_func_bind_textdomain_codeset
615 AC_CHECK_FUNCS(bind_textdomain_codeset)
616 LIBS="$glib_save_LIBS"
617
618 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
619 gt_cv_func_dgettext_libc=no
620 else
621 if test "$gt_cv_func_dgettext_libc" = "yes" \
622 && test "$gt_cv_func_ngettext_libc" = "yes"; then
623 gt_cv_func_dgettext_libintl=no
624 fi
625 fi
626 fi
627 fi
628
629 if test "$gt_cv_func_dgettext_libc" = "yes" \
630 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
631 gt_cv_have_gettext=yes
632 fi
633
634 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
635 INTLLIBS="-lintl $libintl_extra_libs"
636 fi
637
638 if test "$gt_cv_have_gettext" = "yes"; then
639 AC_DEFINE(HAVE_GETTEXT,1,
640 [Define if the GNU gettext() function is already present or preinstalled.])
641 GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
642 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
643 if test "$MSGFMT" != "no"; then
644 glib_save_LIBS="$LIBS"
645 LIBS="$LIBS $INTLLIBS"
646 AC_CHECK_FUNCS(dcgettext)
647 MSGFMT_OPTS=
648 AC_MSG_CHECKING([if msgfmt accepts -c])
649 GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
650msgid ""
651msgstr ""
652"Content-Type: text/plain; charset=UTF-8\n"
653"Project-Id-Version: test 1.0\n"
654"PO-Revision-Date: 2007-02-15 12:01+0100\n"
655"Last-Translator: test <foo@bar.xx>\n"
656"Language-Team: C <LL@li.org>\n"
657"MIME-Version: 1.0\n"
658"Content-Transfer-Encoding: 8bit\n"
659], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
660 AC_SUBST(MSGFMT_OPTS)
661 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
662 GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
663 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
664 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
665 return _nl_msg_cat_cntr],
666 [CATOBJEXT=.gmo
667 DATADIRNAME=share],
668 [case $host in
669 *-*-solaris*)
670 dnl On Solaris, if bind_textdomain_codeset is in libc,
671 dnl GNU format message catalog is always supported,
672 dnl since both are added to the libc all together.
673 dnl Hence, we'd like to go with DATADIRNAME=share and
674 dnl and CATOBJEXT=.gmo in this case.
675 AC_CHECK_FUNC(bind_textdomain_codeset,
676 [CATOBJEXT=.gmo
677 DATADIRNAME=share],
678 [CATOBJEXT=.mo
679 DATADIRNAME=lib])
680 ;;
681 *)
682 CATOBJEXT=.mo
683 DATADIRNAME=lib
684 ;;
685 esac])
686 LIBS="$glib_save_LIBS"
687 INSTOBJEXT=.mo
688 else
689 gt_cv_have_gettext=no
690 fi
691 fi
692 ])
693
694 if test "$gt_cv_have_gettext" = "yes" ; then
695 AC_DEFINE(ENABLE_NLS, 1,
696 [always defined to indicate that i18n is enabled])
697 fi
698
699 dnl Test whether we really found GNU xgettext.
700 if test "$XGETTEXT" != ":"; then
701 dnl If it is not GNU xgettext we define it as : so that the
702 dnl Makefiles still can work.
703 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
704 : ;
705 else
706 AC_MSG_RESULT(
707 [found xgettext program is not GNU xgettext; ignore it])
708 XGETTEXT=":"
709 fi
710 fi
711
712 # We need to process the po/ directory.
713 POSUB=po
714
715 AC_OUTPUT_COMMANDS(
716 [case "$CONFIG_FILES" in *po/Makefile.in*)
717 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
718 esac])
719
720 dnl These rules are solely for the distribution goal. While doing this
721 dnl we only have to keep exactly one list of the available catalogs
722 dnl in configure.in.
723 for lang in $ALL_LINGUAS; do
724 GMOFILES="$GMOFILES $lang.gmo"
725 POFILES="$POFILES $lang.po"
726 done
727
728 dnl Make all variables we use known to autoconf.
729 AC_SUBST(CATALOGS)
730 AC_SUBST(CATOBJEXT)
731 AC_SUBST(DATADIRNAME)
732 AC_SUBST(GMOFILES)
733 AC_SUBST(INSTOBJEXT)
734 AC_SUBST(INTLLIBS)
735 AC_SUBST(PO_IN_DATADIR_TRUE)
736 AC_SUBST(PO_IN_DATADIR_FALSE)
737 AC_SUBST(POFILES)
738 AC_SUBST(POSUB)
739 ])
740
741# AM_GLIB_GNU_GETTEXT
742# -------------------
743# Do checks necessary for use of gettext. If a suitable implementation
744# of gettext is found in either in libintl or in the C library,
745# it will set INTLLIBS to the libraries needed for use of gettext
746# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
747# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
748# on various variables needed by the Makefile.in.in installed by
749# glib-gettextize.
750dnl
751glib_DEFUN([GLIB_GNU_GETTEXT],
752 [AC_REQUIRE([AC_PROG_CC])dnl
753 AC_REQUIRE([AC_HEADER_STDC])dnl
754
755 GLIB_LC_MESSAGES
756 GLIB_WITH_NLS
757
758 if test "$gt_cv_have_gettext" = "yes"; then
759 if test "x$ALL_LINGUAS" = "x"; then
760 LINGUAS=
761 else
762 AC_MSG_CHECKING(for catalogs to be installed)
763 NEW_LINGUAS=
764 for presentlang in $ALL_LINGUAS; do
765 useit=no
766 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
767 desiredlanguages="$LINGUAS"
768 else
769 desiredlanguages="$ALL_LINGUAS"
770 fi
771 for desiredlang in $desiredlanguages; do
772 # Use the presentlang catalog if desiredlang is
773 # a. equal to presentlang, or
774 # b. a variant of presentlang (because in this case,
775 # presentlang can be used as a fallback for messages
776 # which are not translated in the desiredlang catalog).
777 case "$desiredlang" in
778 "$presentlang"*) useit=yes;;
779 esac
780 done
781 if test $useit = yes; then
782 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
783 fi
784 done
785 LINGUAS=$NEW_LINGUAS
786 AC_MSG_RESULT($LINGUAS)
787 fi
788
789 dnl Construct list of names of catalog files to be constructed.
790 if test -n "$LINGUAS"; then
791 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
792 fi
793 fi
794
795 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
796 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
797 dnl Try to locate is.
798 MKINSTALLDIRS=
799 if test -n "$ac_aux_dir"; then
800 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
801 fi
802 if test -z "$MKINSTALLDIRS"; then
803 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
804 fi
805 AC_SUBST(MKINSTALLDIRS)
806
807 dnl Generate list of files to be processed by xgettext which will
808 dnl be included in po/Makefile.
809 test -d po || mkdir po
810 if test "x$srcdir" != "x."; then
811 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
812 posrcprefix="$srcdir/"
813 else
814 posrcprefix="../$srcdir/"
815 fi
816 else
817 posrcprefix="../"
818 fi
819 rm -f po/POTFILES
820 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
821 < $srcdir/po/POTFILES.in > po/POTFILES
822 ])
823
824# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
825# -------------------------------
826# Define VARIABLE to the location where catalog files will
827# be installed by po/Makefile.
828glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
829[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
830glib_save_prefix="$prefix"
831glib_save_exec_prefix="$exec_prefix"
832glib_save_datarootdir="$datarootdir"
833test "x$prefix" = xNONE && prefix=$ac_default_prefix
834test "x$exec_prefix" = xNONE && exec_prefix=$prefix
835datarootdir=`eval echo "${datarootdir}"`
836if test "x$CATOBJEXT" = "x.mo" ; then
837 localedir=`eval echo "${libdir}/locale"`
838else
839 localedir=`eval echo "${datadir}/locale"`
840fi
841prefix="$glib_save_prefix"
842exec_prefix="$glib_save_exec_prefix"
843datarootdir="$glib_save_datarootdir"
844AC_DEFINE_UNQUOTED($1, "$localedir",
845 [Define the location where the catalogs will be installed])
846])
847
848dnl
849dnl Now the definitions that aclocal will find
850dnl
851ifdef(glib_configure_in,[],[
852AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
853AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
854])dnl
855
856# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
857#
858# Create a temporary file with TEST-FILE as its contents and pass the
859# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
860# 0 and perform ACTION-IF-FAIL for any other exit status.
861AC_DEFUN([GLIB_RUN_PROG],
862[cat >conftest.foo <<_ACEOF
863$2
864_ACEOF
865if AC_RUN_LOG([$1 conftest.foo]); then
866 m4_ifval([$3], [$3], [:])
867m4_ifvaln([$4], [else $4])dnl
868echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
869sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
870fi])
871
872
873
874dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
875# serial 36 IT_PROG_INTLTOOL
876AC_DEFUN([IT_PROG_INTLTOOL],
877[AC_PREREQ([2.50])dnl
878
879case "$am__api_version" in
880 1.[01234])
881 AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
882 ;;
883 *)
884 ;;
885esac
886
887if test -n "$1"; then
888 AC_MSG_CHECKING([for intltool >= $1])
889
890 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
891 INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
892 [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
893 ]
894 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
895 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
896 AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
897fi
898
899 INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
900INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
901 INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
902 INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
903 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
904 INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
905 INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
906 INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
907INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
908 INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
909 INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
910 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
911 INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
912 INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
913 INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
914 INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
915 INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
916 INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
917 INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
918
919AC_SUBST(INTLTOOL_DESKTOP_RULE)
920AC_SUBST(INTLTOOL_DIRECTORY_RULE)
921AC_SUBST(INTLTOOL_KEYS_RULE)
922AC_SUBST(INTLTOOL_PROP_RULE)
923AC_SUBST(INTLTOOL_OAF_RULE)
924AC_SUBST(INTLTOOL_PONG_RULE)
925AC_SUBST(INTLTOOL_SERVER_RULE)
926AC_SUBST(INTLTOOL_SHEET_RULE)
927AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
928AC_SUBST(INTLTOOL_UI_RULE)
929AC_SUBST(INTLTOOL_XAM_RULE)
930AC_SUBST(INTLTOOL_KBD_RULE)
931AC_SUBST(INTLTOOL_XML_RULE)
932AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
933AC_SUBST(INTLTOOL_CAVES_RULE)
934AC_SUBST(INTLTOOL_SCHEMAS_RULE)
935AC_SUBST(INTLTOOL_THEME_RULE)
936AC_SUBST(INTLTOOL_SERVICE_RULE)
937AC_SUBST(INTLTOOL_POLICY_RULE)
938
6cc5e1a6
DB
939# Use the tools built into the package, not the ones that are installed.
940AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
941AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
942AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
943
944AC_PATH_PROG(INTLTOOL_PERL, perl)
945if test -z "$INTLTOOL_PERL"; then
946 AC_MSG_ERROR([perl not found; required for intltool])
947fi
948if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
949 AC_MSG_ERROR([perl 5.x required for intltool])
950fi
951if test "x$2" != "xno-xml"; then
952 AC_MSG_CHECKING([for XML::Parser])
953 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
954 AC_MSG_RESULT([ok])
955 else
956 AC_MSG_ERROR([XML::Parser perl module is required for intltool])
957 fi
958fi
959
960# Substitute ALL_LINGUAS so we can use it in po/Makefile
961AC_SUBST(ALL_LINGUAS)
962
963# Set DATADIRNAME correctly if it is not set yet
964# (copied from glib-gettext.m4)
965if test -z "$DATADIRNAME"; then
966 AC_LINK_IFELSE(
967 [AC_LANG_PROGRAM([[]],
968 [[extern int _nl_msg_cat_cntr;
969 return _nl_msg_cat_cntr]])],
970 [DATADIRNAME=share],
971 [case $host in
972 *-*-solaris*)
973 dnl On Solaris, if bind_textdomain_codeset is in libc,
974 dnl GNU format message catalog is always supported,
975 dnl since both are added to the libc all together.
976 dnl Hence, we'd like to go with DATADIRNAME=share
977 dnl in this case.
978 AC_CHECK_FUNC(bind_textdomain_codeset,
979 [DATADIRNAME=share], [DATADIRNAME=lib])
980 ;;
981 *)
982 [DATADIRNAME=lib]
983 ;;
984 esac])
985fi
986AC_SUBST(DATADIRNAME)
987
988IT_PO_SUBDIR([po])
989
990dnl The following is very similar to
991dnl
992dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
993dnl
994dnl with the following slight differences:
995dnl - the *.in files are in ac_aux_dir,
996dnl - if the file haven't changed upon reconfigure, it's not touched,
997dnl - the evaluation of the third parameter enables a hack which computes
998dnl the actual value of $libdir,
999dnl - the user sees "executing intltool commands", instead of
1000dnl "creating intltool-extract" and such.
1001dnl
1002dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
1003dnl a reason for it.
1004
1005AC_CONFIG_COMMANDS([intltool], [
1006
1007for file in intltool-extract intltool-merge intltool-update; do
1008 sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
1009 -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
1010 -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
1011 < ${ac_aux_dir}/${file}.in > ${file}.out
1012 if cmp -s ${file} ${file}.out 2>/dev/null; then
1013 rm -f ${file}.out
1014 else
1015 mv -f ${file}.out ${file}
1016 fi
1017 chmod ugo+x ${file}
1018 chmod u+w ${file}
1019done
1020
1021],
1022[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
1023prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
1024INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'])
1025
1026])
1027
1028
1029# IT_PO_SUBDIR(DIRNAME)
1030# ---------------------
1031# All po subdirs have to be declared with this macro; the subdir "po" is
1032# declared by IT_PROG_INTLTOOL.
1033#
1034AC_DEFUN([IT_PO_SUBDIR],
1035[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
1036dnl
1037dnl The following CONFIG_COMMANDS should be exetuted at the very end
1038dnl of config.status.
1039AC_CONFIG_COMMANDS_PRE([
1040 AC_CONFIG_COMMANDS([$1/stamp-it], [
1041 rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
1042 >"$1/stamp-it.tmp"
1043 [sed '/^#/d
1044 s/^[[].*] *//
1045 /^[ ]*$/d
1046 '"s|^| $ac_top_srcdir/|" \
1047 "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1048 ]
1049 if test ! -f "$1/Makefile"; then
1050 AC_MSG_ERROR([$1/Makefile is not ready.])
1051 fi
1052 mv "$1/Makefile" "$1/Makefile.tmp"
1053 [sed '/^POTFILES =/,/[^\\]$/ {
1054 /^POTFILES =/!d
1055 r $1/POTFILES
1056 }
1057 ' "$1/Makefile.tmp" >"$1/Makefile"]
1058 rm -f "$1/Makefile.tmp"
1059 mv "$1/stamp-it.tmp" "$1/stamp-it"
1060 ])
1061])dnl
1062])
1063
1064
1065# deprecated macros
1066AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1067# A hint is needed for aclocal from Automake <= 1.9.4:
1068# AC_DEFUN([AC_PROG_INTLTOOL], ...)
1069
1070
1071# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1072
ee4883d4 1073# serial 51 Debian 1.5.24-1ubuntu1 AC_PROG_LIBTOOL
6cc5e1a6
DB
1074
1075
1076# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
1077# -----------------------------------------------------------
1078# If this macro is not defined by Autoconf, define it here.
1079m4_ifdef([AC_PROVIDE_IFELSE],
1080 [],
1081 [m4_define([AC_PROVIDE_IFELSE],
1082 [m4_ifdef([AC_PROVIDE_$1],
1083 [$2], [$3])])])
1084
1085
1086# AC_PROG_LIBTOOL
1087# ---------------
1088AC_DEFUN([AC_PROG_LIBTOOL],
1089[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
1090dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
1091dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
1092 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1093 [AC_LIBTOOL_CXX],
1094 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
1095 ])])
1096dnl And a similar setup for Fortran 77 support
1097 AC_PROVIDE_IFELSE([AC_PROG_F77],
1098 [AC_LIBTOOL_F77],
1099 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
1100])])
1101
1102dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
1103dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
1104dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
1105 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1106 [AC_LIBTOOL_GCJ],
1107 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1108 [AC_LIBTOOL_GCJ],
1109 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
1110 [AC_LIBTOOL_GCJ],
1111 [ifdef([AC_PROG_GCJ],
1112 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1113 ifdef([A][M_PROG_GCJ],
1114 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1115 ifdef([LT_AC_PROG_GCJ],
1116 [define([LT_AC_PROG_GCJ],
1117 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
1118])])# AC_PROG_LIBTOOL
1119
1120
1121# _AC_PROG_LIBTOOL
1122# ----------------
1123AC_DEFUN([_AC_PROG_LIBTOOL],
1124[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1125AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
1126AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
1127AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
1128
1129# This can be used to rebuild libtool when needed
1130LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1131
1132# Always use our own libtool.
1133LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1134AC_SUBST(LIBTOOL)dnl
1135
1136# Prevent multiple expansion
1137define([AC_PROG_LIBTOOL], [])
1138])# _AC_PROG_LIBTOOL
1139
1140
1141# AC_LIBTOOL_SETUP
1142# ----------------
1143AC_DEFUN([AC_LIBTOOL_SETUP],
1144[AC_PREREQ(2.50)dnl
1145AC_REQUIRE([AC_ENABLE_SHARED])dnl
1146AC_REQUIRE([AC_ENABLE_STATIC])dnl
1147AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1148AC_REQUIRE([AC_CANONICAL_HOST])dnl
1149AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1150AC_REQUIRE([AC_PROG_CC])dnl
1151AC_REQUIRE([AC_PROG_LD])dnl
1152AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1153AC_REQUIRE([AC_PROG_NM])dnl
1154
1155AC_REQUIRE([AC_PROG_LN_S])dnl
1156AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1157# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1158AC_REQUIRE([AC_OBJEXT])dnl
1159AC_REQUIRE([AC_EXEEXT])dnl
1160dnl
ee4883d4 1161
6cc5e1a6
DB
1162AC_LIBTOOL_SYS_MAX_CMD_LEN
1163AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1164AC_LIBTOOL_OBJDIR
1165
1166AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1167_LT_AC_PROG_ECHO_BACKSLASH
1168
1169case $host_os in
1170aix3*)
1171 # AIX sometimes has problems with the GCC collect2 program. For some
1172 # reason, if we set the COLLECT_NAMES environment variable, the problems
1173 # vanish in a puff of smoke.
1174 if test "X${COLLECT_NAMES+set}" != Xset; then
1175 COLLECT_NAMES=
1176 export COLLECT_NAMES
1177 fi
1178 ;;
1179esac
1180
1181# Sed substitution that helps us do robust quoting. It backslashifies
1182# metacharacters that are still active within double-quoted strings.
1183Xsed='sed -e 1s/^X//'
1184[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1185
1186# Same as above, but do not quote variable references.
1187[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1188
1189# Sed substitution to delay expansion of an escaped shell variable in a
1190# double_quote_subst'ed string.
1191delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1192
1193# Sed substitution to avoid accidental globbing in evaled expressions
1194no_glob_subst='s/\*/\\\*/g'
1195
1196# Constants:
1197rm="rm -f"
1198
1199# Global variables:
1200default_ofile=libtool
1201can_build_shared=yes
1202
1203# All known linkers require a `.a' archive for static linking (except MSVC,
1204# which needs '.lib').
1205libext=a
1206ltmain="$ac_aux_dir/ltmain.sh"
1207ofile="$default_ofile"
1208with_gnu_ld="$lt_cv_prog_gnu_ld"
1209
1210AC_CHECK_TOOL(AR, ar, false)
1211AC_CHECK_TOOL(RANLIB, ranlib, :)
1212AC_CHECK_TOOL(STRIP, strip, :)
1213
1214old_CC="$CC"
1215old_CFLAGS="$CFLAGS"
1216
1217# Set sane defaults for various variables
1218test -z "$AR" && AR=ar
1219test -z "$AR_FLAGS" && AR_FLAGS=cru
1220test -z "$AS" && AS=as
1221test -z "$CC" && CC=cc
1222test -z "$LTCC" && LTCC=$CC
1223test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1224test -z "$DLLTOOL" && DLLTOOL=dlltool
1225test -z "$LD" && LD=ld
1226test -z "$LN_S" && LN_S="ln -s"
1227test -z "$MAGIC_CMD" && MAGIC_CMD=file
1228test -z "$NM" && NM=nm
1229test -z "$SED" && SED=sed
1230test -z "$OBJDUMP" && OBJDUMP=objdump
1231test -z "$RANLIB" && RANLIB=:
1232test -z "$STRIP" && STRIP=:
1233test -z "$ac_objext" && ac_objext=o
1234
1235# Determine commands to create old-style static archives.
1236old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1237old_postinstall_cmds='chmod 644 $oldlib'
1238old_postuninstall_cmds=
1239
1240if test -n "$RANLIB"; then
1241 case $host_os in
1242 openbsd*)
1243 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1244 ;;
1245 *)
1246 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1247 ;;
1248 esac
1249 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1250fi
1251
1252_LT_CC_BASENAME([$compiler])
1253
1254# Only perform the check for file, if the check method requires it
1255case $deplibs_check_method in
1256file_magic*)
1257 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1258 AC_PATH_MAGIC
1259 fi
1260 ;;
1261esac
1262
6cc5e1a6
DB
1263AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1264AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1265enable_win32_dll=yes, enable_win32_dll=no)
1266
1267AC_ARG_ENABLE([libtool-lock],
1268 [AC_HELP_STRING([--disable-libtool-lock],
1269 [avoid locking (might break parallel builds)])])
1270test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1271
1272AC_ARG_WITH([pic],
1273 [AC_HELP_STRING([--with-pic],
1274 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1275 [pic_mode="$withval"],
1276 [pic_mode=default])
1277test -z "$pic_mode" && pic_mode=default
1278
1279# Use C for the default configuration in the libtool script
1280tagname=
1281AC_LIBTOOL_LANG_C_CONFIG
1282_LT_AC_TAGCONFIG
1283])# AC_LIBTOOL_SETUP
1284
1285
1286# _LT_AC_SYS_COMPILER
1287# -------------------
1288AC_DEFUN([_LT_AC_SYS_COMPILER],
1289[AC_REQUIRE([AC_PROG_CC])dnl
1290
1291# If no C compiler was specified, use CC.
1292LTCC=${LTCC-"$CC"}
1293
1294# If no C compiler flags were specified, use CFLAGS.
1295LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1296
1297# Allow CC to be a program name with arguments.
1298compiler=$CC
1299])# _LT_AC_SYS_COMPILER
1300
1301
1302# _LT_CC_BASENAME(CC)
1303# -------------------
1304# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
1305AC_DEFUN([_LT_CC_BASENAME],
1306[for cc_temp in $1""; do
1307 case $cc_temp in
1308 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1309 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1310 \-*) ;;
1311 *) break;;
1312 esac
1313done
1314cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1315])
1316
1317
1318# _LT_COMPILER_BOILERPLATE
1319# ------------------------
1320# Check for compiler boilerplate output or warnings with
1321# the simple compiler test code.
1322AC_DEFUN([_LT_COMPILER_BOILERPLATE],
1323[AC_REQUIRE([LT_AC_PROG_SED])dnl
1324ac_outfile=conftest.$ac_objext
1325echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1326eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1327_lt_compiler_boilerplate=`cat conftest.err`
1328$rm conftest*
1329])# _LT_COMPILER_BOILERPLATE
1330
1331
1332# _LT_LINKER_BOILERPLATE
1333# ----------------------
1334# Check for linker boilerplate output or warnings with
1335# the simple link test code.
1336AC_DEFUN([_LT_LINKER_BOILERPLATE],
1337[AC_REQUIRE([LT_AC_PROG_SED])dnl
1338ac_outfile=conftest.$ac_objext
1339echo "$lt_simple_link_test_code" >conftest.$ac_ext
1340eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1341_lt_linker_boilerplate=`cat conftest.err`
ee4883d4 1342$rm conftest*
6cc5e1a6
DB
1343])# _LT_LINKER_BOILERPLATE
1344
6cc5e1a6
DB
1345
1346# _LT_AC_SYS_LIBPATH_AIX
1347# ----------------------
1348# Links a minimal program and checks the executable
1349# for the system default hardcoded library path. In most cases,
1350# this is /usr/lib:/lib, but when the MPI compilers are used
1351# the location of the communication and MPI libs are included too.
1352# If we don't find anything, use the default library path according
1353# to the aix ld manual.
1354AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1355[AC_REQUIRE([LT_AC_PROG_SED])dnl
1356AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1357lt_aix_libpath_sed='
1358 /Import File Strings/,/^$/ {
1359 /^0/ {
1360 s/^0 *\(.*\)$/\1/
1361 p
1362 }
1363 }'
1364aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1365# Check for a 64-bit object if we didn't find anything.
1366if test -z "$aix_libpath"; then
1367 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1368fi],[])
1369if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1370])# _LT_AC_SYS_LIBPATH_AIX
1371
1372
1373# _LT_AC_SHELL_INIT(ARG)
1374# ----------------------
1375AC_DEFUN([_LT_AC_SHELL_INIT],
1376[ifdef([AC_DIVERSION_NOTICE],
1377 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1378 [AC_DIVERT_PUSH(NOTICE)])
1379$1
1380AC_DIVERT_POP
1381])# _LT_AC_SHELL_INIT
1382
1383
1384# _LT_AC_PROG_ECHO_BACKSLASH
1385# --------------------------
1386# Add some code to the start of the generated configure script which
1387# will find an echo command which doesn't interpret backslashes.
1388AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1389[_LT_AC_SHELL_INIT([
1390# Check that we are running under the correct shell.
1391SHELL=${CONFIG_SHELL-/bin/sh}
1392
1393case X$ECHO in
1394X*--fallback-echo)
1395 # Remove one level of quotation (which was required for Make).
1396 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1397 ;;
1398esac
1399
1400echo=${ECHO-echo}
1401if test "X[$]1" = X--no-reexec; then
1402 # Discard the --no-reexec flag, and continue.
1403 shift
1404elif test "X[$]1" = X--fallback-echo; then
1405 # Avoid inline document here, it may be left over
1406 :
1407elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1408 # Yippee, $echo works!
1409 :
1410else
1411 # Restart under the correct shell.
1412 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1413fi
1414
1415if test "X[$]1" = X--fallback-echo; then
1416 # used as fallback echo
1417 shift
1418 cat <<EOF
1419[$]*
1420EOF
1421 exit 0
1422fi
1423
1424# The HP-UX ksh and POSIX shell print the target directory to stdout
1425# if CDPATH is set.
1426(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1427
1428if test -z "$ECHO"; then
1429if test "X${echo_test_string+set}" != Xset; then
1430# find a string as large as possible, as long as the shell can cope with it
1431 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1432 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1433 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
1434 echo_test_string=`eval $cmd` &&
1435 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1436 then
1437 break
1438 fi
1439 done
1440fi
1441
1442if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1443 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1444 test "X$echo_testing_string" = "X$echo_test_string"; then
1445 :
1446else
1447 # The Solaris, AIX, and Digital Unix default echo programs unquote
1448 # backslashes. This makes it impossible to quote backslashes using
1449 # echo "$something" | sed 's/\\/\\\\/g'
1450 #
1451 # So, first we look for a working echo in the user's PATH.
1452
1453 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1454 for dir in $PATH /usr/ucb; do
1455 IFS="$lt_save_ifs"
1456 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1457 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1458 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1459 test "X$echo_testing_string" = "X$echo_test_string"; then
1460 echo="$dir/echo"
1461 break
1462 fi
1463 done
1464 IFS="$lt_save_ifs"
1465
1466 if test "X$echo" = Xecho; then
1467 # We didn't find a better echo, so look for alternatives.
1468 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1469 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1470 test "X$echo_testing_string" = "X$echo_test_string"; then
1471 # This shell has a builtin print -r that does the trick.
1472 echo='print -r'
1473 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1474 test "X$CONFIG_SHELL" != X/bin/ksh; then
1475 # If we have ksh, try running configure again with it.
1476 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1477 export ORIGINAL_CONFIG_SHELL
1478 CONFIG_SHELL=/bin/ksh
1479 export CONFIG_SHELL
1480 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1481 else
1482 # Try using printf.
1483 echo='printf %s\n'
1484 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1485 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1486 test "X$echo_testing_string" = "X$echo_test_string"; then
1487 # Cool, printf works
1488 :
1489 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1490 test "X$echo_testing_string" = 'X\t' &&
1491 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1492 test "X$echo_testing_string" = "X$echo_test_string"; then
1493 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1494 export CONFIG_SHELL
1495 SHELL="$CONFIG_SHELL"
1496 export SHELL
1497 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1498 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1499 test "X$echo_testing_string" = 'X\t' &&
1500 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1501 test "X$echo_testing_string" = "X$echo_test_string"; then
1502 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1503 else
1504 # maybe with a smaller string...
1505 prev=:
1506
1507 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1508 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1509 then
1510 break
1511 fi
1512 prev="$cmd"
1513 done
1514
1515 if test "$prev" != 'sed 50q "[$]0"'; then
1516 echo_test_string=`eval $prev`
1517 export echo_test_string
1518 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1519 else
1520 # Oops. We lost completely, so just stick with echo.
1521 echo=echo
1522 fi
1523 fi
1524 fi
1525 fi
1526fi
1527fi
1528
1529# Copy echo and quote the copy suitably for passing to libtool from
1530# the Makefile, instead of quoting the original, which is used later.
1531ECHO=$echo
1532if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1533 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1534fi
1535
1536AC_SUBST(ECHO)
1537])])# _LT_AC_PROG_ECHO_BACKSLASH
1538
1539
1540# _LT_AC_LOCK
1541# -----------
1542AC_DEFUN([_LT_AC_LOCK],
1543[AC_ARG_ENABLE([libtool-lock],
1544 [AC_HELP_STRING([--disable-libtool-lock],
1545 [avoid locking (might break parallel builds)])])
1546test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1547
1548# Some flags need to be propagated to the compiler or linker for good
1549# libtool support.
1550case $host in
1551ia64-*-hpux*)
1552 # Find out which ABI we are using.
1553 echo 'int i;' > conftest.$ac_ext
1554 if AC_TRY_EVAL(ac_compile); then
1555 case `/usr/bin/file conftest.$ac_objext` in
1556 *ELF-32*)
1557 HPUX_IA64_MODE="32"
1558 ;;
1559 *ELF-64*)
1560 HPUX_IA64_MODE="64"
1561 ;;
1562 esac
1563 fi
1564 rm -rf conftest*
1565 ;;
1566*-*-irix6*)
1567 # Find out which ABI we are using.
1568 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1569 if AC_TRY_EVAL(ac_compile); then
1570 if test "$lt_cv_prog_gnu_ld" = yes; then
1571 case `/usr/bin/file conftest.$ac_objext` in
1572 *32-bit*)
1573 LD="${LD-ld} -melf32bsmip"
1574 ;;
1575 *N32*)
1576 LD="${LD-ld} -melf32bmipn32"
1577 ;;
1578 *64-bit*)
1579 LD="${LD-ld} -melf64bmip"
1580 ;;
1581 esac
1582 else
1583 case `/usr/bin/file conftest.$ac_objext` in
1584 *32-bit*)
1585 LD="${LD-ld} -32"
1586 ;;
1587 *N32*)
1588 LD="${LD-ld} -n32"
1589 ;;
1590 *64-bit*)
1591 LD="${LD-ld} -64"
1592 ;;
1593 esac
1594 fi
1595 fi
1596 rm -rf conftest*
1597 ;;
1598
1599x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1600s390*-*linux*|sparc*-*linux*)
1601 # Find out which ABI we are using.
1602 echo 'int i;' > conftest.$ac_ext
1603 if AC_TRY_EVAL(ac_compile); then
1604 case `/usr/bin/file conftest.o` in
1605 *32-bit*)
1606 case $host in
1607 x86_64-*kfreebsd*-gnu)
1608 LD="${LD-ld} -m elf_i386_fbsd"
1609 ;;
1610 x86_64-*linux*)
1611 LD="${LD-ld} -m elf_i386"
1612 ;;
1613 ppc64-*linux*|powerpc64-*linux*)
1614 LD="${LD-ld} -m elf32ppclinux"
1615 ;;
1616 s390x-*linux*)
1617 LD="${LD-ld} -m elf_s390"
1618 ;;
1619 sparc64-*linux*)
1620 LD="${LD-ld} -m elf32_sparc"
1621 ;;
1622 esac
1623 ;;
1624 *64-bit*)
1625 case $host in
1626 x86_64-*kfreebsd*-gnu)
1627 LD="${LD-ld} -m elf_x86_64_fbsd"
1628 ;;
1629 x86_64-*linux*)
1630 LD="${LD-ld} -m elf_x86_64"
1631 ;;
1632 ppc*-*linux*|powerpc*-*linux*)
1633 LD="${LD-ld} -m elf64ppc"
1634 ;;
1635 s390*-*linux*)
1636 LD="${LD-ld} -m elf64_s390"
1637 ;;
1638 sparc*-*linux*)
1639 LD="${LD-ld} -m elf64_sparc"
1640 ;;
1641 esac
1642 ;;
1643 esac
1644 fi
1645 rm -rf conftest*
1646 ;;
1647
1648*-*-sco3.2v5*)
1649 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1650 SAVE_CFLAGS="$CFLAGS"
1651 CFLAGS="$CFLAGS -belf"
1652 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1653 [AC_LANG_PUSH(C)
1654 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1655 AC_LANG_POP])
1656 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1657 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1658 CFLAGS="$SAVE_CFLAGS"
1659 fi
1660 ;;
1661sparc*-*solaris*)
1662 # Find out which ABI we are using.
1663 echo 'int i;' > conftest.$ac_ext
1664 if AC_TRY_EVAL(ac_compile); then
1665 case `/usr/bin/file conftest.o` in
1666 *64-bit*)
1667 case $lt_cv_prog_gnu_ld in
1668 yes*) LD="${LD-ld} -m elf64_sparc" ;;
ee4883d4 1669 *) LD="${LD-ld} -64" ;;
6cc5e1a6
DB
1670 esac
1671 ;;
1672 esac
1673 fi
1674 rm -rf conftest*
1675 ;;
1676
1677AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1678[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1679 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1680 AC_CHECK_TOOL(AS, as, false)
1681 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1682 ;;
1683 ])
1684esac
1685
1686need_locks="$enable_libtool_lock"
1687
1688])# _LT_AC_LOCK
1689
1690
1691# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1692# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1693# ----------------------------------------------------------------
1694# Check whether the given compiler option works
1695AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1696[AC_REQUIRE([LT_AC_PROG_SED])
1697AC_CACHE_CHECK([$1], [$2],
1698 [$2=no
1699 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1700 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1701 lt_compiler_flag="$3"
1702 # Insert the option either (1) after the last *FLAGS variable, or
1703 # (2) before a word containing "conftest.", or (3) at the end.
1704 # Note that $ac_compile itself does not contain backslashes and begins
1705 # with a dollar sign (not a hyphen), so the echo should work correctly.
1706 # The option is referenced via a variable to avoid confusing sed.
1707 lt_compile=`echo "$ac_compile" | $SED \
1708 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1709 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1710 -e 's:$: $lt_compiler_flag:'`
1711 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1712 (eval "$lt_compile" 2>conftest.err)
1713 ac_status=$?
1714 cat conftest.err >&AS_MESSAGE_LOG_FD
1715 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1716 if (exit $ac_status) && test -s "$ac_outfile"; then
1717 # The compiler can only warn and ignore the option if not recognized
1718 # So say no if there are warnings other than the usual output.
1719 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1720 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1721 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1722 $2=yes
1723 fi
1724 fi
1725 $rm conftest*
1726])
1727
1728if test x"[$]$2" = xyes; then
1729 ifelse([$5], , :, [$5])
1730else
1731 ifelse([$6], , :, [$6])
1732fi
1733])# AC_LIBTOOL_COMPILER_OPTION
1734
1735
1736# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1737# [ACTION-SUCCESS], [ACTION-FAILURE])
1738# ------------------------------------------------------------
1739# Check whether the given compiler option works
1740AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1741[AC_REQUIRE([LT_AC_PROG_SED])dnl
1742AC_CACHE_CHECK([$1], [$2],
1743 [$2=no
1744 save_LDFLAGS="$LDFLAGS"
1745 LDFLAGS="$LDFLAGS $3"
1746 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1747 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1748 # The linker can only warn and ignore the option if not recognized
1749 # So say no if there are warnings
1750 if test -s conftest.err; then
1751 # Append any errors to the config.log.
1752 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1753 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1754 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1755 if diff conftest.exp conftest.er2 >/dev/null; then
1756 $2=yes
1757 fi
1758 else
1759 $2=yes
1760 fi
1761 fi
ee4883d4 1762 $rm conftest*
6cc5e1a6
DB
1763 LDFLAGS="$save_LDFLAGS"
1764])
1765
1766if test x"[$]$2" = xyes; then
1767 ifelse([$4], , :, [$4])
1768else
1769 ifelse([$5], , :, [$5])
1770fi
1771])# AC_LIBTOOL_LINKER_OPTION
1772
1773
1774# AC_LIBTOOL_SYS_MAX_CMD_LEN
1775# --------------------------
1776AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1777[# find the maximum length of command line arguments
1778AC_MSG_CHECKING([the maximum length of command line arguments])
1779AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1780 i=0
1781 teststring="ABCD"
1782
1783 case $build_os in
1784 msdosdjgpp*)
1785 # On DJGPP, this test can blow up pretty badly due to problems in libc
1786 # (any single argument exceeding 2000 bytes causes a buffer overrun
1787 # during glob expansion). Even if it were fixed, the result of this
1788 # check would be larger than it should be.
1789 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1790 ;;
1791
1792 gnu*)
1793 # Under GNU Hurd, this test is not required because there is
1794 # no limit to the length of command line arguments.
1795 # Libtool will interpret -1 as no limit whatsoever
1796 lt_cv_sys_max_cmd_len=-1;
1797 ;;
1798
1799 cygwin* | mingw*)
1800 # On Win9x/ME, this test blows up -- it succeeds, but takes
1801 # about 5 minutes as the teststring grows exponentially.
1802 # Worse, since 9x/ME are not pre-emptively multitasking,
1803 # you end up with a "frozen" computer, even though with patience
1804 # the test eventually succeeds (with a max line length of 256k).
1805 # Instead, let's just punt: use the minimum linelength reported by
1806 # all of the supported platforms: 8192 (on NT/2K/XP).
1807 lt_cv_sys_max_cmd_len=8192;
1808 ;;
1809
1810 amigaos*)
1811 # On AmigaOS with pdksh, this test takes hours, literally.
1812 # So we just punt and use a minimum line length of 8192.
1813 lt_cv_sys_max_cmd_len=8192;
1814 ;;
1815
1816 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1817 # This has been around since 386BSD, at least. Likely further.
1818 if test -x /sbin/sysctl; then
1819 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1820 elif test -x /usr/sbin/sysctl; then
1821 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1822 else
1823 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1824 fi
1825 # And add a safety zone
1826 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1827 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1828 ;;
1829
1830 interix*)
1831 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1832 lt_cv_sys_max_cmd_len=196608
1833 ;;
1834
1835 osf*)
1836 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1837 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1838 # nice to cause kernel panics so lets avoid the loop below.
1839 # First set a reasonable default.
1840 lt_cv_sys_max_cmd_len=16384
1841 #
1842 if test -x /sbin/sysconfig; then
1843 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1844 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1845 esac
1846 fi
1847 ;;
1848 sco3.2v5*)
1849 lt_cv_sys_max_cmd_len=102400
1850 ;;
1851 sysv5* | sco5v6* | sysv4.2uw2*)
1852 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1853 if test -n "$kargmax"; then
1854 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1855 else
1856 lt_cv_sys_max_cmd_len=32768
1857 fi
1858 ;;
1859 *)
1860 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1861 if test -n "$lt_cv_sys_max_cmd_len"; then
1862 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1863 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1864 else
1865 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1866 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1867 = "XX$teststring") >/dev/null 2>&1 &&
1868 new_result=`expr "X$teststring" : ".*" 2>&1` &&
1869 lt_cv_sys_max_cmd_len=$new_result &&
1870 test $i != 17 # 1/2 MB should be enough
1871 do
1872 i=`expr $i + 1`
1873 teststring=$teststring$teststring
1874 done
1875 teststring=
1876 # Add a significant safety factor because C++ compilers can tack on massive
1877 # amounts of additional arguments before passing them to the linker.
1878 # It appears as though 1/2 is a usable value.
1879 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1880 fi
1881 ;;
1882 esac
1883])
1884if test -n $lt_cv_sys_max_cmd_len ; then
1885 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1886else
1887 AC_MSG_RESULT(none)
1888fi
1889])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1890
1891
1892# _LT_AC_CHECK_DLFCN
1893# ------------------
1894AC_DEFUN([_LT_AC_CHECK_DLFCN],
1895[AC_CHECK_HEADERS(dlfcn.h)dnl
1896])# _LT_AC_CHECK_DLFCN
1897
1898
1899# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1900# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1901# ---------------------------------------------------------------------
1902AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1903[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1904if test "$cross_compiling" = yes; then :
1905 [$4]
1906else
1907 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1908 lt_status=$lt_dlunknown
1909 cat > conftest.$ac_ext <<EOF
1910[#line __oline__ "configure"
1911#include "confdefs.h"
1912
1913#if HAVE_DLFCN_H
1914#include <dlfcn.h>
1915#endif
1916
1917#include <stdio.h>
1918
1919#ifdef RTLD_GLOBAL
1920# define LT_DLGLOBAL RTLD_GLOBAL
1921#else
1922# ifdef DL_GLOBAL
1923# define LT_DLGLOBAL DL_GLOBAL
1924# else
1925# define LT_DLGLOBAL 0
1926# endif
1927#endif
1928
1929/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1930 find out it does not work in some platform. */
1931#ifndef LT_DLLAZY_OR_NOW
1932# ifdef RTLD_LAZY
1933# define LT_DLLAZY_OR_NOW RTLD_LAZY
1934# else
1935# ifdef DL_LAZY
1936# define LT_DLLAZY_OR_NOW DL_LAZY
1937# else
1938# ifdef RTLD_NOW
1939# define LT_DLLAZY_OR_NOW RTLD_NOW
1940# else
1941# ifdef DL_NOW
1942# define LT_DLLAZY_OR_NOW DL_NOW
1943# else
1944# define LT_DLLAZY_OR_NOW 0
1945# endif
1946# endif
1947# endif
1948# endif
1949#endif
1950
1951#ifdef __cplusplus
1952extern "C" void exit (int);
1953#endif
1954
1955void fnord() { int i=42;}
1956int main ()
1957{
1958 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1959 int status = $lt_dlunknown;
1960
1961 if (self)
1962 {
1963 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1964 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1965 /* dlclose (self); */
1966 }
1967 else
1968 puts (dlerror ());
1969
1970 exit (status);
1971}]
1972EOF
1973 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1974 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1975 lt_status=$?
1976 case x$lt_status in
1977 x$lt_dlno_uscore) $1 ;;
1978 x$lt_dlneed_uscore) $2 ;;
1979 x$lt_dlunknown|x*) $3 ;;
1980 esac
1981 else :
1982 # compilation failed
1983 $3
1984 fi
1985fi
1986rm -fr conftest*
1987])# _LT_AC_TRY_DLOPEN_SELF
1988
1989
1990# AC_LIBTOOL_DLOPEN_SELF
1991# ----------------------
1992AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1993[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1994if test "x$enable_dlopen" != xyes; then
1995 enable_dlopen=unknown
1996 enable_dlopen_self=unknown
1997 enable_dlopen_self_static=unknown
1998else
1999 lt_cv_dlopen=no
2000 lt_cv_dlopen_libs=
2001
2002 case $host_os in
2003 beos*)
2004 lt_cv_dlopen="load_add_on"
2005 lt_cv_dlopen_libs=
2006 lt_cv_dlopen_self=yes
2007 ;;
2008
2009 mingw* | pw32*)
2010 lt_cv_dlopen="LoadLibrary"
2011 lt_cv_dlopen_libs=
2012 ;;
2013
2014 cygwin*)
2015 lt_cv_dlopen="dlopen"
2016 lt_cv_dlopen_libs=
2017 ;;
2018
2019 darwin*)
2020 # if libdl is installed we need to link against it
2021 AC_CHECK_LIB([dl], [dlopen],
2022 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2023 lt_cv_dlopen="dyld"
2024 lt_cv_dlopen_libs=
2025 lt_cv_dlopen_self=yes
2026 ])
2027 ;;
2028
2029 *)
2030 AC_CHECK_FUNC([shl_load],
2031 [lt_cv_dlopen="shl_load"],
2032 [AC_CHECK_LIB([dld], [shl_load],
ee4883d4 2033 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
6cc5e1a6
DB
2034 [AC_CHECK_FUNC([dlopen],
2035 [lt_cv_dlopen="dlopen"],
2036 [AC_CHECK_LIB([dl], [dlopen],
2037 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2038 [AC_CHECK_LIB([svld], [dlopen],
2039 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2040 [AC_CHECK_LIB([dld], [dld_link],
ee4883d4 2041 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
6cc5e1a6
DB
2042 ])
2043 ])
2044 ])
2045 ])
2046 ])
2047 ;;
2048 esac
2049
2050 if test "x$lt_cv_dlopen" != xno; then
2051 enable_dlopen=yes
2052 else
2053 enable_dlopen=no
2054 fi
2055
2056 case $lt_cv_dlopen in
2057 dlopen)
2058 save_CPPFLAGS="$CPPFLAGS"
2059 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2060
2061 save_LDFLAGS="$LDFLAGS"
2062 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2063
2064 save_LIBS="$LIBS"
2065 LIBS="$lt_cv_dlopen_libs $LIBS"
2066
2067 AC_CACHE_CHECK([whether a program can dlopen itself],
2068 lt_cv_dlopen_self, [dnl
2069 _LT_AC_TRY_DLOPEN_SELF(
2070 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2071 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2072 ])
2073
2074 if test "x$lt_cv_dlopen_self" = xyes; then
2075 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2076 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2077 lt_cv_dlopen_self_static, [dnl
2078 _LT_AC_TRY_DLOPEN_SELF(
2079 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2080 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2081 ])
2082 fi
2083
2084 CPPFLAGS="$save_CPPFLAGS"
2085 LDFLAGS="$save_LDFLAGS"
2086 LIBS="$save_LIBS"
2087 ;;
2088 esac
2089
2090 case $lt_cv_dlopen_self in
2091 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2092 *) enable_dlopen_self=unknown ;;
2093 esac
2094
2095 case $lt_cv_dlopen_self_static in
2096 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2097 *) enable_dlopen_self_static=unknown ;;
2098 esac
2099fi
2100])# AC_LIBTOOL_DLOPEN_SELF
2101
2102
2103# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
2104# ---------------------------------
2105# Check to see if options -c and -o are simultaneously supported by compiler
2106AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
2107[AC_REQUIRE([LT_AC_PROG_SED])dnl
2108AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2109AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2110 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2111 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2112 $rm -r conftest 2>/dev/null
2113 mkdir conftest
2114 cd conftest
2115 mkdir out
2116 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2117
2118 lt_compiler_flag="-o out/conftest2.$ac_objext"
2119 # Insert the option either (1) after the last *FLAGS variable, or
2120 # (2) before a word containing "conftest.", or (3) at the end.
2121 # Note that $ac_compile itself does not contain backslashes and begins
2122 # with a dollar sign (not a hyphen), so the echo should work correctly.
2123 lt_compile=`echo "$ac_compile" | $SED \
2124 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2125 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2126 -e 's:$: $lt_compiler_flag:'`
2127 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2128 (eval "$lt_compile" 2>out/conftest.err)
2129 ac_status=$?
2130 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2131 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2132 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2133 then
2134 # The compiler can only warn and ignore the option if not recognized
2135 # So say no if there are warnings
2136 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2137 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2138 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2139 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2140 fi
2141 fi
2142 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2143 $rm conftest*
2144 # SGI C++ compiler will create directory out/ii_files/ for
2145 # template instantiation
2146 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
2147 $rm out/* && rmdir out
2148 cd ..
2149 rmdir conftest
2150 $rm conftest*
2151])
2152])# AC_LIBTOOL_PROG_CC_C_O
2153
2154
2155# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
2156# -----------------------------------------
2157# Check to see if we can do hard links to lock some files if needed
2158AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
2159[AC_REQUIRE([_LT_AC_LOCK])dnl
2160
2161hard_links="nottested"
2162if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2163 # do not overwrite the value of need_locks provided by the user
2164 AC_MSG_CHECKING([if we can lock with hard links])
2165 hard_links=yes
2166 $rm conftest*
2167 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2168 touch conftest.a
2169 ln conftest.a conftest.b 2>&5 || hard_links=no
2170 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2171 AC_MSG_RESULT([$hard_links])
2172 if test "$hard_links" = no; then
2173 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2174 need_locks=warn
2175 fi
2176else
2177 need_locks=no
2178fi
2179])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2180
2181
2182# AC_LIBTOOL_OBJDIR
2183# -----------------
2184AC_DEFUN([AC_LIBTOOL_OBJDIR],
2185[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2186[rm -f .libs 2>/dev/null
2187mkdir .libs 2>/dev/null
2188if test -d .libs; then
2189 lt_cv_objdir=.libs
2190else
2191 # MS-DOS does not allow filenames that begin with a dot.
2192 lt_cv_objdir=_libs
2193fi
2194rmdir .libs 2>/dev/null])
2195objdir=$lt_cv_objdir
2196])# AC_LIBTOOL_OBJDIR
2197
2198
2199# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2200# ----------------------------------------------
2201# Check hardcoding attributes.
2202AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2203[AC_MSG_CHECKING([how to hardcode library paths into programs])
2204_LT_AC_TAGVAR(hardcode_action, $1)=
2205if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2206 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
2207 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2208
2209 # We can hardcode non-existant directories.
2210 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2211 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2212 # have to relink, otherwise we might link with an installed library
2213 # when we should be linking with a yet-to-be-installed one
2214 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2215 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2216 # Linking always hardcodes the temporary library directory.
2217 _LT_AC_TAGVAR(hardcode_action, $1)=relink
2218 else
2219 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2220 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2221 fi
2222else
2223 # We cannot hardcode anything, or else we can only hardcode existing
2224 # directories.
2225 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2226fi
2227AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2228
2229if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2230 # Fast installation is not supported
2231 enable_fast_install=no
2232elif test "$shlibpath_overrides_runpath" = yes ||
2233 test "$enable_shared" = no; then
2234 # Fast installation is not necessary
2235 enable_fast_install=needless
2236fi
2237])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2238
2239
2240# AC_LIBTOOL_SYS_LIB_STRIP
2241# ------------------------
2242AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2243[striplib=
2244old_striplib=
2245AC_MSG_CHECKING([whether stripping libraries is possible])
2246if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2247 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2248 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2249 AC_MSG_RESULT([yes])
2250else
2251# FIXME - insert some real tests, host_os isn't really good enough
2252 case $host_os in
2253 darwin*)
2254 if test -n "$STRIP" ; then
2255 striplib="$STRIP -x"
2256 old_striplib="$STRIP -S"
2257 AC_MSG_RESULT([yes])
2258 else
2259 AC_MSG_RESULT([no])
2260fi
2261 ;;
2262 *)
2263 AC_MSG_RESULT([no])
2264 ;;
2265 esac
2266fi
2267])# AC_LIBTOOL_SYS_LIB_STRIP
2268
2269
2270# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2271# -----------------------------
2272# PORTME Fill in your ld.so characteristics
2273AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2274[AC_REQUIRE([LT_AC_PROG_SED])dnl
2275AC_MSG_CHECKING([dynamic linker characteristics])
2276library_names_spec=
2277libname_spec='lib$name'
2278soname_spec=
2279shrext_cmds=".so"
2280postinstall_cmds=
2281postuninstall_cmds=
2282finish_cmds=
2283finish_eval=
2284shlibpath_var=
2285shlibpath_overrides_runpath=unknown
2286version_type=none
2287dynamic_linker="$host_os ld.so"
2288sys_lib_dlsearch_path_spec="/lib /usr/lib"
2289m4_if($1,[],[
2290if test "$GCC" = yes; then
2291 case $host_os in
2292 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2293 *) lt_awk_arg="/^libraries:/" ;;
2294 esac
2295 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2296 if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
2297 # if the path contains ";" then we assume it to be the separator
2298 # otherwise default to the standard path separator (i.e. ":") - it is
2299 # assumed that no part of a normal pathname contains ";" but that should
2300 # okay in the real world where ";" in dirpaths is itself problematic.
2301 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2302 else
2303 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2304 fi
2305 # Ok, now we have the path, separated by spaces, we can step through it
2306 # and add multilib dir if necessary.
2307 lt_tmp_lt_search_path_spec=
2308 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2309 for lt_sys_path in $lt_search_path_spec; do
2310 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2311 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2312 else
2313 test -d "$lt_sys_path" && \
2314 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2315 fi
2316 done
2317 lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
2318BEGIN {RS=" "; FS="/|\n";} {
2319 lt_foo="";
2320 lt_count=0;
2321 for (lt_i = NF; lt_i > 0; lt_i--) {
2322 if ($lt_i != "" && $lt_i != ".") {
2323 if ($lt_i == "..") {
2324 lt_count++;
2325 } else {
2326 if (lt_count == 0) {
2327 lt_foo="/" $lt_i lt_foo;
2328 } else {
2329 lt_count--;
2330 }
2331 }
2332 }
2333 }
2334 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2335 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2336}'`
2337 sys_lib_search_path_spec=`echo $lt_search_path_spec`
2338else
2339 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2340fi])
2341need_lib_prefix=unknown
2342hardcode_into_libs=no
2343
2344# when you set need_version to no, make sure it does not cause -set_version
2345# flags to be left without arguments
2346need_version=unknown
2347
2348case $host_os in
2349aix3*)
2350 version_type=linux
2351 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2352 shlibpath_var=LIBPATH
2353
2354 # AIX 3 has no versioning support, so we append a major version to the name.
2355 soname_spec='${libname}${release}${shared_ext}$major'
2356 ;;
2357
ee4883d4 2358aix4* | aix5*)
6cc5e1a6
DB
2359 version_type=linux
2360 need_lib_prefix=no
2361 need_version=no
2362 hardcode_into_libs=yes
2363 if test "$host_cpu" = ia64; then
2364 # AIX 5 supports IA64
2365 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2366 shlibpath_var=LD_LIBRARY_PATH
2367 else
2368 # With GCC up to 2.95.x, collect2 would create an import file
2369 # for dependence libraries. The import file would start with
2370 # the line `#! .'. This would cause the generated library to
2371 # depend on `.', always an invalid library. This was fixed in
2372 # development snapshots of GCC prior to 3.0.
2373 case $host_os in
2374 aix4 | aix4.[[01]] | aix4.[[01]].*)
2375 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2376 echo ' yes '
2377 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2378 :
2379 else
2380 can_build_shared=no
2381 fi
2382 ;;
2383 esac
2384 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2385 # soname into executable. Probably we can add versioning support to
2386 # collect2, so additional links can be useful in future.
2387 if test "$aix_use_runtimelinking" = yes; then
2388 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2389 # instead of lib<name>.a to let people know that these are not
2390 # typical AIX shared libraries.
2391 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2392 else
2393 # We preserve .a as extension for shared libraries through AIX4.2
2394 # and later when we are not doing run time linking.
2395 library_names_spec='${libname}${release}.a $libname.a'
2396 soname_spec='${libname}${release}${shared_ext}$major'
2397 fi
2398 shlibpath_var=LIBPATH
2399 fi
2400 ;;
2401
2402amigaos*)
2403 library_names_spec='$libname.ixlibrary $libname.a'
2404 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2405 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2406 ;;
2407
2408beos*)
2409 library_names_spec='${libname}${shared_ext}'
2410 dynamic_linker="$host_os ld.so"
2411 shlibpath_var=LIBRARY_PATH
2412 ;;
2413
2414bsdi[[45]]*)
2415 version_type=linux
2416 need_version=no
2417 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2418 soname_spec='${libname}${release}${shared_ext}$major'
2419 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2420 shlibpath_var=LD_LIBRARY_PATH
2421 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2422 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2423 # the default ld.so.conf also contains /usr/contrib/lib and
2424 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2425 # libtool to hard-code these into programs
2426 ;;
2427
2428cygwin* | mingw* | pw32*)
2429 version_type=windows
2430 shrext_cmds=".dll"
2431 need_version=no
2432 need_lib_prefix=no
2433
2434 case $GCC,$host_os in
2435 yes,cygwin* | yes,mingw* | yes,pw32*)
2436 library_names_spec='$libname.dll.a'
2437 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2438 postinstall_cmds='base_file=`basename \${file}`~
2439 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2440 dldir=$destdir/`dirname \$dlpath`~
2441 test -d \$dldir || mkdir -p \$dldir~
2442 $install_prog $dir/$dlname \$dldir/$dlname~
2443 chmod a+x \$dldir/$dlname'
2444 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2445 dlpath=$dir/\$dldll~
2446 $rm \$dlpath'
2447 shlibpath_overrides_runpath=yes
2448
2449 case $host_os in
2450 cygwin*)
2451 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2452 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2453 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2454 ;;
2455 mingw*)
2456 # MinGW DLLs use traditional 'lib' prefix
2457 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2458 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2459 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2460 # It is most probably a Windows format PATH printed by
2461 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2462 # path with ; separators, and with drive letters. We can handle the
2463 # drive letters (cygwin fileutils understands them), so leave them,
2464 # especially as we might pass files found there to a mingw objdump,
2465 # which wouldn't understand a cygwinified path. Ahh.
2466 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2467 else
2468 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2469 fi
2470 ;;
2471 pw32*)
2472 # pw32 DLLs use 'pw' prefix rather than 'lib'
2473 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2474 ;;
2475 esac
2476 ;;
2477
2478 *)
2479 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2480 ;;
2481 esac
2482 dynamic_linker='Win32 ld.exe'
2483 # FIXME: first we should search . and the directory the executable is in
2484 shlibpath_var=PATH
2485 ;;
2486
2487darwin* | rhapsody*)
2488 dynamic_linker="$host_os dyld"
2489 version_type=darwin
2490 need_lib_prefix=no
2491 need_version=no
2492 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2493 soname_spec='${libname}${release}${major}$shared_ext'
2494 shlibpath_overrides_runpath=yes
2495 shlibpath_var=DYLD_LIBRARY_PATH
2496 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2497 m4_if([$1], [],[
2498 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2499 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2500 ;;
2501
2502dgux*)
2503 version_type=linux
2504 need_lib_prefix=no
2505 need_version=no
2506 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2507 soname_spec='${libname}${release}${shared_ext}$major'
2508 shlibpath_var=LD_LIBRARY_PATH
2509 ;;
2510
2511freebsd1*)
2512 dynamic_linker=no
2513 ;;
2514
2515freebsd* | dragonfly*)
2516 # DragonFly does not have aout. When/if they implement a new
2517 # versioning mechanism, adjust this.
2518 if test -x /usr/bin/objformat; then
2519 objformat=`/usr/bin/objformat`
2520 else
2521 case $host_os in
2522 freebsd[[123]]*) objformat=aout ;;
2523 *) objformat=elf ;;
2524 esac
2525 fi
2526 version_type=freebsd-$objformat
2527 case $version_type in
2528 freebsd-elf*)
2529 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2530 need_version=no
2531 need_lib_prefix=no
2532 ;;
2533 freebsd-*)
2534 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2535 need_version=yes
2536 ;;
2537 esac
2538 shlibpath_var=LD_LIBRARY_PATH
2539 case $host_os in
2540 freebsd2*)
2541 shlibpath_overrides_runpath=yes
2542 ;;
2543 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2544 shlibpath_overrides_runpath=yes
2545 hardcode_into_libs=yes
2546 ;;
2547 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2548 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2549 shlibpath_overrides_runpath=no
2550 hardcode_into_libs=yes
2551 ;;
2552 *) # from 4.6 on, and DragonFly
2553 shlibpath_overrides_runpath=yes
2554 hardcode_into_libs=yes
2555 ;;
2556 esac
2557 ;;
2558
2559gnu*)
2560 version_type=linux
2561 need_lib_prefix=no
2562 need_version=no
2563 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2564 soname_spec='${libname}${release}${shared_ext}$major'
2565 shlibpath_var=LD_LIBRARY_PATH
2566 hardcode_into_libs=yes
2567 ;;
2568
2569hpux9* | hpux10* | hpux11*)
2570 # Give a soname corresponding to the major version so that dld.sl refuses to
2571 # link against other versions.
2572 version_type=sunos
2573 need_lib_prefix=no
2574 need_version=no
2575 case $host_cpu in
2576 ia64*)
2577 shrext_cmds='.so'
2578 hardcode_into_libs=yes
2579 dynamic_linker="$host_os dld.so"
2580 shlibpath_var=LD_LIBRARY_PATH
2581 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2582 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2583 soname_spec='${libname}${release}${shared_ext}$major'
2584 if test "X$HPUX_IA64_MODE" = X32; then
2585 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2586 else
2587 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2588 fi
2589 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2590 ;;
2591 hppa*64*)
2592 shrext_cmds='.sl'
2593 hardcode_into_libs=yes
2594 dynamic_linker="$host_os dld.sl"
2595 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2596 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2597 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2598 soname_spec='${libname}${release}${shared_ext}$major'
2599 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2600 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2601 ;;
2602 *)
2603 shrext_cmds='.sl'
2604 dynamic_linker="$host_os dld.sl"
2605 shlibpath_var=SHLIB_PATH
2606 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2607 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2608 soname_spec='${libname}${release}${shared_ext}$major'
2609 ;;
2610 esac
2611 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2612 postinstall_cmds='chmod 555 $lib'
2613 ;;
2614
2615interix[[3-9]]*)
2616 version_type=linux
2617 need_lib_prefix=no
2618 need_version=no
2619 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2620 soname_spec='${libname}${release}${shared_ext}$major'
2621 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2622 shlibpath_var=LD_LIBRARY_PATH
2623 shlibpath_overrides_runpath=no
2624 hardcode_into_libs=yes
2625 ;;
2626
2627irix5* | irix6* | nonstopux*)
2628 case $host_os in
2629 nonstopux*) version_type=nonstopux ;;
2630 *)
2631 if test "$lt_cv_prog_gnu_ld" = yes; then
2632 version_type=linux
2633 else
2634 version_type=irix
2635 fi ;;
2636 esac
2637 need_lib_prefix=no
2638 need_version=no
2639 soname_spec='${libname}${release}${shared_ext}$major'
2640 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2641 case $host_os in
2642 irix5* | nonstopux*)
2643 libsuff= shlibsuff=
2644 ;;
2645 *)
2646 case $LD in # libtool.m4 will add one of these switches to LD
2647 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2648 libsuff= shlibsuff= libmagic=32-bit;;
2649 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2650 libsuff=32 shlibsuff=N32 libmagic=N32;;
2651 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2652 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2653 *) libsuff= shlibsuff= libmagic=never-match;;
2654 esac
2655 ;;
2656 esac
2657 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2658 shlibpath_overrides_runpath=no
2659 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2660 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2661 hardcode_into_libs=yes
2662 ;;
2663
2664# No shared lib support for Linux oldld, aout, or coff.
2665linux*oldld* | linux*aout* | linux*coff*)
2666 dynamic_linker=no
2667 ;;
2668
2669# This must be Linux ELF.
2670linux* | k*bsd*-gnu)
2671 version_type=linux
2672 need_lib_prefix=no
2673 need_version=no
2674 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2675 soname_spec='${libname}${release}${shared_ext}$major'
2676 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2677 shlibpath_var=LD_LIBRARY_PATH
2678 shlibpath_overrides_runpath=no
2679 # This implies no fast_install, which is unacceptable.
2680 # Some rework will be needed to allow for fast_install
2681 # before this can be enabled.
2682 hardcode_into_libs=yes
2683
2684 # Append ld.so.conf contents to the search path
2685 if test -f /etc/ld.so.conf; then
2686 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;/^$/d' | tr '\n' ' '`
2687 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2688 fi
2689
2690 # We used to test for /lib/ld.so.1 and disable shared libraries on
2691 # powerpc, because MkLinux only supported shared libraries with the
2692 # GNU dynamic linker. Since this was broken with cross compilers,
2693 # most powerpc-linux boxes support dynamic linking these days and
2694 # people can always --disable-shared, the test was removed, and we
2695 # assume the GNU/Linux dynamic linker is in use.
2696 dynamic_linker='GNU/Linux ld.so'
2697 ;;
2698
2699netbsdelf*-gnu)
2700 version_type=linux
2701 need_lib_prefix=no
2702 need_version=no
2703 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2704 soname_spec='${libname}${release}${shared_ext}$major'
2705 shlibpath_var=LD_LIBRARY_PATH
2706 shlibpath_overrides_runpath=no
2707 hardcode_into_libs=yes
2708 dynamic_linker='NetBSD ld.elf_so'
2709 ;;
2710
2711netbsd*)
2712 version_type=sunos
2713 need_lib_prefix=no
2714 need_version=no
2715 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2716 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2717 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2718 dynamic_linker='NetBSD (a.out) ld.so'
2719 else
2720 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2721 soname_spec='${libname}${release}${shared_ext}$major'
2722 dynamic_linker='NetBSD ld.elf_so'
2723 fi
2724 shlibpath_var=LD_LIBRARY_PATH
2725 shlibpath_overrides_runpath=yes
2726 hardcode_into_libs=yes
2727 ;;
2728
2729newsos6)
2730 version_type=linux
2731 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2732 shlibpath_var=LD_LIBRARY_PATH
2733 shlibpath_overrides_runpath=yes
2734 ;;
2735
2736nto-qnx*)
2737 version_type=linux
2738 need_lib_prefix=no
2739 need_version=no
2740 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2741 soname_spec='${libname}${release}${shared_ext}$major'
2742 shlibpath_var=LD_LIBRARY_PATH
2743 shlibpath_overrides_runpath=yes
2744 ;;
2745
2746openbsd*)
2747 version_type=sunos
2748 sys_lib_dlsearch_path_spec="/usr/lib"
2749 need_lib_prefix=no
2750 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2751 case $host_os in
2752 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2753 *) need_version=no ;;
2754 esac
2755 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2756 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2757 shlibpath_var=LD_LIBRARY_PATH
2758 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2759 case $host_os in
2760 openbsd2.[[89]] | openbsd2.[[89]].*)
2761 shlibpath_overrides_runpath=no
2762 ;;
2763 *)
2764 shlibpath_overrides_runpath=yes
2765 ;;
2766 esac
2767 else
2768 shlibpath_overrides_runpath=yes
2769 fi
2770 ;;
2771
2772os2*)
2773 libname_spec='$name'
2774 shrext_cmds=".dll"
2775 need_lib_prefix=no
2776 library_names_spec='$libname${shared_ext} $libname.a'
2777 dynamic_linker='OS/2 ld.exe'
2778 shlibpath_var=LIBPATH
2779 ;;
2780
2781osf3* | osf4* | osf5*)
2782 version_type=osf
2783 need_lib_prefix=no
2784 need_version=no
2785 soname_spec='${libname}${release}${shared_ext}$major'
2786 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2787 shlibpath_var=LD_LIBRARY_PATH
2788 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2789 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2790 ;;
2791
2792rdos*)
2793 dynamic_linker=no
2794 ;;
2795
2796solaris*)
2797 version_type=linux
2798 need_lib_prefix=no
2799 need_version=no
2800 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2801 soname_spec='${libname}${release}${shared_ext}$major'
2802 shlibpath_var=LD_LIBRARY_PATH
2803 shlibpath_overrides_runpath=yes
2804 hardcode_into_libs=yes
2805 # ldd complains unless libraries are executable
2806 postinstall_cmds='chmod +x $lib'
2807 ;;
2808
2809sunos4*)
2810 version_type=sunos
2811 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2812 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2813 shlibpath_var=LD_LIBRARY_PATH
2814 shlibpath_overrides_runpath=yes
2815 if test "$with_gnu_ld" = yes; then
2816 need_lib_prefix=no
2817 fi
2818 need_version=yes
2819 ;;
2820
2821sysv4 | sysv4.3*)
2822 version_type=linux
2823 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2824 soname_spec='${libname}${release}${shared_ext}$major'
2825 shlibpath_var=LD_LIBRARY_PATH
2826 case $host_vendor in
2827 sni)
2828 shlibpath_overrides_runpath=no
2829 need_lib_prefix=no
2830 export_dynamic_flag_spec='${wl}-Blargedynsym'
2831 runpath_var=LD_RUN_PATH
2832 ;;
2833 siemens)
2834 need_lib_prefix=no
2835 ;;
2836 motorola)
2837 need_lib_prefix=no
2838 need_version=no
2839 shlibpath_overrides_runpath=no
2840 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2841 ;;
2842 esac
2843 ;;
2844
2845sysv4*MP*)
2846 if test -d /usr/nec ;then
2847 version_type=linux
2848 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2849 soname_spec='$libname${shared_ext}.$major'
2850 shlibpath_var=LD_LIBRARY_PATH
2851 fi
2852 ;;
2853
2854sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2855 version_type=freebsd-elf
2856 need_lib_prefix=no
2857 need_version=no
2858 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2859 soname_spec='${libname}${release}${shared_ext}$major'
2860 shlibpath_var=LD_LIBRARY_PATH
2861 hardcode_into_libs=yes
2862 if test "$with_gnu_ld" = yes; then
2863 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2864 shlibpath_overrides_runpath=no
2865 else
2866 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2867 shlibpath_overrides_runpath=yes
2868 case $host_os in
2869 sco3.2v5*)
2870 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2871 ;;
2872 esac
2873 fi
2874 sys_lib_dlsearch_path_spec='/usr/lib'
2875 ;;
2876
2877uts4*)
2878 version_type=linux
2879 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2880 soname_spec='${libname}${release}${shared_ext}$major'
2881 shlibpath_var=LD_LIBRARY_PATH
2882 ;;
2883
2884*)
2885 dynamic_linker=no
2886 ;;
2887esac
2888AC_MSG_RESULT([$dynamic_linker])
2889test "$dynamic_linker" = no && can_build_shared=no
2890
6cc5e1a6
DB
2891variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2892if test "$GCC" = yes; then
2893 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2894fi
2895])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2896
2897
2898# _LT_AC_TAGCONFIG
2899# ----------------
2900AC_DEFUN([_LT_AC_TAGCONFIG],
2901[AC_REQUIRE([LT_AC_PROG_SED])dnl
2902AC_ARG_WITH([tags],
2903 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2904 [include additional configurations @<:@automatic@:>@])],
2905 [tagnames="$withval"])
2906
2907if test -f "$ltmain" && test -n "$tagnames"; then
2908 if test ! -f "${ofile}"; then
2909 AC_MSG_WARN([output file `$ofile' does not exist])
2910 fi
2911
2912 if test -z "$LTCC"; then
2913 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2914 if test -z "$LTCC"; then
2915 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2916 else
2917 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2918 fi
2919 fi
2920 if test -z "$LTCFLAGS"; then
2921 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
2922 fi
2923
2924 # Extract list of available tagged configurations in $ofile.
2925 # Note that this assumes the entire list is on one line.
2926 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2927
2928 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2929 for tagname in $tagnames; do
2930 IFS="$lt_save_ifs"
2931 # Check whether tagname contains only valid characters
2932 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2933 "") ;;
2934 *) AC_MSG_ERROR([invalid tag name: $tagname])
2935 ;;
2936 esac
2937
2938 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2939 then
2940 AC_MSG_ERROR([tag name \"$tagname\" already exists])
2941 fi
2942
2943 # Update the list of available tags.
2944 if test -n "$tagname"; then
2945 echo appending configuration tag \"$tagname\" to $ofile
2946
2947 case $tagname in
2948 CXX)
2949 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2950 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2951 (test "X$CXX" != "Xg++"))) ; then
2952 AC_LIBTOOL_LANG_CXX_CONFIG
2953 else
2954 tagname=""
2955 fi
2956 ;;
2957
2958 F77)
2959 if test -n "$F77" && test "X$F77" != "Xno"; then
2960 AC_LIBTOOL_LANG_F77_CONFIG
2961 else
2962 tagname=""
2963 fi
2964 ;;
2965
2966 GCJ)
2967 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2968 AC_LIBTOOL_LANG_GCJ_CONFIG
2969 else
2970 tagname=""
2971 fi
2972 ;;
2973
2974 RC)
2975 AC_LIBTOOL_LANG_RC_CONFIG
2976 ;;
2977
2978 *)
2979 AC_MSG_ERROR([Unsupported tag name: $tagname])
2980 ;;
2981 esac
2982
2983 # Append the new tag name to the list of available tags.
2984 if test -n "$tagname" ; then
2985 available_tags="$available_tags $tagname"
2986 fi
2987 fi
2988 done
2989 IFS="$lt_save_ifs"
2990
2991 # Now substitute the updated list of available tags.
2992 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2993 mv "${ofile}T" "$ofile"
2994 chmod +x "$ofile"
2995 else
2996 rm -f "${ofile}T"
2997 AC_MSG_ERROR([unable to update list of available tagged configurations.])
2998 fi
2999fi
3000])# _LT_AC_TAGCONFIG
3001
3002
3003# AC_LIBTOOL_DLOPEN
3004# -----------------
3005# enable checks for dlopen support
3006AC_DEFUN([AC_LIBTOOL_DLOPEN],
3007 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
3008])# AC_LIBTOOL_DLOPEN
3009
3010
3011# AC_LIBTOOL_WIN32_DLL
3012# --------------------
3013# declare package support for building win32 DLLs
3014AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
3015[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
3016])# AC_LIBTOOL_WIN32_DLL
3017
3018
3019# AC_ENABLE_SHARED([DEFAULT])
3020# ---------------------------
3021# implement the --enable-shared flag
3022# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3023AC_DEFUN([AC_ENABLE_SHARED],
3024[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3025AC_ARG_ENABLE([shared],
3026 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
3027 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
3028 [p=${PACKAGE-default}
3029 case $enableval in
3030 yes) enable_shared=yes ;;
3031 no) enable_shared=no ;;
3032 *)
3033 enable_shared=no
3034 # Look at the argument we got. We use all the common list separators.
3035 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3036 for pkg in $enableval; do
3037 IFS="$lt_save_ifs"
3038 if test "X$pkg" = "X$p"; then
3039 enable_shared=yes
3040 fi
3041 done
3042 IFS="$lt_save_ifs"
3043 ;;
3044 esac],
3045 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
3046])# AC_ENABLE_SHARED
3047
3048
3049# AC_DISABLE_SHARED
3050# -----------------
3051# set the default shared flag to --disable-shared
3052AC_DEFUN([AC_DISABLE_SHARED],
3053[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3054AC_ENABLE_SHARED(no)
3055])# AC_DISABLE_SHARED
3056
3057
3058# AC_ENABLE_STATIC([DEFAULT])
3059# ---------------------------
3060# implement the --enable-static flag
3061# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3062AC_DEFUN([AC_ENABLE_STATIC],
3063[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3064AC_ARG_ENABLE([static],
3065 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
3066 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
3067 [p=${PACKAGE-default}
3068 case $enableval in
3069 yes) enable_static=yes ;;
3070 no) enable_static=no ;;
3071 *)
3072 enable_static=no
3073 # Look at the argument we got. We use all the common list separators.
3074 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3075 for pkg in $enableval; do
3076 IFS="$lt_save_ifs"
3077 if test "X$pkg" = "X$p"; then
3078 enable_static=yes
3079 fi
3080 done
3081 IFS="$lt_save_ifs"
3082 ;;
3083 esac],
3084 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
3085])# AC_ENABLE_STATIC
3086
3087
3088# AC_DISABLE_STATIC
3089# -----------------
3090# set the default static flag to --disable-static
3091AC_DEFUN([AC_DISABLE_STATIC],
3092[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3093AC_ENABLE_STATIC(no)
3094])# AC_DISABLE_STATIC
3095
3096
3097# AC_ENABLE_FAST_INSTALL([DEFAULT])
3098# ---------------------------------
3099# implement the --enable-fast-install flag
3100# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3101AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3102[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3103AC_ARG_ENABLE([fast-install],
3104 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
3105 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
3106 [p=${PACKAGE-default}
3107 case $enableval in
3108 yes) enable_fast_install=yes ;;
3109 no) enable_fast_install=no ;;
3110 *)
3111 enable_fast_install=no
3112 # Look at the argument we got. We use all the common list separators.
3113 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3114 for pkg in $enableval; do
3115 IFS="$lt_save_ifs"
3116 if test "X$pkg" = "X$p"; then
3117 enable_fast_install=yes
3118 fi
3119 done
3120 IFS="$lt_save_ifs"
3121 ;;
3122 esac],
3123 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
3124])# AC_ENABLE_FAST_INSTALL
3125
3126
3127# AC_DISABLE_FAST_INSTALL
3128# -----------------------
3129# set the default to --disable-fast-install
3130AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3131[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3132AC_ENABLE_FAST_INSTALL(no)
3133])# AC_DISABLE_FAST_INSTALL
3134
3135
3136# AC_LIBTOOL_PICMODE([MODE])
3137# --------------------------
3138# implement the --with-pic flag
3139# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
3140AC_DEFUN([AC_LIBTOOL_PICMODE],
3141[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3142pic_mode=ifelse($#,1,$1,default)
3143])# AC_LIBTOOL_PICMODE
3144
3145
3146# AC_PROG_EGREP
3147# -------------
3148# This is predefined starting with Autoconf 2.54, so this conditional
3149# definition can be removed once we require Autoconf 2.54 or later.
3150m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
3151[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
3152 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3153 then ac_cv_prog_egrep='grep -E'
3154 else ac_cv_prog_egrep='egrep'
3155 fi])
3156 EGREP=$ac_cv_prog_egrep
3157 AC_SUBST([EGREP])
3158])])
3159
3160
3161# AC_PATH_TOOL_PREFIX
3162# -------------------
3163# find a file program which can recognize shared library
3164AC_DEFUN([AC_PATH_TOOL_PREFIX],
3165[AC_REQUIRE([AC_PROG_EGREP])dnl
3166AC_MSG_CHECKING([for $1])
3167AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3168[case $MAGIC_CMD in
3169[[\\/*] | ?:[\\/]*])
3170 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3171 ;;
3172*)
3173 lt_save_MAGIC_CMD="$MAGIC_CMD"
3174 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3175dnl $ac_dummy forces splitting on constant user-supplied paths.
3176dnl POSIX.2 word splitting is done only on the output of word expansions,
3177dnl not every word. This closes a longstanding sh security hole.
3178 ac_dummy="ifelse([$2], , $PATH, [$2])"
3179 for ac_dir in $ac_dummy; do
3180 IFS="$lt_save_ifs"
3181 test -z "$ac_dir" && ac_dir=.
3182 if test -f $ac_dir/$1; then
3183 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3184 if test -n "$file_magic_test_file"; then
3185 case $deplibs_check_method in
3186 "file_magic "*)
3187 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3188 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3189 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3190 $EGREP "$file_magic_regex" > /dev/null; then
3191 :
3192 else
3193 cat <<EOF 1>&2
3194
3195*** Warning: the command libtool uses to detect shared libraries,
3196*** $file_magic_cmd, produces output that libtool cannot recognize.
3197*** The result is that libtool may fail to recognize shared libraries
3198*** as such. This will affect the creation of libtool libraries that
3199*** depend on shared libraries, but programs linked with such libtool
3200*** libraries will work regardless of this problem. Nevertheless, you
3201*** may want to report the problem to your system manager and/or to
3202*** bug-libtool@gnu.org
3203
3204EOF
3205 fi ;;
3206 esac
3207 fi
3208 break
3209 fi
3210 done
3211 IFS="$lt_save_ifs"
3212 MAGIC_CMD="$lt_save_MAGIC_CMD"
3213 ;;
3214esac])
3215MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3216if test -n "$MAGIC_CMD"; then
3217 AC_MSG_RESULT($MAGIC_CMD)
3218else
3219 AC_MSG_RESULT(no)
3220fi
3221])# AC_PATH_TOOL_PREFIX
3222
3223
3224# AC_PATH_MAGIC
3225# -------------
3226# find a file program which can recognize a shared library
3227AC_DEFUN([AC_PATH_MAGIC],
3228[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3229if test -z "$lt_cv_path_MAGIC_CMD"; then
3230 if test -n "$ac_tool_prefix"; then
3231 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3232 else
3233 MAGIC_CMD=:
3234 fi
3235fi
3236])# AC_PATH_MAGIC
3237
3238
3239# AC_PROG_LD
3240# ----------
3241# find the pathname to the GNU or non-GNU linker
3242AC_DEFUN([AC_PROG_LD],
3243[AC_ARG_WITH([gnu-ld],
3244 [AC_HELP_STRING([--with-gnu-ld],
3245 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3246 [test "$withval" = no || with_gnu_ld=yes],
3247 [with_gnu_ld=no])
3248AC_REQUIRE([LT_AC_PROG_SED])dnl
3249AC_REQUIRE([AC_PROG_CC])dnl
3250AC_REQUIRE([AC_CANONICAL_HOST])dnl
3251AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3252ac_prog=ld
3253if test "$GCC" = yes; then
3254 # Check if gcc -print-prog-name=ld gives a path.
3255 AC_MSG_CHECKING([for ld used by $CC])
3256 case $host in
3257 *-*-mingw*)
3258 # gcc leaves a trailing carriage return which upsets mingw
3259 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3260 *)
3261 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3262 esac
3263 case $ac_prog in
3264 # Accept absolute paths.
3265 [[\\/]]* | ?:[[\\/]]*)
3266 re_direlt='/[[^/]][[^/]]*/\.\./'
3267 # Canonicalize the pathname of ld
3268 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3269 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3270 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3271 done
3272 test -z "$LD" && LD="$ac_prog"
3273 ;;
3274 "")
3275 # If it fails, then pretend we aren't using GCC.
3276 ac_prog=ld
3277 ;;
3278 *)
3279 # If it is relative, then search for the first ld in PATH.
3280 with_gnu_ld=unknown
3281 ;;
3282 esac
3283elif test "$with_gnu_ld" = yes; then
3284 AC_MSG_CHECKING([for GNU ld])
3285else
3286 AC_MSG_CHECKING([for non-GNU ld])
3287fi
3288AC_CACHE_VAL(lt_cv_path_LD,
3289[if test -z "$LD"; then
3290 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3291 for ac_dir in $PATH; do
3292 IFS="$lt_save_ifs"
3293 test -z "$ac_dir" && ac_dir=.
3294 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3295 lt_cv_path_LD="$ac_dir/$ac_prog"
3296 # Check to see if the program is GNU ld. I'd rather use --version,
3297 # but apparently some variants of GNU ld only accept -v.
3298 # Break only if it was the GNU/non-GNU ld that we prefer.
3299 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3300 *GNU* | *'with BFD'*)
3301 test "$with_gnu_ld" != no && break
3302 ;;
3303 *)
3304 test "$with_gnu_ld" != yes && break
3305 ;;
3306 esac
3307 fi
3308 done
3309 IFS="$lt_save_ifs"
3310else
3311 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3312fi])
3313LD="$lt_cv_path_LD"
3314if test -n "$LD"; then
3315 AC_MSG_RESULT($LD)
3316else
3317 AC_MSG_RESULT(no)
3318fi
3319test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3320AC_PROG_LD_GNU
3321])# AC_PROG_LD
3322
3323
3324# AC_PROG_LD_GNU
3325# --------------
3326AC_DEFUN([AC_PROG_LD_GNU],
3327[AC_REQUIRE([AC_PROG_EGREP])dnl
3328AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3329[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3330case `$LD -v 2>&1 </dev/null` in
3331*GNU* | *'with BFD'*)
3332 lt_cv_prog_gnu_ld=yes
3333 ;;
3334*)
3335 lt_cv_prog_gnu_ld=no
3336 ;;
3337esac])
3338with_gnu_ld=$lt_cv_prog_gnu_ld
3339])# AC_PROG_LD_GNU
3340
3341
3342# AC_PROG_LD_RELOAD_FLAG
3343# ----------------------
3344# find reload flag for linker
3345# -- PORTME Some linkers may need a different reload flag.
3346AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3347[AC_CACHE_CHECK([for $LD option to reload object files],
3348 lt_cv_ld_reload_flag,
3349 [lt_cv_ld_reload_flag='-r'])
3350reload_flag=$lt_cv_ld_reload_flag
3351case $reload_flag in
3352"" | " "*) ;;
3353*) reload_flag=" $reload_flag" ;;
3354esac
3355reload_cmds='$LD$reload_flag -o $output$reload_objs'
3356case $host_os in
3357 darwin*)
3358 if test "$GCC" = yes; then
3359 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3360 else
3361 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3362 fi
3363 ;;
3364esac
3365])# AC_PROG_LD_RELOAD_FLAG
3366
3367
3368# AC_DEPLIBS_CHECK_METHOD
3369# -----------------------
3370# how to check for library dependencies
3371# -- PORTME fill in with the dynamic library characteristics
3372AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3373[AC_CACHE_CHECK([how to recognize dependent libraries],
3374lt_cv_deplibs_check_method,
3375[lt_cv_file_magic_cmd='$MAGIC_CMD'
3376lt_cv_file_magic_test_file=
3377lt_cv_deplibs_check_method='unknown'
3378# Need to set the preceding variable on all platforms that support
3379# interlibrary dependencies.
3380# 'none' -- dependencies not supported.
3381# `unknown' -- same as none, but documents that we really don't know.
3382# 'pass_all' -- all dependencies passed with no checks.
3383# 'test_compile' -- check by making test program.
3384# 'file_magic [[regex]]' -- check by looking for files in library path
3385# which responds to the $file_magic_cmd with a given extended regex.
3386# If you have `file' or equivalent on your system and you're not sure
3387# whether `pass_all' will *always* work, you probably want this one.
3388
3389case $host_os in
ee4883d4 3390aix4* | aix5*)
6cc5e1a6
DB
3391 lt_cv_deplibs_check_method=pass_all
3392 ;;
3393
3394beos*)
3395 lt_cv_deplibs_check_method=pass_all
3396 ;;
3397
3398bsdi[[45]]*)
3399 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3400 lt_cv_file_magic_cmd='/usr/bin/file -L'
3401 lt_cv_file_magic_test_file=/shlib/libc.so
3402 ;;
3403
3404cygwin*)
3405 # func_win32_libid is a shell function defined in ltmain.sh
3406 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3407 lt_cv_file_magic_cmd='func_win32_libid'
3408 ;;
3409
3410mingw* | pw32*)
3411 # Base MSYS/MinGW do not provide the 'file' command needed by
3412 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3413 # unless we find 'file', for example because we are cross-compiling.
3414 if ( file / ) >/dev/null 2>&1; then
3415 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3416 lt_cv_file_magic_cmd='func_win32_libid'
3417 else
3418 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3419 lt_cv_file_magic_cmd='$OBJDUMP -f'
3420 fi
3421 ;;
3422
3423darwin* | rhapsody*)
3424 lt_cv_deplibs_check_method=pass_all
3425 ;;
3426
3427freebsd* | dragonfly*)
3428 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3429 case $host_cpu in
3430 i*86 )
3431 # Not sure whether the presence of OpenBSD here was a mistake.
3432 # Let's accept both of them until this is cleared up.
3433 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3434 lt_cv_file_magic_cmd=/usr/bin/file
3435 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3436 ;;
3437 esac
3438 else
3439 lt_cv_deplibs_check_method=pass_all
3440 fi
3441 ;;
3442
3443gnu*)
3444 lt_cv_deplibs_check_method=pass_all
3445 ;;
3446
3447hpux10.20* | hpux11*)
3448 lt_cv_file_magic_cmd=/usr/bin/file
3449 case $host_cpu in
3450 ia64*)
3451 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3452 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3453 ;;
3454 hppa*64*)
3455 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
3456 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3457 ;;
3458 *)
3459 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3460 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3461 ;;
3462 esac
3463 ;;
3464
3465interix[[3-9]]*)
3466 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3467 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3468 ;;
3469
3470irix5* | irix6* | nonstopux*)
3471 case $LD in
3472 *-32|*"-32 ") libmagic=32-bit;;
3473 *-n32|*"-n32 ") libmagic=N32;;
3474 *-64|*"-64 ") libmagic=64-bit;;
3475 *) libmagic=never-match;;
3476 esac
3477 lt_cv_deplibs_check_method=pass_all
3478 ;;
3479
3480# This must be Linux ELF.
3481linux* | k*bsd*-gnu)
3482 lt_cv_deplibs_check_method=pass_all
3483 ;;
3484
3485netbsd* | netbsdelf*-gnu)
3486 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3487 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3488 else
3489 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3490 fi
3491 ;;
3492
3493newos6*)
3494 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3495 lt_cv_file_magic_cmd=/usr/bin/file
3496 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3497 ;;
3498
3499nto-qnx*)
3500 lt_cv_deplibs_check_method=unknown
3501 ;;
3502
3503openbsd*)
3504 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3505 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3506 else
3507 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3508 fi
3509 ;;
3510
3511osf3* | osf4* | osf5*)
3512 lt_cv_deplibs_check_method=pass_all
3513 ;;
3514
3515rdos*)
3516 lt_cv_deplibs_check_method=pass_all
3517 ;;
3518
3519solaris*)
3520 lt_cv_deplibs_check_method=pass_all
3521 ;;
3522
3523sysv4 | sysv4.3*)
3524 case $host_vendor in
3525 motorola)
3526 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]]'
3527 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3528 ;;
3529 ncr)
3530 lt_cv_deplibs_check_method=pass_all
3531 ;;
3532 sequent)
3533 lt_cv_file_magic_cmd='/bin/file'
3534 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3535 ;;
3536 sni)
3537 lt_cv_file_magic_cmd='/bin/file'
3538 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3539 lt_cv_file_magic_test_file=/lib/libc.so
3540 ;;
3541 siemens)
3542 lt_cv_deplibs_check_method=pass_all
3543 ;;
3544 pc)
3545 lt_cv_deplibs_check_method=pass_all
3546 ;;
3547 esac
3548 ;;
3549
3550sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3551 lt_cv_deplibs_check_method=pass_all
3552 ;;
3553esac
3554])
3555file_magic_cmd=$lt_cv_file_magic_cmd
3556deplibs_check_method=$lt_cv_deplibs_check_method
3557test -z "$deplibs_check_method" && deplibs_check_method=unknown
3558])# AC_DEPLIBS_CHECK_METHOD
3559
3560
3561# AC_PROG_NM
3562# ----------
3563# find the pathname to a BSD-compatible name lister
3564AC_DEFUN([AC_PROG_NM],
3565[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3566[if test -n "$NM"; then
3567 # Let the user override the test.
3568 lt_cv_path_NM="$NM"
3569else
3570 lt_nm_to_check="${ac_tool_prefix}nm"
3571 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3572 lt_nm_to_check="$lt_nm_to_check nm"
3573 fi
3574 for lt_tmp_nm in $lt_nm_to_check; do
3575 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3576 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3577 IFS="$lt_save_ifs"
3578 test -z "$ac_dir" && ac_dir=.
3579 tmp_nm="$ac_dir/$lt_tmp_nm"
3580 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3581 # Check to see if the nm accepts a BSD-compat flag.
3582 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3583 # nm: unknown option "B" ignored
3584 # Tru64's nm complains that /dev/null is an invalid object file
3585 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3586 */dev/null* | *'Invalid file or object type'*)
3587 lt_cv_path_NM="$tmp_nm -B"
3588 break
3589 ;;
3590 *)
3591 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3592 */dev/null*)
3593 lt_cv_path_NM="$tmp_nm -p"
3594 break
3595 ;;
3596 *)
3597 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3598 continue # so that we can try to find one that supports BSD flags
3599 ;;
3600 esac
3601 ;;
3602 esac
3603 fi
3604 done
3605 IFS="$lt_save_ifs"
3606 done
3607 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3608fi])
3609NM="$lt_cv_path_NM"
3610])# AC_PROG_NM
3611
3612
3613# AC_CHECK_LIBM
3614# -------------
3615# check for math library
3616AC_DEFUN([AC_CHECK_LIBM],
3617[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3618LIBM=
3619case $host in
3620*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3621 # These system don't have libm, or don't need it
3622 ;;
3623*-ncr-sysv4.3*)
3624 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3625 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3626 ;;
3627*)
3628 AC_CHECK_LIB(m, cos, LIBM="-lm")
3629 ;;
3630esac
3631])# AC_CHECK_LIBM
3632
3633
3634# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3635# -----------------------------------
3636# sets LIBLTDL to the link flags for the libltdl convenience library and
3637# LTDLINCL to the include flags for the libltdl header and adds
3638# --enable-ltdl-convenience to the configure arguments. Note that
3639# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
3640# it is assumed to be `libltdl'. LIBLTDL will be prefixed with
3641# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
3642# (note the single quotes!). If your package is not flat and you're not
3643# using automake, define top_builddir and top_srcdir appropriately in
3644# the Makefiles.
3645AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3646[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3647 case $enable_ltdl_convenience in
3648 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3649 "") enable_ltdl_convenience=yes
3650 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3651 esac
3652 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3653 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3654 # For backwards non-gettext consistent compatibility...
3655 INCLTDL="$LTDLINCL"
3656])# AC_LIBLTDL_CONVENIENCE
3657
3658
3659# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3660# -----------------------------------
3661# sets LIBLTDL to the link flags for the libltdl installable library and
3662# LTDLINCL to the include flags for the libltdl header and adds
3663# --enable-ltdl-install to the configure arguments. Note that
3664# AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
3665# and an installed libltdl is not found, it is assumed to be `libltdl'.
3666# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
3667# '${top_srcdir}/' (note the single quotes!). If your package is not
3668# flat and you're not using automake, define top_builddir and top_srcdir
3669# appropriately in the Makefiles.
3670# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3671AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3672[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3673 AC_CHECK_LIB(ltdl, lt_dlinit,
3674 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3675 [if test x"$enable_ltdl_install" = xno; then
3676 AC_MSG_WARN([libltdl not installed, but installation disabled])
3677 else
3678 enable_ltdl_install=yes
3679 fi
3680 ])
3681 if test x"$enable_ltdl_install" = x"yes"; then
3682 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3683 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3684 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3685 else
3686 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3687 LIBLTDL="-lltdl"
3688 LTDLINCL=
3689 fi
3690 # For backwards non-gettext consistent compatibility...
3691 INCLTDL="$LTDLINCL"
3692])# AC_LIBLTDL_INSTALLABLE
3693
3694
3695# AC_LIBTOOL_CXX
3696# --------------
3697# enable support for C++ libraries
3698AC_DEFUN([AC_LIBTOOL_CXX],
3699[AC_REQUIRE([_LT_AC_LANG_CXX])
3700])# AC_LIBTOOL_CXX
3701
3702
3703# _LT_AC_LANG_CXX
3704# ---------------
3705AC_DEFUN([_LT_AC_LANG_CXX],
3706[AC_REQUIRE([AC_PROG_CXX])
3707AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3708_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3709])# _LT_AC_LANG_CXX
3710
3711# _LT_AC_PROG_CXXCPP
3712# ------------------
3713AC_DEFUN([_LT_AC_PROG_CXXCPP],
3714[
3715AC_REQUIRE([AC_PROG_CXX])
3716if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3717 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3718 (test "X$CXX" != "Xg++"))) ; then
3719 AC_PROG_CXXCPP
3720fi
3721])# _LT_AC_PROG_CXXCPP
3722
3723# AC_LIBTOOL_F77
3724# --------------
3725# enable support for Fortran 77 libraries
3726AC_DEFUN([AC_LIBTOOL_F77],
3727[AC_REQUIRE([_LT_AC_LANG_F77])
3728])# AC_LIBTOOL_F77
3729
3730
3731# _LT_AC_LANG_F77
3732# ---------------
3733AC_DEFUN([_LT_AC_LANG_F77],
3734[AC_REQUIRE([AC_PROG_F77])
3735_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3736])# _LT_AC_LANG_F77
3737
3738
3739# AC_LIBTOOL_GCJ
3740# --------------
3741# enable support for GCJ libraries
3742AC_DEFUN([AC_LIBTOOL_GCJ],
3743[AC_REQUIRE([_LT_AC_LANG_GCJ])
3744])# AC_LIBTOOL_GCJ
3745
3746
3747# _LT_AC_LANG_GCJ
3748# ---------------
3749AC_DEFUN([_LT_AC_LANG_GCJ],
3750[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3751 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3752 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3753 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3754 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3755 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3756_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3757])# _LT_AC_LANG_GCJ
3758
3759
3760# AC_LIBTOOL_RC
3761# -------------
3762# enable support for Windows resource files
3763AC_DEFUN([AC_LIBTOOL_RC],
3764[AC_REQUIRE([LT_AC_PROG_RC])
3765_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3766])# AC_LIBTOOL_RC
3767
3768
3769# AC_LIBTOOL_LANG_C_CONFIG
3770# ------------------------
3771# Ensure that the configuration vars for the C compiler are
3772# suitably defined. Those variables are subsequently used by
3773# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3774AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3775AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3776[lt_save_CC="$CC"
3777AC_LANG_PUSH(C)
3778
3779# Source file extension for C test sources.
3780ac_ext=c
3781
3782# Object file extension for compiled C test sources.
3783objext=o
3784_LT_AC_TAGVAR(objext, $1)=$objext
3785
3786# Code to be used in simple compile tests
3787lt_simple_compile_test_code="int some_variable = 0;"
3788
3789# Code to be used in simple link tests
3790lt_simple_link_test_code='int main(){return(0);}'
3791
3792_LT_AC_SYS_COMPILER
3793
3794# save warnings/boilerplate of simple test code
3795_LT_COMPILER_BOILERPLATE
3796_LT_LINKER_BOILERPLATE
3797
3798AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3799AC_LIBTOOL_PROG_COMPILER_PIC($1)
3800AC_LIBTOOL_PROG_CC_C_O($1)
3801AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3802AC_LIBTOOL_PROG_LD_SHLIBS($1)
3803AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3804AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3805AC_LIBTOOL_SYS_LIB_STRIP
3806AC_LIBTOOL_DLOPEN_SELF
3807
3808# Report which library types will actually be built
3809AC_MSG_CHECKING([if libtool supports shared libraries])
3810AC_MSG_RESULT([$can_build_shared])
3811
3812AC_MSG_CHECKING([whether to build shared libraries])
3813test "$can_build_shared" = "no" && enable_shared=no
3814
3815# On AIX, shared libraries and static libraries use the same namespace, and
3816# are all built from PIC.
3817case $host_os in
3818aix3*)
3819 test "$enable_shared" = yes && enable_static=no
3820 if test -n "$RANLIB"; then
3821 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3822 postinstall_cmds='$RANLIB $lib'
3823 fi
3824 ;;
3825
ee4883d4 3826aix4* | aix5*)
6cc5e1a6
DB
3827 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3828 test "$enable_shared" = yes && enable_static=no
3829 fi
3830 ;;
3831esac
3832AC_MSG_RESULT([$enable_shared])
3833
3834AC_MSG_CHECKING([whether to build static libraries])
3835# Make sure either enable_shared or enable_static is yes.
3836test "$enable_shared" = yes || enable_static=yes
3837AC_MSG_RESULT([$enable_static])
3838
3839AC_LIBTOOL_CONFIG($1)
3840
3841AC_LANG_POP
3842CC="$lt_save_CC"
3843])# AC_LIBTOOL_LANG_C_CONFIG
3844
3845
3846# AC_LIBTOOL_LANG_CXX_CONFIG
3847# --------------------------