1 # generated automatically by aclocal 1.9.6 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005 Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
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.
14 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
15 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
16 #
17 # This file is free software, distributed under the terms of the GNU
18 # General Public License. As a special exception to the GNU General
19 # Public License, this file may be distributed as part of a program
20 # that contains a configuration script generated by Autoconf, under
21 # the same distribution terms as the rest of that program.
22 #
23 # This file can be copied and used freely without restrictions. It can
24 # be used in projects which are not available under the GNU Public License
25 # but which still want to provide support for the GNU gettext functionality.
26 #
27 # Macro to add for using GNU gettext.
28 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
29 #
30 # Modified to never use included libintl.
31 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
32 #
33 # Major rework to remove unused code
34 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
35 #
36 # Added better handling of ALL_LINGUAS from GNU gettext version
37 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
38 #
39 # Modified to require ngettext
40 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
41 #
42 # We need this here as well, since someone might use autoconf-2.5x
43 # to configure GLib then an older version to configure a package
44 # using AM_GLIB_GNU_GETTEXT
45 AC_PREREQ(2.53)
47 dnl
48 dnl We go to great lengths to make sure that aclocal won't
49 dnl try to pull in the installed version of these macros
50 dnl when running aclocal in the glib directory.
51 dnl
52 m4_copy([AC_DEFUN],[glib_DEFUN])
53 m4_copy([AC_REQUIRE],[glib_REQUIRE])
54 dnl
55 dnl At the end, if we're not within glib, we'll define the public
56 dnl definitions in terms of our private definitions.
57 dnl
59 # GLIB_LC_MESSAGES
60 #--------------------
61 glib_DEFUN([GLIB_LC_MESSAGES],
62 [AC_CHECK_HEADERS([locale.h])
63 if test $ac_cv_header_locale_h = yes; then
64 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
65 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
66 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
67 if test $am_cv_val_LC_MESSAGES = yes; then
68 AC_DEFINE(HAVE_LC_MESSAGES, 1,
69 [Define if your <locale.h> file defines LC_MESSAGES.])
70 fi
71 fi])
73 # GLIB_PATH_PROG_WITH_TEST
74 #----------------------------
75 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
76 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
77 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
78 [# Extract the first word of "$2", so it can be a program name with args.
79 set dummy $2; ac_word=[$]2
80 AC_MSG_CHECKING([for $ac_word])
81 AC_CACHE_VAL(ac_cv_path_$1,
82 [case "[$]$1" in
83 /*)
84 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
85 ;;
86 *)
87 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
88 for ac_dir in ifelse([$5], , $PATH, [$5]); do
89 test -z "$ac_dir" && ac_dir=.
90 if test -f $ac_dir/$ac_word; then
91 if [$3]; then
92 ac_cv_path_$1="$ac_dir/$ac_word"
93 break
94 fi
95 fi
96 done
97 IFS="$ac_save_ifs"
98 dnl If no 4th arg is given, leave the cache variable unset,
99 dnl so AC_PATH_PROGS will keep looking.
100 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
101 ])dnl
102 ;;
103 esac])dnl
104 $1="$ac_cv_path_$1"
105 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
106 AC_MSG_RESULT([$]$1)
107 else
108 AC_MSG_RESULT(no)
109 fi
110 AC_SUBST($1)dnl
111 ])
113 # GLIB_WITH_NLS
114 #-----------------
115 glib_DEFUN([GLIB_WITH_NLS],
116 dnl NLS is obligatory
117 [USE_NLS=yes
118 AC_SUBST(USE_NLS)
120 gt_cv_have_gettext=no
122 CATOBJEXT=NONE
123 XGETTEXT=:
124 INTLLIBS=
126 AC_CHECK_HEADER(libintl.h,
127 [gt_cv_func_dgettext_libintl="no"
128 libintl_extra_libs=""
130 #
131 # First check in libc
132 #
133 AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
134 [AC_TRY_LINK([
135 #include <libintl.h>
136 ],
137 [return !ngettext ("","", 1)],
138 gt_cv_func_ngettext_libc=yes,
139 gt_cv_func_ngettext_libc=no)
140 ])
142 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
143 AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
144 [AC_TRY_LINK([
145 #include <libintl.h>
146 ],
147 [return !dgettext ("","")],
148 gt_cv_func_dgettext_libc=yes,
149 gt_cv_func_dgettext_libc=no)
150 ])
151 fi
153 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
154 AC_CHECK_FUNCS(bind_textdomain_codeset)
155 fi
157 #
158 # If we don't have everything we want, check in libintl
159 #
160 if test "$gt_cv_func_dgettext_libc" != "yes" \
161 || test "$gt_cv_func_ngettext_libc" != "yes" \
162 || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
164 AC_CHECK_LIB(intl, bindtextdomain,
165 [AC_CHECK_LIB(intl, ngettext,
166 [AC_CHECK_LIB(intl, dgettext,
167 gt_cv_func_dgettext_libintl=yes)])])
169 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
170 AC_MSG_CHECKING([if -liconv is needed to use gettext])
171 AC_MSG_RESULT([])
172 AC_CHECK_LIB(intl, ngettext,
173 [AC_CHECK_LIB(intl, dcgettext,
174 [gt_cv_func_dgettext_libintl=yes
175 libintl_extra_libs=-liconv],
176 :,-liconv)],
177 :,-liconv)
178 fi
180 #
181 # If we found libintl, then check in it for bind_textdomain_codeset();
182 # we'll prefer libc if neither have bind_textdomain_codeset(),
183 # and both have dgettext and ngettext
184 #
185 if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
186 glib_save_LIBS="$LIBS"
187 LIBS="$LIBS -lintl $libintl_extra_libs"
188 unset ac_cv_func_bind_textdomain_codeset
189 AC_CHECK_FUNCS(bind_textdomain_codeset)
190 LIBS="$glib_save_LIBS"
192 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
193 gt_cv_func_dgettext_libc=no
194 else
195 if test "$gt_cv_func_dgettext_libc" = "yes" \
196 && test "$gt_cv_func_ngettext_libc" = "yes"; then
197 gt_cv_func_dgettext_libintl=no
198 fi
199 fi
200 fi
201 fi
203 if test "$gt_cv_func_dgettext_libc" = "yes" \
204 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
205 gt_cv_have_gettext=yes
206 fi
208 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
209 INTLLIBS="-lintl $libintl_extra_libs"
210 fi
212 if test "$gt_cv_have_gettext" = "yes"; then
213 AC_DEFINE(HAVE_GETTEXT,1,
214 [Define if the GNU gettext() function is already present or preinstalled.])
215 GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
216 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
217 if test "$MSGFMT" != "no"; then
218 glib_save_LIBS="$LIBS"
219 LIBS="$LIBS $INTLLIBS"
220 AC_CHECK_FUNCS(dcgettext)
221 MSGFMT_OPTS=
222 AC_MSG_CHECKING([if msgfmt accepts -c])
223 GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
224 msgid ""
225 msgstr ""
226 "Content-Type: text/plain; charset=UTF-8\n"
227 "Project-Id-Version: test 1.0\n"
228 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
229 "Last-Translator: test <foo@bar.xx>\n"
230 "Language-Team: C <LL@li.org>\n"
231 "MIME-Version: 1.0\n"
232 "Content-Transfer-Encoding: 8bit\n"
233 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
234 AC_SUBST(MSGFMT_OPTS)
235 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
236 GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
237 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
238 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
239 return _nl_msg_cat_cntr],
240 [CATOBJEXT=.gmo
241 DATADIRNAME=share],
242 [case $host in
243 *-*-solaris*)
244 dnl On Solaris, if bind_textdomain_codeset is in libc,
245 dnl GNU format message catalog is always supported,
246 dnl since both are added to the libc all together.
247 dnl Hence, we'd like to go with DATADIRNAME=share and
248 dnl and CATOBJEXT=.gmo in this case.
249 AC_CHECK_FUNC(bind_textdomain_codeset,
250 [CATOBJEXT=.gmo
251 DATADIRNAME=share],
252 [CATOBJEXT=.mo
253 DATADIRNAME=lib])
254 ;;
255 *)
256 CATOBJEXT=.mo
257 DATADIRNAME=lib
258 ;;
259 esac])
260 LIBS="$glib_save_LIBS"
261 INSTOBJEXT=.mo
262 else
263 gt_cv_have_gettext=no
264 fi
265 fi
266 ])
268 if test "$gt_cv_have_gettext" = "yes" ; then
269 AC_DEFINE(ENABLE_NLS, 1,
270 [always defined to indicate that i18n is enabled])
271 fi
273 dnl Test whether we really found GNU xgettext.
274 if test "$XGETTEXT" != ":"; then
275 dnl If it is not GNU xgettext we define it as : so that the
276 dnl Makefiles still can work.
277 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
278 : ;
279 else
280 AC_MSG_RESULT(
281 [found xgettext program is not GNU xgettext; ignore it])
282 XGETTEXT=":"
283 fi
284 fi
286 # We need to process the po/ directory.
287 POSUB=po
289 AC_OUTPUT_COMMANDS(
290 [case "$CONFIG_FILES" in *po/Makefile.in*)
291 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
292 esac])
294 dnl These rules are solely for the distribution goal. While doing this
295 dnl we only have to keep exactly one list of the available catalogs
296 dnl in configure.in.
297 for lang in $ALL_LINGUAS; do
298 GMOFILES="$GMOFILES $lang.gmo"
299 POFILES="$POFILES $lang.po"
300 done
302 dnl Make all variables we use known to autoconf.
303 AC_SUBST(CATALOGS)
304 AC_SUBST(CATOBJEXT)
305 AC_SUBST(DATADIRNAME)
306 AC_SUBST(GMOFILES)
307 AC_SUBST(INSTOBJEXT)
308 AC_SUBST(INTLLIBS)
309 AC_SUBST(PO_IN_DATADIR_TRUE)
310 AC_SUBST(PO_IN_DATADIR_FALSE)
311 AC_SUBST(POFILES)
312 AC_SUBST(POSUB)
313 ])
315 # AM_GLIB_GNU_GETTEXT
316 # -------------------
317 # Do checks necessary for use of gettext. If a suitable implementation
318 # of gettext is found in either in libintl or in the C library,
319 # it will set INTLLIBS to the libraries needed for use of gettext
320 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
321 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
322 # on various variables needed by the Makefile.in.in installed by
323 # glib-gettextize.
324 dnl
325 glib_DEFUN([GLIB_GNU_GETTEXT],
326 [AC_REQUIRE([AC_PROG_CC])dnl
327 AC_REQUIRE([AC_HEADER_STDC])dnl
329 GLIB_LC_MESSAGES
330 GLIB_WITH_NLS
332 if test "$gt_cv_have_gettext" = "yes"; then
333 if test "x$ALL_LINGUAS" = "x"; then
334 LINGUAS=
335 else
336 AC_MSG_CHECKING(for catalogs to be installed)
337 NEW_LINGUAS=
338 for presentlang in $ALL_LINGUAS; do
339 useit=no
340 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
341 desiredlanguages="$LINGUAS"
342 else
343 desiredlanguages="$ALL_LINGUAS"
344 fi
345 for desiredlang in $desiredlanguages; do
346 # Use the presentlang catalog if desiredlang is
347 # a. equal to presentlang, or
348 # b. a variant of presentlang (because in this case,
349 # presentlang can be used as a fallback for messages
350 # which are not translated in the desiredlang catalog).
351 case "$desiredlang" in
352 "$presentlang"*) useit=yes;;
353 esac
354 done
355 if test $useit = yes; then
356 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
357 fi
358 done
359 LINGUAS=$NEW_LINGUAS
360 AC_MSG_RESULT($LINGUAS)
361 fi
363 dnl Construct list of names of catalog files to be constructed.
364 if test -n "$LINGUAS"; then
365 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
366 fi
367 fi
369 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
370 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
371 dnl Try to locate is.
372 MKINSTALLDIRS=
373 if test -n "$ac_aux_dir"; then
374 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
375 fi
376 if test -z "$MKINSTALLDIRS"; then
377 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
378 fi
379 AC_SUBST(MKINSTALLDIRS)
381 dnl Generate list of files to be processed by xgettext which will
382 dnl be included in po/Makefile.
383 test -d po || mkdir po
384 if test "x$srcdir" != "x."; then
385 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
386 posrcprefix="$srcdir/"
387 else
388 posrcprefix="../$srcdir/"
389 fi
390 else
391 posrcprefix="../"
392 fi
393 rm -f po/POTFILES
394 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
395 < $srcdir/po/POTFILES.in > po/POTFILES
396 ])
398 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
399 # -------------------------------
400 # Define VARIABLE to the location where catalog files will
401 # be installed by po/Makefile.
402 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
403 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
404 glib_save_prefix="$prefix"
405 glib_save_exec_prefix="$exec_prefix"
406 glib_save_datarootdir="$datarootdir"
407 test "x$prefix" = xNONE && prefix=$ac_default_prefix
408 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
409 datarootdir=`eval echo "${datarootdir}"`
410 if test "x$CATOBJEXT" = "x.mo" ; then
411 localedir=`eval echo "${libdir}/locale"`
412 else
413 localedir=`eval echo "${datadir}/locale"`
414 fi
415 prefix="$glib_save_prefix"
416 exec_prefix="$glib_save_exec_prefix"
417 datarootdir="$glib_save_datarootdir"
418 AC_DEFINE_UNQUOTED($1, "$localedir",
419 [Define the location where the catalogs will be installed])
420 ])
422 dnl
423 dnl Now the definitions that aclocal will find
424 dnl
425 ifdef(glib_configure_in,[],[
426 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
427 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
428 ])dnl
430 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
431 #
432 # Create a temporary file with TEST-FILE as its contents and pass the
433 # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
434 # 0 and perform ACTION-IF-FAIL for any other exit status.
435 AC_DEFUN([GLIB_RUN_PROG],
436 [cat >conftest.foo <<_ACEOF
437 $2
438 _ACEOF
439 if AC_RUN_LOG([$1 conftest.foo]); then
440 m4_ifval([$3], [$3], [:])
441 m4_ifvaln([$4], [else $4])dnl
442 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
443 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
444 fi])
448 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
449 # serial 36 IT_PROG_INTLTOOL
450 AC_DEFUN([IT_PROG_INTLTOOL],
451 [AC_PREREQ([2.50])dnl
453 case "$am__api_version" in
454 1.[01234])
455 AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
456 ;;
457 *)
458 ;;
459 esac
461 if test -n "$1"; then
462 AC_MSG_CHECKING([for intltool >= $1])
464 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
465 INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
466 [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
467 ]
468 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
469 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
470 AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
471 fi
473 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 $< [$]@'
474 INTLTOOL_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 $< [$]@'
475 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 $< [$]@'
476 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 $< [$]@'
477 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
478 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 $< [$]@'
479 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 $< [$]@'
480 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 $< [$]@'
481 INTLTOOL_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 $< [$]@'
482 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 $< [$]@'
483 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 $< [$]@'
484 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
485 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 $< [$]@'
486 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 $< [$]@'
487 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 $< [$]@'
488 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 $< [$]@'
489 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 $< [$]@'
490 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 $< [$]@'
491 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 $< [$]@'
493 AC_SUBST(INTLTOOL_DESKTOP_RULE)
494 AC_SUBST(INTLTOOL_DIRECTORY_RULE)
495 AC_SUBST(INTLTOOL_KEYS_RULE)
496 AC_SUBST(INTLTOOL_PROP_RULE)
497 AC_SUBST(INTLTOOL_OAF_RULE)
498 AC_SUBST(INTLTOOL_PONG_RULE)
499 AC_SUBST(INTLTOOL_SERVER_RULE)
500 AC_SUBST(INTLTOOL_SHEET_RULE)
501 AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
502 AC_SUBST(INTLTOOL_UI_RULE)
503 AC_SUBST(INTLTOOL_XAM_RULE)
504 AC_SUBST(INTLTOOL_KBD_RULE)
505 AC_SUBST(INTLTOOL_XML_RULE)
506 AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
507 AC_SUBST(INTLTOOL_CAVES_RULE)
508 AC_SUBST(INTLTOOL_SCHEMAS_RULE)
509 AC_SUBST(INTLTOOL_THEME_RULE)
510 AC_SUBST(INTLTOOL_SERVICE_RULE)
511 AC_SUBST(INTLTOOL_POLICY_RULE)
513 # Check the gettext tools to make sure they are GNU
514 AC_PATH_PROG(XGETTEXT, xgettext)
515 AC_PATH_PROG(MSGMERGE, msgmerge)
516 AC_PATH_PROG(MSGFMT, msgfmt)
517 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
518 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
519 fi
520 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
521 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
522 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
523 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
524 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
525 fi
527 # Use the tools built into the package, not the ones that are installed.
528 AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
529 AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
530 AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
532 AC_PATH_PROG(INTLTOOL_PERL, perl)
533 if test -z "$INTLTOOL_PERL"; then
534 AC_MSG_ERROR([perl not found; required for intltool])
535 fi
536 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
537 AC_MSG_ERROR([perl 5.x required for intltool])
538 fi
539 if test "x$2" != "xno-xml"; then
540 AC_MSG_CHECKING([for XML::Parser])
541 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
542 AC_MSG_RESULT([ok])
543 else
544 AC_MSG_ERROR([XML::Parser perl module is required for intltool])
545 fi
546 fi
548 # Substitute ALL_LINGUAS so we can use it in po/Makefile
549 AC_SUBST(ALL_LINGUAS)
551 # Set DATADIRNAME correctly if it is not set yet
552 # (copied from glib-gettext.m4)
553 if test -z "$DATADIRNAME"; then
554 AC_LINK_IFELSE(
555 [AC_LANG_PROGRAM([[]],
556 [[extern int _nl_msg_cat_cntr;
557 return _nl_msg_cat_cntr]])],
558 [DATADIRNAME=share],
559 [case $host in
560 *-*-solaris*)
561 dnl On Solaris, if bind_textdomain_codeset is in libc,
562 dnl GNU format message catalog is always supported,
563 dnl since both are added to the libc all together.
564 dnl Hence, we'd like to go with DATADIRNAME=share
565 dnl in this case.
566 AC_CHECK_FUNC(bind_textdomain_codeset,
567 [DATADIRNAME=share], [DATADIRNAME=lib])
568 ;;
569 *)
570 [DATADIRNAME=lib]
571 ;;
572 esac])
573 fi
574 AC_SUBST(DATADIRNAME)
576 IT_PO_SUBDIR([po])
578 dnl The following is very similar to
579 dnl
580 dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
581 dnl
582 dnl with the following slight differences:
583 dnl - the *.in files are in ac_aux_dir,
584 dnl - if the file haven't changed upon reconfigure, it's not touched,
585 dnl - the evaluation of the third parameter enables a hack which computes
586 dnl the actual value of $libdir,
587 dnl - the user sees "executing intltool commands", instead of
588 dnl "creating intltool-extract" and such.
589 dnl
590 dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
591 dnl a reason for it.
593 AC_CONFIG_COMMANDS([intltool], [
595 for file in intltool-extract intltool-merge intltool-update; do
596 sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
597 -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
598 -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
599 < ${ac_aux_dir}/${file}.in > ${file}.out
600 if cmp -s ${file} ${file}.out 2>/dev/null; then
601 rm -f ${file}.out
602 else
603 mv -f ${file}.out ${file}
604 fi
605 chmod ugo+x ${file}
606 chmod u+w ${file}
607 done
609 ],
610 [INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
611 prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
612 INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'])
614 ])
617 # IT_PO_SUBDIR(DIRNAME)
618 # ---------------------
619 # All po subdirs have to be declared with this macro; the subdir "po" is
620 # declared by IT_PROG_INTLTOOL.
621 #
622 AC_DEFUN([IT_PO_SUBDIR],
623 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
624 dnl
625 dnl The following CONFIG_COMMANDS should be exetuted at the very end
626 dnl of config.status.
627 AC_CONFIG_COMMANDS_PRE([
628 AC_CONFIG_COMMANDS([$1/stamp-it], [
629 rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
630 >"$1/stamp-it.tmp"
631 [sed '/^#/d
632 s/^[[].*] *//
633 /^[ ]*$/d
634 '"s|^| $ac_top_srcdir/|" \
635 "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
636 ]
637 if test ! -f "$1/Makefile"; then
638 AC_MSG_ERROR([$1/Makefile is not ready.])
639 fi
640 mv "$1/Makefile" "$1/Makefile.tmp"
641 [sed '/^POTFILES =/,/[^\\]$/ {
642 /^POTFILES =/!d
643 r $1/POTFILES
644 }
645 ' "$1/Makefile.tmp" >"$1/Makefile"]
646 rm -f "$1/Makefile.tmp"
647 mv "$1/stamp-it.tmp" "$1/stamp-it"
648 ])
649 ])dnl
650 ])
653 # deprecated macros
654 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
655 # A hint is needed for aclocal from Automake <= 1.9.4:
656 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
659 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
661 # serial 52 Debian 1.5.26-1ubuntu1 AC_PROG_LIBTOOL
664 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
665 # -----------------------------------------------------------
666 # If this macro is not defined by Autoconf, define it here.
667 m4_ifdef([AC_PROVIDE_IFELSE],
668 [],
669 [m4_define([AC_PROVIDE_IFELSE],
670 [m4_ifdef([AC_PROVIDE_$1],
671 [$2], [$3])])])
674 # AC_PROG_LIBTOOL
675 # ---------------
676 AC_DEFUN([AC_PROG_LIBTOOL],
677 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
678 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
679 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
680 AC_PROVIDE_IFELSE([AC_PROG_CXX],
681 [AC_LIBTOOL_CXX],
682 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
683 ])])
684 dnl And a similar setup for Fortran 77 support
685 AC_PROVIDE_IFELSE([AC_PROG_F77],
686 [AC_LIBTOOL_F77],
687 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
688 ])])
690 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
691 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
692 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
693 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
694 [AC_LIBTOOL_GCJ],
695 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
696 [AC_LIBTOOL_GCJ],
697 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
698 [AC_LIBTOOL_GCJ],
699 [ifdef([AC_PROG_GCJ],
700 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
701 ifdef([A][M_PROG_GCJ],
702 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
703 ifdef([LT_AC_PROG_GCJ],
704 [define([LT_AC_PROG_GCJ],
705 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
706 ])])# AC_PROG_LIBTOOL
709 # _AC_PROG_LIBTOOL
710 # ----------------
711 AC_DEFUN([_AC_PROG_LIBTOOL],
712 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
713 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
714 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
715 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
717 # This can be used to rebuild libtool when needed
718 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
720 # Always use our own libtool.
721 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
722 AC_SUBST(LIBTOOL)dnl
724 # Prevent multiple expansion
725 define([AC_PROG_LIBTOOL], [])
726 ])# _AC_PROG_LIBTOOL
729 # AC_LIBTOOL_SETUP
730 # ----------------
731 AC_DEFUN([AC_LIBTOOL_SETUP],
732 [AC_PREREQ(2.50)dnl
733 AC_REQUIRE([AC_ENABLE_SHARED])dnl
734 AC_REQUIRE([AC_ENABLE_STATIC])dnl
735 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
736 AC_REQUIRE([AC_CANONICAL_HOST])dnl
737 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
738 AC_REQUIRE([AC_PROG_CC])dnl
739 AC_REQUIRE([AC_PROG_LD])dnl
740 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
741 AC_REQUIRE([AC_PROG_NM])dnl
743 AC_REQUIRE([AC_PROG_LN_S])dnl
744 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
745 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
746 AC_REQUIRE([AC_OBJEXT])dnl
747 AC_REQUIRE([AC_EXEEXT])dnl
748 dnl
749 AC_LIBTOOL_SYS_MAX_CMD_LEN
750 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
751 AC_LIBTOOL_OBJDIR
753 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
754 _LT_AC_PROG_ECHO_BACKSLASH
756 case $host_os in
757 aix3*)
758 # AIX sometimes has problems with the GCC collect2 program. For some
759 # reason, if we set the COLLECT_NAMES environment variable, the problems
760 # vanish in a puff of smoke.
761 if test "X${COLLECT_NAMES+set}" != Xset; then
762 COLLECT_NAMES=
763 export COLLECT_NAMES
764 fi
765 ;;
766 esac
768 # Sed substitution that helps us do robust quoting. It backslashifies
769 # metacharacters that are still active within double-quoted strings.
770 Xsed='sed -e 1s/^X//'
771 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
773 # Same as above, but do not quote variable references.
774 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
776 # Sed substitution to delay expansion of an escaped shell variable in a
777 # double_quote_subst'ed string.
778 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
780 # Sed substitution to avoid accidental globbing in evaled expressions
781 no_glob_subst='s/\*/\\\*/g'
783 # Constants:
784 rm="rm -f"
786 # Global variables:
787 default_ofile=libtool
788 can_build_shared=yes
790 # All known linkers require a `.a' archive for static linking (except MSVC,
791 # which needs '.lib').
792 libext=a
793 ltmain="$ac_aux_dir/ltmain.sh"
794 ofile="$default_ofile"
795 with_gnu_ld="$lt_cv_prog_gnu_ld"
797 AC_CHECK_TOOL(AR, ar, false)
798 AC_CHECK_TOOL(RANLIB, ranlib, :)
799 AC_CHECK_TOOL(STRIP, strip, :)
801 old_CC="$CC"
802 old_CFLAGS="$CFLAGS"
804 # Set sane defaults for various variables
805 test -z "$AR" && AR=ar
806 test -z "$AR_FLAGS" && AR_FLAGS=cru
807 test -z "$AS" && AS=as
808 test -z "$CC" && CC=cc
809 test -z "$LTCC" && LTCC=$CC
810 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
811 test -z "$DLLTOOL" && DLLTOOL=dlltool
812 test -z "$LD" && LD=ld
813 test -z "$LN_S" && LN_S="ln -s"
814 test -z "$MAGIC_CMD" && MAGIC_CMD=file
815 test -z "$NM" && NM=nm
816 test -z "$SED" && SED=sed
817 test -z "$OBJDUMP" && OBJDUMP=objdump
818 test -z "$RANLIB" && RANLIB=:
819 test -z "$STRIP" && STRIP=:
820 test -z "$ac_objext" && ac_objext=o
822 # Determine commands to create old-style static archives.
823 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
824 old_postinstall_cmds='chmod 644 $oldlib'
825 old_postuninstall_cmds=
827 if test -n "$RANLIB"; then
828 case $host_os in
829 openbsd*)
830 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
831 ;;
832 *)
833 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
834 ;;
835 esac
836 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
837 fi
839 _LT_CC_BASENAME([$compiler])
841 # Only perform the check for file, if the check method requires it
842 case $deplibs_check_method in
843 file_magic*)
844 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
845 AC_PATH_MAGIC
846 fi
847 ;;
848 esac
850 _LT_REQUIRED_DARWIN_CHECKS
852 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
853 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
854 enable_win32_dll=yes, enable_win32_dll=no)
856 AC_ARG_ENABLE([libtool-lock],
857 [AC_HELP_STRING([--disable-libtool-lock],
858 [avoid locking (might break parallel builds)])])
859 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
861 AC_ARG_WITH([pic],
862 [AC_HELP_STRING([--with-pic],
863 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
864 [pic_mode="$withval"],
865 [pic_mode=default])
866 test -z "$pic_mode" && pic_mode=default
868 # Use C for the default configuration in the libtool script
869 tagname=
870 AC_LIBTOOL_LANG_C_CONFIG
871 _LT_AC_TAGCONFIG
872 ])# AC_LIBTOOL_SETUP
875 # _LT_AC_SYS_COMPILER
876 # -------------------
877 AC_DEFUN([_LT_AC_SYS_COMPILER],
878 [AC_REQUIRE([AC_PROG_CC])dnl
880 # If no C compiler was specified, use CC.
881 LTCC=${LTCC-"$CC"}
883 # If no C compiler flags were specified, use CFLAGS.
884 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
886 # Allow CC to be a program name with arguments.
887 compiler=$CC
888 ])# _LT_AC_SYS_COMPILER
891 # _LT_CC_BASENAME(CC)
892 # -------------------
893 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
894 AC_DEFUN([_LT_CC_BASENAME],
895 [for cc_temp in $1""; do
896 case $cc_temp in
897 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
898 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
899 \-*) ;;
900 *) break;;
901 esac
902 done
903 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
904 ])
907 # _LT_COMPILER_BOILERPLATE
908 # ------------------------
909 # Check for compiler boilerplate output or warnings with
910 # the simple compiler test code.
911 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
912 [AC_REQUIRE([LT_AC_PROG_SED])dnl
913 ac_outfile=conftest.$ac_objext
914 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
915 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
916 _lt_compiler_boilerplate=`cat conftest.err`
917 $rm conftest*
918 ])# _LT_COMPILER_BOILERPLATE
921 # _LT_LINKER_BOILERPLATE
922 # ----------------------
923 # Check for linker boilerplate output or warnings with
924 # the simple link test code.
925 AC_DEFUN([_LT_LINKER_BOILERPLATE],
926 [AC_REQUIRE([LT_AC_PROG_SED])dnl
927 ac_outfile=conftest.$ac_objext
928 echo "$lt_simple_link_test_code" >conftest.$ac_ext
929 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
930 _lt_linker_boilerplate=`cat conftest.err`
931 $rm -r conftest*
932 ])# _LT_LINKER_BOILERPLATE
934 # _LT_REQUIRED_DARWIN_CHECKS
935 # --------------------------
936 # Check for some things on darwin
937 AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
938 case $host_os in
939 rhapsody* | darwin*)
940 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
941 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
943 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
944 [lt_cv_apple_cc_single_mod=no
945 if test -z "${LT_MULTI_MODULE}"; then
946 # By default we will add the -single_module flag. You can override
947 # by either setting the environment variable LT_MULTI_MODULE
948 # non-empty at configure time, or by adding -multi_module to the
949 # link flags.
950 echo "int foo(void){return 1;}" > conftest.c
951 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
952 -dynamiclib ${wl}-single_module conftest.c
953 if test -f libconftest.dylib; then
954 lt_cv_apple_cc_single_mod=yes
955 rm -rf libconftest.dylib*
956 fi
957 rm conftest.c
958 fi])
959 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
960 [lt_cv_ld_exported_symbols_list],
961 [lt_cv_ld_exported_symbols_list=no
962 save_LDFLAGS=$LDFLAGS
963 echo "_main" > conftest.sym
964 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
965 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
966 [lt_cv_ld_exported_symbols_list=yes],
967 [lt_cv_ld_exported_symbols_list=no])
968 LDFLAGS="$save_LDFLAGS"
969 ])
970 case $host_os in
971 rhapsody* | darwin1.[[0123]])
972 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
973 darwin1.*)
974 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
975 darwin*)
976 # if running on 10.5 or later, the deployment target defaults
977 # to the OS version, if on x86, and 10.4, the deployment
978 # target defaults to 10.4. Don't you love it?
979 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
980 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
981 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
982 10.[[012]]*)
983 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
984 10.*)
985 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
986 esac
987 ;;
988 esac
989 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
990 _lt_dar_single_mod='$single_module'
991 fi
992 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
993 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
994 else
995 _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
996 fi
997 if test "$DSYMUTIL" != ":"; then
998 _lt_dsymutil="~$DSYMUTIL \$lib || :"
999 else
1000 _lt_dsymutil=
1001 fi
1002 ;;
1003 esac
1004 ])
1006 # _LT_AC_SYS_LIBPATH_AIX
1007 # ----------------------
1008 # Links a minimal program and checks the executable
1009 # for the system default hardcoded library path. In most cases,
1010 # this is /usr/lib:/lib, but when the MPI compilers are used
1011 # the location of the communication and MPI libs are included too.
1012 # If we don't find anything, use the default library path according
1013 # to the aix ld manual.
1014 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1015 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1016 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1017 lt_aix_libpath_sed='
1018 /Import File Strings/,/^$/ {
1019 /^0/ {
1020 s/^0 *\(.*\)$/\1/
1021 p
1022 }
1023 }'
1024 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1025 # Check for a 64-bit object if we didn't find anything.
1026 if test -z "$aix_libpath"; then
1027 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1028 fi],[])
1029 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1030 ])# _LT_AC_SYS_LIBPATH_AIX
1033 # _LT_AC_SHELL_INIT(ARG)
1034 # ----------------------
1035 AC_DEFUN([_LT_AC_SHELL_INIT],
1036 [ifdef([AC_DIVERSION_NOTICE],
1037 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1038 [AC_DIVERT_PUSH(NOTICE)])
1039 $1
1040 AC_DIVERT_POP
1041 ])# _LT_AC_SHELL_INIT
1044 # _LT_AC_PROG_ECHO_BACKSLASH
1045 # --------------------------
1046 # Add some code to the start of the generated configure script which
1047 # will find an echo command which doesn't interpret backslashes.
1048 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1049 [_LT_AC_SHELL_INIT([
1050 # Check that we are running under the correct shell.
1051 SHELL=${CONFIG_SHELL-/bin/sh}
1053 case X$ECHO in
1054 X*--fallback-echo)
1055 # Remove one level of quotation (which was required for Make).
1056 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1057 ;;
1058 esac
1060 echo=${ECHO-echo}
1061 if test "X[$]1" = X--no-reexec; then
1062 # Discard the --no-reexec flag, and continue.
1063 shift
1064 elif test "X[$]1" = X--fallback-echo; then
1065 # Avoid inline document here, it may be left over
1066 :
1067 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1068 # Yippee, $echo works!
1069 :
1070 else
1071 # Restart under the correct shell.
1072 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1073 fi
1075 if test "X[$]1" = X--fallback-echo; then
1076 # used as fallback echo
1077 shift
1078 cat <<EOF
1079 [$]*
1080 EOF
1081 exit 0
1082 fi
1084 # The HP-UX ksh and POSIX shell print the target directory to stdout
1085 # if CDPATH is set.
1086 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1088 if test -z "$ECHO"; then
1089 if test "X${echo_test_string+set}" != Xset; then
1090 # find a string as large as possible, as long as the shell can cope with it
1091 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1092 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1093 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
1094 echo_test_string=`eval $cmd` &&
1095 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1096 then
1097 break
1098 fi
1099 done
1100 fi
1102 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1103 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1104 test "X$echo_testing_string" = "X$echo_test_string"; then
1105 :
1106 else
1107 # The Solaris, AIX, and Digital Unix default echo programs unquote
1108 # backslashes. This makes it impossible to quote backslashes using
1109 # echo "$something" | sed 's/\\/\\\\/g'
1110 #
1111 # So, first we look for a working echo in the user's PATH.
1113 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1114 for dir in $PATH /usr/ucb; do
1115 IFS="$lt_save_ifs"
1116 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1117 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1118 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1119 test "X$echo_testing_string" = "X$echo_test_string"; then
1120 echo="$dir/echo"
1121 break
1122 fi
1123 done
1124 IFS="$lt_save_ifs"
1126 if test "X$echo" = Xecho; then
1127 # We didn't find a better echo, so look for alternatives.
1128 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1129 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1130 test "X$echo_testing_string" = "X$echo_test_string"; then
1131 # This shell has a builtin print -r that does the trick.
1132 echo='print -r'
1133 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1134 test "X$CONFIG_SHELL" != X/bin/ksh; then
1135 # If we have ksh, try running configure again with it.
1136 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1137 export ORIGINAL_CONFIG_SHELL
1138 CONFIG_SHELL=/bin/ksh
1139 export CONFIG_SHELL
1140 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1141 else
1142 # Try using printf.
1143 echo='printf %s\n'
1144 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1145 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1146 test "X$echo_testing_string" = "X$echo_test_string"; then
1147 # Cool, printf works
1148 :
1149 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1150 test "X$echo_testing_string" = 'X\t' &&
1151 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1152 test "X$echo_testing_string" = "X$echo_test_string"; then
1153 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1154 export CONFIG_SHELL
1155 SHELL="$CONFIG_SHELL"
1156 export SHELL
1157 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1158 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1159 test "X$echo_testing_string" = 'X\t' &&
1160 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1161 test "X$echo_testing_string" = "X$echo_test_string"; then
1162 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1163 else
1164 # maybe with a smaller string...
1165 prev=:
1167 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1168 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1169 then
1170 break
1171 fi
1172 prev="$cmd"
1173 done
1175 if test "$prev" != 'sed 50q "[$]0"'; then
1176 echo_test_string=`eval $prev`
1177 export echo_test_string
1178 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1179 else
1180 # Oops. We lost completely, so just stick with echo.
1181 echo=echo
1182 fi
1183 fi
1184 fi
1185 fi
1186 fi
1187 fi
1189 # Copy echo and quote the copy suitably for passing to libtool from
1190 # the Makefile, instead of quoting the original, which is used later.
1191 ECHO=$echo
1192 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1193 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1194 fi
1196 AC_SUBST(ECHO)
1197 ])])# _LT_AC_PROG_ECHO_BACKSLASH
1200 # _LT_AC_LOCK
1201 # -----------
1202 AC_DEFUN([_LT_AC_LOCK],
1203 [AC_ARG_ENABLE([libtool-lock],
1204 [AC_HELP_STRING([--disable-libtool-lock],
1205 [avoid locking (might break parallel builds)])])
1206 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1208 # Some flags need to be propagated to the compiler or linker for good
1209 # libtool support.
1210 case $host in
1211 ia64-*-hpux*)
1212 # Find out which ABI we are using.
1213 echo 'int i;' > conftest.$ac_ext
1214 if AC_TRY_EVAL(ac_compile); then
1215 case `/usr/bin/file conftest.$ac_objext` in
1216 *ELF-32*)
1217 HPUX_IA64_MODE="32"
1218 ;;
1219 *ELF-64*)
1220 HPUX_IA64_MODE="64"
1221 ;;
1222 esac
1223 fi
1224 rm -rf conftest*
1225 ;;
1226 *-*-irix6*)
1227 # Find out which ABI we are using.
1228 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1229 if AC_TRY_EVAL(ac_compile); then
1230 if test "$lt_cv_prog_gnu_ld" = yes; then
1231 case `/usr/bin/file conftest.$ac_objext` in
1232 *32-bit*)
1233 LD="${LD-ld} -melf32bsmip"
1234 ;;
1235 *N32*)
1236 LD="${LD-ld} -melf32bmipn32"
1237 ;;
1238 *64-bit*)
1239 LD="${LD-ld} -melf64bmip"
1240 ;;
1241 esac
1242 else
1243 case `/usr/bin/file conftest.$ac_objext` in
1244 *32-bit*)
1245 LD="${LD-ld} -32"
1246 ;;
1247 *N32*)
1248 LD="${LD-ld} -n32"
1249 ;;
1250 *64-bit*)
1251 LD="${LD-ld} -64"
1252 ;;
1253 esac
1254 fi
1255 fi
1256 rm -rf conftest*
1257 ;;
1259 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1260 s390*-*linux*|sparc*-*linux*)
1261 # Find out which ABI we are using.
1262 echo 'int i;' > conftest.$ac_ext
1263 if AC_TRY_EVAL(ac_compile); then
1264 case `/usr/bin/file conftest.o` in
1265 *32-bit*)
1266 case $host in
1267 x86_64-*kfreebsd*-gnu)
1268 LD="${LD-ld} -m elf_i386_fbsd"
1269 ;;
1270 x86_64-*linux*)
1271 LD="${LD-ld} -m elf_i386"
1272 ;;
1273 ppc64-*linux*|powerpc64-*linux*)
1274 LD="${LD-ld} -m elf32ppclinux"
1275 ;;
1276 s390x-*linux*)
1277 LD="${LD-ld} -m elf_s390"
1278 ;;
1279 sparc64-*linux*)
1280 LD="${LD-ld} -m elf32_sparc"
1281 ;;
1282 esac
1283 ;;
1284 *64-bit*)
1285 case $host in
1286 x86_64-*kfreebsd*-gnu)
1287 LD="${LD-ld} -m elf_x86_64_fbsd"
1288 ;;
1289 x86_64-*linux*)
1290 LD="${LD-ld} -m elf_x86_64"
1291 ;;
1292 ppc*-*linux*|powerpc*-*linux*)
1293 LD="${LD-ld} -m elf64ppc"
1294 ;;
1295 s390*-*linux*)
1296 LD="${LD-ld} -m elf64_s390"
1297 ;;
1298 sparc*-*linux*)
1299 LD="${LD-ld} -m elf64_sparc"
1300 ;;
1301 esac
1302 ;;
1303 esac
1304 fi
1305 rm -rf conftest*
1306 ;;
1308 *-*-sco3.2v5*)
1309 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1310 SAVE_CFLAGS="$CFLAGS"
1311 CFLAGS="$CFLAGS -belf"
1312 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1313 [AC_LANG_PUSH(C)
1314 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1315 AC_LANG_POP])
1316 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1317 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1318 CFLAGS="$SAVE_CFLAGS"
1319 fi
1320 ;;
1321 sparc*-*solaris*)
1322 # Find out which ABI we are using.
1323 echo 'int i;' > conftest.$ac_ext
1324 if AC_TRY_EVAL(ac_compile); then
1325 case `/usr/bin/file conftest.o` in
1326 *64-bit*)
1327 case $lt_cv_prog_gnu_ld in
1328 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1329 *)
1330 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1331 LD="${LD-ld} -64"
1332 fi
1333 ;;
1334 esac
1335 ;;
1336 esac
1337 fi
1338 rm -rf conftest*
1339 ;;
1341 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1342 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1343 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1344 AC_CHECK_TOOL(AS, as, false)
1345 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1346 ;;
1347 ])
1348 esac
1350 need_locks="$enable_libtool_lock"
1352 ])# _LT_AC_LOCK
1355 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1356 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1357 # ----------------------------------------------------------------
1358 # Check whether the given compiler option works
1359 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1360 [AC_REQUIRE([LT_AC_PROG_SED])
1361 AC_CACHE_CHECK([$1], [$2],
1362 [$2=no
1363 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1364 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1365 lt_compiler_flag="$3"
1366 # Insert the option either (1) after the last *FLAGS variable, or
1367 # (2) before a word containing "conftest.", or (3) at the end.
1368 # Note that $ac_compile itself does not contain backslashes and begins
1369 # with a dollar sign (not a hyphen), so the echo should work correctly.
1370 # The option is referenced via a variable to avoid confusing sed.
1371 lt_compile=`echo "$ac_compile" | $SED \
1372 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1373 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1374 -e 's:$: $lt_compiler_flag:'`
1375 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1376 (eval "$lt_compile" 2>conftest.err)
1377 ac_status=$?
1378 cat conftest.err >&AS_MESSAGE_LOG_FD
1379 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1380 if (exit $ac_status) && test -s "$ac_outfile"; then
1381 # The compiler can only warn and ignore the option if not recognized
1382 # So say no if there are warnings other than the usual output.
1383 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1384 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1385 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1386 $2=yes
1387 fi
1388 fi
1389 $rm conftest*
1390 ])
1392 if test x"[$]$2" = xyes; then
1393 ifelse([$5], , :, [$5])
1394 else
1395 ifelse([$6], , :, [$6])
1396 fi
1397 ])# AC_LIBTOOL_COMPILER_OPTION
1400 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1401 # [ACTION-SUCCESS], [ACTION-FAILURE])
1402 # ------------------------------------------------------------
1403 # Check whether the given compiler option works
1404 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1405 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1406 AC_CACHE_CHECK([$1], [$2],
1407 [$2=no
1408 save_LDFLAGS="$LDFLAGS"
1409 LDFLAGS="$LDFLAGS $3"
1410 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1411 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1412 # The linker can only warn and ignore the option if not recognized
1413 # So say no if there are warnings
1414 if test -s conftest.err; then
1415 # Append any errors to the config.log.
1416 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1417 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1418 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1419 if diff conftest.exp conftest.er2 >/dev/null; then
1420 $2=yes
1421 fi
1422 else
1423 $2=yes
1424 fi
1425 fi
1426 $rm -r conftest*
1427 LDFLAGS="$save_LDFLAGS"
1428 ])
1430 if test x"[$]$2" = xyes; then
1431 ifelse([$4], , :, [$4])
1432 else
1433 ifelse([$5], , :, [$5])
1434 fi
1435 ])# AC_LIBTOOL_LINKER_OPTION
1438 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1439 # --------------------------
1440 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1441 [# find the maximum length of command line arguments
1442 AC_MSG_CHECKING([the maximum length of command line arguments])
1443 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1444 i=0
1445 teststring="ABCD"
1447 case $build_os in
1448 msdosdjgpp*)
1449 # On DJGPP, this test can blow up pretty badly due to problems in libc
1450 # (any single argument exceeding 2000 bytes causes a buffer overrun
1451 # during glob expansion). Even if it were fixed, the result of this
1452 # check would be larger than it should be.
1453 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1454 ;;
1456 gnu*)
1457 # Under GNU Hurd, this test is not required because there is
1458 # no limit to the length of command line arguments.
1459 # Libtool will interpret -1 as no limit whatsoever
1460 lt_cv_sys_max_cmd_len=-1;
1461 ;;
1463 cygwin* | mingw*)
1464 # On Win9x/ME, this test blows up -- it succeeds, but takes
1465 # about 5 minutes as the teststring grows exponentially.
1466 # Worse, since 9x/ME are not pre-emptively multitasking,
1467 # you end up with a "frozen" computer, even though with patience
1468 # the test eventually succeeds (with a max line length of 256k).
1469 # Instead, let's just punt: use the minimum linelength reported by
1470 # all of the supported platforms: 8192 (on NT/2K/XP).
1471 lt_cv_sys_max_cmd_len=8192;
1472 ;;
1474 amigaos*)
1475 # On AmigaOS with pdksh, this test takes hours, literally.
1476 # So we just punt and use a minimum line length of 8192.
1477 lt_cv_sys_max_cmd_len=8192;
1478 ;;
1480 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1481 # This has been around since 386BSD, at least. Likely further.
1482 if test -x /sbin/sysctl; then
1483 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1484 elif test -x /usr/sbin/sysctl; then
1485 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1486 else
1487 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1488 fi
1489 # And add a safety zone
1490 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1491 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1492 ;;
1494 interix*)
1495 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1496 lt_cv_sys_max_cmd_len=196608
1497 ;;
1499 osf*)
1500 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1501 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1502 # nice to cause kernel panics so lets avoid the loop below.
1503 # First set a reasonable default.
1504 lt_cv_sys_max_cmd_len=16384
1505 #
1506 if test -x /sbin/sysconfig; then
1507 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1508 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1509 esac
1510 fi
1511 ;;
1512 sco3.2v5*)
1513 lt_cv_sys_max_cmd_len=102400
1514 ;;
1515 sysv5* | sco5v6* | sysv4.2uw2*)
1516 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1517 if test -n "$kargmax"; then
1518 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1519 else
1520 lt_cv_sys_max_cmd_len=32768
1521 fi
1522 ;;
1523 *)
1524 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1525 if test -n "$lt_cv_sys_max_cmd_len"; then
1526 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1527 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1528 else
1529 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1530 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1531 = "XX$teststring") >/dev/null 2>&1 &&
1532 new_result=`expr "X$teststring" : ".*" 2>&1` &&
1533 lt_cv_sys_max_cmd_len=$new_result &&
1534 test $i != 17 # 1/2 MB should be enough
1535 do
1536 i=`expr $i + 1`
1537 teststring=$teststring$teststring
1538 done
1539 teststring=
1540 # Add a significant safety factor because C++ compilers can tack on massive
1541 # amounts of additional arguments before passing them to the linker.
1542 # It appears as though 1/2 is a usable value.
1543 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1544 fi
1545 ;;
1546 esac
1547 ])
1548 if test -n $lt_cv_sys_max_cmd_len ; then
1549 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1550 else
1551 AC_MSG_RESULT(none)
1552 fi
1553 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1556 # _LT_AC_CHECK_DLFCN
1557 # ------------------
1558 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1559 [AC_CHECK_HEADERS(dlfcn.h)dnl
1560 ])# _LT_AC_CHECK_DLFCN
1563 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1564 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1565 # ---------------------------------------------------------------------
1566 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1567 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1568 if test "$cross_compiling" = yes; then :
1569 [$4]
1570 else
1571 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1572 lt_status=$lt_dlunknown
1573 cat > conftest.$ac_ext <<EOF
1574 [#line __oline__ "configure"
1575 #include "confdefs.h"
1577 #if HAVE_DLFCN_H
1578 #include <dlfcn.h>
1579 #endif
1581 #include <stdio.h>
1583 #ifdef RTLD_GLOBAL
1584 # define LT_DLGLOBAL RTLD_GLOBAL
1585 #else
1586 # ifdef DL_GLOBAL
1587 # define LT_DLGLOBAL DL_GLOBAL
1588 # else
1589 # define LT_DLGLOBAL 0
1590 # endif
1591 #endif
1593 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1594 find out it does not work in some platform. */
1595 #ifndef LT_DLLAZY_OR_NOW
1596 # ifdef RTLD_LAZY
1597 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1598 # else
1599 # ifdef DL_LAZY
1600 # define LT_DLLAZY_OR_NOW DL_LAZY
1601 # else
1602 # ifdef RTLD_NOW
1603 # define LT_DLLAZY_OR_NOW RTLD_NOW
1604 # else
1605 # ifdef DL_NOW
1606 # define LT_DLLAZY_OR_NOW DL_NOW
1607 # else
1608 # define LT_DLLAZY_OR_NOW 0
1609 # endif
1610 # endif
1611 # endif
1612 # endif
1613 #endif
1615 #ifdef __cplusplus
1616 extern "C" void exit (int);
1617 #endif
1619 void fnord() { int i=42;}
1620 int main ()
1621 {
1622 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1623 int status = $lt_dlunknown;
1625 if (self)
1626 {
1627 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1628 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1629 /* dlclose (self); */
1630 }
1631 else
1632 puts (dlerror ());
1634 exit (status);
1635 }]
1636 EOF
1637 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1638 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1639 lt_status=$?
1640 case x$lt_status in
1641 x$lt_dlno_uscore) $1 ;;
1642 x$lt_dlneed_uscore) $2 ;;
1643 x$lt_dlunknown|x*) $3 ;;
1644 esac
1645 else :
1646 # compilation failed
1647 $3
1648 fi
1649 fi
1650 rm -fr conftest*
1651 ])# _LT_AC_TRY_DLOPEN_SELF
1654 # AC_LIBTOOL_DLOPEN_SELF
1655 # ----------------------
1656 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1657 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1658 if test "x$enable_dlopen" != xyes; then
1659 enable_dlopen=unknown
1660 enable_dlopen_self=unknown
1661 enable_dlopen_self_static=unknown
1662 else
1663 lt_cv_dlopen=no
1664 lt_cv_dlopen_libs=
1666 case $host_os in
1667 beos*)
1668 lt_cv_dlopen="load_add_on"
1669 lt_cv_dlopen_libs=
1670 lt_cv_dlopen_self=yes
1671 ;;
1673 mingw* | pw32*)
1674 lt_cv_dlopen="LoadLibrary"
1675 lt_cv_dlopen_libs=
1676 ;;
1678 cygwin*)
1679 lt_cv_dlopen="dlopen"
1680 lt_cv_dlopen_libs=
1681 ;;
1683 darwin*)
1684 # if libdl is installed we need to link against it
1685 AC_CHECK_LIB([dl], [dlopen],
1686 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1687 lt_cv_dlopen="dyld"
1688 lt_cv_dlopen_libs=
1689 lt_cv_dlopen_self=yes
1690 ])
1691 ;;
1693 *)
1694 AC_CHECK_FUNC([shl_load],
1695 [lt_cv_dlopen="shl_load"],
1696 [AC_CHECK_LIB([dld], [shl_load],
1697 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1698 [AC_CHECK_FUNC([dlopen],
1699 [lt_cv_dlopen="dlopen"],
1700 [AC_CHECK_LIB([dl], [dlopen],
1701 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1702 [AC_CHECK_LIB([svld], [dlopen],
1703 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1704 [AC_CHECK_LIB([dld], [dld_link],
1705 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1706 ])
1707 ])
1708 ])
1709 ])
1710 ])
1711 ;;
1712 esac
1714 if test "x$lt_cv_dlopen" != xno; then
1715 enable_dlopen=yes
1716 else
1717 enable_dlopen=no
1718 fi
1720 case $lt_cv_dlopen in
1721 dlopen)
1722 save_CPPFLAGS="$CPPFLAGS"
1723 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1725 save_LDFLAGS="$LDFLAGS"
1726 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1728 save_LIBS="$LIBS"
1729 LIBS="$lt_cv_dlopen_libs $LIBS"
1731 AC_CACHE_CHECK([whether a program can dlopen itself],
1732 lt_cv_dlopen_self, [dnl
1733 _LT_AC_TRY_DLOPEN_SELF(
1734 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1735 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1736 ])
1738 if test "x$lt_cv_dlopen_self" = xyes; then
1739 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1740 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1741 lt_cv_dlopen_self_static, [dnl
1742 _LT_AC_TRY_DLOPEN_SELF(
1743 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1744 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1745 ])
1746 fi
1748 CPPFLAGS="$save_CPPFLAGS"
1749 LDFLAGS="$save_LDFLAGS"
1750 LIBS="$save_LIBS"
1751 ;;
1752 esac
1754 case $lt_cv_dlopen_self in
1755 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1756 *) enable_dlopen_self=unknown ;;
1757 esac
1759 case $lt_cv_dlopen_self_static in
1760 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1761 *) enable_dlopen_self_static=unknown ;;
1762 esac
1763 fi
1764 ])# AC_LIBTOOL_DLOPEN_SELF
1767 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1768 # ---------------------------------
1769 # Check to see if options -c and -o are simultaneously supported by compiler
1770 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1771 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1772 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1773 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1774 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1775 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1776 $rm -r conftest 2>/dev/null
1777 mkdir conftest
1778 cd conftest
1779 mkdir out
1780 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1782 lt_compiler_flag="-o out/conftest2.$ac_objext"
1783 # Insert the option either (1) after the last *FLAGS variable, or
1784 # (2) before a word containing "conftest.", or (3) at the end.
1785 # Note that $ac_compile itself does not contain backslashes and begins
1786 # with a dollar sign (not a hyphen), so the echo should work correctly.
1787 lt_compile=`echo "$ac_compile" | $SED \
1788 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1789 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1790 -e 's:$: $lt_compiler_flag:'`
1791 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1792 (eval "$lt_compile" 2>out/conftest.err)
1793 ac_status=$?
1794 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1795 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1796 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1797 then
1798 # The compiler can only warn and ignore the option if not recognized
1799 # So say no if there are warnings
1800 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1801 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1802 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1803 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1804 fi
1805 fi
1806 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1807 $rm conftest*
1808 # SGI C++ compiler will create directory out/ii_files/ for
1809 # template instantiation
1810 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1811 $rm out/* && rmdir out
1812 cd ..
1813 rmdir conftest
1814 $rm conftest*
1815 ])
1816 ])# AC_LIBTOOL_PROG_CC_C_O
1819 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1820 # -----------------------------------------
1821 # Check to see if we can do hard links to lock some files if needed
1822 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1823 [AC_REQUIRE([_LT_AC_LOCK])dnl
1825 hard_links="nottested"
1826 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1827 # do not overwrite the value of need_locks provided by the user
1828 AC_MSG_CHECKING([if we can lock with hard links])
1829 hard_links=yes
1830 $rm conftest*
1831 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1832 touch conftest.a
1833 ln conftest.a conftest.b 2>&5 || hard_links=no
1834 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1835 AC_MSG_RESULT([$hard_links])
1836 if test "$hard_links" = no; then
1837 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1838 need_locks=warn
1839 fi
1840 else
1841 need_locks=no
1842 fi
1843 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1846 # AC_LIBTOOL_OBJDIR
1847 # -----------------
1848 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1849 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1850 [rm -f .libs 2>/dev/null
1851 mkdir .libs 2>/dev/null
1852 if test -d .libs; then
1853 lt_cv_objdir=.libs
1854 else
1855 # MS-DOS does not allow filenames that begin with a dot.
1856 lt_cv_objdir=_libs
1857 fi
1858 rmdir .libs 2>/dev/null])
1859 objdir=$lt_cv_objdir
1860 ])# AC_LIBTOOL_OBJDIR
1863 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1864 # ----------------------------------------------
1865 # Check hardcoding attributes.
1866 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1867 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1868 _LT_AC_TAGVAR(hardcode_action, $1)=
1869 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1870 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1871 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1873 # We can hardcode non-existant directories.
1874 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1875 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1876 # have to relink, otherwise we might link with an installed library
1877 # when we should be linking with a yet-to-be-installed one
1878 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1879 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1880 # Linking always hardcodes the temporary library directory.
1881 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1882 else
1883 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1884 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1885 fi
1886 else
1887 # We cannot hardcode anything, or else we can only hardcode existing
1888 # directories.
1889 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1890 fi
1891 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1893 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1894 # Fast installation is not supported
1895 enable_fast_install=no
1896 elif test "$shlibpath_overrides_runpath" = yes ||
1897 test "$enable_shared" = no; then
1898 # Fast installation is not necessary
1899 enable_fast_install=needless
1900 fi
1901 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1904 # AC_LIBTOOL_SYS_LIB_STRIP
1905 # ------------------------
1906 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1907 [striplib=
1908 old_striplib=
1909 AC_MSG_CHECKING([whether stripping libraries is possible])
1910 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1911 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1912 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1913 AC_MSG_RESULT([yes])
1914 else
1915 # FIXME - insert some real tests, host_os isn't really good enough
1916 case $host_os in
1917 darwin*)
1918 if test -n "$STRIP" ; then
1919 striplib="$STRIP -x"
1920 old_striplib="$STRIP -S"
1921 AC_MSG_RESULT([yes])
1922 else
1923 AC_MSG_RESULT([no])
1924 fi
1925 ;;
1926 *)
1927 AC_MSG_RESULT([no])
1928 ;;
1929 esac
1930 fi
1931 ])# AC_LIBTOOL_SYS_LIB_STRIP
1934 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1935 # -----------------------------
1936 # PORTME Fill in your ld.so characteristics
1937 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1938 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1939 AC_MSG_CHECKING([dynamic linker characteristics])
1940 library_names_spec=
1941 libname_spec='lib$name'
1942 soname_spec=
1943 shrext_cmds=".so"
1944 postinstall_cmds=
1945 postuninstall_cmds=
1946 finish_cmds=
1947 finish_eval=
1948 shlibpath_var=
1949 shlibpath_overrides_runpath=unknown
1950 version_type=none
1951 dynamic_linker="$host_os ld.so"
1952 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1953 m4_if($1,[],[
1954 if test "$GCC" = yes; then
1955 case $host_os in
1956 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
1957 *) lt_awk_arg="/^libraries:/" ;;
1958 esac
1959 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1960 if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
1961 # if the path contains ";" then we assume it to be the separator
1962 # otherwise default to the standard path separator (i.e. ":") - it is
1963 # assumed that no part of a normal pathname contains ";" but that should
1964 # okay in the real world where ";" in dirpaths is itself problematic.
1965 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
1966 else
1967 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1968 fi
1969 # Ok, now we have the path, separated by spaces, we can step through it
1970 # and add multilib dir if necessary.
1971 lt_tmp_lt_search_path_spec=
1972 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
1973 for lt_sys_path in $lt_search_path_spec; do
1974 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
1975 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
1976 else
1977 test -d "$lt_sys_path" && \
1978 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
1979 fi
1980 done
1981 lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
1982 BEGIN {RS=" "; FS="/|\n";} {
1983 lt_foo="";
1984 lt_count=0;
1985 for (lt_i = NF; lt_i > 0; lt_i--) {
1986 if ($lt_i != "" && $lt_i != ".") {
1987 if ($lt_i == "..") {
1988 lt_count++;
1989 } else {
1990 if (lt_count == 0) {
1991 lt_foo="/" $lt_i lt_foo;
1992 } else {
1993 lt_count--;
1994 }
1995 }
1996 }
1997 }
1998 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
1999 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2000 }'`
2001 sys_lib_search_path_spec=`echo $lt_search_path_spec`
2002 else
2003 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2004 fi])
2005 need_lib_prefix=unknown
2006 hardcode_into_libs=no
2008 # when you set need_version to no, make sure it does not cause -set_version
2009 # flags to be left without arguments
2010 need_version=unknown
2012 case $host_os in
2013 aix3*)
2014 version_type=linux
2015 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2016 shlibpath_var=LIBPATH
2018 # AIX 3 has no versioning support, so we append a major version to the name.
2019 soname_spec='${libname}${release}${shared_ext}$major'
2020 ;;
2022 aix[[4-9]]*)
2023 version_type=linux
2024 need_lib_prefix=no
2025 need_version=no
2026 hardcode_into_libs=yes
2027 if test "$host_cpu" = ia64; then
2028 # AIX 5 supports IA64
2029 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2030 shlibpath_var=LD_LIBRARY_PATH
2031 else
2032 # With GCC up to 2.95.x, collect2 would create an import file
2033 # for dependence libraries. The import file would start with
2034 # the line `#! .'. This would cause the generated library to
2035 # depend on `.', always an invalid library. This was fixed in
2036 # development snapshots of GCC prior to 3.0.
2037 case $host_os in
2038 aix4 | aix4.[[01]] | aix4.[[01]].*)
2039 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2040 echo ' yes '
2041 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2042 :
2043 else
2044 can_build_shared=no
2045 fi
2046 ;;
2047 esac
2048 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2049 # soname into executable. Probably we can add versioning support to
2050 # collect2, so additional links can be useful in future.
2051 if test "$aix_use_runtimelinking" = yes; then
2052 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2053 # instead of lib<name>.a to let people know that these are not
2054 # typical AIX shared libraries.
2055 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2056 else
2057 # We preserve .a as extension for shared libraries through AIX4.2
2058 # and later when we are not doing run time linking.
2059 library_names_spec='${libname}${release}.a $libname.a'
2060 soname_spec='${libname}${release}${shared_ext}$major'
2061 fi
2062 shlibpath_var=LIBPATH
2063 fi
2064 ;;
2066 amigaos*)
2067 library_names_spec='$libname.ixlibrary $libname.a'
2068 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2069 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'
2070 ;;
2072 beos*)
2073 library_names_spec='${libname}${shared_ext}'
2074 dynamic_linker="$host_os ld.so"
2075 shlibpath_var=LIBRARY_PATH
2076 ;;
2078 bsdi[[45]]*)
2079 version_type=linux
2080 need_version=no
2081 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2082 soname_spec='${libname}${release}${shared_ext}$major'
2083 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2084 shlibpath_var=LD_LIBRARY_PATH
2085 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2086 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2087 # the default ld.so.conf also contains /usr/contrib/lib and
2088 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2089 # libtool to hard-code these into programs
2090 ;;
2092 cygwin* | mingw* | pw32*)
2093 version_type=windows
2094 shrext_cmds=".dll"
2095 need_version=no
2096 need_lib_prefix=no
2098 case $GCC,$host_os in
2099 yes,cygwin* | yes,mingw* | yes,pw32*)
2100 library_names_spec='$libname.dll.a'
2101 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2102 postinstall_cmds='base_file=`basename \${file}`~
2103 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2104 dldir=$destdir/`dirname \$dlpath`~
2105 test -d \$dldir || mkdir -p \$dldir~
2106 $install_prog $dir/$dlname \$dldir/$dlname~
2107 chmod a+x \$dldir/$dlname'
2108 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2109 dlpath=$dir/\$dldll~
2110 $rm \$dlpath'
2111 shlibpath_overrides_runpath=yes
2113 case $host_os in
2114 cygwin*)
2115 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2116 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2117 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2118 ;;
2119 mingw*)
2120 # MinGW DLLs use traditional 'lib' prefix
2121 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2122 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2123 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2124 # It is most probably a Windows format PATH printed by
2125 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2126 # path with ; separators, and with drive letters. We can handle the
2127 # drive letters (cygwin fileutils understands them), so leave them,
2128 # especially as we might pass files found there to a mingw objdump,
2129 # which wouldn't understand a cygwinified path. Ahh.
2130 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2131 else
2132 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2133 fi
2134 ;;
2135 pw32*)
2136 # pw32 DLLs use 'pw' prefix rather than 'lib'
2137 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2138 ;;
2139 esac
2140 ;;
2142 *)
2143 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2144 ;;
2145 esac
2146 dynamic_linker='Win32 ld.exe'
2147 # FIXME: first we should search . and the directory the executable is in
2148 shlibpath_var=PATH
2149 ;;
2151 darwin* | rhapsody*)
2152 dynamic_linker="$host_os dyld"
2153 version_type=darwin
2154 need_lib_prefix=no
2155 need_version=no
2156 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2157 soname_spec='${libname}${release}${major}$shared_ext'
2158 shlibpath_overrides_runpath=yes
2159 shlibpath_var=DYLD_LIBRARY_PATH
2160 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2161 m4_if([$1], [],[
2162 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2163 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2164 ;;
2166 dgux*)
2167 version_type=linux
2168 need_lib_prefix=no
2169 need_version=no
2170 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2171 soname_spec='${libname}${release}${shared_ext}$major'
2172 shlibpath_var=LD_LIBRARY_PATH
2173 ;;
2175 freebsd1*)
2176 dynamic_linker=no
2177 ;;
2179 freebsd* | dragonfly*)
2180 # DragonFly does not have aout. When/if they implement a new
2181 # versioning mechanism, adjust this.
2182 if test -x /usr/bin/objformat; then
2183 objformat=`/usr/bin/objformat`
2184 else
2185 case $host_os in
2186 freebsd[[123]]*) objformat=aout ;;
2187 *) objformat=elf ;;
2188 esac
2189 fi
2190 version_type=freebsd-$objformat
2191 case $version_type in
2192 freebsd-elf*)
2193 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2194 need_version=no
2195 need_lib_prefix=no
2196 ;;
2197 freebsd-*)
2198 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2199 need_version=yes
2200 ;;
2201 esac
2202 shlibpath_var=LD_LIBRARY_PATH
2203 case $host_os in
2204 freebsd2*)
2205 shlibpath_overrides_runpath=yes
2206 ;;
2207 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2208 shlibpath_overrides_runpath=yes
2209 hardcode_into_libs=yes
2210 ;;
2211 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2212 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2213 shlibpath_overrides_runpath=no
2214 hardcode_into_libs=yes
2215 ;;
2216 *) # from 4.6 on, and DragonFly
2217 shlibpath_overrides_runpath=yes
2218 hardcode_into_libs=yes
2219 ;;
2220 esac
2221 ;;
2223 gnu*)
2224 version_type=linux
2225 need_lib_prefix=no
2226 need_version=no
2227 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2228 soname_spec='${libname}${release}${shared_ext}$major'
2229 shlibpath_var=LD_LIBRARY_PATH
2230 hardcode_into_libs=yes
2231 ;;
2233 hpux9* | hpux10* | hpux11*)
2234 # Give a soname corresponding to the major version so that dld.sl refuses to
2235 # link against other versions.
2236 version_type=sunos
2237 need_lib_prefix=no
2238 need_version=no
2239 case $host_cpu in
2240 ia64*)
2241 shrext_cmds='.so'
2242 hardcode_into_libs=yes
2243 dynamic_linker="$host_os dld.so"
2244 shlibpath_var=LD_LIBRARY_PATH
2245 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2246 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2247 soname_spec='${libname}${release}${shared_ext}$major'
2248 if test "X$HPUX_IA64_MODE" = X32; then
2249 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2250 else
2251 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2252 fi
2253 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2254 ;;
2255 hppa*64*)
2256 shrext_cmds='.sl'
2257 hardcode_into_libs=yes
2258 dynamic_linker="$host_os dld.sl"
2259 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2260 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2261 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2262 soname_spec='${libname}${release}${shared_ext}$major'
2263 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2264 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2265 ;;
2266 *)
2267 shrext_cmds='.sl'
2268 dynamic_linker="$host_os dld.sl"
2269 shlibpath_var=SHLIB_PATH
2270 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2271 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2272 soname_spec='${libname}${release}${shared_ext}$major'
2273 ;;
2274 esac
2275 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2276 postinstall_cmds='chmod 555 $lib'
2277 ;;
2279 interix[[3-9]]*)
2280 version_type=linux
2281 need_lib_prefix=no
2282 need_version=no
2283 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2284 soname_spec='${libname}${release}${shared_ext}$major'
2285 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2286 shlibpath_var=LD_LIBRARY_PATH
2287 shlibpath_overrides_runpath=no
2288 hardcode_into_libs=yes
2289 ;;
2291 irix5* | irix6* | nonstopux*)
2292 case $host_os in
2293 nonstopux*) version_type=nonstopux ;;
2294 *)
2295 if test "$lt_cv_prog_gnu_ld" = yes; then
2296 version_type=linux
2297 else
2298 version_type=irix
2299 fi ;;
2300 esac
2301 need_lib_prefix=no
2302 need_version=no
2303 soname_spec='${libname}${release}${shared_ext}$major'
2304 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2305 case $host_os in
2306 irix5* | nonstopux*)
2307 libsuff= shlibsuff=
2308 ;;
2309 *)
2310 case $LD in # libtool.m4 will add one of these switches to LD
2311 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2312 libsuff= shlibsuff= libmagic=32-bit;;
2313 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2314 libsuff=32 shlibsuff=N32 libmagic=N32;;
2315 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2316 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2317 *) libsuff= shlibsuff= libmagic=never-match;;
2318 esac
2319 ;;
2320 esac
2321 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2322 shlibpath_overrides_runpath=no
2323 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2324 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2325 hardcode_into_libs=yes
2326 ;;
2328 # No shared lib support for Linux oldld, aout, or coff.
2329 linux*oldld* | linux*aout* | linux*coff*)
2330 dynamic_linker=no
2331 ;;
2333 # This must be Linux ELF.
2334 linux* | k*bsd*-gnu)
2335 version_type=linux
2336 need_lib_prefix=no
2337 need_version=no
2338 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2339 soname_spec='${libname}${release}${shared_ext}$major'
2340 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2341 shlibpath_var=LD_LIBRARY_PATH
2342 shlibpath_overrides_runpath=no
2343 # This implies no fast_install, which is unacceptable.
2344 # Some rework will be needed to allow for fast_install
2345 # before this can be enabled.
2346 hardcode_into_libs=yes
2348 # Append ld.so.conf contents to the search path
2349 if test -f /etc/ld.so.conf; then
2350 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' ' '`
2351 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2352 fi
2354 # We used to test for /lib/ld.so.1 and disable shared libraries on
2355 # powerpc, because MkLinux only supported shared libraries with the
2356 # GNU dynamic linker. Since this was broken with cross compilers,
2357 # most powerpc-linux boxes support dynamic linking these days and
2358 # people can always --disable-shared, the test was removed, and we
2359 # assume the GNU/Linux dynamic linker is in use.
2360 dynamic_linker='GNU/Linux ld.so'
2361 ;;
2363 netbsdelf*-gnu)
2364 version_type=linux
2365 need_lib_prefix=no
2366 need_version=no
2367 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2368 soname_spec='${libname}${release}${shared_ext}$major'
2369 shlibpath_var=LD_LIBRARY_PATH
2370 shlibpath_overrides_runpath=no
2371 hardcode_into_libs=yes
2372 dynamic_linker='NetBSD ld.elf_so'
2373 ;;
2375 netbsd*)
2376 version_type=sunos
2377 need_lib_prefix=no
2378 need_version=no
2379 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2380 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2381 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2382 dynamic_linker='NetBSD (a.out) ld.so'
2383 else
2384 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2385 soname_spec='${libname}${release}${shared_ext}$major'
2386 dynamic_linker='NetBSD ld.elf_so'
2387 fi
2388 shlibpath_var=LD_LIBRARY_PATH
2389 shlibpath_overrides_runpath=yes
2390 hardcode_into_libs=yes
2391 ;;
2393 newsos6)
2394 version_type=linux
2395 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2396 shlibpath_var=LD_LIBRARY_PATH
2397 shlibpath_overrides_runpath=yes
2398 ;;
2400 nto-qnx*)
2401 version_type=linux
2402 need_lib_prefix=no
2403 need_version=no
2404 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2405 soname_spec='${libname}${release}${shared_ext}$major'
2406 shlibpath_var=LD_LIBRARY_PATH
2407 shlibpath_overrides_runpath=yes
2408 ;;
2410 openbsd*)
2411 version_type=sunos
2412 sys_lib_dlsearch_path_spec="/usr/lib"
2413 need_lib_prefix=no
2414 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2415 case $host_os in
2416 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2417 *) need_version=no ;;
2418 esac
2419 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2420 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2421 shlibpath_var=LD_LIBRARY_PATH
2422 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2423 case $host_os in
2424 openbsd2.[[89]] | openbsd2.[[89]].*)
2425 shlibpath_overrides_runpath=no
2426 ;;
2427 *)
2428 shlibpath_overrides_runpath=yes
2429 ;;
2430 esac
2431 else
2432 shlibpath_overrides_runpath=yes
2433 fi
2434 ;;
2436 os2*)
2437 libname_spec='$name'
2438 shrext_cmds=".dll"
2439 need_lib_prefix=no
2440 library_names_spec='$libname${shared_ext} $libname.a'
2441 dynamic_linker='OS/2 ld.exe'
2442 shlibpath_var=LIBPATH
2443 ;;
2445 osf3* | osf4* | osf5*)
2446 version_type=osf
2447 need_lib_prefix=no
2448 need_version=no
2449 soname_spec='${libname}${release}${shared_ext}$major'
2450 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2451 shlibpath_var=LD_LIBRARY_PATH
2452 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2453 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2454 ;;
2456 rdos*)
2457 dynamic_linker=no
2458 ;;
2460 solaris*)
2461 version_type=linux
2462 need_lib_prefix=no
2463 need_version=no
2464 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2465 soname_spec='${libname}${release}${shared_ext}$major'
2466 shlibpath_var=LD_LIBRARY_PATH
2467 shlibpath_overrides_runpath=yes
2468 hardcode_into_libs=yes
2469 # ldd complains unless libraries are executable
2470 postinstall_cmds='chmod +x $lib'
2471 ;;
2473 sunos4*)
2474 version_type=sunos
2475 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2476 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2477 shlibpath_var=LD_LIBRARY_PATH
2478 shlibpath_overrides_runpath=yes
2479 if test "$with_gnu_ld" = yes; then
2480 need_lib_prefix=no
2481 fi
2482 need_version=yes
2483 ;;
2485 sysv4 | sysv4.3*)
2486 version_type=linux
2487 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2488 soname_spec='${libname}${release}${shared_ext}$major'
2489 shlibpath_var=LD_LIBRARY_PATH
2490 case $host_vendor in
2491 sni)
2492 shlibpath_overrides_runpath=no
2493 need_lib_prefix=no
2494 export_dynamic_flag_spec='${wl}-Blargedynsym'
2495 runpath_var=LD_RUN_PATH
2496 ;;
2497 siemens)
2498 need_lib_prefix=no
2499 ;;
2500 motorola)
2501 need_lib_prefix=no
2502 need_version=no
2503 shlibpath_overrides_runpath=no
2504 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2505 ;;
2506 esac
2507 ;;
2509 sysv4*MP*)
2510 if test -d /usr/nec ;then
2511 version_type=linux
2512 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2513 soname_spec='$libname${shared_ext}.$major'
2514 shlibpath_var=LD_LIBRARY_PATH
2515 fi
2516 ;;
2518 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2519 version_type=freebsd-elf
2520 need_lib_prefix=no
2521 need_version=no
2522 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2523 soname_spec='${libname}${release}${shared_ext}$major'
2524 shlibpath_var=LD_LIBRARY_PATH
2525 hardcode_into_libs=yes
2526 if test "$with_gnu_ld" = yes; then
2527 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2528 shlibpath_overrides_runpath=no
2529 else
2530 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2531 shlibpath_overrides_runpath=yes
2532 case $host_os in
2533 sco3.2v5*)
2534 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2535 ;;
2536 esac
2537 fi
2538 sys_lib_dlsearch_path_spec='/usr/lib'
2539 ;;
2541 uts4*)
2542 version_type=linux
2543 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2544 soname_spec='${libname}${release}${shared_ext}$major'
2545 shlibpath_var=LD_LIBRARY_PATH
2546 ;;
2548 *)
2549 dynamic_linker=no
2550 ;;
2551 esac
2552 AC_MSG_RESULT([$dynamic_linker])
2553 test "$dynamic_linker" = no && can_build_shared=no
2555 AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
2556 [lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
2557 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2558 AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
2559 [lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
2560 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2562 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2563 if test "$GCC" = yes; then
2564 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2565 fi
2566 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2569 # _LT_AC_TAGCONFIG
2570 # ----------------
2571 AC_DEFUN([_LT_AC_TAGCONFIG],
2572 [AC_REQUIRE([LT_AC_PROG_SED])dnl
2573 AC_ARG_WITH([tags],
2574 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2575 [include additional configurations @<:@automatic@:>@])],
2576 [tagnames="$withval"])
2578 if test -f "$ltmain" && test -n "$tagnames"; then
2579 if test ! -f "${ofile}"; then
2580 AC_MSG_WARN([output file `$ofile' does not exist])
2581 fi
2583 if test -z "$LTCC"; then
2584 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2585 if test -z "$LTCC"; then
2586 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2587 else
2588 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2589 fi
2590 fi
2591 if test -z "$LTCFLAGS"; then
2592 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
2593 fi
2595 # Extract list of available tagged configurations in $ofile.
2596 # Note that this assumes the entire list is on one line.
2597 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2599 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2600 for tagname in $tagnames; do
2601 IFS="$lt_save_ifs"
2602 # Check whether tagname contains only valid characters
2603 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2604 "") ;;
2605 *) AC_MSG_ERROR([invalid tag name: $tagname])
2606 ;;
2607 esac
2609 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2610 then
2611 AC_MSG_ERROR([tag name \"$tagname\" already exists])
2612 fi
2614 # Update the list of available tags.
2615 if test -n "$tagname"; then
2616 echo appending configuration tag \"$tagname\" to $ofile
2618 case $tagname in
2619 CXX)
2620 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2621 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2622 (test "X$CXX" != "Xg++"))) ; then
2623 AC_LIBTOOL_LANG_CXX_CONFIG
2624 else
2625 tagname=""
2626 fi
2627 ;;
2629 F77)
2630 if test -n "$F77" && test "X$F77" != "Xno"; then
2631 AC_LIBTOOL_LANG_F77_CONFIG
2632 else
2633 tagname=""
2634 fi
2635 ;;
2637 GCJ)
2638 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2639 AC_LIBTOOL_LANG_GCJ_CONFIG
2640 else
2641 tagname=""
2642 fi
2643 ;;
2645 RC)
2646 AC_LIBTOOL_LANG_RC_CONFIG
2647 ;;
2649 *)
2650 AC_MSG_ERROR([Unsupported tag name: $tagname])
2651 ;;
2652 esac
2654 # Append the new tag name to the list of available tags.
2655 if test -n "$tagname" ; then
2656 available_tags="$available_tags $tagname"
2657 fi
2658 fi
2659 done
2660 IFS="$lt_save_ifs"
2662 # Now substitute the updated list of available tags.
2663 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2664 mv "${ofile}T" "$ofile"
2665 chmod +x "$ofile"
2666 else
2667 rm -f "${ofile}T"
2668 AC_MSG_ERROR([unable to update list of available tagged configurations.])
2669 fi
2670 fi
2671 ])# _LT_AC_TAGCONFIG
2674 # AC_LIBTOOL_DLOPEN
2675 # -----------------
2676 # enable checks for dlopen support
2677 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2678 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2679 ])# AC_LIBTOOL_DLOPEN
2682 # AC_LIBTOOL_WIN32_DLL
2683 # --------------------
2684 # declare package support for building win32 DLLs
2685 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2686 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2687 ])# AC_LIBTOOL_WIN32_DLL
2690 # AC_ENABLE_SHARED([DEFAULT])
2691 # ---------------------------
2692 # implement the --enable-shared flag
2693 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2694 AC_DEFUN([AC_ENABLE_SHARED],
2695 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2696 AC_ARG_ENABLE([shared],
2697 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2698 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2699 [p=${PACKAGE-default}
2700 case $enableval in
2701 yes) enable_shared=yes ;;
2702 no) enable_shared=no ;;
2703 *)
2704 enable_shared=no
2705 # Look at the argument we got. We use all the common list separators.
2706 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2707 for pkg in $enableval; do
2708 IFS="$lt_save_ifs"
2709 if test "X$pkg" = "X$p"; then
2710 enable_shared=yes
2711 fi
2712 done
2713 IFS="$lt_save_ifs"
2714 ;;
2715 esac],
2716 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2717 ])# AC_ENABLE_SHARED
2720 # AC_DISABLE_SHARED
2721 # -----------------
2722 # set the default shared flag to --disable-shared
2723 AC_DEFUN([AC_DISABLE_SHARED],
2724 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2725 AC_ENABLE_SHARED(no)
2726 ])# AC_DISABLE_SHARED
2729 # AC_ENABLE_STATIC([DEFAULT])
2730 # ---------------------------
2731 # implement the --enable-static flag
2732 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2733 AC_DEFUN([AC_ENABLE_STATIC],
2734 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2735 AC_ARG_ENABLE([static],
2736 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2737 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2738 [p=${PACKAGE-default}
2739 case $enableval in
2740 yes) enable_static=yes ;;
2741 no) enable_static=no ;;
2742 *)
2743 enable_static=no
2744 # Look at the argument we got. We use all the common list separators.
2745 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2746 for pkg in $enableval; do
2747 IFS="$lt_save_ifs"
2748 if test "X$pkg" = "X$p"; then
2749 enable_static=yes
2750 fi
2751 done
2752 IFS="$lt_save_ifs"
2753 ;;
2754 esac],
2755 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2756 ])# AC_ENABLE_STATIC
2759 # AC_DISABLE_STATIC
2760 # -----------------
2761 # set the default static flag to --disable-static
2762 AC_DEFUN([AC_DISABLE_STATIC],
2763 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2764 AC_ENABLE_STATIC(no)
2765 ])# AC_DISABLE_STATIC
2768 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2769 # ---------------------------------
2770 # implement the --enable-fast-install flag
2771 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2772 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2773 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2774 AC_ARG_ENABLE([fast-install],
2775 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2776 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2777 [p=${PACKAGE-default}
2778 case $enableval in
2779 yes) enable_fast_install=yes ;;
2780 no) enable_fast_install=no ;;
2781 *)
2782 enable_fast_install=no
2783 # Look at the argument we got. We use all the common list separators.
2784 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2785 for pkg in $enableval; do
2786 IFS="$lt_save_ifs"
2787 if test "X$pkg" = "X$p"; then
2788 enable_fast_install=yes
2789 fi
2790 done
2791 IFS="$lt_save_ifs"
2792 ;;
2793 esac],
2794 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2795 ])# AC_ENABLE_FAST_INSTALL
2798 # AC_DISABLE_FAST_INSTALL
2799 # -----------------------
2800 # set the default to --disable-fast-install
2801 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2802 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2803 AC_ENABLE_FAST_INSTALL(no)
2804 ])# AC_DISABLE_FAST_INSTALL
2807 # AC_LIBTOOL_PICMODE([MODE])
2808 # --------------------------
2809 # implement the --with-pic flag
2810 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2811 AC_DEFUN([AC_LIBTOOL_PICMODE],
2812 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2813 pic_mode=ifelse($#,1,$1,default)
2814 ])# AC_LIBTOOL_PICMODE
2817 # AC_PROG_EGREP
2818 # -------------
2819 # This is predefined starting with Autoconf 2.54, so this conditional
2820 # definition can be removed once we require Autoconf 2.54 or later.
2821 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2822 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2823 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2824 then ac_cv_prog_egrep='grep -E'
2825 else ac_cv_prog_egrep='egrep'
2826 fi])
2827 EGREP=$ac_cv_prog_egrep
2828 AC_SUBST([EGREP])
2829 ])])
2832 # AC_PATH_TOOL_PREFIX
2833 # -------------------
2834 # find a file program which can recognize shared library
2835 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2836 [AC_REQUIRE([AC_PROG_EGREP])dnl
2837 AC_MSG_CHECKING([for $1])
2838 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2839 [case $MAGIC_CMD in
2840 [[\\/*] | ?:[\\/]*])
2841 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2842 ;;
2843 *)
2844 lt_save_MAGIC_CMD="$MAGIC_CMD"
2845 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2846 dnl $ac_dummy forces splitting on constant user-supplied paths.
2847 dnl POSIX.2 word splitting is done only on the output of word expansions,
2848 dnl not every word. This closes a longstanding sh security hole.
2849 ac_dummy="ifelse([$2], , $PATH, [$2])"
2850 for ac_dir in $ac_dummy; do
2851 IFS="$lt_save_ifs"
2852 test -z "$ac_dir" && ac_dir=.
2853 if test -f $ac_dir/$1; then
2854 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2855 if test -n "$file_magic_test_file"; then
2856 case $deplibs_check_method in
2857 "file_magic "*)
2858 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2859 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2860 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2861 $EGREP "$file_magic_regex" > /dev/null; then
2862 :
2863 else
2864 cat <<EOF 1>&2
2866 *** Warning: the command libtool uses to detect shared libraries,
2867 *** $file_magic_cmd, produces output that libtool cannot recognize.
2868 *** The result is that libtool may fail to recognize shared libraries
2869 *** as such. This will affect the creation of libtool libraries that
2870 *** depend on shared libraries, but programs linked with such libtool
2871 *** libraries will work regardless of this problem. Nevertheless, you
2872 *** may want to report the problem to your system manager and/or to
2873 *** bug-libtool@gnu.org
2875 EOF
2876 fi ;;
2877 esac
2878 fi
2879 break
2880 fi
2881 done
2882 IFS="$lt_save_ifs"
2883 MAGIC_CMD="$lt_save_MAGIC_CMD"
2884 ;;
2885 esac])
2886 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2887 if test -n "$MAGIC_CMD"; then
2888 AC_MSG_RESULT($MAGIC_CMD)
2889 else
2890 AC_MSG_RESULT(no)
2891 fi
2892 ])# AC_PATH_TOOL_PREFIX
2895 # AC_PATH_MAGIC
2896 # -------------
2897 # find a file program which can recognize a shared library
2898 AC_DEFUN([AC_PATH_MAGIC],
2899 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2900 if test -z "$lt_cv_path_MAGIC_CMD"; then
2901 if test -n "$ac_tool_prefix"; then
2902 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2903 else
2904 MAGIC_CMD=:
2905 fi
2906 fi
2907 ])# AC_PATH_MAGIC
2910 # AC_PROG_LD
2911 # ----------
2912 # find the pathname to the GNU or non-GNU linker
2913 AC_DEFUN([AC_PROG_LD],
2914 [AC_ARG_WITH([gnu-ld],
2915 [AC_HELP_STRING([--with-gnu-ld],
2916 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2917 [test "$withval" = no || with_gnu_ld=yes],
2918 [with_gnu_ld=no])
2919 AC_REQUIRE([LT_AC_PROG_SED])dnl
2920 AC_REQUIRE([AC_PROG_CC])dnl
2921 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2922 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2923 ac_prog=ld
2924 if test "$GCC" = yes; then
2925 # Check if gcc -print-prog-name=ld gives a path.
2926 AC_MSG_CHECKING([for ld used by $CC])
2927 case $host in
2928 *-*-mingw*)
2929 # gcc leaves a trailing carriage return which upsets mingw
2930 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2931 *)
2932 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2933 esac
2934 case $ac_prog in
2935 # Accept absolute paths.
2936 [[\\/]]* | ?:[[\\/]]*)
2937 re_direlt='/[[^/]][[^/]]*/\.\./'
2938 # Canonicalize the pathname of ld
2939 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2940 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2941 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2942 done
2943 test -z "$LD" && LD="$ac_prog"
2944 ;;
2945 "")
2946 # If it fails, then pretend we aren't using GCC.
2947 ac_prog=ld
2948 ;;
2949 *)
2950 # If it is relative, then search for the first ld in PATH.
2951 with_gnu_ld=unknown
2952 ;;
2953 esac
2954 elif test "$with_gnu_ld" = yes; then
2955 AC_MSG_CHECKING([for GNU ld])
2956 else
2957 AC_MSG_CHECKING([for non-GNU ld])
2958 fi
2959 AC_CACHE_VAL(lt_cv_path_LD,
2960 [if test -z "$LD"; then
2961 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2962 for ac_dir in $PATH; do
2963 IFS="$lt_save_ifs"
2964 test -z "$ac_dir" && ac_dir=.
2965 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2966 lt_cv_path_LD="$ac_dir/$ac_prog"
2967 # Check to see if the program is GNU ld. I'd rather use --version,
2968 # but apparently some variants of GNU ld only accept -v.
2969 # Break only if it was the GNU/non-GNU ld that we prefer.
2970 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2971 *GNU* | *'with BFD'*)
2972 test "$with_gnu_ld" != no && break
2973 ;;
2974 *)
2975 test "$with_gnu_ld" != yes && break
2976 ;;
2977 esac
2978 fi
2979 done
2980 IFS="$lt_save_ifs"
2981 else
2982 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2983 fi])
2984 LD="$lt_cv_path_LD"
2985 if test -n "$LD"; then
2986 AC_MSG_RESULT($LD)
2987 else
2988 AC_MSG_RESULT(no)
2989 fi
2990 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2991 AC_PROG_LD_GNU
2992 ])# AC_PROG_LD
2995 # AC_PROG_LD_GNU
2996 # --------------
2997 AC_DEFUN([AC_PROG_LD_GNU],
2998 [AC_REQUIRE([AC_PROG_EGREP])dnl
2999 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3000 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3001 case `$LD -v 2>&1 </dev/null` in
3002 *GNU* | *'with BFD'*)
3003 lt_cv_prog_gnu_ld=yes
3004 ;;
3005 *)
3006 lt_cv_prog_gnu_ld=no
3007 ;;
3008 esac])
3009 with_gnu_ld=$lt_cv_prog_gnu_ld
3010 ])# AC_PROG_LD_GNU
3013 # AC_PROG_LD_RELOAD_FLAG
3014 # ----------------------
3015 # find reload flag for linker
3016 # -- PORTME Some linkers may need a different reload flag.
3017 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3018 [AC_CACHE_CHECK([for $LD option to reload object files],
3019 lt_cv_ld_reload_flag,
3020 [lt_cv_ld_reload_flag='-r'])
3021 reload_flag=$lt_cv_ld_reload_flag
3022 case $reload_flag in
3023 "" | " "*) ;;
3024 *) reload_flag=" $reload_flag" ;;
3025 esac
3026 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3027 case $host_os in
3028 darwin*)
3029 if test "$GCC" = yes; then
3030 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3031 else
3032 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3033 fi
3034 ;;
3035 esac
3036 ])# AC_PROG_LD_RELOAD_FLAG
3039 # AC_DEPLIBS_CHECK_METHOD
3040 # -----------------------
3041 # how to check for library dependencies
3042 # -- PORTME fill in with the dynamic library characteristics
3043 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3044 [AC_CACHE_CHECK([how to recognize dependent libraries],
3045 lt_cv_deplibs_check_method,
3046 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3047 lt_cv_file_magic_test_file=
3048 lt_cv_deplibs_check_method='unknown'
3049 # Need to set the preceding variable on all platforms that support
3050 # interlibrary dependencies.
3051 # 'none' -- dependencies not supported.
3052 # `unknown' -- same as none, but documents that we really don't know.
3053 # 'pass_all' -- all dependencies passed with no checks.
3054 # 'test_compile' -- check by making test program.
3055 # 'file_magic [[regex]]' -- check by looking for files in library path
3056 # which responds to the $file_magic_cmd with a given extended regex.
3057 # If you have `file' or equivalent on your system and you're not sure
3058 # whether `pass_all' will *always* work, you probably want this one.
3060 case $host_os in
3061 aix[[4-9]]*)
3062 lt_cv_deplibs_check_method=pass_all
3063 ;;
3065 beos*)
3066 lt_cv_deplibs_check_method=pass_all
3067 ;;
3069 bsdi[[45]]*)
3070 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3071 lt_cv_file_magic_cmd='/usr/bin/file -L'
3072 lt_cv_file_magic_test_file=/shlib/libc.so
3073 ;;
3075 cygwin*)
3076 # func_win32_libid is a shell function defined in ltmain.sh
3077 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3078 lt_cv_file_magic_cmd='func_win32_libid'
3079 ;;
3081 mingw* | pw32*)
3082 # Base MSYS/MinGW do not provide the 'file' command needed by
3083 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3084 # unless we find 'file', for example because we are cross-compiling.
3085 if ( file / ) >/dev/null 2>&1; then
3086 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3087 lt_cv_file_magic_cmd='func_win32_libid'
3088 else
3089 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3090 lt_cv_file_magic_cmd='$OBJDUMP -f'
3091 fi
3092 ;;
3094 darwin* | rhapsody*)
3095 lt_cv_deplibs_check_method=pass_all
3096 ;;
3098 freebsd* | dragonfly*)
3099 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3100 case $host_cpu in
3101 i*86 )
3102 # Not sure whether the presence of OpenBSD here was a mistake.
3103 # Let's accept both of them until this is cleared up.
3104 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3105 lt_cv_file_magic_cmd=/usr/bin/file
3106 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3107 ;;
3108 esac
3109 else
3110 lt_cv_deplibs_check_method=pass_all
3111 fi
3112 ;;
3114 gnu*)
3115 lt_cv_deplibs_check_method=pass_all
3116 ;;
3118 hpux10.20* | hpux11*)
3119 lt_cv_file_magic_cmd=/usr/bin/file
3120 case $host_cpu in
3121 ia64*)
3122 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3123 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3124 ;;
3125 hppa*64*)
3126 [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]']
3127 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3128 ;;
3129 *)
3130 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3131 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3132 ;;
3133 esac
3134 ;;
3136 interix[[3-9]]*)
3137 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3138 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3139 ;;
3141 irix5* | irix6* | nonstopux*)
3142 case $LD in
3143 *-32|*"-32 ") libmagic=32-bit;;
3144 *-n32|*"-n32 ") libmagic=N32;;
3145 *-64|*"-64 ") libmagic=64-bit;;
3146 *) libmagic=never-match;;
3147 esac
3148 lt_cv_deplibs_check_method=pass_all
3149 ;;
3151 # This must be Linux ELF.
3152 linux* | k*bsd*-gnu)
3153 lt_cv_deplibs_check_method=pass_all
3154 ;;
3156 netbsd* | netbsdelf*-gnu)
3157 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3158 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3159 else
3160 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3161 fi
3162 ;;
3164 newos6*)
3165 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3166 lt_cv_file_magic_cmd=/usr/bin/file
3167 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3168 ;;
3170 nto-qnx*)
3171 lt_cv_deplibs_check_method=unknown
3172 ;;
3174 openbsd*)
3175 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3176 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3177 else
3178 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3179 fi
3180 ;;
3182 osf3* | osf4* | osf5*)
3183 lt_cv_deplibs_check_method=pass_all
3184 ;;
3186 rdos*)
3187 lt_cv_deplibs_check_method=pass_all
3188 ;;
3190 solaris*)
3191 lt_cv_deplibs_check_method=pass_all
3192 ;;
3194 sysv4 | sysv4.3*)
3195 case $host_vendor in
3196 motorola)
3197 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
3198 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3199 ;;
3200 ncr)
3201 lt_cv_deplibs_check_method=pass_all
3202 ;;
3203 sequent)
3204 lt_cv_file_magic_cmd='/bin/file'
3205 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3206 ;;
3207 sni)
3208 lt_cv_file_magic_cmd='/bin/file'
3209 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3210 lt_cv_file_magic_test_file=/lib/libc.so
3211 ;;
3212 siemens)
3213 lt_cv_deplibs_check_method=pass_all
3214 ;;
3215 pc)
3216 lt_cv_deplibs_check_method=pass_all
3217 ;;
3218 esac
3219 ;;
3221 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3222 lt_cv_deplibs_check_method=pass_all
3223 ;;
3224 esac
3225 ])
3226 file_magic_cmd=$lt_cv_file_magic_cmd
3227 deplibs_check_method=$lt_cv_deplibs_check_method
3228 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3229 ])# AC_DEPLIBS_CHECK_METHOD
3232 # AC_PROG_NM
3233 # ----------
3234 # find the pathname to a BSD-compatible name lister
3235 AC_DEFUN([AC_PROG_NM],
3236 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3237 [if test -n "$NM"; then
3238 # Let the user override the test.
3239 lt_cv_path_NM="$NM"
3240 else
3241 lt_nm_to_check="${ac_tool_prefix}nm"
3242 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3243 lt_nm_to_check="$lt_nm_to_check nm"
3244 fi
3245 for lt_tmp_nm in $lt_nm_to_check; do
3246 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3247 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3248 IFS="$lt_save_ifs"
3249 test -z "$ac_dir" && ac_dir=.
3250 tmp_nm="$ac_dir/$lt_tmp_nm"
3251 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3252 # Check to see if the nm accepts a BSD-compat flag.
3253 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3254 # nm: unknown option "B" ignored
3255 # Tru64's nm complains that /dev/null is an invalid object file
3256 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3257 */dev/null* | *'Invalid file or object type'*)
3258 lt_cv_path_NM="$tmp_nm -B"
3259 break
3260 ;;
3261 *)
3262 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3263 */dev/null*)
3264 lt_cv_path_NM="$tmp_nm -p"
3265 break
3266 ;;
3267 *)
3268 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3269 continue # so that we can try to find one that supports BSD flags
3270 ;;
3271 esac
3272 ;;
3273 esac
3274 fi
3275 done
3276 IFS="$lt_save_ifs"
3277 done
3278 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3279 fi])
3280 NM="$lt_cv_path_NM"
3281 ])# AC_PROG_NM
3284 # AC_CHECK_LIBM
3285 # -------------
3286 # check for math library
3287 AC_DEFUN([AC_CHECK_LIBM],
3288 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3289 LIBM=
3290 case $host in
3291 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3292 # These system don't have libm, or don't need it
3293 ;;
3294 *-ncr-sysv4.3*)
3295 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3296 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3297 ;;
3298 *)
3299 AC_CHECK_LIB(m, cos, LIBM="-lm")
3300 ;;
3301 esac
3302 ])# AC_CHECK_LIBM
3305 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3306 # -----------------------------------
3307 # sets LIBLTDL to the link flags for the libltdl convenience library and
3308 # LTDLINCL to the include flags for the libltdl header and adds
3309 # --enable-ltdl-convenience to the configure arguments. Note that
3310 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
3311 # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
3312 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
3313 # (note the single quotes!). If your package is not flat and you're not
3314 # using automake, define top_builddir and top_srcdir appropriately in
3315 # the Makefiles.
3316 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3317 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3318 case $enable_ltdl_convenience in
3319 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3320 "") enable_ltdl_convenience=yes
3321 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3322 esac
3323 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3324 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3325 # For backwards non-gettext consistent compatibility...
3326 INCLTDL="$LTDLINCL"
3327 ])# AC_LIBLTDL_CONVENIENCE
3330 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3331 # -----------------------------------
3332 # sets LIBLTDL to the link flags for the libltdl installable library and
3333 # LTDLINCL to the include flags for the libltdl header and adds
3334 # --enable-ltdl-install to the configure arguments. Note that
3335 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
3336 # and an installed libltdl is not found, it is assumed to be `libltdl'.
3337 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
3338 # '${top_srcdir}/' (note the single quotes!). If your package is not
3339 # flat and you're not using automake, define top_builddir and top_srcdir
3340 # appropriately in the Makefiles.
3341 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3342 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3343 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3344 AC_CHECK_LIB(ltdl, lt_dlinit,
3345 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3346 [if test x"$enable_ltdl_install" = xno; then
3347 AC_MSG_WARN([libltdl not installed, but installation disabled])
3348 else
3349 enable_ltdl_install=yes
3350 fi
3351 ])
3352 if test x"$enable_ltdl_install" = x"yes"; then
3353 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3354 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3355 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3356 else
3357 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3358 LIBLTDL="-lltdl"
3359 LTDLINCL=
3360 fi
3361 # For backwards non-gettext consistent compatibility...
3362 INCLTDL="$LTDLINCL"
3363 ])# AC_LIBLTDL_INSTALLABLE
3366 # AC_LIBTOOL_CXX
3367 # --------------
3368 # enable support for C++ libraries
3369 AC_DEFUN([AC_LIBTOOL_CXX],
3370 [AC_REQUIRE([_LT_AC_LANG_CXX])
3371 ])# AC_LIBTOOL_CXX
3374 # _LT_AC_LANG_CXX
3375 # ---------------
3376 AC_DEFUN([_LT_AC_LANG_CXX],
3377 [AC_REQUIRE([AC_PROG_CXX])
3378 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3379 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3380 ])# _LT_AC_LANG_CXX
3382 # _LT_AC_PROG_CXXCPP
3383 # ------------------
3384 AC_DEFUN([_LT_AC_PROG_CXXCPP],
3385 [
3386 AC_REQUIRE([AC_PROG_CXX])
3387 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3388 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3389 (test "X$CXX" != "Xg++"))) ; then
3390 AC_PROG_CXXCPP
3391 fi
3392 ])# _LT_AC_PROG_CXXCPP
3394 # AC_LIBTOOL_F77
3395 # --------------
3396 # enable support for Fortran 77 libraries
3397 AC_DEFUN([AC_LIBTOOL_F77],
3398 [AC_REQUIRE([_LT_AC_LANG_F77])
3399 ])# AC_LIBTOOL_F77
3402 # _LT_AC_LANG_F77
3403 # ---------------
3404 AC_DEFUN([_LT_AC_LANG_F77],
3405 [AC_REQUIRE([AC_PROG_F77])
3406 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3407 ])# _LT_AC_LANG_F77
3410 # AC_LIBTOOL_GCJ
3411 # --------------
3412 # enable support for GCJ libraries
3413 AC_DEFUN([AC_LIBTOOL_GCJ],
3414 [AC_REQUIRE([_LT_AC_LANG_GCJ])
3415 ])# AC_LIBTOOL_GCJ
3418 # _LT_AC_LANG_GCJ
3419 # ---------------
3420 AC_DEFUN([_LT_AC_LANG_GCJ],
3421 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3422 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3423 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3424 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3425 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3426 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3427 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3428 ])# _LT_AC_LANG_GCJ
3431 # AC_LIBTOOL_RC
3432 # -------------
3433 # enable support for Windows resource files
3434 AC_DEFUN([AC_LIBTOOL_RC],
3435 [AC_REQUIRE([LT_AC_PROG_RC])
3436 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3437 ])# AC_LIBTOOL_RC
3440 # AC_LIBTOOL_LANG_C_CONFIG
3441 # ------------------------
3442 # Ensure that the configuration vars for the C compiler are
3443 # suitably defined. Those variables are subsequently used by
3444 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3445 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3446 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3447 [lt_save_CC="$CC"
3448 AC_LANG_PUSH(C)
3450 # Source file extension for C test sources.
3451 ac_ext=c
3453 # Object file extension for compiled C test sources.
3454 objext=o
3455 _LT_AC_TAGVAR(objext, $1)=$objext
3457 # Code to be used in simple compile tests
3458 lt_simple_compile_test_code="int some_variable = 0;"
3460 # Code to be used in simple link tests
3461 lt_simple_link_test_code='int main(){return(0);}'
3463 _LT_AC_SYS_COMPILER
3465 # save warnings/boilerplate of simple test code
3466 _LT_COMPILER_BOILERPLATE
3467 _LT_LINKER_BOILERPLATE
3469 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3470 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3471 AC_LIBTOOL_PROG_CC_C_O($1)
3472 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3473 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3474 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3475 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3476 AC_LIBTOOL_SYS_LIB_STRIP
3477 AC_LIBTOOL_DLOPEN_SELF
3479 # Report which library types will actually be built
3480 AC_MSG_CHECKING([if libtool supports shared libraries])
3481 AC_MSG_RESULT([$can_build_shared])
3483 AC_MSG_CHECKING([whether to build shared libraries])
3484 test "$can_build_shared" = "no" && enable_shared=no
3486 # On AIX, shared libraries and static libraries use the same namespace, and
3487 # are all built from PIC.
3488 case $host_os in
3489 aix3*)
3490 test "$enable_shared" = yes && enable_static=no
3491 if test -n "$RANLIB"; then
3492 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3493 postinstall_cmds='$RANLIB $lib'
3494 fi
3495 ;;
3497 aix[[4-9]]*)
3498 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3499 test "$enable_shared" = yes && enable_static=no
3500 fi
3501 ;;
3502 esac
3503 AC_MSG_RESULT([$enable_shared])
3505 AC_MSG_CHECKING([whether to build static libraries])
3506 # Make sure either enable_shared or enable_static is yes.
3507 test "$enable_shared" = yes || enable_static=yes
3508 AC_MSG_RESULT([$enable_static])
3510 AC_LIBTOOL_CONFIG($1)
3512 AC_LANG_POP
3513 CC="$lt_save_CC"
3514 ])# AC_LIBTOOL_LANG_C_CONFIG
3517 # AC_LIBTOOL_LANG_CXX_CONFIG
3518 # --------------------------
3519 # Ensure that the configuration vars for the C compiler are
3520 # suitably defined. Those variables are subsequently used by
3521 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3522 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3523 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3524 [AC_LANG_PUSH(C++)
3525 AC_REQUIRE([AC_PROG_CXX])
3526 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3528 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3529 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3530 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3531 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3532 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3533 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3534 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3535 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3536 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3537 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3538 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3539 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3540 _LT_AC_TAGVAR(module_cmds, $1)=
3541 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3542 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3543 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3544 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3545 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3546 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3548 # Dependencies to place before and after the object being linked:
3549 _LT_AC_TAGVAR(predep_objects, $1)=
3550 _LT_AC_TAGVAR(postdep_objects, $1)=
3551 _LT_AC_TAGVAR(predeps, $1)=
3552 _LT_AC_TAGVAR(postdeps, $1)=
3553 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3554 _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
3556 # Source file extension for C++ test sources.
3557 ac_ext=cpp
3559 # Object file extension for compiled C++ test sources.
3560 objext=o
3561 _LT_AC_TAGVAR(objext, $1)=$objext
3563 # Code to be used in simple compile tests
3564 lt_simple_compile_test_code="int some_variable = 0;"
3566 # Code to be used in simple link tests
3567 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
3569 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3570 _LT_AC_SYS_COMPILER
3572 # save warnings/boilerplate of simple test code
3573 _LT_COMPILER_BOILERPLATE
3574 _LT_LINKER_BOILERPLATE
3576 # Allow CC to be a program name with arguments.
3577 lt_save_CC=$CC
3578 lt_save_LD=$LD
3579 lt_save_GCC=$GCC
3580 GCC=$GXX
3581 lt_save_with_gnu_ld=$with_gnu_ld
3582 lt_save_path_LD=$lt_cv_path_LD
3583 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3584 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3585 else
3586 $as_unset lt_cv_prog_gnu_ld
3587 fi
3588 if test -n "${lt_cv_path_LDCXX+set}"; then
3589 lt_cv_path_LD=$lt_cv_path_LDCXX
3590 else
3591 $as_unset lt_cv_path_LD
3592 fi
3593 test -z "${LDCXX+set}" || LD=$LDCXX
3594 CC=${CXX-"c++"}
3595 compiler=$CC
3596 _LT_AC_TAGVAR(compiler, $1)=$CC
3597 _LT_CC_BASENAME([$compiler])
3599 # We don't want -fno-exception wen compiling C++ code, so set the
3600 # no_builtin_flag separately
3601 if test "$GXX" = yes; then
3602 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3603 else
3604 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3605 fi
3607 if test "$GXX" = yes; then
3608 # Set up default GNU C++ configuration
3610 AC_PROG_LD
3612 # Check if GNU C++ uses GNU ld as the underlying linker, since the
3613 # archiving commands below assume that GNU ld is being used.
3614 if test "$with_gnu_ld" = yes; then
3615 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3616 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3618 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3619 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3621 # If archive_cmds runs LD, not CC, wlarc should be empty
3622 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3623 # investigate it a little bit more. (MM)
3624 wlarc='${wl}'
3626 # ancient GNU ld didn't support --whole-archive et. al.
3627 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3628 grep 'no-whole-archive' > /dev/null; then
3629 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3630 else
3631 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3632 fi
3633 else
3634 with_gnu_ld=no
3635 wlarc=
3637 # A generic and very simple default shared library creation
3638 # command for GNU C++ for the case where it uses the native
3639 # linker, instead of GNU ld. If possible, this setting should
3640 # overridden to take advantage of the native linker features on
3641 # the platform it is being used on.
3642 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3643 fi
3645 # Commands to make compiler produce verbose output that lists
3646 # what "hidden" libraries, object files and flags are used when
3647 # linking a shared library.
3648 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3650 else
3651 GXX=no
3652 with_gnu_ld=no
3653 wlarc=
3654 fi
3656 # PORTME: fill in a description of your system's C++ link characteristics
3657 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3658 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3659 case $host_os in
3660 aix3*)
3661 # FIXME: insert proper C++ library support
3662 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3663 ;;
3664 aix[[4-9]]*)
3665 if test "$host_cpu" = ia64; then
3666 # On IA64, the linker does run time linking by default, so we don't
3667 # have to do anything special.
3668 aix_use_runtimelinking=no
3669 exp_sym_flag='-Bexport'
3670 no_entry_flag=""
3671 else
3672 aix_use_runtimelinking=no
3674 # Test if we are trying to use run time linking or normal
3675 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3676 # need to do runtime linking.
3677 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
3678 for ld_flag in $LDFLAGS; do
3679 case $ld_flag in
3680 *-brtl*)
3681 aix_use_runtimelinking=yes
3682 break
3683 ;;
3684 esac
3685 done
3686 ;;
3687 esac
3689 exp_sym_flag='-bexport'
3690 no_entry_flag='-bnoentry'
3691 fi
3693 # When large executables or shared objects are built, AIX ld can
3694 # have problems creating the table of contents. If linking a library
3695 # or program results in "error TOC overflow" add -mminimal-toc to
3696 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3697 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3699 _LT_AC_TAGVAR(archive_cmds, $1)=''
3700 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3701 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3702 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3704 if test "$GXX" = yes; then
3705 case $host_os in aix4.[[012]]|aix4.[[012]].*)
3706 # We only want to do this on AIX 4.2 and lower, the check
3707 # below for broken collect2 doesn't work under 4.3+
3708 collect2name=`${CC} -print-prog-name=collect2`
3709 if test -f "$collect2name" && \
3710 strings "$collect2name" | grep resolve_lib_name >/dev/null
3711 then
3712 # We have reworked collect2
3713 :
3714 else
3715 # We have old collect2
3716 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3717 # It fails to find uninstalled libraries when the uninstalled
3718 # path is not listed in the libpath. Setting hardcode_minus_L
3719 # to unsupported forces relinking
3720 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3721 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3722 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3723 fi
3724 ;;
3725 esac
3726 shared_flag='-shared'
3727 if test "$aix_use_runtimelinking" = yes; then
3728 shared_flag="$shared_flag "'${wl}-G'
3729 fi
3730 else
3731 # not using gcc
3732 if test "$host_cpu" = ia64; then
3733 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3734 # chokes on -Wl,-G. The following line is correct:
3735 shared_flag='-G'
3736 else
3737 if test "$aix_use_runtimelinking" = yes; then
3738 shared_flag='${wl}-G'
3739 else
3740 shared_flag='${wl}-bM:SRE'
3741 fi
3742 fi
3743 fi
3745 # It seems that -bexpall does not export symbols beginning with
3746 # underscore (_), so it is better to generate a list of symbols to export.
3747 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3748 if test "$aix_use_runtimelinking" = yes; then
3749 # Warning - without using the other runtime loading flags (-brtl),
3750 # -berok will link without error, but may produce a broken library.
3751 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3752 # Determine the default libpath from the value encoded in an empty executable.
3753 _LT_AC_SYS_LIBPATH_AIX
3754 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3756 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3757 else
3758 if test "$host_cpu" = ia64; then
3759 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3760 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3761 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
3762 else
3763 # Determine the default libpath from the value encoded in an empty executable.
3764 _LT_AC_SYS_LIBPATH_AIX
3765 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3766 # Warning - without using the other run time loading flags,
3767 # -berok will link without error, but may produce a broken library.
3768 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3769 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3770 # Exported symbols can be pulled into shared objects from archives
3771 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
3772 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3773 # This is similar to how AIX traditionally builds its shared libraries.
3774 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3775 fi
3776 fi
3777 ;;
3779 beos*)
3780 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3781 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3782 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3783 # support --undefined. This deserves some investigation. FIXME
3784 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3785 else
3786 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3787 fi
3788 ;;
3790 chorus*)
3791 case $cc_basename in
3792 *)
3793 # FIXME: insert proper C++ library support
3794 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3795 ;;
3796 esac
3797 ;;
3799 cygwin* | mingw* | pw32*)
3800 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3801 # as there is no search path for DLLs.
3802 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3803 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3804 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3805 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3807 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3808 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3809 # If the export-symbols file already is a .def file (1st line
3810 # is EXPORTS), use it as is; otherwise, prepend...
3811 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3812 cp $export_symbols $output_objdir/$soname.def;
3813 else
3814 echo EXPORTS > $output_objdir/$soname.def;
3815 cat $export_symbols >> $output_objdir/$soname.def;
3816 fi~
3817 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3818 else
3819 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3820 fi
3821 ;;
3822 darwin* | rhapsody*)
3823 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3824 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3825 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3826 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3827 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3828 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3829 _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
3830 if test "$GXX" = yes ; then
3831 output_verbose_link_cmd='echo'
3832 _LT_AC_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}"
3833 _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
3834 _LT_AC_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}"
3835 _LT_AC_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}"
3836 if test "$lt_cv_apple_cc_single_mod" != "yes"; then
3837 _LT_AC_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}"
3838 _LT_AC_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}"
3839 fi
3840 else
3841 case $cc_basename in
3842 xlc*)
3843 output_verbose_link_cmd='echo'
3844 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
3845 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3846 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3847 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3848 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3849 ;;
3850 *)
3851 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3852 ;;
3853 esac
3854 fi
3855 ;;
3857 dgux*)
3858 case $cc_basename in
3859 ec++*)
3860 # FIXME: insert proper C++ library support
3861 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3862 ;;
3863 ghcx*)
3864 # Green Hills C++ Compiler
3865 # FIXME: insert proper C++ library support
3866 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3867 ;;
3868 *)
3869 # FIXME: insert proper C++ library support
3870 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3871 ;;
3872 esac
3873 ;;
3874 freebsd[[12]]*)
3875 # C++ shared libraries reported to be fairly broken before switch to ELF
3876 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3877 ;;
3878 freebsd-elf*)
3879 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3880 ;;
3881 freebsd* | dragonfly*)
3882 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3883 # conventions
3884 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3885 ;;
3886 gnu*)
3887 ;;
3888 hpux9*)
3889 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3890 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3891 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3892 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3893 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3894 # but as the default
3895 # location of the library.
3897 case $cc_basename in
3898 CC*)
3899 # FIXME: insert proper C++ library support
3900 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3901 ;;
3902 aCC*)
3903 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3904 # Commands to make compiler produce verbose output that lists
3905 # what "hidden" libraries, object files and flags are used when
3906 # linking a shared library.
3907 #
3908 # There doesn't appear to be a way to prevent this compiler from
3909 # explicitly linking system object files so we need to strip them
3910 # from the output so that they don't get included in the library
3911 # dependencies.
3912 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3913 ;;
3914 *)
3915 if test "$GXX" = yes; then
3916 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3917 else
3918 # FIXME: insert proper C++ library support
3919 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3920 fi
3921 ;;
3922 esac
3923 ;;
3924 hpux10*|hpux11*)
3925 if test $with_gnu_ld = no; then
3926 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3927 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3929 case $host_cpu in
3930 hppa*64*|ia64*) ;;
3931 *)
3932 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3933 ;;
3934 esac
3935 fi
3936 case $host_cpu in
3937 hppa*64*|ia64*)
3938 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3939 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3940 ;;
3941 *)
3942 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3943 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3944 # but as the default
3945 # location of the library.
3946 ;;
3947 esac
3949 case $cc_basename in
3950 CC*)
3951 # FIXME: insert proper C++ library support
3952 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3953 ;;
3954 aCC*)
3955 case $host_cpu in
3956 hppa*64*)
3957 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3958 ;;
3959 ia64*)
3960 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3961 ;;
3962 *)
3963 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3964 ;;
3965 esac
3966 # Commands to make compiler produce verbose output that lists
3967 # what "hidden" libraries, object files and flags are used when
3968 # linking a shared library.
3969 #
3970 # There doesn't appear to be a way to prevent this compiler from
3971 # explicitly linking system object files so we need to strip them
3972 # from the output so that they don't get included in the library
3973 # dependencies.
3974 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3975 ;;
3976 *)
3977 if test "$GXX" = yes; then
3978 if test $with_gnu_ld = no; then
3979 case $host_cpu in
3980 hppa*64*)
3981 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3982 ;;
3983 ia64*)
3984 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3985 ;;
3986 *)
3987 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3988 ;;
3989 esac
3990 fi
3991 else
3992 # FIXME: insert proper C++ library support
3993 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3994 fi
3995 ;;
3996 esac
3997 ;;
3998 interix[[3-9]]*)
3999 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4000 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4001 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4002 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4003 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4004 # Instead, shared libraries are loaded at an image base (0x10000000 by
4005 # default) and relocated if they conflict, which is a slow very memory
4006 # consuming and fragmenting process. To avoid this, we pick a random,
4007 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4008 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4009 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4010 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4011 ;;
4012 irix5* | irix6*)
4013 case $cc_basename in
4014 CC*)
4015 # SGI C++
4016 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4018 # Archives containing C++ object files must be created using
4019 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
4020 # necessary to make sure instantiated templates are included
4021 # in the archive.
4022 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4023 ;;
4024 *)
4025 if test "$GXX" = yes; then
4026 if test "$with_gnu_ld" = no; then
4027 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4028 else
4029 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
4030 fi
4031 fi
4032 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4033 ;;
4034 esac
4035 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4036 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4037 ;;
4038 linux* | k*bsd*-gnu)
4039 case $cc_basename in
4040 KCC*)
4041 # Kuck and Associates, Inc. (KAI) C++ Compiler
4043 # KCC will only create a shared library if the output file
4044 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4045 # to its proper name (with version) after linking.
4046 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4047 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
4048 # Commands to make compiler produce verbose output that lists
4049 # what "hidden" libraries, object files and flags are used when
4050 # linking a shared library.
4051 #
4052 # There doesn't appear to be a way to prevent this compiler from
4053 # explicitly linking system object files so we need to strip them
4054 # from the output so that they don't get included in the library
4055 # dependencies.
4056 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4058 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4059 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4061 # Archives containing C++ object files must be created using
4062 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4063 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4064 ;;
4065 icpc*)
4066 # Intel C++
4067 with_gnu_ld=yes
4068 # version 8.0 and above of icpc choke on multiply defined symbols
4069 # if we add $predep_objects and $postdep_objects, however 7.1 and
4070 # earlier do not add the objects themselves.
4071 case `$CC -V 2>&1` in
4072 *"Version 7."*)
4073 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4074 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4075 ;;
4076 *) # Version 8.0 or newer
4077 tmp_idyn=
4078 case $host_cpu in
4079 ia64*) tmp_idyn=' -i_dynamic';;
4080 esac
4081 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4082 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4083 ;;
4084 esac
4085 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4086 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4087 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4088 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4089 ;;
4090 pgCC* | pgcpp*)
4091 # Portland Group C++ compiler
4092 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
4093 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
4095 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4096 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4097 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
4098 ;;
4099 cxx*)
4100 # Compaq C++
4101 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4102 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
4104 runpath_var=LD_RUN_PATH
4105 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4106 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4108 # Commands to make compiler produce verbose output that lists
4109 # what "hidden" libraries, object files and flags are used when
4110 # linking a shared library.
4111 #
4112 # There doesn't appear to be a way to prevent this compiler from
4113 # explicitly linking system object files so we need to strip them
4114 # from the output so that they don't get included in the library
4115 # dependencies.
4116 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4117 ;;
4118 *)
4119 case `$CC -V 2>&1 | sed 5q` in
4120 *Sun\ C*)
4121 # Sun C++ 5.9
4122 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4123 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4124 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
4125 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4126 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
4128 # Not sure whether something based on
4129 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
4130 # would be better.
4131 output_verbose_link_cmd='echo'
4133 # Archives containing C++ object files must be created using
4134 # "CC -xar", where "CC" is the Sun C++ compiler. This is
4135 # necessary to make sure instantiated templates are included
4136 # in the archive.
4137 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4138 ;;
4139 esac
4140 ;;
4141 esac
4142 ;;
4143 lynxos*)
4144 # FIXME: insert proper C++ library support
4145 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4146 ;;
4147 m88k*)
4148 # FIXME: insert proper C++ library support
4149 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4150 ;;
4151 mvs*)
4152 case $cc_basename in
4153 cxx*)
4154 # FIXME: insert proper C++ library support
4155 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4156 ;;
4157 *)
4158 # FIXME: insert proper C++ library support
4159 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4160 ;;
4161 esac
4162 ;;
4163 netbsd* | netbsdelf*-gnu)
4164 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4165 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4166 wlarc=
4167 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4168 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4169 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4170 fi
4171 # Workaround some broken pre-1.5 toolchains
4172 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4173 ;;
4174 openbsd2*)
4175 # C++ shared libraries are fairly broken
4176 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4177 ;;
4178 openbsd*)
4179 if test -f /usr/libexec/ld.so; then
4180 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4181 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4182 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4183 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4184 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4185 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
4186 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4187 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4188 fi
4189 output_verbose_link_cmd='echo'
4190 else
4191 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4192 fi
4193 ;;
4194 osf3*)
4195 case $cc_basename in
4196 KCC*)
4197 # Kuck and Associates, Inc. (KAI) C++ Compiler
4199 # KCC will only create a shared library if the output file
4200 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4201 # to its proper name (with version) after linking.
4202 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4204 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4205 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4207 # Archives containing C++ object files must be created using
4208 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4209 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4211 ;;
4212 RCC*)
4213 # Rational C++ 2.4.1
4214 # FIXME: insert proper C++ library support
4215 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4216 ;;
4217 cxx*)
4218 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4219 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4221 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4222 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4224 # Commands to make compiler produce verbose output that lists
4225 # what "hidden" libraries, object files and flags are used when
4226 # linking a shared library.
4227 #
4228 # There doesn't appear to be a way to prevent this compiler from
4229 # explicitly linking system object files so we need to strip them
4230 # from the output so that they don't get included in the library
4231 # dependencies.
4232 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4233 ;;
4234 *)
4235 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4236 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4237 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4239 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4240 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4242 # Commands to make compiler produce verbose output that lists
4243 # what "hidden" libraries, object files and flags are used when
4244 # linking a shared library.
4245 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4247 else
4248 # FIXME: insert proper C++ library support
4249 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4250 fi
4251 ;;
4252 esac
4253 ;;
4254 osf4* | osf5*)
4255 case $cc_basename in
4256 KCC*)
4257 # Kuck and Associates, Inc. (KAI) C++ Compiler
4259 # KCC will only create a shared library if the output file
4260 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4261 # to its proper name (with version) after linking.
4262 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4264 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4265 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4267 # Archives containing C++ object files must be created using
4268 # the KAI C++ compiler.
4269 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4270 ;;
4271 RCC*)
4272 # Rational C++ 2.4.1
4273 # FIXME: insert proper C++ library support
4274 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4275 ;;
4276 cxx*)
4277 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4278 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4279 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4280 echo "-hidden">> $lib.exp~
4281 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
4282 $rm $lib.exp'
4284 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4285 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4287 # Commands to make compiler produce verbose output that lists
4288 # what "hidden" libraries, object files and flags are used when
4289 # linking a shared library.
4290 #
4291 # There doesn't appear to be a way to prevent this compiler from
4292 # explicitly linking system object files so we need to strip them
4293 # from the output so that they don't get included in the library
4294 # dependencies.
4295 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4296 ;;
4297 *)
4298 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4299 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4300 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4302 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4303 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4305 # Commands to make compiler produce verbose output that lists
4306 # what "hidden" libraries, object files and flags are used when
4307 # linking a shared library.
4308 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4310 else
4311 # FIXME: insert proper C++ library support
4312 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4313 fi
4314 ;;
4315 esac
4316 ;;
4317 psos*)
4318 # FIXME: insert proper C++ library support
4319 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4320 ;;
4321 sunos4*)
4322 case $cc_basename in
4323 CC*)
4324 # Sun C++ 4.x
4325 # FIXME: insert proper C++ library support
4326 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4327 ;;
4328 lcc*)
4329 # Lucid
4330 # FIXME: insert proper C++ library support
4331 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4332 ;;
4333 *)
4334 # FIXME: insert proper C++ library support
4335 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4336 ;;
4337 esac
4338 ;;
4339 solaris*)
4340 case $cc_basename in
4341 CC*)
4342 # Sun C++ 4.2, 5.x and Centerline C++
4343 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
4344 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4345 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4346 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4347 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4349 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4350 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4351 case $host_os in
4352 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4353 *)
4354 # The compiler driver will combine and reorder linker options,
4355 # but understands `-z linker_flag'.
4356 # Supported since Solaris 2.6 (maybe 2.5.1?)
4357 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
4358 ;;
4359 esac
4360 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4362 output_verbose_link_cmd='echo'
4364 # Archives containing C++ object files must be created using
4365 # "CC -xar", where "CC" is the Sun C++ compiler. This is
4366 # necessary to make sure instantiated templates are included
4367 # in the archive.
4368 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4369 ;;
4370 gcx*)
4371 # Green Hills C++ Compiler
4372 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4374 # The C++ compiler must be used to create the archive.
4375 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4376 ;;
4377 *)
4378 # GNU C++ compiler with Solaris linker
4379 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4380 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4381 if $CC --version | grep -v '^2\.7' > /dev/null; then
4382 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4383 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4384 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4386 # Commands to make compiler produce verbose output that lists
4387 # what "hidden" libraries, object files and flags are used when
4388 # linking a shared library.
4389 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4390 else
4391 # g++ 2.7 appears to require `-G' NOT `-shared' on this
4392 # platform.
4393 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4394 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4395 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4397 # Commands to make compiler produce verbose output that lists
4398 # what "hidden" libraries, object files and flags are used when
4399 # linking a shared library.
4400 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4401 fi
4403 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4404 case $host_os in
4405 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4406 *)
4407 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4408 ;;
4409 esac
4410 fi
4411 ;;
4412 esac
4413 ;;
4414 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4415 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4416 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4417 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4418 runpath_var='LD_RUN_PATH'
4420 case $cc_basename in
4421 CC*)
4422 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4423 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4424 ;;
4425 *)
4426 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4427 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4428 ;;
4429 esac
4430 ;;
4431 sysv5* | sco3.2v5* | sco5v6*)
4432 # Note: We can NOT use -z defs as we might desire, because we do not
4433 # link with -lc, and that would cause any symbols used from libc to
4434 # always be unresolved, which means just about no library would
4435 # ever link correctly. If we're not using GNU ld we use -z text
4436 # though, which does catch some bad symbols but isn't as heavy-handed
4437 # as -z defs.
4438 # For security reasons, it is highly recommended that you always
4439 # use absolute paths for naming shared libraries, and exclude the
4440 # DT_RUNPATH tag from executables and libraries. But doing so
4441 # requires that you compile everything twice, which is a pain.
4442 # So that behaviour is only enabled if SCOABSPATH is set to a
4443 # non-empty value in the environment. Most likely only useful for
4444 # creating official distributions of packages.
4445 # This is a hack until libtool officially supports absolute path
4446 # names for shared libraries.
4447 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4448 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
4449 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4450 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4451 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
4452 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4453 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4454 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4455 runpath_var='LD_RUN_PATH'
4457 case $cc_basename in
4458 CC*)
4459 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4460 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4461 ;;
4462 *)
4463 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4464 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4465 ;;
4466 esac
4467 ;;
4468 tandem*)
4469 case $cc_basename in
4470 NCC*)
4471 # NonStop-UX NCC 3.20
4472 # FIXME: insert proper C++ library support
4473 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4474 ;;
4475 *)
4476 # FIXME: insert proper C++ library support
4477 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4478 ;;
4479 esac
4480 ;;
4481 vxworks*)
4482 # FIXME: insert proper C++ library support
4483 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4484 ;;
4485 *)
4486 # FIXME: insert proper C++ library support
4487 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4488 ;;
4489 esac
4490 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4491 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4493 _LT_AC_TAGVAR(GCC, $1)="$GXX"
4494 _LT_AC_TAGVAR(LD, $1)="$LD"
4496 AC_LIBTOOL_POSTDEP_PREDEP($1)
4497 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4498 AC_LIBTOOL_PROG_CC_C_O($1)
4499 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4500 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4501 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4502 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4504 AC_LIBTOOL_CONFIG($1)
4506 AC_LANG_POP
4507 CC=$lt_save_CC
4508 LDCXX=$LD
4509 LD=$lt_save_LD
4510 GCC=$lt_save_GCC
4511 with_gnu_ldcxx=$with_gnu_ld
4512 with_gnu_ld=$lt_save_with_gnu_ld
4513 lt_cv_path_LDCXX=$lt_cv_path_LD
4514 lt_cv_path_LD=$lt_save_path_LD
4515 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4516 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4517 ])# AC_LIBTOOL_LANG_CXX_CONFIG
4519 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4520 # ------------------------------------
4521 # Figure out "hidden" library dependencies from verbose
4522 # compiler output when linking a shared library.
4523 # Parse the compiler output and extract the necessary
4524 # objects, libraries and library flags.
4525 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
4526 [AC_REQUIRE([LT_AC_PROG_SED])dnl
4527 dnl we can't use the lt_simple_compile_test_code here,
4528 dnl because it contains code intended for an executable,
4529 dnl not a library. It's possible we should let each
4530 dnl tag define a new lt_????_link_test_code variable,
4531 dnl but it's only used here...
4532 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4533 int a;
4534 void foo (void) { a = 0; }
4535 EOF
4536 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4537 class Foo
4538 {
4539 public:
4540 Foo (void) { a = 0; }
4541 private:
4542 int a;
4543 };
4544 EOF
4545 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4546 subroutine foo
4547 implicit none
4548 integer*4 a
4549 a=0
4550 return
4551 end
4552 EOF
4553 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4554 public class foo {
4555 private int a;
4556 public void bar (void) {
4557 a = 0;
4558 }
4559 };
4560 EOF
4561 ])
4562 dnl Parse the compiler output and extract the necessary
4563 dnl objects, libraries and library flags.
4564 if AC_TRY_EVAL(ac_compile); then
4565 # Parse the compiler output and extract the necessary
4566 # objects, libraries and library flags.
4568 # Sentinel used to keep track of whether or not we are before
4569 # the conftest object file.
4570 pre_test_object_deps_done=no
4572 # The `*' in the case matches for architectures that use `case' in
4573 # $output_verbose_cmd can trigger glob expansion during the loop
4574 # eval without this substitution.
4575 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
4577 for p in `eval $output_verbose_link_cmd`; do
4578 case $p in
4580 -L* | -R* | -l*)
4581 # Some compilers place space between "-{L,R}" and the path.
4582 # Remove the space.
4583 if test $p = "-L" \
4584 || test $p = "-R"; then
4585 prev=$p
4586 continue
4587 else
4588 prev=
4589 fi
4591 if test "$pre_test_object_deps_done" = no; then
4592 case $p in
4593 -L* | -R*)
4594 # Internal compiler library paths should come after those
4595 # provided the user. The postdeps already come after the
4596 # user supplied libs so there is no need to process them.
4597 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4598 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4599 else
4600 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4601 fi
4602 ;;
4603 # The "-l" case would never come before the object being
4604 # linked, so don't bother handling this case.
4605 esac
4606 else
4607 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4608 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4609 else
4610 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4611 fi
4612 fi
4613 ;;
4615 *.$objext)
4616 # This assumes that the test object file only shows up
4617 # once in the compiler output.
4618 if test "$p" = "conftest.$objext"; then
4619 pre_test_object_deps_done=yes
4620 continue
4621 fi
4623 if test "$pre_test_object_deps_done" = no; then
4624 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4625 _LT_AC_TAGVAR(predep_objects, $1)="$p"
4626 else
4627 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4628 fi
4629 else
4630 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4631 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4632 else
4633 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4634 fi
4635 fi
4636 ;;
4638 *) ;; # Ignore the rest.
4640 esac
4641 done
4643 # Clean up.
4644 rm -f a.out a.exe
4645 else
4646 echo "libtool.m4: error: problem compiling $1 test program"
4647 fi
4649 $rm -f confest.$objext
4651 _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
4652 if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4653 _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
4654 fi
4656 # PORTME: override above test on systems where it is broken
4657 ifelse([$1],[CXX],
4658 [case $host_os in
4659 interix[[3-9]]*)
4660 # Interix 3.5 installs completely hosed .la files for C++, so rather than
4661 # hack all around it, let's just trust "g++" to DTRT.
4662 _LT_AC_TAGVAR(predep_objects,$1)=
4663 _LT_AC_TAGVAR(postdep_objects,$1)=
4664 _LT_AC_TAGVAR(postdeps,$1)=
4665 ;;
4667 linux*)
4668 case `$CC -V 2>&1 | sed 5q` in
4669 *Sun\ C*)
4670 # Sun C++ 5.9
4671 #
4672 # The more standards-conforming stlport4 library is
4673 # incompatible with the Cstd library. Avoid specifying
4674 # it if it's in CXXFLAGS. Ignore libCrun as
4675 # -library=stlport4 depends on it.
4676 case " $CXX $CXXFLAGS " in
4677 *" -library=stlport4 "*)
4678 solaris_use_stlport4=yes
4679 ;;
4680 esac
4681 if test "$solaris_use_stlport4" != yes; then
4682 _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
4683 fi
4684 ;;
4685 esac
4686 ;;
4688 solaris*)
4689 case $cc_basename in
4690 CC*)
4691 # The more standards-conforming stlport4 library is
4692 # incompatible with the Cstd library. Avoid specifying
4693 # it if it's in CXXFLAGS. Ignore libCrun as
4694 # -library=stlport4 depends on it.
4695 case " $CXX $CXXFLAGS " in
4696 *" -library=stlport4 "*)
4697 solaris_use_stlport4=yes
4698 ;;
4699 esac
4701 # Adding this requires a known-good setup of shared libraries for
4702 # Sun compiler versions before 5.6, else PIC objects from an old
4703 # archive will be linked into the output, leading to subtle bugs.
4704 if test "$solaris_use_stlport4" != yes; then
4705 _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
4706 fi
4707 ;;
4708 esac
4709 ;;
4710 esac
4711 ])
4712 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4713 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4714 esac
4715 ])# AC_LIBTOOL_POSTDEP_PREDEP
4717 # AC_LIBTOOL_LANG_F77_CONFIG
4718 # --------------------------
4719 # Ensure that the configuration vars for the C compiler are
4720 # suitably defined. Those variables are subsequently used by
4721 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4722 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4723 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4724 [AC_REQUIRE([AC_PROG_F77])
4725 AC_LANG_PUSH(Fortran 77)
4727 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4728 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4729 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4730 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4731 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4732 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4733 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4734 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4735 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4736 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4737 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4738 _LT_AC_TAGVAR(module_cmds, $1)=
4739 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4740 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4741 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4742 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4743 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4744 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4746 # Source file extension for f77 test sources.
4747 ac_ext=f
4749 # Object file extension for compiled f77 test sources.
4750 objext=o
4751 _LT_AC_TAGVAR(objext, $1)=$objext
4753 # Code to be used in simple compile tests
4754 lt_simple_compile_test_code="\
4755 subroutine t
4756 return
4757 end
4758 "
4760 # Code to be used in simple link tests
4761 lt_simple_link_test_code="\
4762 program t
4763 end
4764 "
4766 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4767 _LT_AC_SYS_COMPILER
4769 # save warnings/boilerplate of simple test code
4770 _LT_COMPILER_BOILERPLATE
4771 _LT_LINKER_BOILERPLATE
4773 # Allow CC to be a program name with arguments.
4774 lt_save_CC="$CC"
4775 CC=${F77-"f77"}
4776 compiler=$CC
4777 _LT_AC_TAGVAR(compiler, $1)=$CC
4778 _LT_CC_BASENAME([$compiler])
4780 AC_MSG_CHECKING([if libtool supports shared libraries])
4781 AC_MSG_RESULT([$can_build_shared])
4783 AC_MSG_CHECKING([whether to build shared libraries])
4784 test "$can_build_shared" = "no" && enable_shared=no
4786 # On AIX, shared libraries and static libraries use the same namespace, and
4787 # are all built from PIC.
4788 case $host_os in
4789 aix3*)
4790 test "$enable_shared" = yes && enable_static=no
4791 if test -n "$RANLIB"; then
4792 archive_cmds="$archive_cmds~\$RANLIB \$lib"
4793 postinstall_cmds='$RANLIB $lib'
4794 fi
4795 ;;
4796 aix[[4-9]]*)
4797 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4798 test "$enable_shared" = yes && enable_static=no
4799 fi
4800 ;;
4801 esac
4802 AC_MSG_RESULT([$enable_shared])
4804 AC_MSG_CHECKING([whether to build static libraries])
4805 # Make sure either enable_shared or enable_static is yes.
4806 test "$enable_shared" = yes || enable_static=yes
4807 AC_MSG_RESULT([$enable_static])
4809 _LT_AC_TAGVAR(GCC, $1)="$G77"
4810 _LT_AC_TAGVAR(LD, $1)="$LD"
4812 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4813 AC_LIBTOOL_PROG_CC_C_O($1)
4814 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4815 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4816 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4817 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4819 AC_LIBTOOL_CONFIG($1)
4821 AC_LANG_POP
4822 CC="$lt_save_CC"
4823 ])# AC_LIBTOOL_LANG_F77_CONFIG
4826 # AC_LIBTOOL_LANG_GCJ_CONFIG
4827 # --------------------------
4828 # Ensure that the configuration vars for the C compiler are
4829 # suitably defined. Those variables are subsequently used by
4830 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4831 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4832 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4833 [AC_LANG_SAVE
4835 # Source file extension for Java test sources.
4836 ac_ext=java
4838 # Object file extension for compiled Java test sources.
4839 objext=o
4840 _LT_AC_TAGVAR(objext, $1)=$objext
4842 # Code to be used in simple compile tests
4843 lt_simple_compile_test_code="class foo {}"
4845 # Code to be used in simple link tests
4846 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
4848 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4849 _LT_AC_SYS_COMPILER
4851 # save warnings/boilerplate of simple test code
4852 _LT_COMPILER_BOILERPLATE
4853 _LT_LINKER_BOILERPLATE
4855 # Allow CC to be a program name with arguments.
4856 lt_save_CC="$CC"
4857 CC=${GCJ-"gcj"}
4858 compiler=$CC
4859 _LT_AC_TAGVAR(compiler, $1)=$CC
4860 _LT_CC_BASENAME([$compiler])
4862 # GCJ did not exist at the time GCC didn't implicitly link libc in.
4863 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4865 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4867 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4868 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4869 AC_LIBTOOL_PROG_CC_C_O($1)
4870 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4871 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4872 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4873 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4875 AC_LIBTOOL_CONFIG($1)
4877 AC_LANG_RESTORE
4878 CC="$lt_save_CC"
4879 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
4882 # AC_LIBTOOL_LANG_RC_CONFIG
4883 # -------------------------
4884 # Ensure that the configuration vars for the Windows resource compiler are
4885 # suitably defined. Those variables are subsequently used by
4886 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4887 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4888 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4889 [AC_LANG_SAVE
4891 # Source file extension for RC test sources.
4892 ac_ext=rc
4894 # Object file extension for compiled RC test sources.
4895 objext=o
4896 _LT_AC_TAGVAR(objext, $1)=$objext
4898 # Code to be used in simple compile tests
4899 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
4901 # Code to be used in simple link tests
4902 lt_simple_link_test_code="$lt_simple_compile_test_code"
4904 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4905 _LT_AC_SYS_COMPILER
4907 # save warnings/boilerplate of simple test code
4908 _LT_COMPILER_BOILERPLATE
4909 _LT_LINKER_BOILERPLATE
4911 # Allow CC to be a program name with arguments.
4912 lt_save_CC="$CC"
4913 CC=${RC-"windres"}
4914 compiler=$CC
4915 _LT_AC_TAGVAR(compiler, $1)=$CC
4916 _LT_CC_BASENAME([$compiler])
4917 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4919 AC_LIBTOOL_CONFIG($1)
4921 AC_LANG_RESTORE
4922 CC="$lt_save_CC"
4923 ])# AC_LIBTOOL_LANG_RC_CONFIG
4926 # AC_LIBTOOL_CONFIG([TAGNAME])
4927 # ----------------------------
4928 # If TAGNAME is not passed, then create an initial libtool script
4929 # with a default configuration from the untagged config vars. Otherwise
4930 # add code to config.status for appending the configuration named by
4931 # TAGNAME from the matching tagged config vars.
4932 AC_DEFUN([AC_LIBTOOL_CONFIG],
4933 [# The else clause should only fire when bootstrapping the
4934 # libtool distribution, otherwise you forgot to ship ltmain.sh
4935 # with your package, and you will get complaints that there are
4936 # no rules to generate ltmain.sh.
4937 if test -f "$ltmain"; then
4938 # See if we are running on zsh, and set the options which allow our commands through
4939 # without removal of \ escapes.
4940 if test -n "${ZSH_VERSION+set}" ; then
4941 setopt NO_GLOB_SUBST
4942 fi
4943 # Now quote all the things that may contain metacharacters while being
4944 # careful not to overquote the AC_SUBSTed values. We take copies of the
4945 # variables and quote the copies for generation of the libtool script.
4946 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4947 SED SHELL STRIP \
4948 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4949 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4950 deplibs_check_method reload_flag reload_cmds need_locks \
4951 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4952 lt_cv_sys_global_symbol_to_c_name_address \
4953 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4954 old_postinstall_cmds old_postuninstall_cmds \
4955 _LT_AC_TAGVAR(compiler, $1) \
4956 _LT_AC_TAGVAR(CC, $1) \
4957 _LT_AC_TAGVAR(LD, $1) \
4958 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4959 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4960 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4961 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4962 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4963 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4964 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4965 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4966 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4967 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4968 _LT_AC_TAGVAR(predep_objects, $1) \
4969 _LT_AC_TAGVAR(postdep_objects, $1) \
4970 _LT_AC_TAGVAR(predeps, $1) \
4971 _LT_AC_TAGVAR(postdeps, $1) \
4972 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4973 _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
4974 _LT_AC_TAGVAR(archive_cmds, $1) \
4975 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4976 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4977 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4978 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4979 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4980 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4981 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4982 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4983 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4984 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4985 _LT_AC_TAGVAR(hardcode_automatic, $1) \
4986 _LT_AC_TAGVAR(module_cmds, $1) \
4987 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4988 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4989 _LT_AC_TAGVAR(fix_srcfile_path, $1) \
4990 _LT_AC_TAGVAR(exclude_expsyms, $1) \
4991 _LT_AC_TAGVAR(include_expsyms, $1); do
4993 case $var in
4994 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4995 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4996 _LT_AC_TAGVAR(archive_cmds, $1) | \
4997 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4998 _LT_AC_TAGVAR(module_cmds, $1) | \
4999 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5000 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5001 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5002 extract_expsyms_cmds | reload_cmds | finish_cmds | \
5003 postinstall_cmds | postuninstall_cmds | \
5004 old_postinstall_cmds | old_postuninstall_cmds | \
5005 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5006 # Double-quote double-evaled strings.
5007 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5008 ;;
5009 *)
5010 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5011 ;;
5012 esac
5013 done
5015 case $lt_echo in
5016 *'\[$]0 --fallback-echo"')
5017 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
5018 ;;
5019 esac
5021 ifelse([$1], [],
5022 [cfgfile="${ofile}T"
5023 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
5024 $rm -f "$cfgfile"
5025 AC_MSG_NOTICE([creating $ofile])],
5026 [cfgfile="$ofile"])
5028 cat <<__EOF__ >> "$cfgfile"
5029 ifelse([$1], [],
5030 [#! $SHELL
5032 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5033 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5034 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
5035 #
5036 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
5037 # Free Software Foundation, Inc.
5038 #
5039 # This file is part of GNU Libtool:
5040 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5041 #
5042 # This program is free software; you can redistribute it and/or modify
5043 # it under the terms of the GNU General Public License as published by
5044 # the Free Software Foundation; either version 2 of the License, or
5045 # (at your option) any later version.
5046 #
5047 # This program is distributed in the hope that it will be useful, but
5048 # WITHOUT ANY WARRANTY; without even the implied warranty of
5049 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5050 # General Public License for more details.
5051 #
5052 # You should have received a copy of the GNU General Public License
5053 # along with this program; if not, write to the Free Software
5054 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5055 #
5056 # As a special exception to the GNU General Public License, if you
5057 # distribute this file as part of a program that contains a
5058 # configuration script generated by Autoconf, you may include it under
5059 # the same distribution terms that you use for the rest of that program.
5061 # A sed program that does not truncate output.
5062 SED=$lt_SED
5064 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
5065 Xsed="$SED -e 1s/^X//"
5067 # The HP-UX ksh and POSIX shell print the target directory to stdout
5068 # if CDPATH is set.
5069 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5071 # The names of the tagged configurations supported by this script.
5072 available_tags=
5074 # ### BEGIN LIBTOOL CONFIG],
5075 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
5077 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5079 # Shell to use when invoking shell scripts.
5080 SHELL=$lt_SHELL
5082 # Whether or not to build shared libraries.
5083 build_libtool_libs=$enable_shared
5085 # Whether or not to build static libraries.
5086 build_old_libs=$enable_static
5088 # Whether or not to add -lc for building shared libraries.
5089 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
5091 # Whether or not to disallow shared libs when runtime libs are static
5092 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
5094 # Whether or not to optimize for fast installation.
5095 fast_install=$enable_fast_install
5097 # The host system.
5098 host_alias=$host_alias
5099 host=$host
5100 host_os=$host_os
5102 # The build system.
5103 build_alias=$build_alias
5104 build=$build
5105 build_os=$build_os
5107 # An echo program that does not interpret backslashes.
5108 echo=$lt_echo
5110 # The archiver.
5111 AR=$lt_AR
5112 AR_FLAGS=$lt_AR_FLAGS
5114 # A C compiler.
5115 LTCC=$lt_LTCC
5117 # LTCC compiler flags.
5118 LTCFLAGS=$lt_LTCFLAGS
5120 # A language-specific compiler.
5121 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
5123 # Is the compiler the GNU C compiler?
5124 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
5126 # An ERE matcher.
5127 EGREP=$lt_EGREP
5129 # The linker used to build libraries.
5130 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
5132 # Whether we need hard or soft links.
5133 LN_S=$lt_LN_S
5135 # A BSD-compatible nm program.
5136 NM=$lt_NM
5138 # A symbol stripping program
5139 STRIP=$lt_STRIP
5141 # Used to examine libraries when file_magic_cmd begins "file"
5142 MAGIC_CMD=$MAGIC_CMD
5144 # Used on cygwin: DLL creation program.
5145 DLLTOOL="$DLLTOOL"
5147 # Used on cygwin: object dumper.
5148 OBJDUMP="$OBJDUMP"
5150 # Used on cygwin: assembler.
5151 AS="$AS"
5153 # The name of the directory that contains temporary libtool files.
5154 objdir=$objdir
5156 # How to create reloadable object files.
5157 reload_flag=$lt_reload_flag
5158 reload_cmds=$lt_reload_cmds
5160 # How to pass a linker flag through the compiler.
5161 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5163 # Object file suffix (normally "o").
5164 objext="$ac_objext"
5166 # Old archive suffix (normally "a").
5167 libext="$libext"
5169 # Shared library suffix (normally ".so").
5170 shrext_cmds='$shrext_cmds'
5172 # Executable file suffix (normally "").
5173 exeext="$exeext"
5175 # Additional compiler flags for building library objects.
5176 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5177 pic_mode=$pic_mode
5179 # What is the maximum length of a command?
5180 max_cmd_len=$lt_cv_sys_max_cmd_len
5182 # Does compiler simultaneously support -c and -o options?
5183 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5185 # Must we lock files when doing compilation?
5186 need_locks=$lt_need_locks
5188 # Do we need the lib prefix for modules?
5189 need_lib_prefix=$need_lib_prefix
5191 # Do we need a version for libraries?
5192 need_version=$need_version
5194 # Whether dlopen is supported.
5195 dlopen_support=$enable_dlopen
5197 # Whether dlopen of programs is supported.
5198 dlopen_self=$enable_dlopen_self
5200 # Whether dlopen of statically linked programs is supported.
5201 dlopen_self_static=$enable_dlopen_self_static
5203 # Compiler flag to prevent dynamic linking.
5204 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5206 # Compiler flag to turn off builtin functions.
5207 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5209 # Compiler flag to allow reflexive dlopens.
5210 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5212 # Compiler flag to generate shared objects directly from archives.
5213 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5215 # Compiler flag to generate thread-safe objects.
5216 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5218 # Library versioning type.
5219 version_type=$version_type
5221 # Format of library name prefix.
5222 libname_spec=$lt_libname_spec
5224 # List of archive names. First name is the real one, the rest are links.
5225 # The last name is the one that the linker finds with -lNAME.
5226 library_names_spec=$lt_library_names_spec
5228 # The coded name of the library, if different from the real name.
5229 soname_spec=$lt_soname_spec
5231 # Commands used to build and install an old-style archive.
5232 RANLIB=$lt_RANLIB
5233 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5234 old_postinstall_cmds=$lt_old_postinstall_cmds
5235 old_postuninstall_cmds=$lt_old_postuninstall_cmds
5237 # Create an old-style archive from a shared archive.
5238 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5240 # Create a temporary old-style archive to link instead of a shared archive.
5241 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5243 # Commands used to build and install a shared archive.
5244 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5245 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5246 postinstall_cmds=$lt_postinstall_cmds
5247 postuninstall_cmds=$lt_postuninstall_cmds
5249 # Commands used to build a loadable module (assumed same as above if empty)
5250 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5251 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5253 # Commands to strip libraries.
5254 old_striplib=$lt_old_striplib
5255 striplib=$lt_striplib
5257 # Dependencies to place before the objects being linked to create a
5258 # shared library.
5259 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5261 # Dependencies to place after the objects being linked to create a
5262 # shared library.
5263 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5265 # Dependencies to place before the objects being linked to create a
5266 # shared library.
5267 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5269 # Dependencies to place after the objects being linked to create a
5270 # shared library.
5271 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5273 # The directories searched by this compiler when creating a shared
5274 # library
5275 compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
5277 # The library search path used internally by the compiler when linking
5278 # a shared library.
5279 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5281 # Method to check whether dependent libraries are shared objects.
5282 deplibs_check_method=$lt_deplibs_check_method
5284 # Command to use when deplibs_check_method == file_magic.
5285 file_magic_cmd=$lt_file_magic_cmd
5287 # Flag that allows shared libraries with undefined symbols to be built.
5288 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5290 # Flag that forces no undefined symbols.
5291 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5293 # Commands used to finish a libtool library installation in a directory.
5294 finish_cmds=$lt_finish_cmds
5296 # Same as above, but a single script fragment to be evaled but not shown.
5297 finish_eval=$lt_finish_eval
5299 # Take the output of nm and produce a listing of raw symbols and C names.
5300 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5302 # Transform the output of nm in a proper C declaration
5303 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5305 # Transform the output of nm in a C name address pair
5306 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5308 # This is the shared library runtime path variable.
5309 runpath_var=$runpath_var
5311 # This is the shared library path variable.
5312 shlibpath_var=$shlibpath_var
5314 # Is shlibpath searched before the hard-coded library search path?
5315 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5317 # How to hardcode a shared library path into an executable.
5318 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5320 # Whether we should hardcode library paths into libraries.
5321 hardcode_into_libs=$hardcode_into_libs
5323 # Flag to hardcode \$libdir into a binary during linking.
5324 # This must work even if \$libdir does not exist.
5325 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5327 # If ld is used when linking, flag to hardcode \$libdir into
5328 # a binary during linking. This must work even if \$libdir does
5329 # not exist.
5330 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5332 # Whether we need a single -rpath flag with a separated argument.
5333 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5335 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5336 # resulting binary.
5337 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5339 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5340 # resulting binary.
5341 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5343 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5344 # the resulting binary.
5345 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5347 # Set to yes if building a shared library automatically hardcodes DIR into the library
5348 # and all subsequent libraries and executables linked against it.
5349 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5351 # Variables whose values should be saved in libtool wrapper scripts and
5352 # restored at relink time.
5353 variables_saved_for_relink="$variables_saved_for_relink"
5355 # Whether libtool must link a program against all its dependency libraries.
5356 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5358 # Compile-time system search path for libraries
5359 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5361 # Run-time system search path for libraries
5362 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5364 # Fix the shell variable \$srcfile for the compiler.
5365 fix_srcfile_path=$lt_fix_srcfile_path
5367 # Set to yes if exported symbols are required.
5368 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5370 # The commands to list exported symbols.
5371 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5373 # The commands to extract the exported symbol list from a shared archive.
5374 extract_expsyms_cmds=$lt_extract_expsyms_cmds
5376 # Symbols that should not be listed in the preloaded symbols.
5377 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5379 # Symbols that must always be exported.
5380 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5382 ifelse([$1],[],
5383 [# ### END LIBTOOL CONFIG],
5384 [# ### END LIBTOOL TAG CONFIG: $tagname])
5386 __EOF__
5388 ifelse([$1],[], [
5389 case $host_os in
5390 aix3*)
5391 cat <<\EOF >> "$cfgfile"
5393 # AIX sometimes has problems with the GCC collect2 program. For some
5394 # reason, if we set the COLLECT_NAMES environment variable, the problems
5395 # vanish in a puff of smoke.
5396 if test "X${COLLECT_NAMES+set}" != Xset; then
5397 COLLECT_NAMES=
5398 export COLLECT_NAMES
5399 fi
5400 EOF
5401 ;;
5402 esac
5404 # We use sed instead of cat because bash on DJGPP gets confused if
5405 # if finds mixed CR/LF and LF-only lines. Since sed operates in
5406 # text mode, it properly converts lines to CR/LF. This bash problem
5407 # is reportedly fixed, but why not run on old versions too?
5408 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5410 mv -f "$cfgfile" "$ofile" || \
5411 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5412 chmod +x "$ofile"
5413 ])
5414 else
5415 # If there is no Makefile yet, we rely on a make rule to execute
5416 # `config.status --recheck' to rerun these tests and create the
5417 # libtool script then.
5418 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5419 if test -f "$ltmain_in"; then
5420 test -f Makefile && make "$ltmain"
5421 fi
5422 fi
5423 ])# AC_LIBTOOL_CONFIG
5426 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5427 # -------------------------------------------
5428 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5429 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5431 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5433 if test "$GCC" = yes; then
5434 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5436 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5437 lt_cv_prog_compiler_rtti_exceptions,
5438 [-fno-rtti -fno-exceptions], [],
5439 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5440 fi
5441 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5444 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5445 # ---------------------------------
5446 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5447 [AC_REQUIRE([AC_CANONICAL_HOST])
5448 AC_REQUIRE([LT_AC_PROG_SED])
5449 AC_REQUIRE([AC_PROG_NM])
5450 AC_REQUIRE([AC_OBJEXT])
5451 # Check for command to grab the raw symbol name followed by C symbol from nm.
5452 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5453 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5454 [
5455 # These are sane defaults that work on at least a few old systems.
5456 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
5458 # Character class describing NM global symbol codes.
5459 symcode='[[BCDEGRST]]'
5461 # Regexp to match symbols that can be accessed directly from C.
5462 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5464 # Transform an extracted symbol line into a proper C declaration
5465 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5467 # Transform an extracted symbol line into symbol name and symbol address
5468 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
5470 # Define system-specific variables.
5471 case $host_os in
5472 aix*)
5473 symcode='[[BCDT]]'
5474 ;;
5475 cygwin* | mingw* | pw32*)
5476 symcode='[[ABCDGISTW]]'
5477 ;;
5478 hpux*) # Its linker distinguishes data from code symbols
5479 if test "$host_cpu" = ia64; then
5480 symcode='[[ABCDEGRST]]'
5481 fi
5482 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5483 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
5484 ;;
5485 linux* | k*bsd*-gnu)
5486 if test "$host_cpu" = ia64; then
5487 symcode='[[ABCDGIRSTW]]'
5488 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5489 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
5490 fi
5491 ;;
5492 irix* | nonstopux*)
5493 symcode='[[BCDEGRST]]'
5494 ;;
5495 osf*)
5496 symcode='[[BCDEGQRST]]'
5497 ;;
5498 solaris*)
5499 symcode='[[BDRT]]'
5500 ;;
5501 sco3.2v5*)
5502 symcode='[[DT]]'
5503 ;;
5504 sysv4.2uw2*)
5505 symcode='[[DT]]'
5506 ;;
5507 sysv5* | sco5v6* | unixware* | OpenUNIX*)
5508 symcode='[[ABDT]]'
5509 ;;
5510 sysv4)
5511 symcode='[[DFNSTU]]'
5512 ;;
5513 esac
5515 # Handle CRLF in mingw tool chain
5516 opt_cr=
5517 case $build_os in
5518 mingw*)
5519 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5520 ;;
5521 esac
5523 # If we're using GNU nm, then use its standard symbol codes.
5524 case `$NM -V 2>&1` in
5525 *GNU* | *'with BFD'*)
5526 symcode='[[ABCDGIRSTW]]' ;;
5527 esac
5529 # Try without a prefix undercore, then with it.
5530 for ac_symprfx in "" "_"; do
5532 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5533 symxfrm="\\1 $ac_symprfx\\2 \\2"
5535 # Write the raw and C identifiers.
5536 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5538 # Check to see that the pipe works correctly.
5539 pipe_works=no
5541 rm -f conftest*
5542 cat > conftest.$ac_ext <<EOF
5543 #ifdef __cplusplus
5544 extern "C" {
5545 #endif
5546 char nm_test_var;
5547 void nm_test_func(){}
5548 #ifdef __cplusplus
5549 }
5550 #endif
5551 int main(){nm_test_var='a';nm_test_func();return(0);}
5552 EOF
5554 if AC_TRY_EVAL(ac_compile); then
5555 # Now try to grab the symbols.
5556 nlist=conftest.nm
5557 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5558 # Try sorting and uniquifying the output.
5559 if sort "$nlist" | uniq > "$nlist"T; then
5560 mv -f "$nlist"T "$nlist"
5561 else
5562 rm -f "$nlist"T
5563 fi
5565 # Make sure that we snagged all the symbols we need.
5566 if grep ' nm_test_var$' "$nlist" >/dev/null; then
5567 if grep ' nm_test_func$' "$nlist" >/dev/null; then
5568 cat <<EOF > conftest.$ac_ext
5569 #ifdef __cplusplus
5570 extern "C" {
5571 #endif
5573 EOF
5574 # Now generate the symbol file.
5575 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5577 cat <<EOF >> conftest.$ac_ext
5578 #if defined (__STDC__) && __STDC__
5579 # define lt_ptr_t void *
5580 #else
5581 # define lt_ptr_t char *
5582 # define const
5583 #endif
5585 /* The mapping between symbol names and symbols. */
5586 const struct {
5587 const char *name;
5588 lt_ptr_t address;
5589 }
5590 lt_preloaded_symbols[[]] =
5591 {
5592 EOF
5593 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5594 cat <<\EOF >> conftest.$ac_ext
5595 {0, (lt_ptr_t) 0}
5596 };
5598 #ifdef __cplusplus
5599 }
5600 #endif
5601 EOF
5602 # Now try linking the two files.
5603 mv conftest.$ac_objext conftstm.$ac_objext
5604 lt_save_LIBS="$LIBS"
5605 lt_save_CFLAGS="$CFLAGS"
5606 LIBS="conftstm.$ac_objext"
5607 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5608 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5609 pipe_works=yes
5610 fi
5611 LIBS="$lt_save_LIBS"
5612 CFLAGS="$lt_save_CFLAGS"
5613 else
5614 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5615 fi
5616 else
5617 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5618 fi
5619 else
5620 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5621 fi
5622 else
5623 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5624 cat conftest.$ac_ext >&5
5625 fi
5626 rm -rf conftest* conftst*
5628 # Do not use the global_symbol_pipe unless it works.
5629 if test "$pipe_works" = yes; then
5630 break
5631 else
5632 lt_cv_sys_global_symbol_pipe=
5633 fi
5634 done
5635 ])
5636 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5637 lt_cv_sys_global_symbol_to_cdecl=
5638 fi
5639 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5640 AC_MSG_RESULT(failed)
5641 else
5642 AC_MSG_RESULT(ok)
5643 fi
5644 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5647 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5648 # ---------------------------------------
5649 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5650 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5651 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5652 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5654 AC_MSG_CHECKING([for $compiler option to produce PIC])
5655 ifelse([$1],[CXX],[
5656 # C++ specific cases for pic, static, wl, etc.
5657 if test "$GXX" = yes; then
5658 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5659 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5661 case $host_os in
5662 aix*)
5663 # All AIX code is PIC.
5664 if test "$host_cpu" = ia64; then
5665 # AIX 5 now supports IA64 processor
5666 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5667 fi
5668 ;;
5669 amigaos*)
5670 # FIXME: we need at least 68020 code to build shared libraries, but
5671 # adding the `-m68020' flag to GCC prevents building anything better,
5672 # like `-m68040'.
5673 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5674 ;;
5675 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5676 # PIC is the default for these OSes.
5677 ;;
5678 mingw* | cygwin* | os2* | pw32*)
5679 # This hack is so that the source file can tell whether it is being
5680 # built for inclusion in a dll (and should export symbols for example).
5681 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5682 # (--disable-auto-import) libraries
5683 m4_if([$1], [GCJ], [],
5684 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5685 ;;
5686 darwin* | rhapsody*)
5687 # PIC is the default on this platform
5688 # Common symbols not allowed in MH_DYLIB files
5689 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5690 ;;
5691 *djgpp*)
5692 # DJGPP does not support shared libraries at all
5693 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5694 ;;
5695 interix[[3-9]]*)
5696 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5697 # Instead, we relocate shared libraries at runtime.
5698 ;;
5699 sysv4*MP*)
5700 if test -d /usr/nec; then
5701 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5702 fi
5703 ;;
5704 hpux*)
5705 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5706 # not for PA HP-UX.
5707 case $host_cpu in
5708 hppa*64*|ia64*)
5709 ;;
5710 *)
5711 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5712 ;;
5713 esac
5714 ;;
5715 *)
5716 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5717 ;;
5718 esac
5719 else
5720 case $host_os in
5721 aix[[4-9]]*)
5722 # All AIX code is PIC.
5723 if test "$host_cpu" = ia64; then
5724 # AIX 5 now supports IA64 processor
5725 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5726 else
5727 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5728 fi
5729 ;;
5730 chorus*)
5731 case $cc_basename in
5732 cxch68*)
5733 # Green Hills C++ Compiler
5734 # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
5735 ;;
5736 esac
5737 ;;
5738 darwin*)
5739 # PIC is the default on this platform
5740 # Common symbols not allowed in MH_DYLIB files
5741 case $cc_basename in
5742 xlc*)
5743 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5744 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5745 ;;
5746 esac
5747 ;;
5748 dgux*)
5749 case $cc_basename in
5750 ec++*)
5751 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5752 ;;
5753 ghcx*)
5754 # Green Hills C++ Compiler
5755 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5756 ;;
5757 *)
5758 ;;
5759 esac
5760 ;;
5761 freebsd* | dragonfly*)
5762 # FreeBSD uses GNU C++
5763 ;;
5764 hpux9* | hpux10* | hpux11*)
5765 case $cc_basename in
5766 CC*)
5767 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5768 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5769 if test "$host_cpu" != ia64; then
5770 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5771 fi
5772 ;;
5773 aCC*)
5774 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5775 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5776 case $host_cpu in
5777 hppa*64*|ia64*)
5778 # +Z the default
5779 ;;
5780 *)
5781 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5782 ;;
5783 esac
5784 ;;
5785 *)
5786 ;;
5787 esac
5788 ;;
5789 interix*)
5790 # This is c89, which is MS Visual C++ (no shared libs)
5791 # Anyone wants to do a port?
5792 ;;
5793 irix5* | irix6* | nonstopux*)
5794 case $cc_basename in
5795 CC*)
5796 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5797 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5798 # CC pic flag -KPIC is the default.
5799 ;;
5800 *)
5801 ;;
5802 esac
5803 ;;
5804 linux* | k*bsd*-gnu)
5805 case $cc_basename in
5806 KCC*)
5807 # KAI C++ Compiler
5808 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5809 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5810 ;;
5811 icpc* | ecpc*)
5812 # Intel C++
5813 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5814 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5815 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5816 ;;
5817 pgCC* | pgcpp*)
5818 # Portland Group C++ compiler.
5819 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5820 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5821 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5822 ;;
5823 cxx*)
5824 # Compaq C++
5825 # Make sure the PIC flag is empty. It appears that all Alpha
5826 # Linux and Compaq Tru64 Unix objects are PIC.
5827 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5828 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5829 ;;
5830 *)
5831 case `$CC -V 2>&1 | sed 5q` in
5832 *Sun\ C*)
5833 # Sun C++ 5.9
5834 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5835 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5836 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5837 ;;
5838 esac
5839 ;;
5840 esac
5841 ;;
5842 lynxos*)
5843 ;;
5844 m88k*)
5845 ;;
5846 mvs*)
5847 case $cc_basename in
5848 cxx*)
5849 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5850 ;;
5851 *)
5852 ;;
5853 esac
5854 ;;
5855 netbsd* | netbsdelf*-gnu)
5856 ;;
5857 osf3* | osf4* | osf5*)
5858 case $cc_basename in
5859 KCC*)
5860 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5861 ;;
5862 RCC*)
5863 # Rational C++ 2.4.1
5864 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5865 ;;
5866 cxx*)
5867 # Digital/Compaq C++
5868 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5869 # Make sure the PIC flag is empty. It appears that all Alpha
5870 # Linux and Compaq Tru64 Unix objects are PIC.
5871 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5872 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5873 ;;
5874 *)
5875 ;;
5876 esac
5877 ;;
5878 psos*)
5879 ;;
5880 solaris*)
5881 case $cc_basename in
5882 CC*)
5883 # Sun C++ 4.2, 5.x and Centerline C++
5884 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5885 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5886 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5887 ;;
5888 gcx*)
5889 # Green Hills C++ Compiler
5890 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5891 ;;
5892 *)
5893 ;;
5894 esac
5895 ;;
5896 sunos4*)
5897 case $cc_basename in
5898 CC*)
5899 # Sun C++ 4.x
5900 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5901 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5902 ;;
5903 lcc*)
5904 # Lucid
5905 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5906 ;;
5907 *)
5908 ;;
5909 esac
5910 ;;
5911 tandem*)
5912 case $cc_basename in
5913 NCC*)
5914 # NonStop-UX NCC 3.20
5915 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5916 ;;
5917 *)
5918 ;;
5919 esac
5920 ;;
5921 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5922 case $cc_basename in
5923 CC*)
5924 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5925 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5926 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5927 ;;
5928 esac
5929 ;;
5930 vxworks*)
5931 ;;
5932 *)
5933 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5934 ;;
5935 esac
5936 fi
5937 ],
5938 [
5939 if test "$GCC" = yes; then
5940 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5941 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5943 case $host_os in
5944 aix*)
5945 # All AIX code is PIC.
5946 if test "$host_cpu" = ia64; then
5947 # AIX 5 now supports IA64 processor
5948 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5949 fi
5950 ;;
5952 amigaos*)
5953 # FIXME: we need at least 68020 code to build shared libraries, but
5954 # adding the `-m68020' flag to GCC prevents building anything better,
5955 # like `-m68040'.
5956 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5957 ;;
5959 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5960 # PIC is the default for these OSes.
5961 ;;
5963 mingw* | cygwin* | pw32* | os2*)
5964 # This hack is so that the source file can tell whether it is being
5965 # built for inclusion in a dll (and should export symbols for example).
5966 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5967 # (--disable-auto-import) libraries
5968 m4_if([$1], [GCJ], [],
5969 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5970 ;;
5972 darwin* | rhapsody*)
5973 # PIC is the default on this platform
5974 # Common symbols not allowed in MH_DYLIB files
5975 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5976 ;;
5978 interix[[3-9]]*)
5979 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5980 # Instead, we relocate shared libraries at runtime.
5981 ;;
5983 msdosdjgpp*)
5984 # Just because we use GCC doesn't mean we suddenly get shared libraries
5985 # on systems that don't support them.
5986 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5987 enable_shared=no
5988 ;;
5990 sysv4*MP*)
5991 if test -d /usr/nec; then
5992 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5993 fi
5994 ;;
5996 hpux*)
5997 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5998 # not for PA HP-UX.
5999 case $host_cpu in
6000 hppa*64*|ia64*)
6001 # +Z the default
6002 ;;
6003 *)
6004 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6005 ;;
6006 esac
6007 ;;
6009 *)
6010 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6011 ;;
6012 esac
6013 else
6014 # PORTME Check for flag to pass linker flags through the system compiler.
6015 case $host_os in
6016 aix*)
6017 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6018 if test "$host_cpu" = ia64; then
6019 # AIX 5 now supports IA64 processor
6020 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6021 else
6022 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6023 fi
6024 ;;
6025 darwin*)
6026 # PIC is the default on this platform
6027 # Common symbols not allowed in MH_DYLIB files
6028 case $cc_basename in
6029 xlc*)
6030 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6031 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6032 ;;
6033 esac
6034 ;;
6036 mingw* | cygwin* | pw32* | os2*)
6037 # This hack is so that the source file can tell whether it is being
6038 # built for inclusion in a dll (and should export symbols for example).
6039 m4_if([$1], [GCJ], [],
6040 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6041 ;;
6043 hpux9* | hpux10* | hpux11*)
6044 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6045 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6046 # not for PA HP-UX.
6047 case $host_cpu in
6048 hppa*64*|ia64*)
6049 # +Z the default
6050 ;;
6051 *)
6052 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6053 ;;
6054 esac
6055 # Is there a better lt_prog_compiler_static that works with the bundled CC?
6056 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6057 ;;
6059 irix5* | irix6* | nonstopux*)
6060 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6061 # PIC (with -KPIC) is the default.
6062 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6063 ;;
6065 newsos6)
6066 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6067 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6068 ;;
6070 linux* | k*bsd*-gnu)
6071 case $cc_basename in
6072 icc* | ecc*)
6073 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6074 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6075 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6076 ;;
6077 pgcc* | pgf77* | pgf90* | pgf95*)
6078 # Portland Group compilers (*not* the Pentium gcc compiler,
6079 # which looks to be a dead project)
6080 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6081 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6082 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6083 ;;
6084 ccc*)
6085 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6086 # All Alpha code is PIC.
6087 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6088 ;;
6089 *)
6090 case `$CC -V 2>&1 | sed 5q` in
6091 *Sun\ C*)
6092 # Sun C 5.9
6093 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6094 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6095 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6096 ;;
6097 *Sun\ F*)
6098 # Sun Fortran 8.3 passes all unrecognized flags to the linker
6099 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6100 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6101 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
6102 ;;
6103 esac
6104 ;;
6105 esac
6106 ;;
6108 osf3* | osf4* | osf5*)
6109 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6110 # All OSF/1 code is PIC.
6111 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6112 ;;
6114 rdos*)
6115 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6116 ;;
6118 solaris*)
6119 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6120 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6121 case $cc_basename in
6122 f77* | f90* | f95*)
6123 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6124 *)
6125 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6126 esac
6127 ;;
6129 sunos4*)
6130 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6131 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6132 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6133 ;;
6135 sysv4 | sysv4.2uw2* | sysv4.3*)
6136 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6137 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6138 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6139 ;;
6141 sysv4*MP*)
6142 if test -d /usr/nec ;then
6143 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6144 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6145 fi
6146 ;;
6148 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6149 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6150 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6151 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6152 ;;
6154 unicos*)
6155 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6156 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6157 ;;
6159 uts4*)
6160 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6161 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6162 ;;
6164 *)
6165 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6166 ;;
6167 esac
6168 fi
6169 ])
6170 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
6172 #
6173 # Check to make sure the PIC flag actually works.
6174 #
6175 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
6176 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
6177 _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
6178 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
6179 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
6180 "" | " "*) ;;
6181 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6182 esac],
6183 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6184 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6185 fi
6186 case $host_os in
6187 # For platforms which do not support PIC, -DPIC is meaningless:
6188 *djgpp*)
6189 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6190 ;;
6191 *)
6192 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
6193 ;;
6194 esac
6196 #
6197 # Check to make sure the static flag actually works.
6198 #
6199 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
6200 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6201 _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
6202 $lt_tmp_static_flag,
6203 [],
6204 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
6205 ])
6208 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
6209 # ------------------------------------
6210 # See if the linker supports building shared libraries.
6211 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
6212 [AC_REQUIRE([LT_AC_PROG_SED])dnl
6213 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6214 ifelse([$1],[CXX],[
6215 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6216 case $host_os in
6217 aix[[4-9]]*)
6218 # If we're using GNU nm, then we don't want the "-C" option.
6219 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6220 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6221 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6222 else
6223 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6224 fi
6225 ;;
6226 pw32*)
6227 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6228 ;;
6229 cygwin* | mingw*)
6230 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
6231 ;;
6232 linux* | k*bsd*-gnu)
6233 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
6234 ;;
6235 *)
6236 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6237 ;;
6238 esac
6239 _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6240 ],[
6241 runpath_var=
6242 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6243 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6244 _LT_AC_TAGVAR(archive_cmds, $1)=
6245 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6246 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6247 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6248 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6249 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6250 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
6251 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6252 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6253 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6254 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6255 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6256 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6257 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6258 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
6259 _LT_AC_TAGVAR(module_cmds, $1)=
6260 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
6261 _LT_AC_TAGVAR(always_export_symbols, $1)=no
6262 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6263 # include_expsyms should be a list of space-separated symbols to be *always*
6264 # included in the symbol list
6265 _LT_AC_TAGVAR(include_expsyms, $1)=
6266 # exclude_expsyms can be an extended regexp of symbols to exclude
6267 # it will be wrapped by ` (' and `)$', so one must not match beginning or
6268 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6269 # as well as any symbol that contains `d'.
6270 _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6271 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6272 # platforms (ab)use it in PIC code, but their linkers get confused if
6273 # the symbol is explicitly referenced. Since portable code cannot
6274 # rely on this symbol name, it's probably fine to never include it in
6275 # preloaded symbol tables.
6276 # Exclude shared library initialization/finalization symbols.
6277 dnl Note also adjust exclude_expsyms for C++ above.
6278 extract_expsyms_cmds=
6279 # Just being paranoid about ensuring that cc_basename is set.
6280 _LT_CC_BASENAME([$compiler])
6281 case $host_os in
6282 cygwin* | mingw* | pw32*)
6283 # FIXME: the MSVC++ port hasn't been tested in a loooong time
6284 # When not using gcc, we currently assume that we are using
6285 # Microsoft Visual C++.
6286 if test "$GCC" != yes; then
6287 with_gnu_ld=no
6288 fi
6289 ;;
6290 interix*)
6291 # we just hope/assume this is gcc and not c89 (= MSVC++)
6292 with_gnu_ld=yes
6293 ;;
6294 openbsd*)
6295 with_gnu_ld=no
6296 ;;
6297 esac
6299 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6300 if test "$with_gnu_ld" = yes; then
6301 # If archive_cmds runs LD, not CC, wlarc should be empty
6302 wlarc='${wl}'
6304 # Set some defaults for GNU ld with shared library support. These
6305 # are reset later if shared libraries are not supported. Putting them
6306 # here allows them to be overridden if necessary.
6307 runpath_var=LD_RUN_PATH
6308 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6309 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6310 # ancient GNU ld didn't support --whole-archive et. al.
6311 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6312 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6313 else
6314 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6315 fi
6316 supports_anon_versioning=no
6317 case `$LD -v 2>/dev/null` in
6318 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6319 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6320 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6321 *\ 2.11.*) ;; # other 2.11 versions
6322 *) supports_anon_versioning=yes ;;
6323 esac
6325 # See if GNU ld supports shared libraries.
6326 case $host_os in
6327 aix[[3-9]]*)
6328 # On AIX/PPC, the GNU linker is very broken
6329 if test "$host_cpu" != ia64; then
6330 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6331 cat <<EOF 1>&2
6333 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
6334 *** to be unable to reliably create shared libraries on AIX.
6335 *** Therefore, libtool is disabling shared libraries support. If you
6336 *** really care for shared libraries, you may want to modify your PATH
6337 *** so that a non-GNU linker is found, and then restart.
6339 EOF
6340 fi
6341 ;;
6343 amigaos*)
6344 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6345 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6346 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6348 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6349 # that the semantics of dynamic libraries on AmigaOS, at least up
6350 # to version 4, is to share data among multiple programs linked
6351 # with the same dynamic library. Since this doesn't match the
6352 # behavior of shared libraries on other platforms, we can't use
6353 # them.
6354 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6355 ;;
6357 beos*)
6358 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6359 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6360 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6361 # support --undefined. This deserves some investigation. FIXME
6362 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6363 else
6364 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6365 fi
6366 ;;
6368 cygwin* | mingw* | pw32*)
6369 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6370 # as there is no search path for DLLs.
6371 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6372 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6373 _LT_AC_TAGVAR(always_export_symbols, $1)=no
6374 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6375 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
6377 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6378 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6379 # If the export-symbols file already is a .def file (1st line
6380 # is EXPORTS), use it as is; otherwise, prepend...
6381 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6382 cp $export_symbols $output_objdir/$soname.def;
6383 else
6384 echo EXPORTS > $output_objdir/$soname.def;
6385 cat $export_symbols >> $output_objdir/$soname.def;
6386 fi~
6387 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6388 else
6389 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6390 fi
6391 ;;
6393 interix[[3-9]]*)
6394 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6395 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6396 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6397 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6398 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6399 # Instead, shared libraries are loaded at an image base (0x10000000 by
6400 # default) and relocated if they conflict, which is a slow very memory
6401 # consuming and fragmenting process. To avoid this, we pick a random,
6402 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6403 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6404 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6405 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6406 ;;
6408 gnu* | linux* | k*bsd*-gnu)
6409 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6410 tmp_addflag=
6411 case $cc_basename,$host_cpu in
6412 pgcc*) # Portland Group C compiler
6413 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6414 tmp_addflag=' $pic_flag'
6415 ;;
6416 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
6417 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6418 tmp_addflag=' $pic_flag -Mnomain' ;;
6419 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
6420 tmp_addflag=' -i_dynamic' ;;
6421 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
6422 tmp_addflag=' -i_dynamic -nofor_main' ;;
6423 ifc* | ifort*) # Intel Fortran compiler
6424 tmp_addflag=' -nofor_main' ;;
6425 esac
6426 case `$CC -V 2>&1 | sed 5q` in
6427 *Sun\ C*) # Sun C 5.9
6428 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6429 tmp_sharedflag='-G' ;;
6430 *Sun\ F*) # Sun Fortran 8.3
6431 tmp_sharedflag='-G' ;;
6432 *)
6433 tmp_sharedflag='-shared' ;;
6434 esac
6435 _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6437 if test $supports_anon_versioning = yes; then
6438 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6439 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6440 $echo "local: *; };" >> $output_objdir/$libname.ver~
6441 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6442 fi
6443 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
6444 else
6445 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6446 fi
6447 ;;
6449 netbsd* | netbsdelf*-gnu)
6450 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6451 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6452 wlarc=
6453 else
6454 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6455 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6456 fi
6457 ;;
6459 solaris*)
6460 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6461 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6462 cat <<EOF 1>&2
6464 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6465 *** create shared libraries on Solaris systems. Therefore, libtool
6466 *** is disabling shared libraries support. We urge you to upgrade GNU
6467 *** binutils to release 2.9.1 or newer. Another option is to modify
6468 *** your PATH or compiler configuration so that the native linker is
6469 *** used, and then restart.
6471 EOF
6472 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6473 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6474 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6475 else
6476 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6477 fi
6478 ;;
6480 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6481 case `$LD -v 2>&1` in
6482 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6483 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6484 cat <<_LT_EOF 1>&2
6486 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6487 *** reliably create shared libraries on SCO systems. Therefore, libtool
6488 *** is disabling shared libraries support. We urge you to upgrade GNU
6489 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
6490 *** your PATH or compiler configuration so that the native linker is
6491 *** used, and then restart.
6493 _LT_EOF
6494 ;;
6495 *)
6496 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6497 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
6498 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
6499 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
6500 else
6501 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6502 fi
6503 ;;
6504 esac
6505 ;;
6507 sunos4*)
6508 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6509 wlarc=
6510 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6511 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6512 ;;
6514 *)
6515 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6516 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6517 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6518 else
6519 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6520 fi
6521 ;;
6522 esac
6524 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
6525 runpath_var=
6526 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6527 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6528 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6529 fi
6530 else
6531 # PORTME fill in a description of your system's linker (not GNU ld)
6532 case $host_os in
6533 aix3*)
6534 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6535 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6536 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
6537 # Note: this linker hardcodes the directories in LIBPATH if there
6538 # are no directories specified by -L.
6539 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6540 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6541 # Neither direct hardcoding nor static linking is supported with a
6542 # broken collect2.
6543 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6544 fi
6545 ;;
6547 aix[[4-9]]*)
6548 if test "$host_cpu" = ia64; then
6549 # On IA64, the linker does run time linking by default, so we don't
6550 # have to do anything special.
6551 aix_use_runtimelinking=no
6552 exp_sym_flag='-Bexport'
6553 no_entry_flag=""
6554 else
6555 # If we're using GNU nm, then we don't want the "-C" option.
6556 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6557 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6558 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6559 else
6560 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6561 fi
6562 aix_use_runtimelinking=no
6564 # Test if we are trying to use run time linking or normal
6565 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6566 # need to do runtime linking.
6567 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6568 for ld_flag in $LDFLAGS; do
6569 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6570 aix_use_runtimelinking=yes
6571 break
6572 fi
6573 done
6574 ;;
6575 esac
6577 exp_sym_flag='-bexport'
6578 no_entry_flag='-bnoentry'
6579 fi
6581 # When large executables or shared objects are built, AIX ld can
6582 # have problems creating the table of contents. If linking a library
6583 # or program results in "error TOC overflow" add -mminimal-toc to
6584 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6585 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6587 _LT_AC_TAGVAR(archive_cmds, $1)=''
6588 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6589 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6590 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6592 if test "$GCC" = yes; then
6593 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6594 # We only want to do this on AIX 4.2 and lower, the check
6595 # below for broken collect2 doesn't work under 4.3+
6596 collect2name=`${CC} -print-prog-name=collect2`
6597 if test -f "$collect2name" && \
6598 strings "$collect2name" | grep resolve_lib_name >/dev/null
6599 then
6600 # We have reworked collect2
6601 :
6602 else
6603 # We have old collect2
6604 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6605 # It fails to find uninstalled libraries when the uninstalled
6606 # path is not listed in the libpath. Setting hardcode_minus_L
6607 # to unsupported forces relinking
6608 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6609 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6610 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6611 fi
6612 ;;
6613 esac
6614 shared_flag='-shared'
6615 if test "$aix_use_runtimelinking" = yes; then
6616 shared_flag="$shared_flag "'${wl}-G'
6617 fi
6618 else
6619 # not using gcc
6620 if test "$host_cpu" = ia64; then
6621 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6622 # chokes on -Wl,-G. The following line is correct:
6623 shared_flag='-G'
6624 else
6625 if test "$aix_use_runtimelinking" = yes; then
6626 shared_flag='${wl}-G'
6627 else
6628 shared_flag='${wl}-bM:SRE'
6629 fi
6630 fi
6631 fi
6633 # It seems that -bexpall does not export symbols beginning with
6634 # underscore (_), so it is better to generate a list of symbols to export.
6635 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6636 if test "$aix_use_runtimelinking" = yes; then
6637 # Warning - without using the other runtime loading flags (-brtl),
6638 # -berok will link without error, but may produce a broken library.
6639 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6640 # Determine the default libpath from the value encoded in an empty executable.
6641 _LT_AC_SYS_LIBPATH_AIX
6642 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6643 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6644 else
6645 if test "$host_cpu" = ia64; then
6646 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6647 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6648 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6649 else
6650 # Determine the default libpath from the value encoded in an empty executable.
6651 _LT_AC_SYS_LIBPATH_AIX
6652 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6653 # Warning - without using the other run time loading flags,
6654 # -berok will link without error, but may produce a broken library.
6655 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6656 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6657 # Exported symbols can be pulled into shared objects from archives
6658 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6659 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6660 # This is similar to how AIX traditionally builds its shared libraries.
6661 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6662 fi
6663 fi
6664 ;;
6666 amigaos*)
6667 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6668 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6669 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6670 # see comment about different semantics on the GNU ld section
6671 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6672 ;;
6674 bsdi[[45]]*)
6675 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6676 ;;
6678 cygwin* | mingw* | pw32*)
6679 # When not using gcc, we currently assume that we are using
6680 # Microsoft Visual C++.
6681 # hardcode_libdir_flag_spec is actually meaningless, as there is
6682 # no search path for DLLs.
6683 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6684 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6685 # Tell ltmain to make .lib files, not .a files.
6686 libext=lib
6687 # Tell ltmain to make .dll files, not .so files.
6688 shrext_cmds=".dll"
6689 # FIXME: Setting linknames here is a bad hack.
6690 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6691 # The linker will automatically build a .lib file if we build a DLL.
6692 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6693 # FIXME: Should let the user specify the lib program.
6694 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6695 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6696 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6697 ;;
6699 darwin* | rhapsody*)
6700 case $host_os in
6701 rhapsody* | darwin1.[[012]])
6702 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
6703 ;;
6704 *) # Darwin 1.3 on
6705 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6706 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6707 else
6708 case ${MACOSX_DEPLOYMENT_TARGET} in
6709 10.[[012]])
6710 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6711 ;;
6712 10.*)
6713 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
6714 ;;
6715 esac
6716 fi
6717 ;;
6718 esac
6719 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6720 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6721 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6722 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6723 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6724 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6725 if test "$GCC" = yes ; then
6726 output_verbose_link_cmd='echo'
6727 _LT_AC_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}"
6728 _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
6729 _LT_AC_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}"
6730 _LT_AC_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}"
6731 else
6732 case $cc_basename in
6733 xlc*)
6734 output_verbose_link_cmd='echo'
6735 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
6736 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6737 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6738 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6739 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6740 ;;
6741 *)
6742 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6743 ;;
6744 esac
6745 fi
6746 ;;
6748 dgux*)
6749 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6750 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6751 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6752 ;;
6754 freebsd1*)
6755 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6756 ;;
6758 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6759 # support. Future versions do this automatically, but an explicit c++rt0.o
6760 # does not break anything, and helps significantly (at the cost of a little
6761 # extra space).
6762 freebsd2.2*)
6763 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6764 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6765 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6766 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6767 ;;
6769 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6770 freebsd2*)
6771 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6772 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6773 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6774 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6775 ;;
6777 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6778 freebsd* | dragonfly*)
6779 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6780 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6781 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6782 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6783 ;;
6785 hpux9*)
6786 if test "$GCC" = yes; then
6787 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6788 else
6789 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6790 fi
6791 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6792 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6793 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6795 # hardcode_minus_L: Not really in the search PATH,
6796 # but as the default location of the library.
6797 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6798 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6799 ;;
6801 hpux10*)
6802 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6803 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6804 else
6805 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6806 fi
6807 if test "$with_gnu_ld" = no; then
6808 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6809 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6811 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6812 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6814 # hardcode_minus_L: Not really in the search PATH,
6815 # but as the default location of the library.
6816 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6817 fi
6818 ;;
6820 hpux11*)
6821 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6822 case $host_cpu in
6823 hppa*64*)
6824 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6825 ;;
6826 ia64*)
6827 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6828 ;;
6829 *)
6830 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6831 ;;
6832 esac
6833 else
6834 case $host_cpu in
6835 hppa*64*)
6836 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6837 ;;
6838 ia64*)
6839 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6840 ;;
6841 *)
6842 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6843 ;;
6844 esac
6845 fi
6846 if test "$with_gnu_ld" = no; then
6847 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6848 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6850 case $host_cpu in
6851 hppa*64*|ia64*)
6852 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6853 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6854 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6855 ;;
6856 *)
6857 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6858 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6860 # hardcode_minus_L: Not really in the search PATH,
6861 # but as the default location of the library.
6862 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6863 ;;
6864 esac
6865 fi
6866 ;;
6868 irix5* | irix6* | nonstopux*)
6869 if test "$GCC" = yes; then
6870 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6871 else
6872 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6873 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6874 fi
6875 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6876 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6877 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6878 ;;
6880 netbsd* | netbsdelf*-gnu)
6881 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6882 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6883 else
6884 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6885 fi
6886 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6887 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6888 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6889 ;;
6891 newsos6)
6892 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6893 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6894 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6895 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6896 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6897 ;;
6899 openbsd*)
6900 if test -f /usr/libexec/ld.so; then
6901 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6902 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6903 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6904 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6905 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6906 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6907 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6908 else
6909 case $host_os in
6910 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6911 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6912 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6913 ;;
6914 *)
6915 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6916 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6917 ;;
6918 esac
6919 fi
6920 else
6921 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6922 fi
6923 ;;
6925 os2*)
6926 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6927 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6928 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6929 _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6930 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6931 ;;
6933 osf3*)
6934 if test "$GCC" = yes; then
6935 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6936 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6937 else
6938 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6939 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6940 fi
6941 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6942 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6943 ;;
6945 osf4* | osf5*) # as osf3* with the addition of -msym flag
6946 if test "$GCC" = yes; then
6947 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6948 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6949 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6950 else
6951 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6952 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6953 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6954 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
6956 # Both c and cxx compiler support -rpath directly
6957 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6958 fi
6959 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6960 ;;
6962 solaris*)
6963 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6964 if test "$GCC" = yes; then
6965 wlarc='${wl}'
6966 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6967 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6968 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6969 else
6970 wlarc=''
6971 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6972 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6973 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6974 fi
6975 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6976 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6977 case $host_os in
6978 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6979 *)
6980 # The compiler driver will combine and reorder linker options,
6981 # but understands `-z linker_flag'. GCC discards it without `$wl',
6982 # but is careful enough not to reorder.
6983 # Supported since Solaris 2.6 (maybe 2.5.1?)
6984 if test "$GCC" = yes; then
6985 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6986 else
6987 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6988 fi
6989 ;;
6990 esac
6991 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6992 ;;
6994 sunos4*)
6995 if test "x$host_vendor" = xsequent; then
6996 # Use $CC to link under sequent, because it throws in some extra .o
6997 # files that make .init and .fini sections work.
6998 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6999 else
7000 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7001 fi
7002 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7003 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7004 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7005 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7006 ;;
7008 sysv4)
7009 case $host_vendor in
7010 sni)
7011 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7012 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7013 ;;
7014 siemens)
7015 ## LD is ld it makes a PLAMLIB
7016 ## CC just makes a GrossModule.
7017 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7018 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7019 _LT_AC_TAGVAR(hardcode_direct, $1)=no
7020 ;;
7021 motorola)
7022 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7023 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7024 ;;
7025 esac
7026 runpath_var='LD_RUN_PATH'
7027 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7028 ;;
7030 sysv4.3*)
7031 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7032 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7033 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7034 ;;
7036 sysv4*MP*)
7037 if test -d /usr/nec; then
7038 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7039 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7040 runpath_var=LD_RUN_PATH
7041 hardcode_runpath_var=yes
7042 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
7043 fi
7044 ;;
7046 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7047 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7048 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7049 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7050 runpath_var='LD_RUN_PATH'
7052 if test "$GCC" = yes; then
7053 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7054 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7055 else
7056 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7057 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7058 fi
7059 ;;
7061 sysv5* | sco3.2v5* | sco5v6*)
7062 # Note: We can NOT use -z defs as we might desire, because we do not
7063 # link with -lc, and that would cause any symbols used from libc to
7064 # always be unresolved, which means just about no library would
7065 # ever link correctly. If we're not using GNU ld we use -z text
7066 # though, which does catch some bad symbols but isn't as heavy-handed
7067 # as -z defs.
7068 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7069 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7070 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7071 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7072 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
7073 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7074 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7075 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7076 runpath_var='LD_RUN_PATH'
7078 if test "$GCC" = yes; then
7079 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7080 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7081 else
7082 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7083 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7084 fi
7085 ;;
7087 uts4*)
7088 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7089 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7090 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7091 ;;
7093 *)
7094 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7095 ;;
7096 esac
7097 fi
7098 ])
7099 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
7100 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7102 #
7103 # Do we need to explicitly link libc?
7104 #
7105 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
7106 x|xyes)
7107 # Assume -lc should be added
7108 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7110 if test "$enable_shared" = yes && test "$GCC" = yes; then
7111 case $_LT_AC_TAGVAR(archive_cmds, $1) in
7112 *'~'*)
7113 # FIXME: we may have to deal with multi-command sequences.
7114 ;;
7115 '$CC '*)
7116 # Test whether the compiler implicitly links with -lc since on some
7117 # systems, -lgcc has to come before -lc. If gcc already passes -lc
7118 # to ld, don't add -lc before -lgcc.
7119 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7120 $rm conftest*
7121 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7123 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7124 soname=conftest
7125 lib=conftest
7126 libobjs=conftest.$ac_objext
7127 deplibs=
7128 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
7129 pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
7130 compiler_flags=-v
7131 linker_flags=-v
7132 verstring=
7133 output_objdir=.
7134 libname=conftest
7135 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
7136 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7137 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
7138 then
7139 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7140 else
7141 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7142 fi
7143 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7144 else
7145 cat conftest.err 1>&5
7146 fi
7147 $rm conftest*
7148 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
7149 ;;
7150 esac
7151 fi
7152 ;;
7153 esac
7154 ])# AC_LIBTOOL_PROG_LD_SHLIBS
7157 # _LT_AC_FILE_LTDLL_C
7158 # -------------------
7159 # Be careful that the start marker always follows a newline.
7160 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
7161 # /* ltdll.c starts here */
7162 # #define WIN32_LEAN_AND_MEAN
7163 # #include <windows.h>
7164 # #undef WIN32_LEAN_AND_MEAN
7165 # #include <stdio.h>
7166 #
7167 # #ifndef __CYGWIN__
7168 # # ifdef __CYGWIN32__
7169 # # define __CYGWIN__ __CYGWIN32__
7170 # # endif
7171 # #endif
7172 #
7173 # #ifdef __cplusplus
7174 # extern "C" {
7175 # #endif
7176 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7177 # #ifdef __cplusplus
7178 # }
7179 # #endif
7180 #
7181 # #ifdef __CYGWIN__
7182 # #include <cygwin/cygwin_dll.h>
7183 # DECLARE_CYGWIN_DLL( DllMain );
7184 # #endif
7185 # HINSTANCE __hDllInstance_base;
7186 #
7187 # BOOL APIENTRY
7188 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7189 # {
7190 # __hDllInstance_base = hInst;
7191 # return TRUE;
7192 # }
7193 # /* ltdll.c ends here */
7194 ])# _LT_AC_FILE_LTDLL_C
7197 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
7198 # ---------------------------------
7199 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
7202 # old names
7203 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
7204 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
7205 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
7206 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7207 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7208 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
7209 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
7211 # This is just to silence aclocal about the macro not being used
7212 ifelse([AC_DISABLE_FAST_INSTALL])
7214 AC_DEFUN([LT_AC_PROG_GCJ],
7215 [AC_CHECK_TOOL(GCJ, gcj, no)
7216 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7217 AC_SUBST(GCJFLAGS)
7218 ])
7220 AC_DEFUN([LT_AC_PROG_RC],
7221 [AC_CHECK_TOOL(RC, windres, no)
7222 ])
7225 # Cheap backport of AS_EXECUTABLE_P and required macros
7226 # from Autoconf 2.59; we should not use $as_executable_p directly.
7228 # _AS_TEST_PREPARE
7229 # ----------------
7230 m4_ifndef([_AS_TEST_PREPARE],
7231 [m4_defun([_AS_TEST_PREPARE],
7232 [if test -x / >/dev/null 2>&1; then
7233 as_executable_p='test -x'
7234 else
7235 as_executable_p='test -f'
7236 fi
7237 ])])# _AS_TEST_PREPARE
7239 # AS_EXECUTABLE_P
7240 # ---------------
7241 # Check whether a file is executable.
7242 m4_ifndef([AS_EXECUTABLE_P],
7243 [m4_defun([AS_EXECUTABLE_P],
7244 [AS_REQUIRE([_AS_TEST_PREPARE])dnl
7245 $as_executable_p $1[]dnl
7246 ])])# AS_EXECUTABLE_P
7248 # NOTE: This macro has been submitted for inclusion into #
7249 # GNU Autoconf as AC_PROG_SED. When it is available in #
7250 # a released version of Autoconf we should remove this #
7251 # macro and use it instead. #
7252 # LT_AC_PROG_SED
7253 # --------------
7254 # Check for a fully-functional sed program, that truncates
7255 # as few characters as possible. Prefer GNU sed if found.
7256 AC_DEFUN([LT_AC_PROG_SED],
7257 [AC_MSG_CHECKING([for a sed that does not truncate output])
7258 AC_CACHE_VAL(lt_cv_path_SED,
7259 [# Loop through the user's path and test for sed and gsed.
7260 # Then use that list of sed's as ones to test for truncation.
7261 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7262 for as_dir in $PATH
7263 do
7264 IFS=$as_save_IFS
7265 test -z "$as_dir" && as_dir=.
7266 for lt_ac_prog in sed gsed; do
7267 for ac_exec_ext in '' $ac_executable_extensions; do
7268 if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
7269 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7270 fi
7271 done
7272 done
7273 done
7274 IFS=$as_save_IFS
7275 lt_ac_max=0
7276 lt_ac_count=0
7277 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7278 # along with /bin/sed that truncates output.
7279 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7280 test ! -f $lt_ac_sed && continue
7281 cat /dev/null > conftest.in
7282 lt_ac_count=0
7283 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7284 # Check for GNU sed and select it if it is found.
7285 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7286 lt_cv_path_SED=$lt_ac_sed
7287 break
7288 fi
7289 while true; do
7290 cat conftest.in conftest.in >conftest.tmp
7291 mv conftest.tmp conftest.in
7292 cp conftest.in conftest.nl
7293 echo >>conftest.nl
7294 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7295 cmp -s conftest.out conftest.nl || break
7296 # 10000 chars as input seems more than enough
7297 test $lt_ac_count -gt 10 && break
7298 lt_ac_count=`expr $lt_ac_count + 1`
7299 if test $lt_ac_count -gt $lt_ac_max; then
7300 lt_ac_max=$lt_ac_count
7301 lt_cv_path_SED=$lt_ac_sed
7302 fi
7303 done
7304 done
7305 ])
7306 SED=$lt_cv_path_SED
7307 AC_SUBST([SED])
7308 AC_MSG_RESULT([$SED])
7309 ])
7311 # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
7312 #
7313 # This file is free software; the Free Software Foundation
7314 # gives unlimited permission to copy and/or distribute it,
7315 # with or without modifications, as long as this notice is preserved.
7317 # AM_AUTOMAKE_VERSION(VERSION)
7318 # ----------------------------
7319 # Automake X.Y traces this macro to ensure aclocal.m4 has been
7320 # generated from the m4 files accompanying Automake X.Y.
7321 AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
7323 # AM_SET_CURRENT_AUTOMAKE_VERSION
7324 # -------------------------------
7325 # Call AM_AUTOMAKE_VERSION so it can be traced.
7326 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
7327 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
7328 [AM_AUTOMAKE_VERSION([1.9.6])])
7330 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
7332 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
7333 #
7334 # This file is free software; the Free Software Foundation
7335 # gives unlimited permission to copy and/or distribute it,
7336 # with or without modifications, as long as this notice is preserved.
7338 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
7339 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
7340 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
7341 #
7342 # Of course, Automake must honor this variable whenever it calls a
7343 # tool from the auxiliary directory. The problem is that $srcdir (and
7344 # therefore $ac_aux_dir as well) can be either absolute or relative,
7345 # depending on how configure is run. This is pretty annoying, since
7346 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
7347 # source directory, any form will work fine, but in subdirectories a
7348 # relative path needs to be adjusted first.
7349 #
7350 # $ac_aux_dir/missing
7351 # fails when called from a subdirectory if $ac_aux_dir is relative
7352 # $top_srcdir/$ac_aux_dir/missing
7353 # fails if $ac_aux_dir is absolute,
7354 # fails when called from a subdirectory in a VPATH build with
7355 # a relative $ac_aux_dir
7356 #
7357 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
7358 # are both prefixed by $srcdir. In an in-source build this is usually
7359 # harmless because $srcdir is `.', but things will broke when you
7360 # start a VPATH build or use an absolute $srcdir.
7361 #
7362 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
7363 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
7364 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
7365 # and then we would define $MISSING as
7366 # MISSING="\${SHELL} $am_aux_dir/missing"
7367 # This will work as long as MISSING is not called from configure, because
7368 # unfortunately $(top_srcdir) has no meaning in configure.
7369 # However there are other variables, like CC, which are often used in
7370 # configure, and could therefore not use this "fixed" $ac_aux_dir.
7371 #
7372 # Another solution, used here, is to always expand $ac_aux_dir to an
7373 # absolute PATH. The drawback is that using absolute paths prevent a
7374 # configured tree to be moved without reconfiguration.
7376 AC_DEFUN([AM_AUX_DIR_EXPAND],
7377 [dnl Rely on autoconf to set up CDPATH properly.
7378 AC_PREREQ([2.50])dnl
7379 # expand $ac_aux_dir to an absolute path
7380 am_aux_dir=`cd $ac_aux_dir && pwd`
7381 ])
7383 # AM_CONDITIONAL -*- Autoconf -*-
7385 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
7386 # Free Software Foundation, Inc.
7387 #
7388 # This file is free software; the Free Software Foundation
7389 # gives unlimited permission to copy and/or distribute it,
7390 # with or without modifications, as long as this notice is preserved.
7392 # serial 7
7394 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
7395 # -------------------------------------
7396 # Define a conditional.
7397 AC_DEFUN([AM_CONDITIONAL],
7398 [AC_PREREQ(2.52)dnl
7399 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
7400 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
7401 AC_SUBST([$1_TRUE])
7402 AC_SUBST([$1_FALSE])
7403 if $2; then
7404 $1_TRUE=
7405 $1_FALSE='#'
7406 else
7407 $1_TRUE='#'
7408 $1_FALSE=
7409 fi
7410 AC_CONFIG_COMMANDS_PRE(
7411 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
7412 AC_MSG_ERROR([[conditional "$1" was never defined.
7413 Usually this means the macro was only invoked conditionally.]])
7414 fi])])
7417 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
7418 # Free Software Foundation, Inc.
7419 #
7420 # This file is free software; the Free Software Foundation
7421 # gives unlimited permission to copy and/or distribute it,
7422 # with or without modifications, as long as this notice is preserved.
7424 # serial 8
7426 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
7427 # written in clear, in which case automake, when reading aclocal.m4,
7428 # will think it sees a *use*, and therefore will trigger all it's
7429 # C support machinery. Also note that it means that autoscan, seeing
7430 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
7433 # _AM_DEPENDENCIES(NAME)
7434 # ----------------------
7435 # See how the compiler implements dependency checking.
7436 # NAME is "CC", "CXX", "GCJ", or "OBJC".
7437 # We try a few techniques and use that to set a single cache variable.
7438 #
7439 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
7440 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
7441 # dependency, and given that the user is not expected to run this macro,
7442 # just rely on AC_PROG_CC.
7443 AC_DEFUN([_AM_DEPENDENCIES],
7444 [AC_REQUIRE([AM_SET_DEPDIR])dnl
7445 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
7446 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
7447 AC_REQUIRE([AM_DEP_TRACK])dnl
7449 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
7450 [$1], CXX, [depcc="$CXX" am_compiler_list=],
7451 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
7452 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
7453 [depcc="$$1" am_compiler_list=])
7455 AC_CACHE_CHECK([dependency style of $depcc],
7456 [am_cv_$1_dependencies_compiler_type],
7457 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7458 # We make a subdir and do the tests there. Otherwise we can end up
7459 # making bogus files that we don't know about and never remove. For
7460 # instance it was reported that on HP-UX the gcc test will end up
7461 # making a dummy file named `D' -- because `-MD' means `put the output
7462 # in D'.
7463 mkdir conftest.dir
7464 # Copy depcomp to subdir because otherwise we won't find it if we're
7465 # using a relative directory.
7466 cp "$am_depcomp" conftest.dir
7467 cd conftest.dir
7468 # We will build objects and dependencies in a subdirectory because
7469 # it helps to detect inapplicable dependency modes. For instance
7470 # both Tru64's cc and ICC support -MD to output dependencies as a
7471 # side effect of compilation, but ICC will put the dependencies in
7472 # the current directory while Tru64 will put them in the object
7473 # directory.
7474 mkdir sub
7476 am_cv_$1_dependencies_compiler_type=none
7477 if test "$am_compiler_list" = ""; then
7478 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
7479 fi
7480 for depmode in $am_compiler_list; do
7481 # Setup a source with many dependencies, because some compilers
7482 # like to wrap large dependency lists on column 80 (with \), and
7483 # we should not choose a depcomp mode which is confused by this.
7484 #
7485 # We need to recreate these files for each test, as the compiler may
7486 # overwrite some of them when testing with obscure command lines.
7487 # This happens at least with the AIX C compiler.
7488 : > sub/conftest.c
7489 for i in 1 2 3 4 5 6; do
7490 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7491 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7492 # Solaris 8's {/usr,}/bin/sh.
7493 touch sub/conftst$i.h
7494 done
7495 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7497 case $depmode in
7498 nosideeffect)
7499 # after this tag, mechanisms are not by side-effect, so they'll
7500 # only be used when explicitly requested
7501 if test "x$enable_dependency_tracking" = xyes; then
7502 continue
7503 else
7504 break
7505 fi
7506 ;;
7507 none) break ;;
7508 esac
7509 # We check with `-c' and `-o' for the sake of the "dashmstdout"
7510 # mode. It turns out that the SunPro C++ compiler does not properly
7511 # handle `-M -o', and we need to detect this.
7512 if depmode=$depmode \
7513 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
7514 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7515 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
7516 >/dev/null 2>conftest.err &&
7517 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7518 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
7519 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7520 # icc doesn't choke on unknown options, it will just issue warnings
7521 # or remarks (even with -Werror). So we grep stderr for any message
7522 # that says an option was ignored or not supported.
7523 # When given -MP, icc 7.0 and 7.1 complain thusly:
7524 # icc: Command line warning: ignoring option '-M'; no argument required
7525 # The diagnosis changed in icc 8.0:
7526 # icc: Command line remark: option '-MP' not supported
7527 if (grep 'ignoring option' conftest.err ||
7528 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7529 am_cv_$1_dependencies_compiler_type=$depmode
7530 break
7531 fi
7532 fi
7533 done
7535 cd ..
7536 rm -rf conftest.dir
7537 else
7538 am_cv_$1_dependencies_compiler_type=none
7539 fi
7540 ])
7541 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
7542 AM_CONDITIONAL([am__fastdep$1], [
7543 test "x$enable_dependency_tracking" != xno \
7544 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
7545 ])
7548 # AM_SET_DEPDIR
7549 # -------------
7550 # Choose a directory name for dependency files.
7551 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
7552 AC_DEFUN([AM_SET_DEPDIR],
7553 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
7554 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
7555 ])
7558 # AM_DEP_TRACK
7559 # ------------
7560 AC_DEFUN([AM_DEP_TRACK],
7561 [AC_ARG_ENABLE(dependency-tracking,
7562 [ --disable-dependency-tracking speeds up one-time build
7563 --enable-dependency-tracking do not reject slow dependency extractors])
7564 if test "x$enable_dependency_tracking" != xno; then
7565 am_depcomp="$ac_aux_dir/depcomp"
7566 AMDEPBACKSLASH='\'
7567 fi
7568 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
7569 AC_SUBST([AMDEPBACKSLASH])
7570 ])
7572 # Generate code to set up dependency tracking. -*- Autoconf -*-
7574 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
7575 # Free Software Foundation, Inc.
7576 #
7577 # This file is free software; the Free Software Foundation
7578 # gives unlimited permission to copy and/or distribute it,
7579 # with or without modifications, as long as this notice is preserved.
7581 #serial 3
7583 # _AM_OUTPUT_DEPENDENCY_COMMANDS
7584 # ------------------------------
7585 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
7586 [for mf in $CONFIG_FILES; do
7587 # Strip MF so we end up with the name of the file.
7588 mf=`echo "$mf" | sed -e 's/:.*$//'`
7589 # Check whether this is an Automake generated Makefile or not.
7590 # We used to match only the files named `Makefile.in', but
7591 # some people rename them; so instead we look at the file content.
7592 # Grep'ing the first line is not enough: some people post-process
7593 # each Makefile.in and add a new line on top of each file to say so.
7594 # So let's grep whole file.
7595 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
7596 dirpart=`AS_DIRNAME("$mf")`
7597 else
7598 continue
7599 fi
7600 # Extract the definition of DEPDIR, am__include, and am__quote
7601 # from the Makefile without running `make'.
7602 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
7603 test -z "$DEPDIR" && continue
7604 am__include=`sed -n 's/^am__include = //p' < "$mf"`
7605 test -z "am__include" && continue
7606 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
7607 # When using ansi2knr, U may be empty or an underscore; expand it
7608 U=`sed -n 's/^U = //p' < "$mf"`
7609 # Find all dependency output files, they are included files with
7610 # $(DEPDIR) in their names. We invoke sed twice because it is the
7611 # simplest approach to changing $(DEPDIR) to its actual value in the
7612 # expansion.
7613 for file in `sed -n "
7614 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
7615 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
7616 # Make sure the directory exists.
7617 test -f "$dirpart/$file" && continue
7618 fdir=`AS_DIRNAME(["$file"])`
7619 AS_MKDIR_P([$dirpart/$fdir])
7620 # echo "creating $dirpart/$file"
7621 echo '# dummy' > "$dirpart/$file"
7622 done
7623 done
7624 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
7627 # AM_OUTPUT_DEPENDENCY_COMMANDS
7628 # -----------------------------
7629 # This macro should only be invoked once -- use via AC_REQUIRE.
7630 #
7631 # This code is only required when automatic dependency tracking
7632 # is enabled. FIXME. This creates each `.P' file that we will
7633 # need in order to bootstrap the dependency handling code.
7634 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
7635 [AC_CONFIG_COMMANDS([depfiles],
7636 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
7637 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
7638 ])
7640 # Do all the work for Automake. -*- Autoconf -*-
7642 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
7643 # Free Software Foundation, Inc.
7644 #
7645 # This file is free software; the Free Software Foundation
7646 # gives unlimited permission to copy and/or distribute it,
7647 # with or without modifications, as long as this notice is preserved.
7649 # serial 12
7651 # This macro actually does too much. Some checks are only needed if
7652 # your package does certain things. But this isn't really a big deal.
7654 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
7655 # AM_INIT_AUTOMAKE([OPTIONS])
7656 # -----------------------------------------------
7657 # The call with PACKAGE and VERSION arguments is the old style
7658 # call (pre autoconf-2.50), which is being phased out. PACKAGE
7659 # and VERSION should now be passed to AC_INIT and removed from
7660 # the call to AM_INIT_AUTOMAKE.
7661 # We support both call styles for the transition. After
7662 # the next Automake release, Autoconf can make the AC_INIT
7663 # arguments mandatory, and then we can depend on a new Autoconf
7664 # release and drop the old call support.
7665 AC_DEFUN([AM_INIT_AUTOMAKE],
7666 [AC_PREREQ([2.58])dnl
7667 dnl Autoconf wants to disallow AM_ names. We explicitly allow
7668 dnl the ones we care about.
7669 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
7670 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
7671 AC_REQUIRE([AC_PROG_INSTALL])dnl
7672 # test to see if srcdir already configured
7673 if test "`cd $srcdir && pwd`" != "`pwd`" &&
7674 test -f $srcdir/config.status; then
7675 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
7676 fi
7678 # test whether we have cygpath
7679 if test -z "$CYGPATH_W"; then
7680 if (cygpath --version) >/dev/null 2>/dev/null; then
7681 CYGPATH_W='cygpath -w'
7682 else
7683 CYGPATH_W=echo
7684 fi
7685 fi
7686 AC_SUBST([CYGPATH_W])
7688 # Define the identity of the package.
7689 dnl Distinguish between old-style and new-style calls.
7690 m4_ifval([$2],
7691 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
7692 AC_SUBST([PACKAGE], [$1])dnl
7693 AC_SUBST([VERSION], [$2])],
7694 [_AM_SET_OPTIONS([$1])dnl
7695 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
7696 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
7698 _AM_IF_OPTION([no-define],,
7699 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
7700 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
7702 # Some tools Automake needs.
7703 AC_REQUIRE([AM_SANITY_CHECK])dnl
7704 AC_REQUIRE([AC_ARG_PROGRAM])dnl
7705 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
7706 AM_MISSING_PROG(AUTOCONF, autoconf)
7707 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
7708 AM_MISSING_PROG(AUTOHEADER, autoheader)
7709 AM_MISSING_PROG(MAKEINFO, makeinfo)
7710 AM_PROG_INSTALL_SH
7711 AM_PROG_INSTALL_STRIP
7712 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
7713 # We need awk for the "check" target. The system "awk" is bad on
7714 # some platforms.
7715 AC_REQUIRE([AC_PROG_AWK])dnl
7716 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
7717 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
7718 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
7719 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
7720 [_AM_PROG_TAR([v7])])])
7721 _AM_IF_OPTION([no-dependencies],,
7722 [AC_PROVIDE_IFELSE([AC_PROG_CC],
7723 [_AM_DEPENDENCIES(CC)],
7724 [define([AC_PROG_CC],
7725 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
7726 AC_PROVIDE_IFELSE([AC_PROG_CXX],
7727 [_AM_DEPENDENCIES(CXX)],
7728 [define([AC_PROG_CXX],
7729 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
7730 ])
7731 ])
7734 # When config.status generates a header, we must update the stamp-h file.
7735 # This file resides in the same directory as the config header
7736 # that is generated. The stamp files are numbered to have different names.
7738 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
7739 # loop where config.status creates the headers, so we can generate
7740 # our stamp files there.
7741 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
7742 [# Compute $1's index in $config_headers.
7743 _am_stamp_count=1
7744 for _am_header in $config_headers :; do
7745 case $_am_header in
7746 $1 | $1:* )
7747 break ;;
7748 * )
7749 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
7750 esac
7751 done
7752 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
7754 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
7755 #
7756 # This file is free software; the Free Software Foundation
7757 # gives unlimited permission to copy and/or distribute it,
7758 # with or without modifications, as long as this notice is preserved.
7760 # AM_PROG_INSTALL_SH
7761 # ------------------
7762 # Define $install_sh.
7763 AC_DEFUN([AM_PROG_INSTALL_SH],
7764 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7765 install_sh=${install_sh-"$am_aux_dir/install-sh"}
7766 AC_SUBST(install_sh)])
7768 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
7769 #
7770 # This file is free software; the Free Software Foundation
7771 # gives unlimited permission to copy and/or distribute it,
7772 # with or without modifications, as long as this notice is preserved.
7774 # serial 2
7776 # Check whether the underlying file-system supports filenames
7777 # with a leading dot. For instance MS-DOS doesn't.
7778 AC_DEFUN([AM_SET_LEADING_DOT],
7779 [rm -rf .tst 2>/dev/null
7780 mkdir .tst 2>/dev/null
7781 if test -d .tst; then
7782 am__leading_dot=.
7783 else
7784 am__leading_dot=_
7785 fi
7786 rmdir .tst 2>/dev/null
7787 AC_SUBST([am__leading_dot])])
7789 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
7790 # From Jim Meyering
7792 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
7793 # Free Software Foundation, Inc.
7794 #
7795 # This file is free software; the Free Software Foundation
7796 # gives unlimited permission to copy and/or distribute it,
7797 # with or without modifications, as long as this notice is preserved.
7799 # serial 4
7801 AC_DEFUN([AM_MAINTAINER_MODE],
7802 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
7803 dnl maintainer-mode is disabled by default
7804 AC_ARG_ENABLE(maintainer-mode,
7805 [ --enable-maintainer-mode enable make rules and dependencies not useful
7806 (and sometimes confusing) to the casual installer],
7807 USE_MAINTAINER_MODE=$enableval,
7808 USE_MAINTAINER_MODE=no)
7809 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
7810 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
7811 MAINT=$MAINTAINER_MODE_TRUE
7812 AC_SUBST(MAINT)dnl
7813 ]
7814 )
7816 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
7818 # Check to see how 'make' treats includes. -*- Autoconf -*-
7820 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
7821 #
7822 # This file is free software; the Free Software Foundation
7823 # gives unlimited permission to copy and/or distribute it,
7824 # with or without modifications, as long as this notice is preserved.
7826 # serial 3
7828 # AM_MAKE_INCLUDE()
7829 # -----------------
7830 # Check to see how make treats includes.
7831 AC_DEFUN([AM_MAKE_INCLUDE],
7832 [am_make=${MAKE-make}
7833 cat > confinc << 'END'
7834 am__doit:
7835 @echo done
7836 .PHONY: am__doit
7837 END
7838 # If we don't find an include directive, just comment out the code.
7839 AC_MSG_CHECKING([for style of include used by $am_make])
7840 am__include="#"
7841 am__quote=
7842 _am_result=none
7843 # First try GNU make style include.
7844 echo "include confinc" > confmf
7845 # We grep out `Entering directory' and `Leaving directory'
7846 # messages which can occur if `w' ends up in MAKEFLAGS.
7847 # In particular we don't look at `^make:' because GNU make might
7848 # be invoked under some other name (usually "gmake"), in which
7849 # case it prints its new name instead of `make'.
7850 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
7851 am__include=include
7852 am__quote=
7853 _am_result=GNU
7854 fi
7855 # Now try BSD make style include.
7856 if test "$am__include" = "#"; then
7857 echo '.include "confinc"' > confmf
7858 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
7859 am__include=.include
7860 am__quote="\""
7861 _am_result=BSD
7862 fi
7863 fi
7864 AC_SUBST([am__include])
7865 AC_SUBST([am__quote])
7866 AC_MSG_RESULT([$_am_result])
7867 rm -f confinc confmf
7868 ])
7870 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
7872 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
7873 # Free Software Foundation, Inc.
7874 #
7875 # This file is free software; the Free Software Foundation
7876 # gives unlimited permission to copy and/or distribute it,
7877 # with or without modifications, as long as this notice is preserved.
7879 # serial 4
7881 # AM_MISSING_PROG(NAME, PROGRAM)
7882 # ------------------------------
7883 AC_DEFUN([AM_MISSING_PROG],
7884 [AC_REQUIRE([AM_MISSING_HAS_RUN])
7885 $1=${$1-"${am_missing_run}$2"}
7886 AC_SUBST($1)])
7889 # AM_MISSING_HAS_RUN
7890 # ------------------
7891 # Define MISSING if not defined so far and test if it supports --run.
7892 # If it does, set am_missing_run to use it, otherwise, to nothing.
7893 AC_DEFUN([AM_MISSING_HAS_RUN],
7894 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7895 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
7896 # Use eval to expand $SHELL
7897 if eval "$MISSING --run true"; then
7898 am_missing_run="$MISSING --run "
7899 else
7900 am_missing_run=
7901 AC_MSG_WARN([`missing' script is too old or missing])
7902 fi
7903 ])
7905 # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
7906 #
7907 # This file is free software; the Free Software Foundation
7908 # gives unlimited permission to copy and/or distribute it,
7909 # with or without modifications, as long as this notice is preserved.
7911 # AM_PROG_MKDIR_P
7912 # ---------------
7913 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
7914 #
7915 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
7916 # created by `make install' are always world readable, even if the
7917 # installer happens to have an overly restrictive umask (e.g. 077).
7918 # This was a mistake. There are at least two reasons why we must not
7919 # use `-m 0755':
7920 # - it causes special bits like SGID to be ignored,
7921 # - it may be too restrictive (some setups expect 775 directories).
7922 #
7923 # Do not use -m 0755 and let people choose whatever they expect by
7924 # setting umask.
7925 #
7926 # We cannot accept any implementation of `mkdir' that recognizes `-p'.
7927 # Some implementations (such as Solaris 8's) are not thread-safe: if a
7928 # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
7929 # concurrently, both version can detect that a/ is missing, but only
7930 # one can create it and the other will error out. Consequently we
7931 # restrict ourselves to GNU make (using the --version option ensures
7932 # this.)
7933 AC_DEFUN([AM_PROG_MKDIR_P],
7934 [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
7935 # We used to keeping the `.' as first argument, in order to
7936 # allow $(mkdir_p) to be used without argument. As in
7937 # $(mkdir_p) $(somedir)
7938 # where $(somedir) is conditionally defined. However this is wrong
7939 # for two reasons:
7940 # 1. if the package is installed by a user who cannot write `.'
7941 # make install will fail,
7942 # 2. the above comment should most certainly read
7943 # $(mkdir_p) $(DESTDIR)$(somedir)
7944 # so it does not work when $(somedir) is undefined and
7945 # $(DESTDIR) is not.
7946 # To support the latter case, we have to write
7947 # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
7948 # so the `.' trick is pointless.
7949 mkdir_p='mkdir -p --'
7950 else
7951 # On NextStep and OpenStep, the `mkdir' command does not
7952 # recognize any option. It will interpret all options as
7953 # directories to create, and then abort because `.' already
7954 # exists.
7955 for d in ./-p ./--version;
7956 do
7957 test -d $d && rmdir $d
7958 done
7959 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
7960 if test -f "$ac_aux_dir/mkinstalldirs"; then
7961 mkdir_p='$(mkinstalldirs)'
7962 else
7963 mkdir_p='$(install_sh) -d'
7964 fi
7965 fi
7966 AC_SUBST([mkdir_p])])
7968 # Helper functions for option handling. -*- Autoconf -*-
7970 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
7971 #
7972 # This file is free software; the Free Software Foundation
7973 # gives unlimited permission to copy and/or distribute it,
7974 # with or without modifications, as long as this notice is preserved.
7976 # serial 3
7978 # _AM_MANGLE_OPTION(NAME)
7979 # -----------------------
7980 AC_DEFUN([_AM_MANGLE_OPTION],
7981 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7983 # _AM_SET_OPTION(NAME)
7984 # ------------------------------
7985 # Set option NAME. Presently that only means defining a flag for this option.
7986 AC_DEFUN([_AM_SET_OPTION],
7987 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7989 # _AM_SET_OPTIONS(OPTIONS)
7990 # ----------------------------------
7991 # OPTIONS is a space-separated list of Automake options.
7992 AC_DEFUN([_AM_SET_OPTIONS],
7993 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7995 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7996 # -------------------------------------------
7997 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7998 AC_DEFUN([_AM_IF_OPTION],
7999 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
8001 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
8002 # Free Software Foundation, Inc.
8003 #
8004 # This file is free software; the Free Software Foundation
8005 # gives unlimited permission to copy and/or distribute it,
8006 # with or without modifications, as long as this notice is preserved.
8008 # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8009 # ---------------------------------------------------------------------------
8010 # Adds support for distributing Python modules and packages. To
8011 # install modules, copy them to $(pythondir), using the python_PYTHON
8012 # automake variable. To install a package with the same name as the
8013 # automake package, install to $(pkgpythondir), or use the
8014 # pkgpython_PYTHON automake variable.
8015 #
8016 # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
8017 # locations to install python extension modules (shared libraries).
8018 # Another macro is required to find the appropriate flags to compile
8019 # extension modules.
8020 #
8021 # If your package is configured with a different prefix to python,
8022 # users will have to add the install directory to the PYTHONPATH
8023 # environment variable, or create a .pth file (see the python
8024 # documentation for details).
8025 #
8026 # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
8027 # cause an error if the version of python installed on the system
8028 # doesn't meet the requirement. MINIMUM-VERSION should consist of
8029 # numbers and dots only.
8030 AC_DEFUN([AM_PATH_PYTHON],
8031 [
8032 dnl Find a Python interpreter. Python versions prior to 1.5 are not
8033 dnl supported because the default installation locations changed from
8034 dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages
8035 dnl in 1.5.
8036 m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
8037 [python python2 python2.5 python2.4 python2.3 python2.2 dnl
8038 python2.1 python2.0 python1.6 python1.5])
8040 m4_if([$1],[],[
8041 dnl No version check is needed.
8042 # Find any Python interpreter.
8043 if test -z "$PYTHON"; then
8044 AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
8045 fi
8046 am_display_PYTHON=python
8047 ], [
8048 dnl A version check is needed.
8049 if test -n "$PYTHON"; then
8050 # If the user set $PYTHON, use it and don't search something else.
8051 AC_MSG_CHECKING([whether $PYTHON version >= $1])
8052 AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
8053 [AC_MSG_RESULT(yes)],
8054 [AC_MSG_ERROR(too old)])
8055 am_display_PYTHON=$PYTHON
8056 else
8057 # Otherwise, try each interpreter until we find one that satisfies
8058 # VERSION.
8059 AC_CACHE_CHECK([for a Python interpreter with version >= $1],
8060 [am_cv_pathless_PYTHON],[
8061 for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
8062 test "$am_cv_pathless_PYTHON" = none && break
8063 AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
8064 done])
8065 # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
8066 if test "$am_cv_pathless_PYTHON" = none; then
8067 PYTHON=:
8068 else
8069 AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
8070 fi
8071 am_display_PYTHON=$am_cv_pathless_PYTHON
8072 fi
8073 ])
8075 if test "$PYTHON" = :; then
8076 dnl Run any user-specified action, or abort.
8077 m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
8078 else
8080 dnl Query Python for its version number. Getting [:3] seems to be
8081 dnl the best way to do this; it's what "site.py" does in the standard
8082 dnl library.
8084 AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
8085 [am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`])
8086 AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
8088 dnl Use the values of $prefix and $exec_prefix for the corresponding
8089 dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
8090 dnl distinct variables so they can be overridden if need be. However,
8091 dnl general consensus is that you shouldn't need this ability.
8093 AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
8094 AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
8096 dnl At times (like when building shared libraries) you may want
8097 dnl to know which OS platform Python thinks this is.
8099 AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
8100 [am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`])
8101 AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
8104 dnl Set up 4 directories:
8106 dnl pythondir -- where to install python scripts. This is the
8107 dnl site-packages directory, not the python standard library
8108 dnl directory like in previous automake betas. This behavior
8109 dnl is more consistent with lispdir.m4 for example.
8110 dnl Query distutils for this directory. distutils does not exist in
8111 dnl Python 1.5, so we fall back to the hardcoded directory if it
8112 dnl doesn't work.
8113 AC_CACHE_CHECK([for $am_display_PYTHON script directory],
8114 [am_cv_python_pythondir],
8115 [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
8116 echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`])
8117 AC_SUBST([pythondir], [$am_cv_python_pythondir])
8119 dnl pkgpythondir -- $PACKAGE directory under pythondir. Was
8120 dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
8121 dnl more consistent with the rest of automake.
8123 AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
8125 dnl pyexecdir -- directory for installing python extension modules
8126 dnl (shared libraries)
8127 dnl Query distutils for this directory. distutils does not exist in
8128 dnl Python 1.5, so we fall back to the hardcoded directory if it
8129 dnl doesn't work.
8130 AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
8131 [am_cv_python_pyexecdir],
8132 [am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null ||
8133 echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`])
8134 AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
8136 dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
8138 AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
8140 dnl Run any user-specified action.
8141 $2
8142 fi
8144 ])
8147 # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
8148 # ---------------------------------------------------------------------------
8149 # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
8150 # Run ACTION-IF-FALSE otherwise.
8151 # This test uses sys.hexversion instead of the string equivalent (first
8152 # word of sys.version), in order to cope with versions such as 2.2c1.
8153 # hexversion has been introduced in Python 1.5.2; it's probably not
8154 # worth to support older versions (1.5.1 was released on October 31, 1998).
8155 AC_DEFUN([AM_PYTHON_CHECK_VERSION],
8156 [prog="import sys, string
8157 # split strings by '.' and convert to numeric. Append some zeros
8158 # because we need at least 4 digits for the hex conversion.
8159 minver = map(int, string.split('$2', '.')) + [[0, 0, 0]]
8160 minverhex = 0
8161 for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]]
8162 sys.exit(sys.hexversion < minverhex)"
8163 AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
8165 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
8166 #
8167 # This file is free software; the Free Software Foundation
8168 # gives unlimited permission to copy and/or distribute it,
8169 # with or without modifications, as long as this notice is preserved.
8171 # AM_RUN_LOG(COMMAND)
8172 # -------------------
8173 # Run COMMAND, save the exit status in ac_status, and log it.
8174 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
8175 AC_DEFUN([AM_RUN_LOG],
8176 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
8177 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
8178 ac_status=$?
8179 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
8180 (exit $ac_status); }])
8182 # Check to make sure that the build environment is sane. -*- Autoconf -*-
8184 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
8185 # Free Software Foundation, Inc.
8186 #
8187 # This file is free software; the Free Software Foundation
8188 # gives unlimited permission to copy and/or distribute it,
8189 # with or without modifications, as long as this notice is preserved.
8191 # serial 4
8193 # AM_SANITY_CHECK
8194 # ---------------
8195 AC_DEFUN([AM_SANITY_CHECK],
8196 [AC_MSG_CHECKING([whether build environment is sane])
8197 # Just in case
8198 sleep 1
8199 echo timestamp > conftest.file
8200 # Do `set' in a subshell so we don't clobber the current shell's
8201 # arguments. Must try -L first in case configure is actually a
8202 # symlink; some systems play weird games with the mod time of symlinks
8203 # (eg FreeBSD returns the mod time of the symlink's containing
8204 # directory).
8205 if (
8206 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
8207 if test "$[*]" = "X"; then
8208 # -L didn't work.
8209 set X `ls -t $srcdir/configure conftest.file`
8210 fi
8211 rm -f conftest.file
8212 if test "$[*]" != "X $srcdir/configure conftest.file" \
8213 && test "$[*]" != "X conftest.file $srcdir/configure"; then
8215 # If neither matched, then we have a broken ls. This can happen
8216 # if, for instance, CONFIG_SHELL is bash and it inherits a
8217 # broken ls alias from the environment. This has actually
8218 # happened. Such a system could not be considered "sane".
8219 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
8220 alias in your environment])
8221 fi
8223 test "$[2]" = conftest.file
8224 )
8225 then
8226 # Ok.
8227 :
8228 else
8229 AC_MSG_ERROR([newly created file is older than distributed files!
8230 Check your system clock])
8231 fi
8232 AC_MSG_RESULT(yes)])
8234 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
8235 #
8236 # This file is free software; the Free Software Foundation
8237 # gives unlimited permission to copy and/or distribute it,
8238 # with or without modifications, as long as this notice is preserved.
8240 # AM_PROG_INSTALL_STRIP
8241 # ---------------------
8242 # One issue with vendor `install' (even GNU) is that you can't
8243 # specify the program used to strip binaries. This is especially
8244 # annoying in cross-compiling environments, where the build's strip
8245 # is unlikely to handle the host's binaries.
8246 # Fortunately install-sh will honor a STRIPPROG variable, so we
8247 # always use install-sh in `make install-strip', and initialize
8248 # STRIPPROG with the value of the STRIP variable (set by the user).
8249 AC_DEFUN([AM_PROG_INSTALL_STRIP],
8250 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
8251 # Installed binaries are usually stripped using `strip' when the user
8252 # run `make install-strip'. However `strip' might not be the right
8253 # tool to use in cross-compilation environments, therefore Automake
8254 # will honor the `STRIP' environment variable to overrule this program.
8255 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
8256 if test "$cross_compiling" != no; then
8257 AC_CHECK_TOOL([STRIP], [strip], :)
8258 fi
8259 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
8260 AC_SUBST([INSTALL_STRIP_PROGRAM])])
8262 # Check how to create a tarball. -*- Autoconf -*-
8264 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
8265 #
8266 # This file is free software; the Free Software Foundation
8267 # gives unlimited permission to copy and/or distribute it,
8268 # with or without modifications, as long as this notice is preserved.
8270 # serial 2
8272 # _AM_PROG_TAR(FORMAT)
8273 # --------------------
8274 # Check how to create a tarball in format FORMAT.
8275 # FORMAT should be one of `v7', `ustar', or `pax'.
8276 #
8277 # Substitute a variable $(am__tar) that is a command
8278 # writing to stdout a FORMAT-tarball containing the directory
8279 # $tardir.
8280 # tardir=directory && $(am__tar) > result.tar
8281 #
8282 # Substitute a variable $(am__untar) that extract such
8283 # a tarball read from stdin.
8284 # $(am__untar) < result.tar
8285 AC_DEFUN([_AM_PROG_TAR],
8286 [# Always define AMTAR for backward compatibility.
8287 AM_MISSING_PROG([AMTAR], [tar])
8288 m4_if([$1], [v7],
8289 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
8290 [m4_case([$1], [ustar],, [pax],,
8291 [m4_fatal([Unknown tar format])])
8292 AC_MSG_CHECKING([how to create a $1 tar archive])
8293 # Loop over all known methods to create a tar archive until one works.
8294 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
8295 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
8296 # Do not fold the above two line into one, because Tru64 sh and
8297 # Solaris sh will not grok spaces in the rhs of `-'.
8298 for _am_tool in $_am_tools
8299 do
8300 case $_am_tool in
8301 gnutar)
8302 for _am_tar in tar gnutar gtar;
8303 do
8304 AM_RUN_LOG([$_am_tar --version]) && break
8305 done
8306 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
8307 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
8308 am__untar="$_am_tar -xf -"
8309 ;;
8310 plaintar)
8311 # Must skip GNU tar: if it does not support --format= it doesn't create
8312 # ustar tarball either.
8313 (tar --version) >/dev/null 2>&1 && continue
8314 am__tar='tar chf - "$$tardir"'
8315 am__tar_='tar chf - "$tardir"'
8316 am__untar='tar xf -'
8317 ;;
8318 pax)
8319 am__tar='pax -L -x $1 -w "$$tardir"'
8320 am__tar_='pax -L -x $1 -w "$tardir"'
8321 am__untar='pax -r'
8322 ;;
8323 cpio)
8324 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
8325 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
8326 am__untar='cpio -i -H $1 -d'
8327 ;;
8328 none)
8329 am__tar=false
8330 am__tar_=false
8331 am__untar=false
8332 ;;
8333 esac
8335 # If the value was cached, stop now. We just wanted to have am__tar
8336 # and am__untar set.
8337 test -n "${am_cv_prog_tar_$1}" && break
8339 # tar/untar a dummy directory, and stop if the command works
8340 rm -rf conftest.dir
8341 mkdir conftest.dir
8342 echo GrepMe > conftest.dir/file
8343 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
8344 rm -rf conftest.dir
8345 if test -s conftest.tar; then
8346 AM_RUN_LOG([$am__untar <conftest.tar])
8347 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
8348 fi
8349 done
8350 rm -rf conftest.dir
8352 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
8353 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
8354 AC_SUBST([am__tar])
8355 AC_SUBST([am__untar])
8356 ]) # _AM_PROG_TAR
8358 m4_include([acinclude.m4])