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