You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

10738 lines
378 KiB

  1. # generated automatically by aclocal 1.11.3 -*- Autoconf -*-
  2. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
  3. # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
  4. # 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.
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  10. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  11. # PARTICULAR PURPOSE.
  12. m4_ifndef([AC_AUTOCONF_VERSION],
  13. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  14. m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
  15. [m4_warning([this file was generated for autoconf 2.68.
  16. You have another version of autoconf. It may work, but is not guaranteed to.
  17. If you have problems, you may need to regenerate the build system entirely.
  18. To do so, use the procedure documented by the package, typically `autoreconf'.])])
  19. # Copyright (C) 1995-2002 Free Software Foundation, Inc.
  20. # Copyright (C) 2001-2003,2004 Red Hat, Inc.
  21. #
  22. # This file is free software, distributed under the terms of the GNU
  23. # General Public License. As a special exception to the GNU General
  24. # Public License, this file may be distributed as part of a program
  25. # that contains a configuration script generated by Autoconf, under
  26. # the same distribution terms as the rest of that program.
  27. #
  28. # This file can be copied and used freely without restrictions. It can
  29. # be used in projects which are not available under the GNU Public License
  30. # but which still want to provide support for the GNU gettext functionality.
  31. #
  32. # Macro to add for using GNU gettext.
  33. # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
  34. #
  35. # Modified to never use included libintl.
  36. # Owen Taylor <otaylor@redhat.com>, 12/15/1998
  37. #
  38. # Major rework to remove unused code
  39. # Owen Taylor <otaylor@redhat.com>, 12/11/2002
  40. #
  41. # Added better handling of ALL_LINGUAS from GNU gettext version
  42. # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
  43. #
  44. # Modified to require ngettext
  45. # Matthias Clasen <mclasen@redhat.com> 08/06/2004
  46. #
  47. # We need this here as well, since someone might use autoconf-2.5x
  48. # to configure GLib then an older version to configure a package
  49. # using AM_GLIB_GNU_GETTEXT
  50. AC_PREREQ(2.53)
  51. dnl
  52. dnl We go to great lengths to make sure that aclocal won't
  53. dnl try to pull in the installed version of these macros
  54. dnl when running aclocal in the glib directory.
  55. dnl
  56. m4_copy([AC_DEFUN],[glib_DEFUN])
  57. m4_copy([AC_REQUIRE],[glib_REQUIRE])
  58. dnl
  59. dnl At the end, if we're not within glib, we'll define the public
  60. dnl definitions in terms of our private definitions.
  61. dnl
  62. # GLIB_LC_MESSAGES
  63. #--------------------
  64. glib_DEFUN([GLIB_LC_MESSAGES],
  65. [AC_CHECK_HEADERS([locale.h])
  66. if test $ac_cv_header_locale_h = yes; then
  67. AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
  68. [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
  69. am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
  70. if test $am_cv_val_LC_MESSAGES = yes; then
  71. AC_DEFINE(HAVE_LC_MESSAGES, 1,
  72. [Define if your <locale.h> file defines LC_MESSAGES.])
  73. fi
  74. fi])
  75. # GLIB_PATH_PROG_WITH_TEST
  76. #----------------------------
  77. dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
  78. dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
  79. glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
  80. [# Extract the first word of "$2", so it can be a program name with args.
  81. set dummy $2; ac_word=[$]2
  82. AC_MSG_CHECKING([for $ac_word])
  83. AC_CACHE_VAL(ac_cv_path_$1,
  84. [case "[$]$1" in
  85. /*)
  86. ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
  87. ;;
  88. *)
  89. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  90. for ac_dir in ifelse([$5], , $PATH, [$5]); do
  91. test -z "$ac_dir" && ac_dir=.
  92. if test -f $ac_dir/$ac_word; then
  93. if [$3]; then
  94. ac_cv_path_$1="$ac_dir/$ac_word"
  95. break
  96. fi
  97. fi
  98. done
  99. IFS="$ac_save_ifs"
  100. dnl If no 4th arg is given, leave the cache variable unset,
  101. dnl so AC_PATH_PROGS will keep looking.
  102. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
  103. ])dnl
  104. ;;
  105. esac])dnl
  106. $1="$ac_cv_path_$1"
  107. if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
  108. AC_MSG_RESULT([$]$1)
  109. else
  110. AC_MSG_RESULT(no)
  111. fi
  112. AC_SUBST($1)dnl
  113. ])
  114. # GLIB_WITH_NLS
  115. #-----------------
  116. glib_DEFUN([GLIB_WITH_NLS],
  117. dnl NLS is obligatory
  118. [USE_NLS=yes
  119. AC_SUBST(USE_NLS)
  120. gt_cv_have_gettext=no
  121. CATOBJEXT=NONE
  122. XGETTEXT=:
  123. INTLLIBS=
  124. AC_CHECK_HEADER(libintl.h,
  125. [gt_cv_func_dgettext_libintl="no"
  126. libintl_extra_libs=""
  127. #
  128. # First check in libc
  129. #
  130. AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
  131. [AC_TRY_LINK([
  132. #include <libintl.h>
  133. ],
  134. [return !ngettext ("","", 1)],
  135. gt_cv_func_ngettext_libc=yes,
  136. gt_cv_func_ngettext_libc=no)
  137. ])
  138. if test "$gt_cv_func_ngettext_libc" = "yes" ; then
  139. AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
  140. [AC_TRY_LINK([
  141. #include <libintl.h>
  142. ],
  143. [return !dgettext ("","")],
  144. gt_cv_func_dgettext_libc=yes,
  145. gt_cv_func_dgettext_libc=no)
  146. ])
  147. fi
  148. if test "$gt_cv_func_ngettext_libc" = "yes" ; then
  149. AC_CHECK_FUNCS(bind_textdomain_codeset)
  150. fi
  151. #
  152. # If we don't have everything we want, check in libintl
  153. #
  154. if test "$gt_cv_func_dgettext_libc" != "yes" \
  155. || test "$gt_cv_func_ngettext_libc" != "yes" \
  156. || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
  157. AC_CHECK_LIB(intl, bindtextdomain,
  158. [AC_CHECK_LIB(intl, ngettext,
  159. [AC_CHECK_LIB(intl, dgettext,
  160. gt_cv_func_dgettext_libintl=yes)])])
  161. if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
  162. AC_MSG_CHECKING([if -liconv is needed to use gettext])
  163. AC_MSG_RESULT([])
  164. AC_CHECK_LIB(intl, ngettext,
  165. [AC_CHECK_LIB(intl, dcgettext,
  166. [gt_cv_func_dgettext_libintl=yes
  167. libintl_extra_libs=-liconv],
  168. :,-liconv)],
  169. :,-liconv)
  170. fi
  171. #
  172. # If we found libintl, then check in it for bind_textdomain_codeset();
  173. # we'll prefer libc if neither have bind_textdomain_codeset(),
  174. # and both have dgettext and ngettext
  175. #
  176. if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
  177. glib_save_LIBS="$LIBS"
  178. LIBS="$LIBS -lintl $libintl_extra_libs"
  179. unset ac_cv_func_bind_textdomain_codeset
  180. AC_CHECK_FUNCS(bind_textdomain_codeset)
  181. LIBS="$glib_save_LIBS"
  182. if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
  183. gt_cv_func_dgettext_libc=no
  184. else
  185. if test "$gt_cv_func_dgettext_libc" = "yes" \
  186. && test "$gt_cv_func_ngettext_libc" = "yes"; then
  187. gt_cv_func_dgettext_libintl=no
  188. fi
  189. fi
  190. fi
  191. fi
  192. if test "$gt_cv_func_dgettext_libc" = "yes" \
  193. || test "$gt_cv_func_dgettext_libintl" = "yes"; then
  194. gt_cv_have_gettext=yes
  195. fi
  196. if test "$gt_cv_func_dgettext_libintl" = "yes"; then
  197. INTLLIBS="-lintl $libintl_extra_libs"
  198. fi
  199. if test "$gt_cv_have_gettext" = "yes"; then
  200. AC_DEFINE(HAVE_GETTEXT,1,
  201. [Define if the GNU gettext() function is already present or preinstalled.])
  202. GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
  203. [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
  204. if test "$MSGFMT" != "no"; then
  205. glib_save_LIBS="$LIBS"
  206. LIBS="$LIBS $INTLLIBS"
  207. AC_CHECK_FUNCS(dcgettext)
  208. MSGFMT_OPTS=
  209. AC_MSG_CHECKING([if msgfmt accepts -c])
  210. GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
  211. msgid ""
  212. msgstr ""
  213. "Content-Type: text/plain; charset=UTF-8\n"
  214. "Project-Id-Version: test 1.0\n"
  215. "PO-Revision-Date: 2007-02-15 12:01+0100\n"
  216. "Last-Translator: test <foo@bar.xx>\n"
  217. "Language-Team: C <LL@li.org>\n"
  218. "MIME-Version: 1.0\n"
  219. "Content-Transfer-Encoding: 8bit\n"
  220. ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
  221. AC_SUBST(MSGFMT_OPTS)
  222. AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
  223. GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
  224. [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
  225. AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
  226. return _nl_msg_cat_cntr],
  227. [CATOBJEXT=.gmo
  228. DATADIRNAME=share],
  229. [case $host in
  230. *-*-solaris*)
  231. dnl On Solaris, if bind_textdomain_codeset is in libc,
  232. dnl GNU format message catalog is always supported,
  233. dnl since both are added to the libc all together.
  234. dnl Hence, we'd like to go with DATADIRNAME=share and
  235. dnl and CATOBJEXT=.gmo in this case.
  236. AC_CHECK_FUNC(bind_textdomain_codeset,
  237. [CATOBJEXT=.gmo
  238. DATADIRNAME=share],
  239. [CATOBJEXT=.mo
  240. DATADIRNAME=lib])
  241. ;;
  242. *-*-openbsd*)
  243. CATOBJEXT=.mo
  244. DATADIRNAME=share
  245. ;;
  246. *)
  247. CATOBJEXT=.mo
  248. DATADIRNAME=lib
  249. ;;
  250. esac])
  251. LIBS="$glib_save_LIBS"
  252. INSTOBJEXT=.mo
  253. else
  254. gt_cv_have_gettext=no
  255. fi
  256. fi
  257. ])
  258. if test "$gt_cv_have_gettext" = "yes" ; then
  259. AC_DEFINE(ENABLE_NLS, 1,
  260. [always defined to indicate that i18n is enabled])
  261. fi
  262. dnl Test whether we really found GNU xgettext.
  263. if test "$XGETTEXT" != ":"; then
  264. dnl If it is not GNU xgettext we define it as : so that the
  265. dnl Makefiles still can work.
  266. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
  267. : ;
  268. else
  269. AC_MSG_RESULT(
  270. [found xgettext program is not GNU xgettext; ignore it])
  271. XGETTEXT=":"
  272. fi
  273. fi
  274. # We need to process the po/ directory.
  275. POSUB=po
  276. AC_OUTPUT_COMMANDS(
  277. [case "$CONFIG_FILES" in *po/Makefile.in*)
  278. sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
  279. esac])
  280. dnl These rules are solely for the distribution goal. While doing this
  281. dnl we only have to keep exactly one list of the available catalogs
  282. dnl in configure.ac.
  283. for lang in $ALL_LINGUAS; do
  284. GMOFILES="$GMOFILES $lang.gmo"
  285. POFILES="$POFILES $lang.po"
  286. done
  287. dnl Make all variables we use known to autoconf.
  288. AC_SUBST(CATALOGS)
  289. AC_SUBST(CATOBJEXT)
  290. AC_SUBST(DATADIRNAME)
  291. AC_SUBST(GMOFILES)
  292. AC_SUBST(INSTOBJEXT)
  293. AC_SUBST(INTLLIBS)
  294. AC_SUBST(PO_IN_DATADIR_TRUE)
  295. AC_SUBST(PO_IN_DATADIR_FALSE)
  296. AC_SUBST(POFILES)
  297. AC_SUBST(POSUB)
  298. ])
  299. # AM_GLIB_GNU_GETTEXT
  300. # -------------------
  301. # Do checks necessary for use of gettext. If a suitable implementation
  302. # of gettext is found in either in libintl or in the C library,
  303. # it will set INTLLIBS to the libraries needed for use of gettext
  304. # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
  305. # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
  306. # on various variables needed by the Makefile.in.in installed by
  307. # glib-gettextize.
  308. dnl
  309. glib_DEFUN([GLIB_GNU_GETTEXT],
  310. [AC_REQUIRE([AC_PROG_CC])dnl
  311. AC_REQUIRE([AC_HEADER_STDC])dnl
  312. GLIB_LC_MESSAGES
  313. GLIB_WITH_NLS
  314. if test "$gt_cv_have_gettext" = "yes"; then
  315. if test "x$ALL_LINGUAS" = "x"; then
  316. LINGUAS=
  317. else
  318. AC_MSG_CHECKING(for catalogs to be installed)
  319. NEW_LINGUAS=
  320. for presentlang in $ALL_LINGUAS; do
  321. useit=no
  322. if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
  323. desiredlanguages="$LINGUAS"
  324. else
  325. desiredlanguages="$ALL_LINGUAS"
  326. fi
  327. for desiredlang in $desiredlanguages; do
  328. # Use the presentlang catalog if desiredlang is
  329. # a. equal to presentlang, or
  330. # b. a variant of presentlang (because in this case,
  331. # presentlang can be used as a fallback for messages
  332. # which are not translated in the desiredlang catalog).
  333. case "$desiredlang" in
  334. "$presentlang"*) useit=yes;;
  335. esac
  336. done
  337. if test $useit = yes; then
  338. NEW_LINGUAS="$NEW_LINGUAS $presentlang"
  339. fi
  340. done
  341. LINGUAS=$NEW_LINGUAS
  342. AC_MSG_RESULT($LINGUAS)
  343. fi
  344. dnl Construct list of names of catalog files to be constructed.
  345. if test -n "$LINGUAS"; then
  346. for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
  347. fi
  348. fi
  349. dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
  350. dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
  351. dnl Try to locate is.
  352. MKINSTALLDIRS=
  353. if test -n "$ac_aux_dir"; then
  354. MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
  355. fi
  356. if test -z "$MKINSTALLDIRS"; then
  357. MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
  358. fi
  359. AC_SUBST(MKINSTALLDIRS)
  360. dnl Generate list of files to be processed by xgettext which will
  361. dnl be included in po/Makefile.
  362. test -d po || mkdir po
  363. if test "x$srcdir" != "x."; then
  364. if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
  365. posrcprefix="$srcdir/"
  366. else
  367. posrcprefix="../$srcdir/"
  368. fi
  369. else
  370. posrcprefix="../"
  371. fi
  372. rm -f po/POTFILES
  373. sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
  374. < $srcdir/po/POTFILES.in > po/POTFILES
  375. ])
  376. # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
  377. # -------------------------------
  378. # Define VARIABLE to the location where catalog files will
  379. # be installed by po/Makefile.
  380. glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
  381. [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
  382. glib_save_prefix="$prefix"
  383. glib_save_exec_prefix="$exec_prefix"
  384. glib_save_datarootdir="$datarootdir"
  385. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  386. test "x$exec_prefix" = xNONE && exec_prefix=$prefix
  387. datarootdir=`eval echo "${datarootdir}"`
  388. if test "x$CATOBJEXT" = "x.mo" ; then
  389. localedir=`eval echo "${libdir}/locale"`
  390. else
  391. localedir=`eval echo "${datadir}/locale"`
  392. fi
  393. prefix="$glib_save_prefix"
  394. exec_prefix="$glib_save_exec_prefix"
  395. datarootdir="$glib_save_datarootdir"
  396. AC_DEFINE_UNQUOTED($1, "$localedir",
  397. [Define the location where the catalogs will be installed])
  398. ])
  399. dnl
  400. dnl Now the definitions that aclocal will find
  401. dnl
  402. ifdef(glib_configure_ac,[],[
  403. AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
  404. AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
  405. ])dnl
  406. # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
  407. #
  408. # Create a temporary file with TEST-FILE as its contents and pass the
  409. # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
  410. # 0 and perform ACTION-IF-FAIL for any other exit status.
  411. AC_DEFUN([GLIB_RUN_PROG],
  412. [cat >conftest.foo <<_ACEOF
  413. $2
  414. _ACEOF
  415. if AC_RUN_LOG([$1 conftest.foo]); then
  416. m4_ifval([$3], [$3], [:])
  417. m4_ifvaln([$4], [else $4])dnl
  418. echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
  419. sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
  420. fi])
  421. dnl -*- mode: autoconf -*-
  422. # serial 1
  423. dnl Usage:
  424. dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
  425. AC_DEFUN([GTK_DOC_CHECK],
  426. [
  427. AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  428. AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
  429. AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
  430. dnl check for tools we added during development
  431. AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
  432. AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
  433. AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
  434. dnl for overriding the documentation installation directory
  435. AC_ARG_WITH([html-dir],
  436. AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
  437. [with_html_dir='${datadir}/gtk-doc/html'])
  438. HTML_DIR="$with_html_dir"
  439. AC_SUBST([HTML_DIR])
  440. dnl enable/disable documentation building
  441. AC_ARG_ENABLE([gtk-doc],
  442. AS_HELP_STRING([--enable-gtk-doc],
  443. [use gtk-doc to build documentation [[default=no]]]),,
  444. [enable_gtk_doc=no])
  445. if test x$enable_gtk_doc = xyes; then
  446. ifelse([$1],[],
  447. [PKG_CHECK_EXISTS([gtk-doc],,
  448. AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
  449. [PKG_CHECK_EXISTS([gtk-doc >= $1],,
  450. AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))])
  451. dnl don't check for glib if we build glib
  452. if test "x$PACKAGE_NAME" != "xglib"; then
  453. dnl don't fail if someone does not have glib
  454. PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,)
  455. fi
  456. fi
  457. AC_MSG_CHECKING([whether to build gtk-doc documentation])
  458. AC_MSG_RESULT($enable_gtk_doc)
  459. dnl enable/disable output formats
  460. AC_ARG_ENABLE([gtk-doc-html],
  461. AS_HELP_STRING([--enable-gtk-doc-html],
  462. [build documentation in html format [[default=yes]]]),,
  463. [enable_gtk_doc_html=yes])
  464. AC_ARG_ENABLE([gtk-doc-pdf],
  465. AS_HELP_STRING([--enable-gtk-doc-pdf],
  466. [build documentation in pdf format [[default=no]]]),,
  467. [enable_gtk_doc_pdf=no])
  468. if test -z "$GTKDOC_MKPDF"; then
  469. enable_gtk_doc_pdf=no
  470. fi
  471. AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
  472. AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
  473. AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
  474. AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
  475. AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
  476. ])
  477. dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
  478. # serial 42 IT_PROG_INTLTOOL
  479. AC_DEFUN([IT_PROG_INTLTOOL], [
  480. AC_PREREQ([2.50])dnl
  481. AC_REQUIRE([AM_NLS])dnl
  482. case "$am__api_version" in
  483. 1.[01234])
  484. AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
  485. ;;
  486. *)
  487. ;;
  488. esac
  489. INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
  490. INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
  491. INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
  492. if test -n "$1"; then
  493. AC_MSG_CHECKING([for intltool >= $1])
  494. AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
  495. test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
  496. AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
  497. fi
  498. AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
  499. AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
  500. AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
  501. if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
  502. AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
  503. fi
  504. if test -z "$AM_DEFAULT_VERBOSITY"; then
  505. AM_DEFAULT_VERBOSITY=1
  506. fi
  507. AC_SUBST([AM_DEFAULT_VERBOSITY])
  508. INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
  509. INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
  510. INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;'
  511. AC_SUBST(INTLTOOL_V_MERGE)
  512. AC_SUBST(INTLTOOL__v_MERGE_)
  513. AC_SUBST(INTLTOOL__v_MERGE_0)
  514. INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
  515. intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
  516. intltool__v_merge_options_0='-q'
  517. AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
  518. AC_SUBST(intltool__v_merge_options_)
  519. AC_SUBST(intltool__v_merge_options_0)
  520. INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  521. INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  522. INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  523. INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  524. INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
  525. INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  526. INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  527. INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  528. INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  529. INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  530. INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  531. if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
  532. INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
  533. else
  534. INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
  535. fi
  536. INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  537. INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  538. INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  539. INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  540. INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  541. INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  542. INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  543. _IT_SUBST(INTLTOOL_DESKTOP_RULE)
  544. _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
  545. _IT_SUBST(INTLTOOL_KEYS_RULE)
  546. _IT_SUBST(INTLTOOL_PROP_RULE)
  547. _IT_SUBST(INTLTOOL_OAF_RULE)
  548. _IT_SUBST(INTLTOOL_PONG_RULE)
  549. _IT_SUBST(INTLTOOL_SERVER_RULE)
  550. _IT_SUBST(INTLTOOL_SHEET_RULE)
  551. _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
  552. _IT_SUBST(INTLTOOL_UI_RULE)
  553. _IT_SUBST(INTLTOOL_XAM_RULE)
  554. _IT_SUBST(INTLTOOL_KBD_RULE)
  555. _IT_SUBST(INTLTOOL_XML_RULE)
  556. _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
  557. _IT_SUBST(INTLTOOL_CAVES_RULE)
  558. _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
  559. _IT_SUBST(INTLTOOL_THEME_RULE)
  560. _IT_SUBST(INTLTOOL_SERVICE_RULE)
  561. _IT_SUBST(INTLTOOL_POLICY_RULE)
  562. # Check the gettext tools to make sure they are GNU
  563. AC_PATH_PROG(XGETTEXT, xgettext)
  564. AC_PATH_PROG(MSGMERGE, msgmerge)
  565. AC_PATH_PROG(MSGFMT, msgfmt)
  566. AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
  567. if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
  568. AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
  569. fi
  570. xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
  571. mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
  572. mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
  573. if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
  574. AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
  575. fi
  576. AC_PATH_PROG(INTLTOOL_PERL, perl)
  577. if test -z "$INTLTOOL_PERL"; then
  578. AC_MSG_ERROR([perl not found])
  579. fi
  580. AC_MSG_CHECKING([for perl >= 5.8.1])
  581. $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
  582. if test $? -ne 0; then
  583. AC_MSG_ERROR([perl 5.8.1 is required for intltool])
  584. else
  585. IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
  586. AC_MSG_RESULT([$IT_PERL_VERSION])
  587. fi
  588. if test "x$2" != "xno-xml"; then
  589. AC_MSG_CHECKING([for XML::Parser])
  590. if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
  591. AC_MSG_RESULT([ok])
  592. else
  593. AC_MSG_ERROR([XML::Parser perl module is required for intltool])
  594. fi
  595. fi
  596. # Substitute ALL_LINGUAS so we can use it in po/Makefile
  597. AC_SUBST(ALL_LINGUAS)
  598. # Set DATADIRNAME correctly if it is not set yet
  599. # (copied from glib-gettext.m4)
  600. if test -z "$DATADIRNAME"; then
  601. AC_LINK_IFELSE(
  602. [AC_LANG_PROGRAM([[]],
  603. [[extern int _nl_msg_cat_cntr;
  604. return _nl_msg_cat_cntr]])],
  605. [DATADIRNAME=share],
  606. [case $host in
  607. *-*-solaris*)
  608. dnl On Solaris, if bind_textdomain_codeset is in libc,
  609. dnl GNU format message catalog is always supported,
  610. dnl since both are added to the libc all together.
  611. dnl Hence, we'd like to go with DATADIRNAME=share
  612. dnl in this case.
  613. AC_CHECK_FUNC(bind_textdomain_codeset,
  614. [DATADIRNAME=share], [DATADIRNAME=lib])
  615. ;;
  616. *)
  617. [DATADIRNAME=lib]
  618. ;;
  619. esac])
  620. fi
  621. AC_SUBST(DATADIRNAME)
  622. IT_PO_SUBDIR([po])
  623. ])
  624. # IT_PO_SUBDIR(DIRNAME)
  625. # ---------------------
  626. # All po subdirs have to be declared with this macro; the subdir "po" is
  627. # declared by IT_PROG_INTLTOOL.
  628. #
  629. AC_DEFUN([IT_PO_SUBDIR],
  630. [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
  631. dnl
  632. dnl The following CONFIG_COMMANDS should be executed at the very end
  633. dnl of config.status.
  634. AC_CONFIG_COMMANDS_PRE([
  635. AC_CONFIG_COMMANDS([$1/stamp-it], [
  636. if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
  637. AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
  638. fi
  639. rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
  640. >"$1/stamp-it.tmp"
  641. [sed '/^#/d
  642. s/^[[].*] *//
  643. /^[ ]*$/d
  644. '"s|^| $ac_top_srcdir/|" \
  645. "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
  646. ]
  647. [sed '/^POTFILES =/,/[^\\]$/ {
  648. /^POTFILES =/!d
  649. r $1/POTFILES
  650. }
  651. ' "$1/Makefile.in" >"$1/Makefile"]
  652. rm -f "$1/Makefile.tmp"
  653. mv "$1/stamp-it.tmp" "$1/stamp-it"
  654. ])
  655. ])dnl
  656. ])
  657. # _IT_SUBST(VARIABLE)
  658. # -------------------
  659. # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
  660. #
  661. AC_DEFUN([_IT_SUBST],
  662. [
  663. AC_SUBST([$1])
  664. m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
  665. ]
  666. )
  667. # deprecated macros
  668. AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
  669. # A hint is needed for aclocal from Automake <= 1.9.4:
  670. # AC_DEFUN([AC_PROG_INTLTOOL], ...)
  671. dnl -*- mode: autoconf -*-
  672. dnl Copyright 2009 Johan Dahlin
  673. dnl
  674. dnl This file is free software; the author(s) gives unlimited
  675. dnl permission to copy and/or distribute it, with or without
  676. dnl modifications, as long as this notice is preserved.
  677. dnl
  678. # serial 1
  679. m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
  680. [
  681. AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
  682. AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
  683. AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
  684. dnl enable/disable introspection
  685. m4_if([$2], [require],
  686. [dnl
  687. enable_introspection=yes
  688. ],[dnl
  689. AC_ARG_ENABLE(introspection,
  690. AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
  691. [Enable introspection for this build]),,
  692. [enable_introspection=auto])
  693. ])dnl
  694. AC_MSG_CHECKING([for gobject-introspection])
  695. dnl presence/version checking
  696. AS_CASE([$enable_introspection],
  697. [no], [dnl
  698. found_introspection="no (disabled, use --enable-introspection to enable)"
  699. ],dnl
  700. [yes],[dnl
  701. PKG_CHECK_EXISTS([gobject-introspection-1.0],,
  702. AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
  703. PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
  704. found_introspection=yes,
  705. AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
  706. ],dnl
  707. [auto],[dnl
  708. PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
  709. dnl Canonicalize enable_introspection
  710. enable_introspection=$found_introspection
  711. ],dnl
  712. [dnl
  713. AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
  714. ])dnl
  715. AC_MSG_RESULT([$found_introspection])
  716. INTROSPECTION_SCANNER=
  717. INTROSPECTION_COMPILER=
  718. INTROSPECTION_GENERATE=
  719. INTROSPECTION_GIRDIR=
  720. INTROSPECTION_TYPELIBDIR=
  721. if test "x$found_introspection" = "xyes"; then
  722. INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
  723. INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
  724. INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
  725. INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
  726. INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
  727. INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
  728. INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
  729. INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
  730. fi
  731. AC_SUBST(INTROSPECTION_SCANNER)
  732. AC_SUBST(INTROSPECTION_COMPILER)
  733. AC_SUBST(INTROSPECTION_GENERATE)
  734. AC_SUBST(INTROSPECTION_GIRDIR)
  735. AC_SUBST(INTROSPECTION_TYPELIBDIR)
  736. AC_SUBST(INTROSPECTION_CFLAGS)
  737. AC_SUBST(INTROSPECTION_LIBS)
  738. AC_SUBST(INTROSPECTION_MAKEFILE)
  739. AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
  740. ])
  741. dnl Usage:
  742. dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
  743. AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
  744. [
  745. _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
  746. ])
  747. dnl Usage:
  748. dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
  749. AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
  750. [
  751. _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
  752. ])
  753. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  754. #
  755. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  756. # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
  757. # Foundation, Inc.
  758. # Written by Gordon Matzigkeit, 1996
  759. #
  760. # This file is free software; the Free Software Foundation gives
  761. # unlimited permission to copy and/or distribute it, with or without
  762. # modifications, as long as this notice is preserved.
  763. m4_define([_LT_COPYING], [dnl
  764. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
  765. # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
  766. # Foundation, Inc.
  767. # Written by Gordon Matzigkeit, 1996
  768. #
  769. # This file is part of GNU Libtool.
  770. #
  771. # GNU Libtool is free software; you can redistribute it and/or
  772. # modify it under the terms of the GNU General Public License as
  773. # published by the Free Software Foundation; either version 2 of
  774. # the License, or (at your option) any later version.
  775. #
  776. # As a special exception to the GNU General Public License,
  777. # if you distribute this file as part of a program or library that
  778. # is built using GNU Libtool, you may include this file under the
  779. # same distribution terms that you use for the rest of that program.
  780. #
  781. # GNU Libtool is distributed in the hope that it will be useful,
  782. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  783. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  784. # GNU General Public License for more details.
  785. #
  786. # You should have received a copy of the GNU General Public License
  787. # along with GNU Libtool; see the file COPYING. If not, a copy
  788. # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
  789. # obtained by writing to the Free Software Foundation, Inc.,
  790. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  791. ])
  792. # serial 57 LT_INIT
  793. # LT_PREREQ(VERSION)
  794. # ------------------
  795. # Complain and exit if this libtool version is less that VERSION.
  796. m4_defun([LT_PREREQ],
  797. [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
  798. [m4_default([$3],
  799. [m4_fatal([Libtool version $1 or higher is required],
  800. 63)])],
  801. [$2])])
  802. # _LT_CHECK_BUILDDIR
  803. # ------------------
  804. # Complain if the absolute build directory name contains unusual characters
  805. m4_defun([_LT_CHECK_BUILDDIR],
  806. [case `pwd` in
  807. *\ * | *\ *)
  808. AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
  809. esac
  810. ])
  811. # LT_INIT([OPTIONS])
  812. # ------------------
  813. AC_DEFUN([LT_INIT],
  814. [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
  815. AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  816. AC_BEFORE([$0], [LT_LANG])dnl
  817. AC_BEFORE([$0], [LT_OUTPUT])dnl
  818. AC_BEFORE([$0], [LTDL_INIT])dnl
  819. m4_require([_LT_CHECK_BUILDDIR])dnl
  820. dnl Autoconf doesn't catch unexpanded LT_ macros by default:
  821. m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
  822. m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
  823. dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
  824. dnl unless we require an AC_DEFUNed macro:
  825. AC_REQUIRE([LTOPTIONS_VERSION])dnl
  826. AC_REQUIRE([LTSUGAR_VERSION])dnl
  827. AC_REQUIRE([LTVERSION_VERSION])dnl
  828. AC_REQUIRE([LTOBSOLETE_VERSION])dnl
  829. m4_require([_LT_PROG_LTMAIN])dnl
  830. _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
  831. dnl Parse OPTIONS
  832. _LT_SET_OPTIONS([$0], [$1])
  833. # This can be used to rebuild libtool when needed
  834. LIBTOOL_DEPS="$ltmain"
  835. # Always use our own libtool.
  836. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  837. AC_SUBST(LIBTOOL)dnl
  838. _LT_SETUP
  839. # Only expand once:
  840. m4_define([LT_INIT])
  841. ])# LT_INIT
  842. # Old names:
  843. AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
  844. AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
  845. dnl aclocal-1.4 backwards compatibility:
  846. dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
  847. dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
  848. # _LT_CC_BASENAME(CC)
  849. # -------------------
  850. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  851. m4_defun([_LT_CC_BASENAME],
  852. [for cc_temp in $1""; do
  853. case $cc_temp in
  854. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  855. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  856. \-*) ;;
  857. *) break;;
  858. esac
  859. done
  860. cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
  861. ])
  862. # _LT_FILEUTILS_DEFAULTS
  863. # ----------------------
  864. # It is okay to use these file commands and assume they have been set
  865. # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
  866. m4_defun([_LT_FILEUTILS_DEFAULTS],
  867. [: ${CP="cp -f"}
  868. : ${MV="mv -f"}
  869. : ${RM="rm -f"}
  870. ])# _LT_FILEUTILS_DEFAULTS
  871. # _LT_SETUP
  872. # ---------
  873. m4_defun([_LT_SETUP],
  874. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  875. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  876. AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
  877. AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
  878. _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
  879. dnl
  880. _LT_DECL([], [host_alias], [0], [The host system])dnl
  881. _LT_DECL([], [host], [0])dnl
  882. _LT_DECL([], [host_os], [0])dnl
  883. dnl
  884. _LT_DECL([], [build_alias], [0], [The build system])dnl
  885. _LT_DECL([], [build], [0])dnl
  886. _LT_DECL([], [build_os], [0])dnl
  887. dnl
  888. AC_REQUIRE([AC_PROG_CC])dnl
  889. AC_REQUIRE([LT_PATH_LD])dnl
  890. AC_REQUIRE([LT_PATH_NM])dnl
  891. dnl
  892. AC_REQUIRE([AC_PROG_LN_S])dnl
  893. test -z "$LN_S" && LN_S="ln -s"
  894. _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
  895. dnl
  896. AC_REQUIRE([LT_CMD_MAX_LEN])dnl
  897. _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
  898. _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
  899. dnl
  900. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  901. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  902. m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
  903. m4_require([_LT_CMD_RELOAD])dnl
  904. m4_require([_LT_CHECK_MAGIC_METHOD])dnl
  905. m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
  906. m4_require([_LT_CMD_OLD_ARCHIVE])dnl
  907. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  908. m4_require([_LT_WITH_SYSROOT])dnl
  909. _LT_CONFIG_LIBTOOL_INIT([
  910. # See if we are running on zsh, and set the options which allow our
  911. # commands through without removal of \ escapes INIT.
  912. if test -n "\${ZSH_VERSION+set}" ; then
  913. setopt NO_GLOB_SUBST
  914. fi
  915. ])
  916. if test -n "${ZSH_VERSION+set}" ; then
  917. setopt NO_GLOB_SUBST
  918. fi
  919. _LT_CHECK_OBJDIR
  920. m4_require([_LT_TAG_COMPILER])dnl
  921. case $host_os in
  922. aix3*)
  923. # AIX sometimes has problems with the GCC collect2 program. For some
  924. # reason, if we set the COLLECT_NAMES environment variable, the problems
  925. # vanish in a puff of smoke.
  926. if test "X${COLLECT_NAMES+set}" != Xset; then
  927. COLLECT_NAMES=
  928. export COLLECT_NAMES
  929. fi
  930. ;;
  931. esac
  932. # Global variables:
  933. ofile=libtool
  934. can_build_shared=yes
  935. # All known linkers require a `.a' archive for static linking (except MSVC,
  936. # which needs '.lib').
  937. libext=a
  938. with_gnu_ld="$lt_cv_prog_gnu_ld"
  939. old_CC="$CC"
  940. old_CFLAGS="$CFLAGS"
  941. # Set sane defaults for various variables
  942. test -z "$CC" && CC=cc
  943. test -z "$LTCC" && LTCC=$CC
  944. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  945. test -z "$LD" && LD=ld
  946. test -z "$ac_objext" && ac_objext=o
  947. _LT_CC_BASENAME([$compiler])
  948. # Only perform the check for file, if the check method requires it
  949. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  950. case $deplibs_check_method in
  951. file_magic*)
  952. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  953. _LT_PATH_MAGIC
  954. fi
  955. ;;
  956. esac
  957. # Use C for the default configuration in the libtool script
  958. LT_SUPPORTED_TAG([CC])
  959. _LT_LANG_C_CONFIG
  960. _LT_LANG_DEFAULT_CONFIG
  961. _LT_CONFIG_COMMANDS
  962. ])# _LT_SETUP
  963. # _LT_PREPARE_SED_QUOTE_VARS
  964. # --------------------------
  965. # Define a few sed substitution that help us do robust quoting.
  966. m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
  967. [# Backslashify metacharacters that are still active within
  968. # double-quoted strings.
  969. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
  970. # Same as above, but do not quote variable references.
  971. double_quote_subst='s/\([["`\\]]\)/\\\1/g'
  972. # Sed substitution to delay expansion of an escaped shell variable in a
  973. # double_quote_subst'ed string.
  974. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  975. # Sed substitution to delay expansion of an escaped single quote.
  976. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
  977. # Sed substitution to avoid accidental globbing in evaled expressions
  978. no_glob_subst='s/\*/\\\*/g'
  979. ])
  980. # _LT_PROG_LTMAIN
  981. # ---------------
  982. # Note that this code is called both from `configure', and `config.status'
  983. # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
  984. # `config.status' has no value for ac_aux_dir unless we are using Automake,
  985. # so we pass a copy along to make sure it has a sensible value anyway.
  986. m4_defun([_LT_PROG_LTMAIN],
  987. [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
  988. _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
  989. ltmain="$ac_aux_dir/ltmain.sh"
  990. ])# _LT_PROG_LTMAIN
  991. # So that we can recreate a full libtool script including additional
  992. # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
  993. # in macros and then make a single call at the end using the `libtool'
  994. # label.
  995. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
  996. # ----------------------------------------
  997. # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  998. m4_define([_LT_CONFIG_LIBTOOL_INIT],
  999. [m4_ifval([$1],
  1000. [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
  1001. [$1
  1002. ])])])
  1003. # Initialize.
  1004. m4_define([_LT_OUTPUT_LIBTOOL_INIT])
  1005. # _LT_CONFIG_LIBTOOL([COMMANDS])
  1006. # ------------------------------
  1007. # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
  1008. m4_define([_LT_CONFIG_LIBTOOL],
  1009. [m4_ifval([$1],
  1010. [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
  1011. [$1
  1012. ])])])
  1013. # Initialize.
  1014. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
  1015. # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
  1016. # -----------------------------------------------------
  1017. m4_defun([_LT_CONFIG_SAVE_COMMANDS],
  1018. [_LT_CONFIG_LIBTOOL([$1])
  1019. _LT_CONFIG_LIBTOOL_INIT([$2])
  1020. ])
  1021. # _LT_FORMAT_COMMENT([COMMENT])
  1022. # -----------------------------
  1023. # Add leading comment marks to the start of each line, and a trailing
  1024. # full-stop to the whole comment if one is not present already.
  1025. m4_define([_LT_FORMAT_COMMENT],
  1026. [m4_ifval([$1], [
  1027. m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
  1028. [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
  1029. )])
  1030. # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
  1031. # -------------------------------------------------------------------
  1032. # CONFIGNAME is the name given to the value in the libtool script.
  1033. # VARNAME is the (base) name used in the configure script.
  1034. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
  1035. # VARNAME. Any other value will be used directly.
  1036. m4_define([_LT_DECL],
  1037. [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
  1038. [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
  1039. [m4_ifval([$1], [$1], [$2])])
  1040. lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
  1041. m4_ifval([$4],
  1042. [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
  1043. lt_dict_add_subkey([lt_decl_dict], [$2],
  1044. [tagged?], [m4_ifval([$5], [yes], [no])])])
  1045. ])
  1046. # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
  1047. # --------------------------------------------------------
  1048. m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
  1049. # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
  1050. # ------------------------------------------------
  1051. m4_define([lt_decl_tag_varnames],
  1052. [_lt_decl_filter([tagged?], [yes], $@)])
  1053. # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
  1054. # ---------------------------------------------------------
  1055. m4_define([_lt_decl_filter],
  1056. [m4_case([$#],
  1057. [0], [m4_fatal([$0: too few arguments: $#])],
  1058. [1], [m4_fatal([$0: too few arguments: $#: $1])],
  1059. [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
  1060. [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
  1061. [lt_dict_filter([lt_decl_dict], $@)])[]dnl
  1062. ])
  1063. # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
  1064. # --------------------------------------------------
  1065. m4_define([lt_decl_quote_varnames],
  1066. [_lt_decl_filter([value], [1], $@)])
  1067. # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
  1068. # ---------------------------------------------------
  1069. m4_define([lt_decl_dquote_varnames],
  1070. [_lt_decl_filter([value], [2], $@)])
  1071. # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
  1072. # ---------------------------------------------------
  1073. m4_define([lt_decl_varnames_tagged],
  1074. [m4_assert([$# <= 2])dnl
  1075. _$0(m4_quote(m4_default([$1], [[, ]])),
  1076. m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
  1077. m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
  1078. m4_define([_lt_decl_varnames_tagged],
  1079. [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
  1080. # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
  1081. # ------------------------------------------------
  1082. m4_define([lt_decl_all_varnames],
  1083. [_$0(m4_quote(m4_default([$1], [[, ]])),
  1084. m4_if([$2], [],
  1085. m4_quote(lt_decl_varnames),
  1086. m4_quote(m4_shift($@))))[]dnl
  1087. ])
  1088. m4_define([_lt_decl_all_varnames],
  1089. [lt_join($@, lt_decl_varnames_tagged([$1],
  1090. lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
  1091. ])
  1092. # _LT_CONFIG_STATUS_DECLARE([VARNAME])
  1093. # ------------------------------------
  1094. # Quote a variable value, and forward it to `config.status' so that its
  1095. # declaration there will have the same value as in `configure'. VARNAME
  1096. # must have a single quote delimited value for this to work.
  1097. m4_define([_LT_CONFIG_STATUS_DECLARE],
  1098. [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
  1099. # _LT_CONFIG_STATUS_DECLARATIONS
  1100. # ------------------------------
  1101. # We delimit libtool config variables with single quotes, so when
  1102. # we write them to config.status, we have to be sure to quote all
  1103. # embedded single quotes properly. In configure, this macro expands
  1104. # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
  1105. #
  1106. # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
  1107. m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
  1108. [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
  1109. [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
  1110. # _LT_LIBTOOL_TAGS
  1111. # ----------------
  1112. # Output comment and list of tags supported by the script
  1113. m4_defun([_LT_LIBTOOL_TAGS],
  1114. [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
  1115. available_tags="_LT_TAGS"dnl
  1116. ])
  1117. # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
  1118. # -----------------------------------
  1119. # Extract the dictionary values for VARNAME (optionally with TAG) and
  1120. # expand to a commented shell variable setting:
  1121. #
  1122. # # Some comment about what VAR is for.
  1123. # visible_name=$lt_internal_name
  1124. m4_define([_LT_LIBTOOL_DECLARE],
  1125. [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
  1126. [description])))[]dnl
  1127. m4_pushdef([_libtool_name],
  1128. m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
  1129. m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
  1130. [0], [_libtool_name=[$]$1],
  1131. [1], [_libtool_name=$lt_[]$1],
  1132. [2], [_libtool_name=$lt_[]$1],
  1133. [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
  1134. m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
  1135. ])
  1136. # _LT_LIBTOOL_CONFIG_VARS
  1137. # -----------------------
  1138. # Produce commented declarations of non-tagged libtool config variables
  1139. # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
  1140. # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
  1141. # section) are produced by _LT_LIBTOOL_TAG_VARS.
  1142. m4_defun([_LT_LIBTOOL_CONFIG_VARS],
  1143. [m4_foreach([_lt_var],
  1144. m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
  1145. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
  1146. # _LT_LIBTOOL_TAG_VARS(TAG)
  1147. # -------------------------
  1148. m4_define([_LT_LIBTOOL_TAG_VARS],
  1149. [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
  1150. [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
  1151. # _LT_TAGVAR(VARNAME, [TAGNAME])
  1152. # ------------------------------
  1153. m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
  1154. # _LT_CONFIG_COMMANDS
  1155. # -------------------
  1156. # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
  1157. # variables for single and double quote escaping we saved from calls
  1158. # to _LT_DECL, we can put quote escaped variables declarations
  1159. # into `config.status', and then the shell code to quote escape them in
  1160. # for loops in `config.status'. Finally, any additional code accumulated
  1161. # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
  1162. m4_defun([_LT_CONFIG_COMMANDS],
  1163. [AC_PROVIDE_IFELSE([LT_OUTPUT],
  1164. dnl If the libtool generation code has been placed in $CONFIG_LT,
  1165. dnl instead of duplicating it all over again into config.status,
  1166. dnl then we will have config.status run $CONFIG_LT later, so it
  1167. dnl needs to know what name is stored there:
  1168. [AC_CONFIG_COMMANDS([libtool],
  1169. [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
  1170. dnl If the libtool generation code is destined for config.status,
  1171. dnl expand the accumulated commands and init code now:
  1172. [AC_CONFIG_COMMANDS([libtool],
  1173. [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
  1174. ])#_LT_CONFIG_COMMANDS
  1175. # Initialize.
  1176. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
  1177. [
  1178. # The HP-UX ksh and POSIX shell print the target directory to stdout
  1179. # if CDPATH is set.
  1180. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  1181. sed_quote_subst='$sed_quote_subst'
  1182. double_quote_subst='$double_quote_subst'
  1183. delay_variable_subst='$delay_variable_subst'
  1184. _LT_CONFIG_STATUS_DECLARATIONS
  1185. LTCC='$LTCC'
  1186. LTCFLAGS='$LTCFLAGS'
  1187. compiler='$compiler_DEFAULT'
  1188. # A function that is used when there is no print builtin or printf.
  1189. func_fallback_echo ()
  1190. {
  1191. eval 'cat <<_LTECHO_EOF
  1192. \$[]1
  1193. _LTECHO_EOF'
  1194. }
  1195. # Quote evaled strings.
  1196. for var in lt_decl_all_varnames([[ \
  1197. ]], lt_decl_quote_varnames); do
  1198. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  1199. *[[\\\\\\\`\\"\\\$]]*)
  1200. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
  1201. ;;
  1202. *)
  1203. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  1204. ;;
  1205. esac
  1206. done
  1207. # Double-quote double-evaled strings.
  1208. for var in lt_decl_all_varnames([[ \
  1209. ]], lt_decl_dquote_varnames); do
  1210. case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
  1211. *[[\\\\\\\`\\"\\\$]]*)
  1212. eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
  1213. ;;
  1214. *)
  1215. eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
  1216. ;;
  1217. esac
  1218. done
  1219. _LT_OUTPUT_LIBTOOL_INIT
  1220. ])
  1221. # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
  1222. # ------------------------------------
  1223. # Generate a child script FILE with all initialization necessary to
  1224. # reuse the environment learned by the parent script, and make the
  1225. # file executable. If COMMENT is supplied, it is inserted after the
  1226. # `#!' sequence but before initialization text begins. After this
  1227. # macro, additional text can be appended to FILE to form the body of
  1228. # the child script. The macro ends with non-zero status if the
  1229. # file could not be fully written (such as if the disk is full).
  1230. m4_ifdef([AS_INIT_GENERATED],
  1231. [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
  1232. [m4_defun([_LT_GENERATED_FILE_INIT],
  1233. [m4_require([AS_PREPARE])]dnl
  1234. [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
  1235. [lt_write_fail=0
  1236. cat >$1 <<_ASEOF || lt_write_fail=1
  1237. #! $SHELL
  1238. # Generated by $as_me.
  1239. $2
  1240. SHELL=\${CONFIG_SHELL-$SHELL}
  1241. export SHELL
  1242. _ASEOF
  1243. cat >>$1 <<\_ASEOF || lt_write_fail=1
  1244. AS_SHELL_SANITIZE
  1245. _AS_PREPARE
  1246. exec AS_MESSAGE_FD>&1
  1247. _ASEOF
  1248. test $lt_write_fail = 0 && chmod +x $1[]dnl
  1249. m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
  1250. # LT_OUTPUT
  1251. # ---------
  1252. # This macro allows early generation of the libtool script (before
  1253. # AC_OUTPUT is called), incase it is used in configure for compilation
  1254. # tests.
  1255. AC_DEFUN([LT_OUTPUT],
  1256. [: ${CONFIG_LT=./config.lt}
  1257. AC_MSG_NOTICE([creating $CONFIG_LT])
  1258. _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
  1259. [# Run this file to recreate a libtool stub with the current configuration.])
  1260. cat >>"$CONFIG_LT" <<\_LTEOF
  1261. lt_cl_silent=false
  1262. exec AS_MESSAGE_LOG_FD>>config.log
  1263. {
  1264. echo
  1265. AS_BOX([Running $as_me.])
  1266. } >&AS_MESSAGE_LOG_FD
  1267. lt_cl_help="\
  1268. \`$as_me' creates a local libtool stub from the current configuration,
  1269. for use in further configure time tests before the real libtool is
  1270. generated.
  1271. Usage: $[0] [[OPTIONS]]
  1272. -h, --help print this help, then exit
  1273. -V, --version print version number, then exit
  1274. -q, --quiet do not print progress messages
  1275. -d, --debug don't remove temporary files
  1276. Report bugs to <bug-libtool@gnu.org>."
  1277. lt_cl_version="\
  1278. m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
  1279. m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
  1280. configured by $[0], generated by m4_PACKAGE_STRING.
  1281. Copyright (C) 2011 Free Software Foundation, Inc.
  1282. This config.lt script is free software; the Free Software Foundation
  1283. gives unlimited permision to copy, distribute and modify it."
  1284. while test $[#] != 0
  1285. do
  1286. case $[1] in
  1287. --version | --v* | -V )
  1288. echo "$lt_cl_version"; exit 0 ;;
  1289. --help | --h* | -h )
  1290. echo "$lt_cl_help"; exit 0 ;;
  1291. --debug | --d* | -d )
  1292. debug=: ;;
  1293. --quiet | --q* | --silent | --s* | -q )
  1294. lt_cl_silent=: ;;
  1295. -*) AC_MSG_ERROR([unrecognized option: $[1]
  1296. Try \`$[0] --help' for more information.]) ;;
  1297. *) AC_MSG_ERROR([unrecognized argument: $[1]
  1298. Try \`$[0] --help' for more information.]) ;;
  1299. esac
  1300. shift
  1301. done
  1302. if $lt_cl_silent; then
  1303. exec AS_MESSAGE_FD>/dev/null
  1304. fi
  1305. _LTEOF
  1306. cat >>"$CONFIG_LT" <<_LTEOF
  1307. _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
  1308. _LTEOF
  1309. cat >>"$CONFIG_LT" <<\_LTEOF
  1310. AC_MSG_NOTICE([creating $ofile])
  1311. _LT_OUTPUT_LIBTOOL_COMMANDS
  1312. AS_EXIT(0)
  1313. _LTEOF
  1314. chmod +x "$CONFIG_LT"
  1315. # configure is writing to config.log, but config.lt does its own redirection,
  1316. # appending to config.log, which fails on DOS, as config.log is still kept
  1317. # open by configure. Here we exec the FD to /dev/null, effectively closing
  1318. # config.log, so it can be properly (re)opened and appended to by config.lt.
  1319. lt_cl_success=:
  1320. test "$silent" = yes &&
  1321. lt_config_lt_args="$lt_config_lt_args --quiet"
  1322. exec AS_MESSAGE_LOG_FD>/dev/null
  1323. $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
  1324. exec AS_MESSAGE_LOG_FD>>config.log
  1325. $lt_cl_success || AS_EXIT(1)
  1326. ])# LT_OUTPUT
  1327. # _LT_CONFIG(TAG)
  1328. # ---------------
  1329. # If TAG is the built-in tag, create an initial libtool script with a
  1330. # default configuration from the untagged config vars. Otherwise add code
  1331. # to config.status for appending the configuration named by TAG from the
  1332. # matching tagged config vars.
  1333. m4_defun([_LT_CONFIG],
  1334. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  1335. _LT_CONFIG_SAVE_COMMANDS([
  1336. m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
  1337. m4_if(_LT_TAG, [C], [
  1338. # See if we are running on zsh, and set the options which allow our
  1339. # commands through without removal of \ escapes.
  1340. if test -n "${ZSH_VERSION+set}" ; then
  1341. setopt NO_GLOB_SUBST
  1342. fi
  1343. cfgfile="${ofile}T"
  1344. trap "$RM \"$cfgfile\"; exit 1" 1 2 15
  1345. $RM "$cfgfile"
  1346. cat <<_LT_EOF >> "$cfgfile"
  1347. #! $SHELL
  1348. # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  1349. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
  1350. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1351. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  1352. #
  1353. _LT_COPYING
  1354. _LT_LIBTOOL_TAGS
  1355. # ### BEGIN LIBTOOL CONFIG
  1356. _LT_LIBTOOL_CONFIG_VARS
  1357. _LT_LIBTOOL_TAG_VARS
  1358. # ### END LIBTOOL CONFIG
  1359. _LT_EOF
  1360. case $host_os in
  1361. aix3*)
  1362. cat <<\_LT_EOF >> "$cfgfile"
  1363. # AIX sometimes has problems with the GCC collect2 program. For some
  1364. # reason, if we set the COLLECT_NAMES environment variable, the problems
  1365. # vanish in a puff of smoke.
  1366. if test "X${COLLECT_NAMES+set}" != Xset; then
  1367. COLLECT_NAMES=
  1368. export COLLECT_NAMES
  1369. fi
  1370. _LT_EOF
  1371. ;;
  1372. esac
  1373. _LT_PROG_LTMAIN
  1374. # We use sed instead of cat because bash on DJGPP gets confused if
  1375. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  1376. # text mode, it properly converts lines to CR/LF. This bash problem
  1377. # is reportedly fixed, but why not run on old versions too?
  1378. sed '$q' "$ltmain" >> "$cfgfile" \
  1379. || (rm -f "$cfgfile"; exit 1)
  1380. _LT_PROG_REPLACE_SHELLFNS
  1381. mv -f "$cfgfile" "$ofile" ||
  1382. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  1383. chmod +x "$ofile"
  1384. ],
  1385. [cat <<_LT_EOF >> "$ofile"
  1386. dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
  1387. dnl in a comment (ie after a #).
  1388. # ### BEGIN LIBTOOL TAG CONFIG: $1
  1389. _LT_LIBTOOL_TAG_VARS(_LT_TAG)
  1390. # ### END LIBTOOL TAG CONFIG: $1
  1391. _LT_EOF
  1392. ])dnl /m4_if
  1393. ],
  1394. [m4_if([$1], [], [
  1395. PACKAGE='$PACKAGE'
  1396. VERSION='$VERSION'
  1397. TIMESTAMP='$TIMESTAMP'
  1398. RM='$RM'
  1399. ofile='$ofile'], [])
  1400. ])dnl /_LT_CONFIG_SAVE_COMMANDS
  1401. ])# _LT_CONFIG
  1402. # LT_SUPPORTED_TAG(TAG)
  1403. # ---------------------
  1404. # Trace this macro to discover what tags are supported by the libtool
  1405. # --tag option, using:
  1406. # autoconf --trace 'LT_SUPPORTED_TAG:$1'
  1407. AC_DEFUN([LT_SUPPORTED_TAG], [])
  1408. # C support is built-in for now
  1409. m4_define([_LT_LANG_C_enabled], [])
  1410. m4_define([_LT_TAGS], [])
  1411. # LT_LANG(LANG)
  1412. # -------------
  1413. # Enable libtool support for the given language if not already enabled.
  1414. AC_DEFUN([LT_LANG],
  1415. [AC_BEFORE([$0], [LT_OUTPUT])dnl
  1416. m4_case([$1],
  1417. [C], [_LT_LANG(C)],
  1418. [C++], [_LT_LANG(CXX)],
  1419. [Go], [_LT_LANG(GO)],
  1420. [Java], [_LT_LANG(GCJ)],
  1421. [Fortran 77], [_LT_LANG(F77)],
  1422. [Fortran], [_LT_LANG(FC)],
  1423. [Windows Resource], [_LT_LANG(RC)],
  1424. [m4_ifdef([_LT_LANG_]$1[_CONFIG],
  1425. [_LT_LANG($1)],
  1426. [m4_fatal([$0: unsupported language: "$1"])])])dnl
  1427. ])# LT_LANG
  1428. # _LT_LANG(LANGNAME)
  1429. # ------------------
  1430. m4_defun([_LT_LANG],
  1431. [m4_ifdef([_LT_LANG_]$1[_enabled], [],
  1432. [LT_SUPPORTED_TAG([$1])dnl
  1433. m4_append([_LT_TAGS], [$1 ])dnl
  1434. m4_define([_LT_LANG_]$1[_enabled], [])dnl
  1435. _LT_LANG_$1_CONFIG($1)])dnl
  1436. ])# _LT_LANG
  1437. m4_ifndef([AC_PROG_GO], [
  1438. # NOTE: This macro has been submitted for inclusion into #
  1439. # GNU Autoconf as AC_PROG_GO. When it is available in #
  1440. # a released version of Autoconf we should remove this #
  1441. # macro and use it instead. #
  1442. m4_defun([AC_PROG_GO],
  1443. [AC_LANG_PUSH(Go)dnl
  1444. AC_ARG_VAR([GOC], [Go compiler command])dnl
  1445. AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
  1446. _AC_ARG_VAR_LDFLAGS()dnl
  1447. AC_CHECK_TOOL(GOC, gccgo)
  1448. if test -z "$GOC"; then
  1449. if test -n "$ac_tool_prefix"; then
  1450. AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
  1451. fi
  1452. fi
  1453. if test -z "$GOC"; then
  1454. AC_CHECK_PROG(GOC, gccgo, gccgo, false)
  1455. fi
  1456. ])#m4_defun
  1457. ])#m4_ifndef
  1458. # _LT_LANG_DEFAULT_CONFIG
  1459. # -----------------------
  1460. m4_defun([_LT_LANG_DEFAULT_CONFIG],
  1461. [AC_PROVIDE_IFELSE([AC_PROG_CXX],
  1462. [LT_LANG(CXX)],
  1463. [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
  1464. AC_PROVIDE_IFELSE([AC_PROG_F77],
  1465. [LT_LANG(F77)],
  1466. [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
  1467. AC_PROVIDE_IFELSE([AC_PROG_FC],
  1468. [LT_LANG(FC)],
  1469. [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
  1470. dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
  1471. dnl pulling things in needlessly.
  1472. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  1473. [LT_LANG(GCJ)],
  1474. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  1475. [LT_LANG(GCJ)],
  1476. [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
  1477. [LT_LANG(GCJ)],
  1478. [m4_ifdef([AC_PROG_GCJ],
  1479. [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
  1480. m4_ifdef([A][M_PROG_GCJ],
  1481. [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
  1482. m4_ifdef([LT_PROG_GCJ],
  1483. [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
  1484. AC_PROVIDE_IFELSE([AC_PROG_GO],
  1485. [LT_LANG(GO)],
  1486. [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
  1487. AC_PROVIDE_IFELSE([LT_PROG_RC],
  1488. [LT_LANG(RC)],
  1489. [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
  1490. ])# _LT_LANG_DEFAULT_CONFIG
  1491. # Obsolete macros:
  1492. AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
  1493. AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
  1494. AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
  1495. AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
  1496. AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
  1497. dnl aclocal-1.4 backwards compatibility:
  1498. dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
  1499. dnl AC_DEFUN([AC_LIBTOOL_F77], [])
  1500. dnl AC_DEFUN([AC_LIBTOOL_FC], [])
  1501. dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
  1502. dnl AC_DEFUN([AC_LIBTOOL_RC], [])
  1503. # _LT_TAG_COMPILER
  1504. # ----------------
  1505. m4_defun([_LT_TAG_COMPILER],
  1506. [AC_REQUIRE([AC_PROG_CC])dnl
  1507. _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
  1508. _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
  1509. _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
  1510. _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
  1511. # If no C compiler was specified, use CC.
  1512. LTCC=${LTCC-"$CC"}
  1513. # If no C compiler flags were specified, use CFLAGS.
  1514. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  1515. # Allow CC to be a program name with arguments.
  1516. compiler=$CC
  1517. ])# _LT_TAG_COMPILER
  1518. # _LT_COMPILER_BOILERPLATE
  1519. # ------------------------
  1520. # Check for compiler boilerplate output or warnings with
  1521. # the simple compiler test code.
  1522. m4_defun([_LT_COMPILER_BOILERPLATE],
  1523. [m4_require([_LT_DECL_SED])dnl
  1524. ac_outfile=conftest.$ac_objext
  1525. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  1526. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  1527. _lt_compiler_boilerplate=`cat conftest.err`
  1528. $RM conftest*
  1529. ])# _LT_COMPILER_BOILERPLATE
  1530. # _LT_LINKER_BOILERPLATE
  1531. # ----------------------
  1532. # Check for linker boilerplate output or warnings with
  1533. # the simple link test code.
  1534. m4_defun([_LT_LINKER_BOILERPLATE],
  1535. [m4_require([_LT_DECL_SED])dnl
  1536. ac_outfile=conftest.$ac_objext
  1537. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  1538. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  1539. _lt_linker_boilerplate=`cat conftest.err`
  1540. $RM -r conftest*
  1541. ])# _LT_LINKER_BOILERPLATE
  1542. # _LT_REQUIRED_DARWIN_CHECKS
  1543. # -------------------------
  1544. m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
  1545. case $host_os in
  1546. rhapsody* | darwin*)
  1547. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  1548. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  1549. AC_CHECK_TOOL([LIPO], [lipo], [:])
  1550. AC_CHECK_TOOL([OTOOL], [otool], [:])
  1551. AC_CHECK_TOOL([OTOOL64], [otool64], [:])
  1552. _LT_DECL([], [DSYMUTIL], [1],
  1553. [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
  1554. _LT_DECL([], [NMEDIT], [1],
  1555. [Tool to change global to local symbols on Mac OS X])
  1556. _LT_DECL([], [LIPO], [1],
  1557. [Tool to manipulate fat objects and archives on Mac OS X])
  1558. _LT_DECL([], [OTOOL], [1],
  1559. [ldd/readelf like tool for Mach-O binaries on Mac OS X])
  1560. _LT_DECL([], [OTOOL64], [1],
  1561. [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
  1562. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  1563. [lt_cv_apple_cc_single_mod=no
  1564. if test -z "${LT_MULTI_MODULE}"; then
  1565. # By default we will add the -single_module flag. You can override
  1566. # by either setting the environment variable LT_MULTI_MODULE
  1567. # non-empty at configure time, or by adding -multi_module to the
  1568. # link flags.
  1569. rm -rf libconftest.dylib*
  1570. echo "int foo(void){return 1;}" > conftest.c
  1571. echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  1572. -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
  1573. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  1574. -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
  1575. _lt_result=$?
  1576. # If there is a non-empty error log, and "single_module"
  1577. # appears in it, assume the flag caused a linker warning
  1578. if test -s conftest.err && $GREP single_module conftest.err; then
  1579. cat conftest.err >&AS_MESSAGE_LOG_FD
  1580. # Otherwise, if the output was created with a 0 exit code from
  1581. # the compiler, it worked.
  1582. elif test -f libconftest.dylib && test $_lt_result -eq 0; then
  1583. lt_cv_apple_cc_single_mod=yes
  1584. else
  1585. cat conftest.err >&AS_MESSAGE_LOG_FD
  1586. fi
  1587. rm -rf libconftest.dylib*
  1588. rm -f conftest.*
  1589. fi])
  1590. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  1591. [lt_cv_ld_exported_symbols_list],
  1592. [lt_cv_ld_exported_symbols_list=no
  1593. save_LDFLAGS=$LDFLAGS
  1594. echo "_main" > conftest.sym
  1595. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  1596. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  1597. [lt_cv_ld_exported_symbols_list=yes],
  1598. [lt_cv_ld_exported_symbols_list=no])
  1599. LDFLAGS="$save_LDFLAGS"
  1600. ])
  1601. AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
  1602. [lt_cv_ld_force_load=no
  1603. cat > conftest.c << _LT_EOF
  1604. int forced_loaded() { return 2;}
  1605. _LT_EOF
  1606. echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
  1607. $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
  1608. echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
  1609. $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
  1610. echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
  1611. $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
  1612. cat > conftest.c << _LT_EOF
  1613. int main() { return 0;}
  1614. _LT_EOF
  1615. echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
  1616. $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
  1617. _lt_result=$?
  1618. if test -s conftest.err && $GREP force_load conftest.err; then
  1619. cat conftest.err >&AS_MESSAGE_LOG_FD
  1620. elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
  1621. lt_cv_ld_force_load=yes
  1622. else
  1623. cat conftest.err >&AS_MESSAGE_LOG_FD
  1624. fi
  1625. rm -f conftest.err libconftest.a conftest conftest.c
  1626. rm -rf conftest.dSYM
  1627. ])
  1628. case $host_os in
  1629. rhapsody* | darwin1.[[012]])
  1630. _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
  1631. darwin1.*)
  1632. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  1633. darwin*) # darwin 5.x on
  1634. # if running on 10.5 or later, the deployment target defaults
  1635. # to the OS version, if on x86, and 10.4, the deployment
  1636. # target defaults to 10.4. Don't you love it?
  1637. case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  1638. 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
  1639. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  1640. 10.[[012]]*)
  1641. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  1642. 10.*)
  1643. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  1644. esac
  1645. ;;
  1646. esac
  1647. if test "$lt_cv_apple_cc_single_mod" = "yes"; then
  1648. _lt_dar_single_mod='$single_module'
  1649. fi
  1650. if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
  1651. _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
  1652. else
  1653. _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
  1654. fi
  1655. if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
  1656. _lt_dsymutil='~$DSYMUTIL $lib || :'
  1657. else
  1658. _lt_dsymutil=
  1659. fi
  1660. ;;
  1661. esac
  1662. ])
  1663. # _LT_DARWIN_LINKER_FEATURES([TAG])
  1664. # ---------------------------------
  1665. # Checks for linker and compiler features on darwin
  1666. m4_defun([_LT_DARWIN_LINKER_FEATURES],
  1667. [
  1668. m4_require([_LT_REQUIRED_DARWIN_CHECKS])
  1669. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  1670. _LT_TAGVAR(hardcode_direct, $1)=no
  1671. _LT_TAGVAR(hardcode_automatic, $1)=yes
  1672. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  1673. if test "$lt_cv_ld_force_load" = "yes"; then
  1674. _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
  1675. m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
  1676. [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
  1677. else
  1678. _LT_TAGVAR(whole_archive_flag_spec, $1)=''
  1679. fi
  1680. _LT_TAGVAR(link_all_deplibs, $1)=yes
  1681. _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
  1682. case $cc_basename in
  1683. ifort*) _lt_dar_can_shared=yes ;;
  1684. *) _lt_dar_can_shared=$GCC ;;
  1685. esac
  1686. if test "$_lt_dar_can_shared" = "yes"; then
  1687. output_verbose_link_cmd=func_echo_all
  1688. _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
  1689. _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
  1690. _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
  1691. _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
  1692. m4_if([$1], [CXX],
  1693. [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
  1694. _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
  1695. _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
  1696. fi
  1697. ],[])
  1698. else
  1699. _LT_TAGVAR(ld_shlibs, $1)=no
  1700. fi
  1701. ])
  1702. # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
  1703. # ----------------------------------
  1704. # Links a minimal program and checks the executable
  1705. # for the system default hardcoded library path. In most cases,
  1706. # this is /usr/lib:/lib, but when the MPI compilers are used
  1707. # the location of the communication and MPI libs are included too.
  1708. # If we don't find anything, use the default library path according
  1709. # to the aix ld manual.
  1710. # Store the results from the different compilers for each TAGNAME.
  1711. # Allow to override them for all tags through lt_cv_aix_libpath.
  1712. m4_defun([_LT_SYS_MODULE_PATH_AIX],
  1713. [m4_require([_LT_DECL_SED])dnl
  1714. if test "${lt_cv_aix_libpath+set}" = set; then
  1715. aix_libpath=$lt_cv_aix_libpath
  1716. else
  1717. AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
  1718. [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
  1719. lt_aix_libpath_sed='[
  1720. /Import File Strings/,/^$/ {
  1721. /^0/ {
  1722. s/^0 *\([^ ]*\) *$/\1/
  1723. p
  1724. }
  1725. }]'
  1726. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  1727. # Check for a 64-bit object if we didn't find anything.
  1728. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  1729. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  1730. fi],[])
  1731. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
  1732. _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
  1733. fi
  1734. ])
  1735. aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
  1736. fi
  1737. ])# _LT_SYS_MODULE_PATH_AIX
  1738. # _LT_SHELL_INIT(ARG)
  1739. # -------------------
  1740. m4_define([_LT_SHELL_INIT],
  1741. [m4_divert_text([M4SH-INIT], [$1
  1742. ])])# _LT_SHELL_INIT
  1743. # _LT_PROG_ECHO_BACKSLASH
  1744. # -----------------------
  1745. # Find how we can fake an echo command that does not interpret backslash.
  1746. # In particular, with Autoconf 2.60 or later we add some code to the start
  1747. # of the generated configure script which will find a shell with a builtin
  1748. # printf (which we can use as an echo command).
  1749. m4_defun([_LT_PROG_ECHO_BACKSLASH],
  1750. [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1751. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1752. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1753. AC_MSG_CHECKING([how to print strings])
  1754. # Test print first, because it will be a builtin if present.
  1755. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
  1756. test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
  1757. ECHO='print -r --'
  1758. elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
  1759. ECHO='printf %s\n'
  1760. else
  1761. # Use this function as a fallback that always works.
  1762. func_fallback_echo ()
  1763. {
  1764. eval 'cat <<_LTECHO_EOF
  1765. $[]1
  1766. _LTECHO_EOF'
  1767. }
  1768. ECHO='func_fallback_echo'
  1769. fi
  1770. # func_echo_all arg...
  1771. # Invoke $ECHO with all args, space-separated.
  1772. func_echo_all ()
  1773. {
  1774. $ECHO "$*"
  1775. }
  1776. case "$ECHO" in
  1777. printf*) AC_MSG_RESULT([printf]) ;;
  1778. print*) AC_MSG_RESULT([print -r]) ;;
  1779. *) AC_MSG_RESULT([cat]) ;;
  1780. esac
  1781. m4_ifdef([_AS_DETECT_SUGGESTED],
  1782. [_AS_DETECT_SUGGESTED([
  1783. test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
  1784. ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  1785. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
  1786. ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  1787. PATH=/empty FPATH=/empty; export PATH FPATH
  1788. test "X`printf %s $ECHO`" = "X$ECHO" \
  1789. || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
  1790. _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
  1791. _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
  1792. ])# _LT_PROG_ECHO_BACKSLASH
  1793. # _LT_WITH_SYSROOT
  1794. # ----------------
  1795. AC_DEFUN([_LT_WITH_SYSROOT],
  1796. [AC_MSG_CHECKING([for sysroot])
  1797. AC_ARG_WITH([sysroot],
  1798. [ --with-sysroot[=DIR] Search for dependent libraries within DIR
  1799. (or the compiler's sysroot if not specified).],
  1800. [], [with_sysroot=no])
  1801. dnl lt_sysroot will always be passed unquoted. We quote it here
  1802. dnl in case the user passed a directory name.
  1803. lt_sysroot=
  1804. case ${with_sysroot} in #(
  1805. yes)
  1806. if test "$GCC" = yes; then
  1807. lt_sysroot=`$CC --print-sysroot 2>/dev/null`
  1808. fi
  1809. ;; #(
  1810. /*)
  1811. lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
  1812. ;; #(
  1813. no|'')
  1814. ;; #(
  1815. *)
  1816. AC_MSG_RESULT([${with_sysroot}])
  1817. AC_MSG_ERROR([The sysroot must be an absolute path.])
  1818. ;;
  1819. esac
  1820. AC_MSG_RESULT([${lt_sysroot:-no}])
  1821. _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
  1822. [dependent libraries, and in which our libraries should be installed.])])
  1823. # _LT_ENABLE_LOCK
  1824. # ---------------
  1825. m4_defun([_LT_ENABLE_LOCK],
  1826. [AC_ARG_ENABLE([libtool-lock],
  1827. [AS_HELP_STRING([--disable-libtool-lock],
  1828. [avoid locking (might break parallel builds)])])
  1829. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  1830. # Some flags need to be propagated to the compiler or linker for good
  1831. # libtool support.
  1832. case $host in
  1833. ia64-*-hpux*)
  1834. # Find out which ABI we are using.
  1835. echo 'int i;' > conftest.$ac_ext
  1836. if AC_TRY_EVAL(ac_compile); then
  1837. case `/usr/bin/file conftest.$ac_objext` in
  1838. *ELF-32*)
  1839. HPUX_IA64_MODE="32"
  1840. ;;
  1841. *ELF-64*)
  1842. HPUX_IA64_MODE="64"
  1843. ;;
  1844. esac
  1845. fi
  1846. rm -rf conftest*
  1847. ;;
  1848. *-*-irix6*)
  1849. # Find out which ABI we are using.
  1850. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
  1851. if AC_TRY_EVAL(ac_compile); then
  1852. if test "$lt_cv_prog_gnu_ld" = yes; then
  1853. case `/usr/bin/file conftest.$ac_objext` in
  1854. *32-bit*)
  1855. LD="${LD-ld} -melf32bsmip"
  1856. ;;
  1857. *N32*)
  1858. LD="${LD-ld} -melf32bmipn32"
  1859. ;;
  1860. *64-bit*)
  1861. LD="${LD-ld} -melf64bmip"
  1862. ;;
  1863. esac
  1864. else
  1865. case `/usr/bin/file conftest.$ac_objext` in
  1866. *32-bit*)
  1867. LD="${LD-ld} -32"
  1868. ;;
  1869. *N32*)
  1870. LD="${LD-ld} -n32"
  1871. ;;
  1872. *64-bit*)
  1873. LD="${LD-ld} -64"
  1874. ;;
  1875. esac
  1876. fi
  1877. fi
  1878. rm -rf conftest*
  1879. ;;
  1880. x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
  1881. s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
  1882. # Find out which ABI we are using.
  1883. echo 'int i;' > conftest.$ac_ext
  1884. if AC_TRY_EVAL(ac_compile); then
  1885. case `/usr/bin/file conftest.o` in
  1886. *32-bit*)
  1887. case $host in
  1888. x86_64-*kfreebsd*-gnu)
  1889. LD="${LD-ld} -m elf_i386_fbsd"
  1890. ;;
  1891. x86_64-*linux*)
  1892. LD="${LD-ld} -m elf_i386"
  1893. ;;
  1894. ppc64-*linux*|powerpc64-*linux*)
  1895. LD="${LD-ld} -m elf32ppclinux"
  1896. ;;
  1897. s390x-*linux*)
  1898. LD="${LD-ld} -m elf_s390"
  1899. ;;
  1900. sparc64-*linux*)
  1901. LD="${LD-ld} -m elf32_sparc"
  1902. ;;
  1903. esac
  1904. ;;
  1905. *64-bit*)
  1906. case $host in
  1907. x86_64-*kfreebsd*-gnu)
  1908. LD="${LD-ld} -m elf_x86_64_fbsd"
  1909. ;;
  1910. x86_64-*linux*)
  1911. LD="${LD-ld} -m elf_x86_64"
  1912. ;;
  1913. ppc*-*linux*|powerpc*-*linux*)
  1914. LD="${LD-ld} -m elf64ppc"
  1915. ;;
  1916. s390*-*linux*|s390*-*tpf*)
  1917. LD="${LD-ld} -m elf64_s390"
  1918. ;;
  1919. sparc*-*linux*)
  1920. LD="${LD-ld} -m elf64_sparc"
  1921. ;;
  1922. esac
  1923. ;;
  1924. esac
  1925. fi
  1926. rm -rf conftest*
  1927. ;;
  1928. *-*-sco3.2v5*)
  1929. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  1930. SAVE_CFLAGS="$CFLAGS"
  1931. CFLAGS="$CFLAGS -belf"
  1932. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  1933. [AC_LANG_PUSH(C)
  1934. AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  1935. AC_LANG_POP])
  1936. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  1937. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  1938. CFLAGS="$SAVE_CFLAGS"
  1939. fi
  1940. ;;
  1941. *-*solaris*)
  1942. # Find out which ABI we are using.
  1943. echo 'int i;' > conftest.$ac_ext
  1944. if AC_TRY_EVAL(ac_compile); then
  1945. case `/usr/bin/file conftest.o` in
  1946. *64-bit*)
  1947. case $lt_cv_prog_gnu_ld in
  1948. yes*)
  1949. case $host in
  1950. i?86-*-solaris*)
  1951. LD="${LD-ld} -m elf_x86_64"
  1952. ;;
  1953. sparc*-*-solaris*)
  1954. LD="${LD-ld} -m elf64_sparc"
  1955. ;;
  1956. esac
  1957. # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
  1958. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
  1959. LD="${LD-ld}_sol2"
  1960. fi
  1961. ;;
  1962. *)
  1963. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  1964. LD="${LD-ld} -64"
  1965. fi
  1966. ;;
  1967. esac
  1968. ;;
  1969. esac
  1970. fi
  1971. rm -rf conftest*
  1972. ;;
  1973. esac
  1974. need_locks="$enable_libtool_lock"
  1975. ])# _LT_ENABLE_LOCK
  1976. # _LT_PROG_AR
  1977. # -----------
  1978. m4_defun([_LT_PROG_AR],
  1979. [AC_CHECK_TOOLS(AR, [ar], false)
  1980. : ${AR=ar}
  1981. : ${AR_FLAGS=cru}
  1982. _LT_DECL([], [AR], [1], [The archiver])
  1983. _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
  1984. AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
  1985. [lt_cv_ar_at_file=no
  1986. AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
  1987. [echo conftest.$ac_objext > conftest.lst
  1988. lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
  1989. AC_TRY_EVAL([lt_ar_try])
  1990. if test "$ac_status" -eq 0; then
  1991. # Ensure the archiver fails upon bogus file names.
  1992. rm -f conftest.$ac_objext libconftest.a
  1993. AC_TRY_EVAL([lt_ar_try])
  1994. if test "$ac_status" -ne 0; then
  1995. lt_cv_ar_at_file=@
  1996. fi
  1997. fi
  1998. rm -f conftest.* libconftest.a
  1999. ])
  2000. ])
  2001. if test "x$lt_cv_ar_at_file" = xno; then
  2002. archiver_list_spec=
  2003. else
  2004. archiver_list_spec=$lt_cv_ar_at_file
  2005. fi
  2006. _LT_DECL([], [archiver_list_spec], [1],
  2007. [How to feed a file listing to the archiver])
  2008. ])# _LT_PROG_AR
  2009. # _LT_CMD_OLD_ARCHIVE
  2010. # -------------------
  2011. m4_defun([_LT_CMD_OLD_ARCHIVE],
  2012. [_LT_PROG_AR
  2013. AC_CHECK_TOOL(STRIP, strip, :)
  2014. test -z "$STRIP" && STRIP=:
  2015. _LT_DECL([], [STRIP], [1], [A symbol stripping program])
  2016. AC_CHECK_TOOL(RANLIB, ranlib, :)
  2017. test -z "$RANLIB" && RANLIB=:
  2018. _LT_DECL([], [RANLIB], [1],
  2019. [Commands used to install an old-style archive])
  2020. # Determine commands to create old-style static archives.
  2021. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  2022. old_postinstall_cmds='chmod 644 $oldlib'
  2023. old_postuninstall_cmds=
  2024. if test -n "$RANLIB"; then
  2025. case $host_os in
  2026. openbsd*)
  2027. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
  2028. ;;
  2029. *)
  2030. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
  2031. ;;
  2032. esac
  2033. old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
  2034. fi
  2035. case $host_os in
  2036. darwin*)
  2037. lock_old_archive_extraction=yes ;;
  2038. *)
  2039. lock_old_archive_extraction=no ;;
  2040. esac
  2041. _LT_DECL([], [old_postinstall_cmds], [2])
  2042. _LT_DECL([], [old_postuninstall_cmds], [2])
  2043. _LT_TAGDECL([], [old_archive_cmds], [2],
  2044. [Commands used to build an old-style archive])
  2045. _LT_DECL([], [lock_old_archive_extraction], [0],
  2046. [Whether to use a lock for old archive extraction])
  2047. ])# _LT_CMD_OLD_ARCHIVE
  2048. # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  2049. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  2050. # ----------------------------------------------------------------
  2051. # Check whether the given compiler option works
  2052. AC_DEFUN([_LT_COMPILER_OPTION],
  2053. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2054. m4_require([_LT_DECL_SED])dnl
  2055. AC_CACHE_CHECK([$1], [$2],
  2056. [$2=no
  2057. m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  2058. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  2059. lt_compiler_flag="$3"
  2060. # Insert the option either (1) after the last *FLAGS variable, or
  2061. # (2) before a word containing "conftest.", or (3) at the end.
  2062. # Note that $ac_compile itself does not contain backslashes and begins
  2063. # with a dollar sign (not a hyphen), so the echo should work correctly.
  2064. # The option is referenced via a variable to avoid confusing sed.
  2065. lt_compile=`echo "$ac_compile" | $SED \
  2066. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  2067. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  2068. -e 's:$: $lt_compiler_flag:'`
  2069. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  2070. (eval "$lt_compile" 2>conftest.err)
  2071. ac_status=$?
  2072. cat conftest.err >&AS_MESSAGE_LOG_FD
  2073. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  2074. if (exit $ac_status) && test -s "$ac_outfile"; then
  2075. # The compiler can only warn and ignore the option if not recognized
  2076. # So say no if there are warnings other than the usual output.
  2077. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
  2078. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  2079. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  2080. $2=yes
  2081. fi
  2082. fi
  2083. $RM conftest*
  2084. ])
  2085. if test x"[$]$2" = xyes; then
  2086. m4_if([$5], , :, [$5])
  2087. else
  2088. m4_if([$6], , :, [$6])
  2089. fi
  2090. ])# _LT_COMPILER_OPTION
  2091. # Old name:
  2092. AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
  2093. dnl aclocal-1.4 backwards compatibility:
  2094. dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
  2095. # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  2096. # [ACTION-SUCCESS], [ACTION-FAILURE])
  2097. # ----------------------------------------------------
  2098. # Check whether the given linker option works
  2099. AC_DEFUN([_LT_LINKER_OPTION],
  2100. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2101. m4_require([_LT_DECL_SED])dnl
  2102. AC_CACHE_CHECK([$1], [$2],
  2103. [$2=no
  2104. save_LDFLAGS="$LDFLAGS"
  2105. LDFLAGS="$LDFLAGS $3"
  2106. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  2107. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  2108. # The linker can only warn and ignore the option if not recognized
  2109. # So say no if there are warnings
  2110. if test -s conftest.err; then
  2111. # Append any errors to the config.log.
  2112. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  2113. $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
  2114. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  2115. if diff conftest.exp conftest.er2 >/dev/null; then
  2116. $2=yes
  2117. fi
  2118. else
  2119. $2=yes
  2120. fi
  2121. fi
  2122. $RM -r conftest*
  2123. LDFLAGS="$save_LDFLAGS"
  2124. ])
  2125. if test x"[$]$2" = xyes; then
  2126. m4_if([$4], , :, [$4])
  2127. else
  2128. m4_if([$5], , :, [$5])
  2129. fi
  2130. ])# _LT_LINKER_OPTION
  2131. # Old name:
  2132. AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
  2133. dnl aclocal-1.4 backwards compatibility:
  2134. dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
  2135. # LT_CMD_MAX_LEN
  2136. #---------------
  2137. AC_DEFUN([LT_CMD_MAX_LEN],
  2138. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2139. # find the maximum length of command line arguments
  2140. AC_MSG_CHECKING([the maximum length of command line arguments])
  2141. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  2142. i=0
  2143. teststring="ABCD"
  2144. case $build_os in
  2145. msdosdjgpp*)
  2146. # On DJGPP, this test can blow up pretty badly due to problems in libc
  2147. # (any single argument exceeding 2000 bytes causes a buffer overrun
  2148. # during glob expansion). Even if it were fixed, the result of this
  2149. # check would be larger than it should be.
  2150. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  2151. ;;
  2152. gnu*)
  2153. # Under GNU Hurd, this test is not required because there is
  2154. # no limit to the length of command line arguments.
  2155. # Libtool will interpret -1 as no limit whatsoever
  2156. lt_cv_sys_max_cmd_len=-1;
  2157. ;;
  2158. cygwin* | mingw* | cegcc*)
  2159. # On Win9x/ME, this test blows up -- it succeeds, but takes
  2160. # about 5 minutes as the teststring grows exponentially.
  2161. # Worse, since 9x/ME are not pre-emptively multitasking,
  2162. # you end up with a "frozen" computer, even though with patience
  2163. # the test eventually succeeds (with a max line length of 256k).
  2164. # Instead, let's just punt: use the minimum linelength reported by
  2165. # all of the supported platforms: 8192 (on NT/2K/XP).
  2166. lt_cv_sys_max_cmd_len=8192;
  2167. ;;
  2168. mint*)
  2169. # On MiNT this can take a long time and run out of memory.
  2170. lt_cv_sys_max_cmd_len=8192;
  2171. ;;
  2172. amigaos*)
  2173. # On AmigaOS with pdksh, this test takes hours, literally.
  2174. # So we just punt and use a minimum line length of 8192.
  2175. lt_cv_sys_max_cmd_len=8192;
  2176. ;;
  2177. netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
  2178. # This has been around since 386BSD, at least. Likely further.
  2179. if test -x /sbin/sysctl; then
  2180. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  2181. elif test -x /usr/sbin/sysctl; then
  2182. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  2183. else
  2184. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  2185. fi
  2186. # And add a safety zone
  2187. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  2188. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  2189. ;;
  2190. interix*)
  2191. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  2192. lt_cv_sys_max_cmd_len=196608
  2193. ;;
  2194. os2*)
  2195. # The test takes a long time on OS/2.
  2196. lt_cv_sys_max_cmd_len=8192
  2197. ;;
  2198. osf*)
  2199. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  2200. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  2201. # nice to cause kernel panics so lets avoid the loop below.
  2202. # First set a reasonable default.
  2203. lt_cv_sys_max_cmd_len=16384
  2204. #
  2205. if test -x /sbin/sysconfig; then
  2206. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  2207. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  2208. esac
  2209. fi
  2210. ;;
  2211. sco3.2v5*)
  2212. lt_cv_sys_max_cmd_len=102400
  2213. ;;
  2214. sysv5* | sco5v6* | sysv4.2uw2*)
  2215. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  2216. if test -n "$kargmax"; then
  2217. lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
  2218. else
  2219. lt_cv_sys_max_cmd_len=32768
  2220. fi
  2221. ;;
  2222. *)
  2223. lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  2224. if test -n "$lt_cv_sys_max_cmd_len"; then
  2225. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  2226. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  2227. else
  2228. # Make teststring a little bigger before we do anything with it.
  2229. # a 1K string should be a reasonable start.
  2230. for i in 1 2 3 4 5 6 7 8 ; do
  2231. teststring=$teststring$teststring
  2232. done
  2233. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  2234. # If test is not a shell built-in, we'll probably end up computing a
  2235. # maximum length that is only half of the actual maximum length, but
  2236. # we can't tell.
  2237. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
  2238. = "X$teststring$teststring"; } >/dev/null 2>&1 &&
  2239. test $i != 17 # 1/2 MB should be enough
  2240. do
  2241. i=`expr $i + 1`
  2242. teststring=$teststring$teststring
  2243. done
  2244. # Only check the string length outside the loop.
  2245. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
  2246. teststring=
  2247. # Add a significant safety factor because C++ compilers can tack on
  2248. # massive amounts of additional arguments before passing them to the
  2249. # linker. It appears as though 1/2 is a usable value.
  2250. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  2251. fi
  2252. ;;
  2253. esac
  2254. ])
  2255. if test -n $lt_cv_sys_max_cmd_len ; then
  2256. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  2257. else
  2258. AC_MSG_RESULT(none)
  2259. fi
  2260. max_cmd_len=$lt_cv_sys_max_cmd_len
  2261. _LT_DECL([], [max_cmd_len], [0],
  2262. [What is the maximum length of a command?])
  2263. ])# LT_CMD_MAX_LEN
  2264. # Old name:
  2265. AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
  2266. dnl aclocal-1.4 backwards compatibility:
  2267. dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
  2268. # _LT_HEADER_DLFCN
  2269. # ----------------
  2270. m4_defun([_LT_HEADER_DLFCN],
  2271. [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
  2272. ])# _LT_HEADER_DLFCN
  2273. # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  2274. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  2275. # ----------------------------------------------------------------
  2276. m4_defun([_LT_TRY_DLOPEN_SELF],
  2277. [m4_require([_LT_HEADER_DLFCN])dnl
  2278. if test "$cross_compiling" = yes; then :
  2279. [$4]
  2280. else
  2281. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  2282. lt_status=$lt_dlunknown
  2283. cat > conftest.$ac_ext <<_LT_EOF
  2284. [#line $LINENO "configure"
  2285. #include "confdefs.h"
  2286. #if HAVE_DLFCN_H
  2287. #include <dlfcn.h>
  2288. #endif
  2289. #include <stdio.h>
  2290. #ifdef RTLD_GLOBAL
  2291. # define LT_DLGLOBAL RTLD_GLOBAL
  2292. #else
  2293. # ifdef DL_GLOBAL
  2294. # define LT_DLGLOBAL DL_GLOBAL
  2295. # else
  2296. # define LT_DLGLOBAL 0
  2297. # endif
  2298. #endif
  2299. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  2300. find out it does not work in some platform. */
  2301. #ifndef LT_DLLAZY_OR_NOW
  2302. # ifdef RTLD_LAZY
  2303. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  2304. # else
  2305. # ifdef DL_LAZY
  2306. # define LT_DLLAZY_OR_NOW DL_LAZY
  2307. # else
  2308. # ifdef RTLD_NOW
  2309. # define LT_DLLAZY_OR_NOW RTLD_NOW
  2310. # else
  2311. # ifdef DL_NOW
  2312. # define LT_DLLAZY_OR_NOW DL_NOW
  2313. # else
  2314. # define LT_DLLAZY_OR_NOW 0
  2315. # endif
  2316. # endif
  2317. # endif
  2318. # endif
  2319. #endif
  2320. /* When -fvisbility=hidden is used, assume the code has been annotated
  2321. correspondingly for the symbols needed. */
  2322. #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
  2323. int fnord () __attribute__((visibility("default")));
  2324. #endif
  2325. int fnord () { return 42; }
  2326. int main ()
  2327. {
  2328. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  2329. int status = $lt_dlunknown;
  2330. if (self)
  2331. {
  2332. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  2333. else
  2334. {
  2335. if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  2336. else puts (dlerror ());
  2337. }
  2338. /* dlclose (self); */
  2339. }
  2340. else
  2341. puts (dlerror ());
  2342. return status;
  2343. }]
  2344. _LT_EOF
  2345. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  2346. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  2347. lt_status=$?
  2348. case x$lt_status in
  2349. x$lt_dlno_uscore) $1 ;;
  2350. x$lt_dlneed_uscore) $2 ;;
  2351. x$lt_dlunknown|x*) $3 ;;
  2352. esac
  2353. else :
  2354. # compilation failed
  2355. $3
  2356. fi
  2357. fi
  2358. rm -fr conftest*
  2359. ])# _LT_TRY_DLOPEN_SELF
  2360. # LT_SYS_DLOPEN_SELF
  2361. # ------------------
  2362. AC_DEFUN([LT_SYS_DLOPEN_SELF],
  2363. [m4_require([_LT_HEADER_DLFCN])dnl
  2364. if test "x$enable_dlopen" != xyes; then
  2365. enable_dlopen=unknown
  2366. enable_dlopen_self=unknown
  2367. enable_dlopen_self_static=unknown
  2368. else
  2369. lt_cv_dlopen=no
  2370. lt_cv_dlopen_libs=
  2371. case $host_os in
  2372. beos*)
  2373. lt_cv_dlopen="load_add_on"
  2374. lt_cv_dlopen_libs=
  2375. lt_cv_dlopen_self=yes
  2376. ;;
  2377. mingw* | pw32* | cegcc*)
  2378. lt_cv_dlopen="LoadLibrary"
  2379. lt_cv_dlopen_libs=
  2380. ;;
  2381. cygwin*)
  2382. lt_cv_dlopen="dlopen"
  2383. lt_cv_dlopen_libs=
  2384. ;;
  2385. darwin*)
  2386. # if libdl is installed we need to link against it
  2387. AC_CHECK_LIB([dl], [dlopen],
  2388. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
  2389. lt_cv_dlopen="dyld"
  2390. lt_cv_dlopen_libs=
  2391. lt_cv_dlopen_self=yes
  2392. ])
  2393. ;;
  2394. *)
  2395. AC_CHECK_FUNC([shl_load],
  2396. [lt_cv_dlopen="shl_load"],
  2397. [AC_CHECK_LIB([dld], [shl_load],
  2398. [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
  2399. [AC_CHECK_FUNC([dlopen],
  2400. [lt_cv_dlopen="dlopen"],
  2401. [AC_CHECK_LIB([dl], [dlopen],
  2402. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  2403. [AC_CHECK_LIB([svld], [dlopen],
  2404. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  2405. [AC_CHECK_LIB([dld], [dld_link],
  2406. [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
  2407. ])
  2408. ])
  2409. ])
  2410. ])
  2411. ])
  2412. ;;
  2413. esac
  2414. if test "x$lt_cv_dlopen" != xno; then
  2415. enable_dlopen=yes
  2416. else
  2417. enable_dlopen=no
  2418. fi
  2419. case $lt_cv_dlopen in
  2420. dlopen)
  2421. save_CPPFLAGS="$CPPFLAGS"
  2422. test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  2423. save_LDFLAGS="$LDFLAGS"
  2424. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  2425. save_LIBS="$LIBS"
  2426. LIBS="$lt_cv_dlopen_libs $LIBS"
  2427. AC_CACHE_CHECK([whether a program can dlopen itself],
  2428. lt_cv_dlopen_self, [dnl
  2429. _LT_TRY_DLOPEN_SELF(
  2430. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  2431. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  2432. ])
  2433. if test "x$lt_cv_dlopen_self" = xyes; then
  2434. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  2435. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  2436. lt_cv_dlopen_self_static, [dnl
  2437. _LT_TRY_DLOPEN_SELF(
  2438. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  2439. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  2440. ])
  2441. fi
  2442. CPPFLAGS="$save_CPPFLAGS"
  2443. LDFLAGS="$save_LDFLAGS"
  2444. LIBS="$save_LIBS"
  2445. ;;
  2446. esac
  2447. case $lt_cv_dlopen_self in
  2448. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  2449. *) enable_dlopen_self=unknown ;;
  2450. esac
  2451. case $lt_cv_dlopen_self_static in
  2452. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  2453. *) enable_dlopen_self_static=unknown ;;
  2454. esac
  2455. fi
  2456. _LT_DECL([dlopen_support], [enable_dlopen], [0],
  2457. [Whether dlopen is supported])
  2458. _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
  2459. [Whether dlopen of programs is supported])
  2460. _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
  2461. [Whether dlopen of statically linked programs is supported])
  2462. ])# LT_SYS_DLOPEN_SELF
  2463. # Old name:
  2464. AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
  2465. dnl aclocal-1.4 backwards compatibility:
  2466. dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
  2467. # _LT_COMPILER_C_O([TAGNAME])
  2468. # ---------------------------
  2469. # Check to see if options -c and -o are simultaneously supported by compiler.
  2470. # This macro does not hard code the compiler like AC_PROG_CC_C_O.
  2471. m4_defun([_LT_COMPILER_C_O],
  2472. [m4_require([_LT_DECL_SED])dnl
  2473. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2474. m4_require([_LT_TAG_COMPILER])dnl
  2475. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  2476. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  2477. [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  2478. $RM -r conftest 2>/dev/null
  2479. mkdir conftest
  2480. cd conftest
  2481. mkdir out
  2482. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  2483. lt_compiler_flag="-o out/conftest2.$ac_objext"
  2484. # Insert the option either (1) after the last *FLAGS variable, or
  2485. # (2) before a word containing "conftest.", or (3) at the end.
  2486. # Note that $ac_compile itself does not contain backslashes and begins
  2487. # with a dollar sign (not a hyphen), so the echo should work correctly.
  2488. lt_compile=`echo "$ac_compile" | $SED \
  2489. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  2490. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  2491. -e 's:$: $lt_compiler_flag:'`
  2492. (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  2493. (eval "$lt_compile" 2>out/conftest.err)
  2494. ac_status=$?
  2495. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  2496. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  2497. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  2498. then
  2499. # The compiler can only warn and ignore the option if not recognized
  2500. # So say no if there are warnings
  2501. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
  2502. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  2503. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  2504. _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  2505. fi
  2506. fi
  2507. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  2508. $RM conftest*
  2509. # SGI C++ compiler will create directory out/ii_files/ for
  2510. # template instantiation
  2511. test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
  2512. $RM out/* && rmdir out
  2513. cd ..
  2514. $RM -r conftest
  2515. $RM conftest*
  2516. ])
  2517. _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
  2518. [Does compiler simultaneously support -c and -o options?])
  2519. ])# _LT_COMPILER_C_O
  2520. # _LT_COMPILER_FILE_LOCKS([TAGNAME])
  2521. # ----------------------------------
  2522. # Check to see if we can do hard links to lock some files if needed
  2523. m4_defun([_LT_COMPILER_FILE_LOCKS],
  2524. [m4_require([_LT_ENABLE_LOCK])dnl
  2525. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2526. _LT_COMPILER_C_O([$1])
  2527. hard_links="nottested"
  2528. if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
  2529. # do not overwrite the value of need_locks provided by the user
  2530. AC_MSG_CHECKING([if we can lock with hard links])
  2531. hard_links=yes
  2532. $RM conftest*
  2533. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  2534. touch conftest.a
  2535. ln conftest.a conftest.b 2>&5 || hard_links=no
  2536. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  2537. AC_MSG_RESULT([$hard_links])
  2538. if test "$hard_links" = no; then
  2539. AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
  2540. need_locks=warn
  2541. fi
  2542. else
  2543. need_locks=no
  2544. fi
  2545. _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
  2546. ])# _LT_COMPILER_FILE_LOCKS
  2547. # _LT_CHECK_OBJDIR
  2548. # ----------------
  2549. m4_defun([_LT_CHECK_OBJDIR],
  2550. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  2551. [rm -f .libs 2>/dev/null
  2552. mkdir .libs 2>/dev/null
  2553. if test -d .libs; then
  2554. lt_cv_objdir=.libs
  2555. else
  2556. # MS-DOS does not allow filenames that begin with a dot.
  2557. lt_cv_objdir=_libs
  2558. fi
  2559. rmdir .libs 2>/dev/null])
  2560. objdir=$lt_cv_objdir
  2561. _LT_DECL([], [objdir], [0],
  2562. [The name of the directory that contains temporary libtool files])dnl
  2563. m4_pattern_allow([LT_OBJDIR])dnl
  2564. AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
  2565. [Define to the sub-directory in which libtool stores uninstalled libraries.])
  2566. ])# _LT_CHECK_OBJDIR
  2567. # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
  2568. # --------------------------------------
  2569. # Check hardcoding attributes.
  2570. m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
  2571. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  2572. _LT_TAGVAR(hardcode_action, $1)=
  2573. if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
  2574. test -n "$_LT_TAGVAR(runpath_var, $1)" ||
  2575. test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
  2576. # We can hardcode non-existent directories.
  2577. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
  2578. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  2579. # have to relink, otherwise we might link with an installed library
  2580. # when we should be linking with a yet-to-be-installed one
  2581. ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
  2582. test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
  2583. # Linking always hardcodes the temporary library directory.
  2584. _LT_TAGVAR(hardcode_action, $1)=relink
  2585. else
  2586. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  2587. _LT_TAGVAR(hardcode_action, $1)=immediate
  2588. fi
  2589. else
  2590. # We cannot hardcode anything, or else we can only hardcode existing
  2591. # directories.
  2592. _LT_TAGVAR(hardcode_action, $1)=unsupported
  2593. fi
  2594. AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
  2595. if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
  2596. test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
  2597. # Fast installation is not supported
  2598. enable_fast_install=no
  2599. elif test "$shlibpath_overrides_runpath" = yes ||
  2600. test "$enable_shared" = no; then
  2601. # Fast installation is not necessary
  2602. enable_fast_install=needless
  2603. fi
  2604. _LT_TAGDECL([], [hardcode_action], [0],
  2605. [How to hardcode a shared library path into an executable])
  2606. ])# _LT_LINKER_HARDCODE_LIBPATH
  2607. # _LT_CMD_STRIPLIB
  2608. # ----------------
  2609. m4_defun([_LT_CMD_STRIPLIB],
  2610. [m4_require([_LT_DECL_EGREP])
  2611. striplib=
  2612. old_striplib=
  2613. AC_MSG_CHECKING([whether stripping libraries is possible])
  2614. if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
  2615. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  2616. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  2617. AC_MSG_RESULT([yes])
  2618. else
  2619. # FIXME - insert some real tests, host_os isn't really good enough
  2620. case $host_os in
  2621. darwin*)
  2622. if test -n "$STRIP" ; then
  2623. striplib="$STRIP -x"
  2624. old_striplib="$STRIP -S"
  2625. AC_MSG_RESULT([yes])
  2626. else
  2627. AC_MSG_RESULT([no])
  2628. fi
  2629. ;;
  2630. *)
  2631. AC_MSG_RESULT([no])
  2632. ;;
  2633. esac
  2634. fi
  2635. _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
  2636. _LT_DECL([], [striplib], [1])
  2637. ])# _LT_CMD_STRIPLIB
  2638. # _LT_SYS_DYNAMIC_LINKER([TAG])
  2639. # -----------------------------
  2640. # PORTME Fill in your ld.so characteristics
  2641. m4_defun([_LT_SYS_DYNAMIC_LINKER],
  2642. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2643. m4_require([_LT_DECL_EGREP])dnl
  2644. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  2645. m4_require([_LT_DECL_OBJDUMP])dnl
  2646. m4_require([_LT_DECL_SED])dnl
  2647. m4_require([_LT_CHECK_SHELL_FEATURES])dnl
  2648. AC_MSG_CHECKING([dynamic linker characteristics])
  2649. m4_if([$1],
  2650. [], [
  2651. if test "$GCC" = yes; then
  2652. case $host_os in
  2653. darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
  2654. *) lt_awk_arg="/^libraries:/" ;;
  2655. esac
  2656. case $host_os in
  2657. mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
  2658. *) lt_sed_strip_eq="s,=/,/,g" ;;
  2659. esac
  2660. lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
  2661. case $lt_search_path_spec in
  2662. *\;*)
  2663. # if the path contains ";" then we assume it to be the separator
  2664. # otherwise default to the standard path separator (i.e. ":") - it is
  2665. # assumed that no part of a normal pathname contains ";" but that should
  2666. # okay in the real world where ";" in dirpaths is itself problematic.
  2667. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
  2668. ;;
  2669. *)
  2670. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
  2671. ;;
  2672. esac
  2673. # Ok, now we have the path, separated by spaces, we can step through it
  2674. # and add multilib dir if necessary.
  2675. lt_tmp_lt_search_path_spec=
  2676. lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  2677. for lt_sys_path in $lt_search_path_spec; do
  2678. if test -d "$lt_sys_path/$lt_multi_os_dir"; then
  2679. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
  2680. else
  2681. test -d "$lt_sys_path" && \
  2682. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  2683. fi
  2684. done
  2685. lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
  2686. BEGIN {RS=" "; FS="/|\n";} {
  2687. lt_foo="";
  2688. lt_count=0;
  2689. for (lt_i = NF; lt_i > 0; lt_i--) {
  2690. if ($lt_i != "" && $lt_i != ".") {
  2691. if ($lt_i == "..") {
  2692. lt_count++;
  2693. } else {
  2694. if (lt_count == 0) {
  2695. lt_foo="/" $lt_i lt_foo;
  2696. } else {
  2697. lt_count--;
  2698. }
  2699. }
  2700. }
  2701. }
  2702. if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  2703. if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  2704. }'`
  2705. # AWK program above erroneously prepends '/' to C:/dos/paths
  2706. # for these hosts.
  2707. case $host_os in
  2708. mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
  2709. $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
  2710. esac
  2711. sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
  2712. else
  2713. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  2714. fi])
  2715. library_names_spec=
  2716. libname_spec='lib$name'
  2717. soname_spec=
  2718. shrext_cmds=".so"
  2719. postinstall_cmds=
  2720. postuninstall_cmds=
  2721. finish_cmds=
  2722. finish_eval=
  2723. shlibpath_var=
  2724. shlibpath_overrides_runpath=unknown
  2725. version_type=none
  2726. dynamic_linker="$host_os ld.so"
  2727. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  2728. need_lib_prefix=unknown
  2729. hardcode_into_libs=no
  2730. # when you set need_version to no, make sure it does not cause -set_version
  2731. # flags to be left without arguments
  2732. need_version=unknown
  2733. case $host_os in
  2734. aix3*)
  2735. version_type=linux # correct to gnu/linux during the next big refactor
  2736. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  2737. shlibpath_var=LIBPATH
  2738. # AIX 3 has no versioning support, so we append a major version to the name.
  2739. soname_spec='${libname}${release}${shared_ext}$major'
  2740. ;;
  2741. aix[[4-9]]*)
  2742. version_type=linux # correct to gnu/linux during the next big refactor
  2743. need_lib_prefix=no
  2744. need_version=no
  2745. hardcode_into_libs=yes
  2746. if test "$host_cpu" = ia64; then
  2747. # AIX 5 supports IA64
  2748. library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  2749. shlibpath_var=LD_LIBRARY_PATH
  2750. else
  2751. # With GCC up to 2.95.x, collect2 would create an import file
  2752. # for dependence libraries. The import file would start with
  2753. # the line `#! .'. This would cause the generated library to
  2754. # depend on `.', always an invalid library. This was fixed in
  2755. # development snapshots of GCC prior to 3.0.
  2756. case $host_os in
  2757. aix4 | aix4.[[01]] | aix4.[[01]].*)
  2758. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  2759. echo ' yes '
  2760. echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
  2761. :
  2762. else
  2763. can_build_shared=no
  2764. fi
  2765. ;;
  2766. esac
  2767. # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  2768. # soname into executable. Probably we can add versioning support to
  2769. # collect2, so additional links can be useful in future.
  2770. if test "$aix_use_runtimelinking" = yes; then
  2771. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  2772. # instead of lib<name>.a to let people know that these are not
  2773. # typical AIX shared libraries.
  2774. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2775. else
  2776. # We preserve .a as extension for shared libraries through AIX4.2
  2777. # and later when we are not doing run time linking.
  2778. library_names_spec='${libname}${release}.a $libname.a'
  2779. soname_spec='${libname}${release}${shared_ext}$major'
  2780. fi
  2781. shlibpath_var=LIBPATH
  2782. fi
  2783. ;;
  2784. amigaos*)
  2785. case $host_cpu in
  2786. powerpc)
  2787. # Since July 2007 AmigaOS4 officially supports .so libraries.
  2788. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
  2789. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2790. ;;
  2791. m68k)
  2792. library_names_spec='$libname.ixlibrary $libname.a'
  2793. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  2794. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
  2795. ;;
  2796. esac
  2797. ;;
  2798. beos*)
  2799. library_names_spec='${libname}${shared_ext}'
  2800. dynamic_linker="$host_os ld.so"
  2801. shlibpath_var=LIBRARY_PATH
  2802. ;;
  2803. bsdi[[45]]*)
  2804. version_type=linux # correct to gnu/linux during the next big refactor
  2805. need_version=no
  2806. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2807. soname_spec='${libname}${release}${shared_ext}$major'
  2808. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  2809. shlibpath_var=LD_LIBRARY_PATH
  2810. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  2811. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  2812. # the default ld.so.conf also contains /usr/contrib/lib and
  2813. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  2814. # libtool to hard-code these into programs
  2815. ;;
  2816. cygwin* | mingw* | pw32* | cegcc*)
  2817. version_type=windows
  2818. shrext_cmds=".dll"
  2819. need_version=no
  2820. need_lib_prefix=no
  2821. case $GCC,$cc_basename in
  2822. yes,*)
  2823. # gcc
  2824. library_names_spec='$libname.dll.a'
  2825. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2826. postinstall_cmds='base_file=`basename \${file}`~
  2827. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  2828. dldir=$destdir/`dirname \$dlpath`~
  2829. test -d \$dldir || mkdir -p \$dldir~
  2830. $install_prog $dir/$dlname \$dldir/$dlname~
  2831. chmod a+x \$dldir/$dlname~
  2832. if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
  2833. eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
  2834. fi'
  2835. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2836. dlpath=$dir/\$dldll~
  2837. $RM \$dlpath'
  2838. shlibpath_overrides_runpath=yes
  2839. case $host_os in
  2840. cygwin*)
  2841. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  2842. soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2843. m4_if([$1], [],[
  2844. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
  2845. ;;
  2846. mingw* | cegcc*)
  2847. # MinGW DLLs use traditional 'lib' prefix
  2848. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2849. ;;
  2850. pw32*)
  2851. # pw32 DLLs use 'pw' prefix rather than 'lib'
  2852. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2853. ;;
  2854. esac
  2855. dynamic_linker='Win32 ld.exe'
  2856. ;;
  2857. *,cl*)
  2858. # Native MSVC
  2859. libname_spec='$name'
  2860. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  2861. library_names_spec='${libname}.dll.lib'
  2862. case $build_os in
  2863. mingw*)
  2864. sys_lib_search_path_spec=
  2865. lt_save_ifs=$IFS
  2866. IFS=';'
  2867. for lt_path in $LIB
  2868. do
  2869. IFS=$lt_save_ifs
  2870. # Let DOS variable expansion print the short 8.3 style file name.
  2871. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
  2872. sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
  2873. done
  2874. IFS=$lt_save_ifs
  2875. # Convert to MSYS style.
  2876. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
  2877. ;;
  2878. cygwin*)
  2879. # Convert to unix form, then to dos form, then back to unix form
  2880. # but this time dos style (no spaces!) so that the unix form looks
  2881. # like /cygdrive/c/PROGRA~1:/cygdr...
  2882. sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
  2883. sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
  2884. sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2885. ;;
  2886. *)
  2887. sys_lib_search_path_spec="$LIB"
  2888. if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
  2889. # It is most probably a Windows format PATH.
  2890. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  2891. else
  2892. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  2893. fi
  2894. # FIXME: find the short name or the path components, as spaces are
  2895. # common. (e.g. "Program Files" -> "PROGRA~1")
  2896. ;;
  2897. esac
  2898. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  2899. postinstall_cmds='base_file=`basename \${file}`~
  2900. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
  2901. dldir=$destdir/`dirname \$dlpath`~
  2902. test -d \$dldir || mkdir -p \$dldir~
  2903. $install_prog $dir/$dlname \$dldir/$dlname'
  2904. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2905. dlpath=$dir/\$dldll~
  2906. $RM \$dlpath'
  2907. shlibpath_overrides_runpath=yes
  2908. dynamic_linker='Win32 link.exe'
  2909. ;;
  2910. *)
  2911. # Assume MSVC wrapper
  2912. library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  2913. dynamic_linker='Win32 ld.exe'
  2914. ;;
  2915. esac
  2916. # FIXME: first we should search . and the directory the executable is in
  2917. shlibpath_var=PATH
  2918. ;;
  2919. darwin* | rhapsody*)
  2920. dynamic_linker="$host_os dyld"
  2921. version_type=darwin
  2922. need_lib_prefix=no
  2923. need_version=no
  2924. library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  2925. soname_spec='${libname}${release}${major}$shared_ext'
  2926. shlibpath_overrides_runpath=yes
  2927. shlibpath_var=DYLD_LIBRARY_PATH
  2928. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  2929. m4_if([$1], [],[
  2930. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  2931. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  2932. ;;
  2933. dgux*)
  2934. version_type=linux # correct to gnu/linux during the next big refactor
  2935. need_lib_prefix=no
  2936. need_version=no
  2937. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  2938. soname_spec='${libname}${release}${shared_ext}$major'
  2939. shlibpath_var=LD_LIBRARY_PATH
  2940. ;;
  2941. freebsd* | dragonfly*)
  2942. # DragonFly does not have aout. When/if they implement a new
  2943. # versioning mechanism, adjust this.
  2944. if test -x /usr/bin/objformat; then
  2945. objformat=`/usr/bin/objformat`
  2946. else
  2947. case $host_os in
  2948. freebsd[[23]].*) objformat=aout ;;
  2949. *) objformat=elf ;;
  2950. esac
  2951. fi
  2952. version_type=freebsd-$objformat
  2953. case $version_type in
  2954. freebsd-elf*)
  2955. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  2956. need_version=no
  2957. need_lib_prefix=no
  2958. ;;
  2959. freebsd-*)
  2960. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  2961. need_version=yes
  2962. ;;
  2963. esac
  2964. shlibpath_var=LD_LIBRARY_PATH
  2965. case $host_os in
  2966. freebsd2.*)
  2967. shlibpath_overrides_runpath=yes
  2968. ;;
  2969. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  2970. shlibpath_overrides_runpath=yes
  2971. hardcode_into_libs=yes
  2972. ;;
  2973. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  2974. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  2975. shlibpath_overrides_runpath=no
  2976. hardcode_into_libs=yes
  2977. ;;
  2978. *) # from 4.6 on, and DragonFly
  2979. shlibpath_overrides_runpath=yes
  2980. hardcode_into_libs=yes
  2981. ;;
  2982. esac
  2983. ;;
  2984. gnu*)
  2985. version_type=linux # correct to gnu/linux during the next big refactor
  2986. need_lib_prefix=no
  2987. need_version=no
  2988. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  2989. soname_spec='${libname}${release}${shared_ext}$major'
  2990. shlibpath_var=LD_LIBRARY_PATH
  2991. shlibpath_overrides_runpath=no
  2992. hardcode_into_libs=yes
  2993. ;;
  2994. haiku*)
  2995. version_type=linux # correct to gnu/linux during the next big refactor
  2996. need_lib_prefix=no
  2997. need_version=no
  2998. dynamic_linker="$host_os runtime_loader"
  2999. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  3000. soname_spec='${libname}${release}${shared_ext}$major'
  3001. shlibpath_var=LIBRARY_PATH
  3002. shlibpath_overrides_runpath=yes
  3003. sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
  3004. hardcode_into_libs=yes
  3005. ;;
  3006. hpux9* | hpux10* | hpux11*)
  3007. # Give a soname corresponding to the major version so that dld.sl refuses to
  3008. # link against other versions.
  3009. version_type=sunos
  3010. need_lib_prefix=no
  3011. need_version=no
  3012. case $host_cpu in
  3013. ia64*)
  3014. shrext_cmds='.so'
  3015. hardcode_into_libs=yes
  3016. dynamic_linker="$host_os dld.so"
  3017. shlibpath_var=LD_LIBRARY_PATH
  3018. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  3019. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3020. soname_spec='${libname}${release}${shared_ext}$major'
  3021. if test "X$HPUX_IA64_MODE" = X32; then
  3022. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  3023. else
  3024. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  3025. fi
  3026. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  3027. ;;
  3028. hppa*64*)
  3029. shrext_cmds='.sl'
  3030. hardcode_into_libs=yes
  3031. dynamic_linker="$host_os dld.sl"
  3032. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  3033. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  3034. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3035. soname_spec='${libname}${release}${shared_ext}$major'
  3036. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  3037. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  3038. ;;
  3039. *)
  3040. shrext_cmds='.sl'
  3041. dynamic_linker="$host_os dld.sl"
  3042. shlibpath_var=SHLIB_PATH
  3043. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  3044. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3045. soname_spec='${libname}${release}${shared_ext}$major'
  3046. ;;
  3047. esac
  3048. # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
  3049. postinstall_cmds='chmod 555 $lib'
  3050. # or fails outright, so override atomically:
  3051. install_override_mode=555
  3052. ;;
  3053. interix[[3-9]]*)
  3054. version_type=linux # correct to gnu/linux during the next big refactor
  3055. need_lib_prefix=no
  3056. need_version=no
  3057. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  3058. soname_spec='${libname}${release}${shared_ext}$major'
  3059. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  3060. shlibpath_var=LD_LIBRARY_PATH
  3061. shlibpath_overrides_runpath=no
  3062. hardcode_into_libs=yes
  3063. ;;
  3064. irix5* | irix6* | nonstopux*)
  3065. case $host_os in
  3066. nonstopux*) version_type=nonstopux ;;
  3067. *)
  3068. if test "$lt_cv_prog_gnu_ld" = yes; then
  3069. version_type=linux # correct to gnu/linux during the next big refactor
  3070. else
  3071. version_type=irix
  3072. fi ;;
  3073. esac
  3074. need_lib_prefix=no
  3075. need_version=no
  3076. soname_spec='${libname}${release}${shared_ext}$major'
  3077. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  3078. case $host_os in
  3079. irix5* | nonstopux*)
  3080. libsuff= shlibsuff=
  3081. ;;
  3082. *)
  3083. case $LD in # libtool.m4 will add one of these switches to LD
  3084. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  3085. libsuff= shlibsuff= libmagic=32-bit;;
  3086. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  3087. libsuff=32 shlibsuff=N32 libmagic=N32;;
  3088. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  3089. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  3090. *) libsuff= shlibsuff= libmagic=never-match;;
  3091. esac
  3092. ;;
  3093. esac
  3094. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  3095. shlibpath_overrides_runpath=no
  3096. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  3097. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  3098. hardcode_into_libs=yes
  3099. ;;
  3100. # No shared lib support for Linux oldld, aout, or coff.
  3101. linux*oldld* | linux*aout* | linux*coff*)
  3102. dynamic_linker=no
  3103. ;;
  3104. # This must be glibc/ELF.
  3105. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  3106. version_type=linux # correct to gnu/linux during the next big refactor
  3107. need_lib_prefix=no
  3108. need_version=no
  3109. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3110. soname_spec='${libname}${release}${shared_ext}$major'
  3111. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  3112. shlibpath_var=LD_LIBRARY_PATH
  3113. shlibpath_overrides_runpath=no
  3114. # Some binutils ld are patched to set DT_RUNPATH
  3115. AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
  3116. [lt_cv_shlibpath_overrides_runpath=no
  3117. save_LDFLAGS=$LDFLAGS
  3118. save_libdir=$libdir
  3119. eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
  3120. LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
  3121. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  3122. [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
  3123. [lt_cv_shlibpath_overrides_runpath=yes])])
  3124. LDFLAGS=$save_LDFLAGS
  3125. libdir=$save_libdir
  3126. ])
  3127. shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
  3128. # This implies no fast_install, which is unacceptable.
  3129. # Some rework will be needed to allow for fast_install
  3130. # before this can be enabled.
  3131. hardcode_into_libs=yes
  3132. # Add ABI-specific directories to the system library path.
  3133. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
  3134. # Append ld.so.conf contents to the search path
  3135. if test -f /etc/ld.so.conf; then
  3136. lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
  3137. sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
  3138. fi
  3139. # We used to test for /lib/ld.so.1 and disable shared libraries on
  3140. # powerpc, because MkLinux only supported shared libraries with the
  3141. # GNU dynamic linker. Since this was broken with cross compilers,
  3142. # most powerpc-linux boxes support dynamic linking these days and
  3143. # people can always --disable-shared, the test was removed, and we
  3144. # assume the GNU/Linux dynamic linker is in use.
  3145. dynamic_linker='GNU/Linux ld.so'
  3146. ;;
  3147. netbsd*)
  3148. version_type=sunos
  3149. need_lib_prefix=no
  3150. need_version=no
  3151. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  3152. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  3153. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  3154. dynamic_linker='NetBSD (a.out) ld.so'
  3155. else
  3156. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  3157. soname_spec='${libname}${release}${shared_ext}$major'
  3158. dynamic_linker='NetBSD ld.elf_so'
  3159. fi
  3160. shlibpath_var=LD_LIBRARY_PATH
  3161. shlibpath_overrides_runpath=yes
  3162. hardcode_into_libs=yes
  3163. ;;
  3164. newsos6)
  3165. version_type=linux # correct to gnu/linux during the next big refactor
  3166. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3167. shlibpath_var=LD_LIBRARY_PATH
  3168. shlibpath_overrides_runpath=yes
  3169. ;;
  3170. *nto* | *qnx*)
  3171. version_type=qnx
  3172. need_lib_prefix=no
  3173. need_version=no
  3174. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3175. soname_spec='${libname}${release}${shared_ext}$major'
  3176. shlibpath_var=LD_LIBRARY_PATH
  3177. shlibpath_overrides_runpath=no
  3178. hardcode_into_libs=yes
  3179. dynamic_linker='ldqnx.so'
  3180. ;;
  3181. openbsd*)
  3182. version_type=sunos
  3183. sys_lib_dlsearch_path_spec="/usr/lib"
  3184. need_lib_prefix=no
  3185. # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  3186. case $host_os in
  3187. openbsd3.3 | openbsd3.3.*) need_version=yes ;;
  3188. *) need_version=no ;;
  3189. esac
  3190. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  3191. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  3192. shlibpath_var=LD_LIBRARY_PATH
  3193. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  3194. case $host_os in
  3195. openbsd2.[[89]] | openbsd2.[[89]].*)
  3196. shlibpath_overrides_runpath=no
  3197. ;;
  3198. *)
  3199. shlibpath_overrides_runpath=yes
  3200. ;;
  3201. esac
  3202. else
  3203. shlibpath_overrides_runpath=yes
  3204. fi
  3205. ;;
  3206. os2*)
  3207. libname_spec='$name'
  3208. shrext_cmds=".dll"
  3209. need_lib_prefix=no
  3210. library_names_spec='$libname${shared_ext} $libname.a'
  3211. dynamic_linker='OS/2 ld.exe'
  3212. shlibpath_var=LIBPATH
  3213. ;;
  3214. osf3* | osf4* | osf5*)
  3215. version_type=osf
  3216. need_lib_prefix=no
  3217. need_version=no
  3218. soname_spec='${libname}${release}${shared_ext}$major'
  3219. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3220. shlibpath_var=LD_LIBRARY_PATH
  3221. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  3222. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  3223. ;;
  3224. rdos*)
  3225. dynamic_linker=no
  3226. ;;
  3227. solaris*)
  3228. version_type=linux # correct to gnu/linux during the next big refactor
  3229. need_lib_prefix=no
  3230. need_version=no
  3231. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3232. soname_spec='${libname}${release}${shared_ext}$major'
  3233. shlibpath_var=LD_LIBRARY_PATH
  3234. shlibpath_overrides_runpath=yes
  3235. hardcode_into_libs=yes
  3236. # ldd complains unless libraries are executable
  3237. postinstall_cmds='chmod +x $lib'
  3238. ;;
  3239. sunos4*)
  3240. version_type=sunos
  3241. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  3242. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  3243. shlibpath_var=LD_LIBRARY_PATH
  3244. shlibpath_overrides_runpath=yes
  3245. if test "$with_gnu_ld" = yes; then
  3246. need_lib_prefix=no
  3247. fi
  3248. need_version=yes
  3249. ;;
  3250. sysv4 | sysv4.3*)
  3251. version_type=linux # correct to gnu/linux during the next big refactor
  3252. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3253. soname_spec='${libname}${release}${shared_ext}$major'
  3254. shlibpath_var=LD_LIBRARY_PATH
  3255. case $host_vendor in
  3256. sni)
  3257. shlibpath_overrides_runpath=no
  3258. need_lib_prefix=no
  3259. runpath_var=LD_RUN_PATH
  3260. ;;
  3261. siemens)
  3262. need_lib_prefix=no
  3263. ;;
  3264. motorola)
  3265. need_lib_prefix=no
  3266. need_version=no
  3267. shlibpath_overrides_runpath=no
  3268. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  3269. ;;
  3270. esac
  3271. ;;
  3272. sysv4*MP*)
  3273. if test -d /usr/nec ;then
  3274. version_type=linux # correct to gnu/linux during the next big refactor
  3275. library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  3276. soname_spec='$libname${shared_ext}.$major'
  3277. shlibpath_var=LD_LIBRARY_PATH
  3278. fi
  3279. ;;
  3280. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  3281. version_type=freebsd-elf
  3282. need_lib_prefix=no
  3283. need_version=no
  3284. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  3285. soname_spec='${libname}${release}${shared_ext}$major'
  3286. shlibpath_var=LD_LIBRARY_PATH
  3287. shlibpath_overrides_runpath=yes
  3288. hardcode_into_libs=yes
  3289. if test "$with_gnu_ld" = yes; then
  3290. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  3291. else
  3292. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  3293. case $host_os in
  3294. sco3.2v5*)
  3295. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  3296. ;;
  3297. esac
  3298. fi
  3299. sys_lib_dlsearch_path_spec='/usr/lib'
  3300. ;;
  3301. tpf*)
  3302. # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
  3303. version_type=linux # correct to gnu/linux during the next big refactor
  3304. need_lib_prefix=no
  3305. need_version=no
  3306. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3307. shlibpath_var=LD_LIBRARY_PATH
  3308. shlibpath_overrides_runpath=no
  3309. hardcode_into_libs=yes
  3310. ;;
  3311. uts4*)
  3312. version_type=linux # correct to gnu/linux during the next big refactor
  3313. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  3314. soname_spec='${libname}${release}${shared_ext}$major'
  3315. shlibpath_var=LD_LIBRARY_PATH
  3316. ;;
  3317. *)
  3318. dynamic_linker=no
  3319. ;;
  3320. esac
  3321. AC_MSG_RESULT([$dynamic_linker])
  3322. test "$dynamic_linker" = no && can_build_shared=no
  3323. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  3324. if test "$GCC" = yes; then
  3325. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  3326. fi
  3327. if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
  3328. sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
  3329. fi
  3330. if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
  3331. sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
  3332. fi
  3333. _LT_DECL([], [variables_saved_for_relink], [1],
  3334. [Variables whose values should be saved in libtool wrapper scripts and
  3335. restored at link time])
  3336. _LT_DECL([], [need_lib_prefix], [0],
  3337. [Do we need the "lib" prefix for modules?])
  3338. _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
  3339. _LT_DECL([], [version_type], [0], [Library versioning type])
  3340. _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
  3341. _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
  3342. _LT_DECL([], [shlibpath_overrides_runpath], [0],
  3343. [Is shlibpath searched before the hard-coded library search path?])
  3344. _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
  3345. _LT_DECL([], [library_names_spec], [1],
  3346. [[List of archive names. First name is the real one, the rest are links.
  3347. The last name is the one that the linker finds with -lNAME]])
  3348. _LT_DECL([], [soname_spec], [1],
  3349. [[The coded name of the library, if different from the real name]])
  3350. _LT_DECL([], [install_override_mode], [1],
  3351. [Permission mode override for installation of shared libraries])
  3352. _LT_DECL([], [postinstall_cmds], [2],
  3353. [Command to use after installation of a shared archive])
  3354. _LT_DECL([], [postuninstall_cmds], [2],
  3355. [Command to use after uninstallation of a shared archive])
  3356. _LT_DECL([], [finish_cmds], [2],
  3357. [Commands used to finish a libtool library installation in a directory])
  3358. _LT_DECL([], [finish_eval], [1],
  3359. [[As "finish_cmds", except a single script fragment to be evaled but
  3360. not shown]])
  3361. _LT_DECL([], [hardcode_into_libs], [0],
  3362. [Whether we should hardcode library paths into libraries])
  3363. _LT_DECL([], [sys_lib_search_path_spec], [2],
  3364. [Compile-time system search path for libraries])
  3365. _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
  3366. [Run-time system search path for libraries])
  3367. ])# _LT_SYS_DYNAMIC_LINKER
  3368. # _LT_PATH_TOOL_PREFIX(TOOL)
  3369. # --------------------------
  3370. # find a file program which can recognize shared library
  3371. AC_DEFUN([_LT_PATH_TOOL_PREFIX],
  3372. [m4_require([_LT_DECL_EGREP])dnl
  3373. AC_MSG_CHECKING([for $1])
  3374. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  3375. [case $MAGIC_CMD in
  3376. [[\\/*] | ?:[\\/]*])
  3377. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  3378. ;;
  3379. *)
  3380. lt_save_MAGIC_CMD="$MAGIC_CMD"
  3381. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3382. dnl $ac_dummy forces splitting on constant user-supplied paths.
  3383. dnl POSIX.2 word splitting is done only on the output of word expansions,
  3384. dnl not every word. This closes a longstanding sh security hole.
  3385. ac_dummy="m4_if([$2], , $PATH, [$2])"
  3386. for ac_dir in $ac_dummy; do
  3387. IFS="$lt_save_ifs"
  3388. test -z "$ac_dir" && ac_dir=.
  3389. if test -f $ac_dir/$1; then
  3390. lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  3391. if test -n "$file_magic_test_file"; then
  3392. case $deplibs_check_method in
  3393. "file_magic "*)
  3394. file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
  3395. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  3396. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  3397. $EGREP "$file_magic_regex" > /dev/null; then
  3398. :
  3399. else
  3400. cat <<_LT_EOF 1>&2
  3401. *** Warning: the command libtool uses to detect shared libraries,
  3402. *** $file_magic_cmd, produces output that libtool cannot recognize.
  3403. *** The result is that libtool may fail to recognize shared libraries
  3404. *** as such. This will affect the creation of libtool libraries that
  3405. *** depend on shared libraries, but programs linked with such libtool
  3406. *** libraries will work regardless of this problem. Nevertheless, you
  3407. *** may want to report the problem to your system manager and/or to
  3408. *** bug-libtool@gnu.org
  3409. _LT_EOF
  3410. fi ;;
  3411. esac
  3412. fi
  3413. break
  3414. fi
  3415. done
  3416. IFS="$lt_save_ifs"
  3417. MAGIC_CMD="$lt_save_MAGIC_CMD"
  3418. ;;
  3419. esac])
  3420. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  3421. if test -n "$MAGIC_CMD"; then
  3422. AC_MSG_RESULT($MAGIC_CMD)
  3423. else
  3424. AC_MSG_RESULT(no)
  3425. fi
  3426. _LT_DECL([], [MAGIC_CMD], [0],
  3427. [Used to examine libraries when file_magic_cmd begins with "file"])dnl
  3428. ])# _LT_PATH_TOOL_PREFIX
  3429. # Old name:
  3430. AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
  3431. dnl aclocal-1.4 backwards compatibility:
  3432. dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
  3433. # _LT_PATH_MAGIC
  3434. # --------------
  3435. # find a file program which can recognize a shared library
  3436. m4_defun([_LT_PATH_MAGIC],
  3437. [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  3438. if test -z "$lt_cv_path_MAGIC_CMD"; then
  3439. if test -n "$ac_tool_prefix"; then
  3440. _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  3441. else
  3442. MAGIC_CMD=:
  3443. fi
  3444. fi
  3445. ])# _LT_PATH_MAGIC
  3446. # LT_PATH_LD
  3447. # ----------
  3448. # find the pathname to the GNU or non-GNU linker
  3449. AC_DEFUN([LT_PATH_LD],
  3450. [AC_REQUIRE([AC_PROG_CC])dnl
  3451. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3452. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  3453. m4_require([_LT_DECL_SED])dnl
  3454. m4_require([_LT_DECL_EGREP])dnl
  3455. m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
  3456. AC_ARG_WITH([gnu-ld],
  3457. [AS_HELP_STRING([--with-gnu-ld],
  3458. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  3459. [test "$withval" = no || with_gnu_ld=yes],
  3460. [with_gnu_ld=no])dnl
  3461. ac_prog=ld
  3462. if test "$GCC" = yes; then
  3463. # Check if gcc -print-prog-name=ld gives a path.
  3464. AC_MSG_CHECKING([for ld used by $CC])
  3465. case $host in
  3466. *-*-mingw*)
  3467. # gcc leaves a trailing carriage return which upsets mingw
  3468. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  3469. *)
  3470. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  3471. esac
  3472. case $ac_prog in
  3473. # Accept absolute paths.
  3474. [[\\/]]* | ?:[[\\/]]*)
  3475. re_direlt='/[[^/]][[^/]]*/\.\./'
  3476. # Canonicalize the pathname of ld
  3477. ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
  3478. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
  3479. ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
  3480. done
  3481. test -z "$LD" && LD="$ac_prog"
  3482. ;;
  3483. "")
  3484. # If it fails, then pretend we aren't using GCC.
  3485. ac_prog=ld
  3486. ;;
  3487. *)
  3488. # If it is relative, then search for the first ld in PATH.
  3489. with_gnu_ld=unknown
  3490. ;;
  3491. esac
  3492. elif test "$with_gnu_ld" = yes; then
  3493. AC_MSG_CHECKING([for GNU ld])
  3494. else
  3495. AC_MSG_CHECKING([for non-GNU ld])
  3496. fi
  3497. AC_CACHE_VAL(lt_cv_path_LD,
  3498. [if test -z "$LD"; then
  3499. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3500. for ac_dir in $PATH; do
  3501. IFS="$lt_save_ifs"
  3502. test -z "$ac_dir" && ac_dir=.
  3503. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  3504. lt_cv_path_LD="$ac_dir/$ac_prog"
  3505. # Check to see if the program is GNU ld. I'd rather use --version,
  3506. # but apparently some variants of GNU ld only accept -v.
  3507. # Break only if it was the GNU/non-GNU ld that we prefer.
  3508. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  3509. *GNU* | *'with BFD'*)
  3510. test "$with_gnu_ld" != no && break
  3511. ;;
  3512. *)
  3513. test "$with_gnu_ld" != yes && break
  3514. ;;
  3515. esac
  3516. fi
  3517. done
  3518. IFS="$lt_save_ifs"
  3519. else
  3520. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  3521. fi])
  3522. LD="$lt_cv_path_LD"
  3523. if test -n "$LD"; then
  3524. AC_MSG_RESULT($LD)
  3525. else
  3526. AC_MSG_RESULT(no)
  3527. fi
  3528. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  3529. _LT_PATH_LD_GNU
  3530. AC_SUBST([LD])
  3531. _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
  3532. ])# LT_PATH_LD
  3533. # Old names:
  3534. AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
  3535. AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
  3536. dnl aclocal-1.4 backwards compatibility:
  3537. dnl AC_DEFUN([AM_PROG_LD], [])
  3538. dnl AC_DEFUN([AC_PROG_LD], [])
  3539. # _LT_PATH_LD_GNU
  3540. #- --------------
  3541. m4_defun([_LT_PATH_LD_GNU],
  3542. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  3543. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  3544. case `$LD -v 2>&1 </dev/null` in
  3545. *GNU* | *'with BFD'*)
  3546. lt_cv_prog_gnu_ld=yes
  3547. ;;
  3548. *)
  3549. lt_cv_prog_gnu_ld=no
  3550. ;;
  3551. esac])
  3552. with_gnu_ld=$lt_cv_prog_gnu_ld
  3553. ])# _LT_PATH_LD_GNU
  3554. # _LT_CMD_RELOAD
  3555. # --------------
  3556. # find reload flag for linker
  3557. # -- PORTME Some linkers may need a different reload flag.
  3558. m4_defun([_LT_CMD_RELOAD],
  3559. [AC_CACHE_CHECK([for $LD option to reload object files],
  3560. lt_cv_ld_reload_flag,
  3561. [lt_cv_ld_reload_flag='-r'])
  3562. reload_flag=$lt_cv_ld_reload_flag
  3563. case $reload_flag in
  3564. "" | " "*) ;;
  3565. *) reload_flag=" $reload_flag" ;;
  3566. esac
  3567. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3568. case $host_os in
  3569. cygwin* | mingw* | pw32* | cegcc*)
  3570. if test "$GCC" != yes; then
  3571. reload_cmds=false
  3572. fi
  3573. ;;
  3574. darwin*)
  3575. if test "$GCC" = yes; then
  3576. reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
  3577. else
  3578. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  3579. fi
  3580. ;;
  3581. esac
  3582. _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
  3583. _LT_TAGDECL([], [reload_cmds], [2])dnl
  3584. ])# _LT_CMD_RELOAD
  3585. # _LT_CHECK_MAGIC_METHOD
  3586. # ----------------------
  3587. # how to check for library dependencies
  3588. # -- PORTME fill in with the dynamic library characteristics
  3589. m4_defun([_LT_CHECK_MAGIC_METHOD],
  3590. [m4_require([_LT_DECL_EGREP])
  3591. m4_require([_LT_DECL_OBJDUMP])
  3592. AC_CACHE_CHECK([how to recognize dependent libraries],
  3593. lt_cv_deplibs_check_method,
  3594. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  3595. lt_cv_file_magic_test_file=
  3596. lt_cv_deplibs_check_method='unknown'
  3597. # Need to set the preceding variable on all platforms that support
  3598. # interlibrary dependencies.
  3599. # 'none' -- dependencies not supported.
  3600. # `unknown' -- same as none, but documents that we really don't know.
  3601. # 'pass_all' -- all dependencies passed with no checks.
  3602. # 'test_compile' -- check by making test program.
  3603. # 'file_magic [[regex]]' -- check by looking for files in library path
  3604. # which responds to the $file_magic_cmd with a given extended regex.
  3605. # If you have `file' or equivalent on your system and you're not sure
  3606. # whether `pass_all' will *always* work, you probably want this one.
  3607. case $host_os in
  3608. aix[[4-9]]*)
  3609. lt_cv_deplibs_check_method=pass_all
  3610. ;;
  3611. beos*)
  3612. lt_cv_deplibs_check_method=pass_all
  3613. ;;
  3614. bsdi[[45]]*)
  3615. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  3616. lt_cv_file_magic_cmd='/usr/bin/file -L'
  3617. lt_cv_file_magic_test_file=/shlib/libc.so
  3618. ;;
  3619. cygwin*)
  3620. # func_win32_libid is a shell function defined in ltmain.sh
  3621. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3622. lt_cv_file_magic_cmd='func_win32_libid'
  3623. ;;
  3624. mingw* | pw32*)
  3625. # Base MSYS/MinGW do not provide the 'file' command needed by
  3626. # func_win32_libid shell function, so use a weaker test based on 'objdump',
  3627. # unless we find 'file', for example because we are cross-compiling.
  3628. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
  3629. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
  3630. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  3631. lt_cv_file_magic_cmd='func_win32_libid'
  3632. else
  3633. # Keep this pattern in sync with the one in func_win32_libid.
  3634. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
  3635. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3636. fi
  3637. ;;
  3638. cegcc*)
  3639. # use the weaker test based on 'objdump'. See mingw*.
  3640. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
  3641. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3642. ;;
  3643. darwin* | rhapsody*)
  3644. lt_cv_deplibs_check_method=pass_all
  3645. ;;
  3646. freebsd* | dragonfly*)
  3647. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3648. case $host_cpu in
  3649. i*86 )
  3650. # Not sure whether the presence of OpenBSD here was a mistake.
  3651. # Let's accept both of them until this is cleared up.
  3652. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
  3653. lt_cv_file_magic_cmd=/usr/bin/file
  3654. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  3655. ;;
  3656. esac
  3657. else
  3658. lt_cv_deplibs_check_method=pass_all
  3659. fi
  3660. ;;
  3661. gnu*)
  3662. lt_cv_deplibs_check_method=pass_all
  3663. ;;
  3664. haiku*)
  3665. lt_cv_deplibs_check_method=pass_all
  3666. ;;
  3667. hpux10.20* | hpux11*)
  3668. lt_cv_file_magic_cmd=/usr/bin/file
  3669. case $host_cpu in
  3670. ia64*)
  3671. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  3672. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  3673. ;;
  3674. hppa*64*)
  3675. [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
  3676. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  3677. ;;
  3678. *)
  3679. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
  3680. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  3681. ;;
  3682. esac
  3683. ;;
  3684. interix[[3-9]]*)
  3685. # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
  3686. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
  3687. ;;
  3688. irix5* | irix6* | nonstopux*)
  3689. case $LD in
  3690. *-32|*"-32 ") libmagic=32-bit;;
  3691. *-n32|*"-n32 ") libmagic=N32;;
  3692. *-64|*"-64 ") libmagic=64-bit;;
  3693. *) libmagic=never-match;;
  3694. esac
  3695. lt_cv_deplibs_check_method=pass_all
  3696. ;;
  3697. # This must be glibc/ELF.
  3698. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  3699. lt_cv_deplibs_check_method=pass_all
  3700. ;;
  3701. netbsd*)
  3702. if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
  3703. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3704. else
  3705. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  3706. fi
  3707. ;;
  3708. newos6*)
  3709. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  3710. lt_cv_file_magic_cmd=/usr/bin/file
  3711. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  3712. ;;
  3713. *nto* | *qnx*)
  3714. lt_cv_deplibs_check_method=pass_all
  3715. ;;
  3716. openbsd*)
  3717. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  3718. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
  3719. else
  3720. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  3721. fi
  3722. ;;
  3723. osf3* | osf4* | osf5*)
  3724. lt_cv_deplibs_check_method=pass_all
  3725. ;;
  3726. rdos*)
  3727. lt_cv_deplibs_check_method=pass_all
  3728. ;;
  3729. solaris*)
  3730. lt_cv_deplibs_check_method=pass_all
  3731. ;;
  3732. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  3733. lt_cv_deplibs_check_method=pass_all
  3734. ;;
  3735. sysv4 | sysv4.3*)
  3736. case $host_vendor in
  3737. motorola)
  3738. 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]]'
  3739. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  3740. ;;
  3741. ncr)
  3742. lt_cv_deplibs_check_method=pass_all
  3743. ;;
  3744. sequent)
  3745. lt_cv_file_magic_cmd='/bin/file'
  3746. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  3747. ;;
  3748. sni)
  3749. lt_cv_file_magic_cmd='/bin/file'
  3750. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  3751. lt_cv_file_magic_test_file=/lib/libc.so
  3752. ;;
  3753. siemens)
  3754. lt_cv_deplibs_check_method=pass_all
  3755. ;;
  3756. pc)
  3757. lt_cv_deplibs_check_method=pass_all
  3758. ;;
  3759. esac
  3760. ;;
  3761. tpf*)
  3762. lt_cv_deplibs_check_method=pass_all
  3763. ;;
  3764. esac
  3765. ])
  3766. file_magic_glob=
  3767. want_nocaseglob=no
  3768. if test "$build" = "$host"; then
  3769. case $host_os in
  3770. mingw* | pw32*)
  3771. if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
  3772. want_nocaseglob=yes
  3773. else
  3774. file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
  3775. fi
  3776. ;;
  3777. esac
  3778. fi
  3779. file_magic_cmd=$lt_cv_file_magic_cmd
  3780. deplibs_check_method=$lt_cv_deplibs_check_method
  3781. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  3782. _LT_DECL([], [deplibs_check_method], [1],
  3783. [Method to check whether dependent libraries are shared objects])
  3784. _LT_DECL([], [file_magic_cmd], [1],
  3785. [Command to use when deplibs_check_method = "file_magic"])
  3786. _LT_DECL([], [file_magic_glob], [1],
  3787. [How to find potential files when deplibs_check_method = "file_magic"])
  3788. _LT_DECL([], [want_nocaseglob], [1],
  3789. [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
  3790. ])# _LT_CHECK_MAGIC_METHOD
  3791. # LT_PATH_NM
  3792. # ----------
  3793. # find the pathname to a BSD- or MS-compatible name lister
  3794. AC_DEFUN([LT_PATH_NM],
  3795. [AC_REQUIRE([AC_PROG_CC])dnl
  3796. AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
  3797. [if test -n "$NM"; then
  3798. # Let the user override the test.
  3799. lt_cv_path_NM="$NM"
  3800. else
  3801. lt_nm_to_check="${ac_tool_prefix}nm"
  3802. if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
  3803. lt_nm_to_check="$lt_nm_to_check nm"
  3804. fi
  3805. for lt_tmp_nm in $lt_nm_to_check; do
  3806. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3807. for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
  3808. IFS="$lt_save_ifs"
  3809. test -z "$ac_dir" && ac_dir=.
  3810. tmp_nm="$ac_dir/$lt_tmp_nm"
  3811. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  3812. # Check to see if the nm accepts a BSD-compat flag.
  3813. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  3814. # nm: unknown option "B" ignored
  3815. # Tru64's nm complains that /dev/null is an invalid object file
  3816. case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  3817. */dev/null* | *'Invalid file or object type'*)
  3818. lt_cv_path_NM="$tmp_nm -B"
  3819. break
  3820. ;;
  3821. *)
  3822. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  3823. */dev/null*)
  3824. lt_cv_path_NM="$tmp_nm -p"
  3825. break
  3826. ;;
  3827. *)
  3828. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  3829. continue # so that we can try to find one that supports BSD flags
  3830. ;;
  3831. esac
  3832. ;;
  3833. esac
  3834. fi
  3835. done
  3836. IFS="$lt_save_ifs"
  3837. done
  3838. : ${lt_cv_path_NM=no}
  3839. fi])
  3840. if test "$lt_cv_path_NM" != "no"; then
  3841. NM="$lt_cv_path_NM"
  3842. else
  3843. # Didn't find any BSD compatible name lister, look for dumpbin.
  3844. if test -n "$DUMPBIN"; then :
  3845. # Let the user override the test.
  3846. else
  3847. AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
  3848. case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
  3849. *COFF*)
  3850. DUMPBIN="$DUMPBIN -symbols"
  3851. ;;
  3852. *)
  3853. DUMPBIN=:
  3854. ;;
  3855. esac
  3856. fi
  3857. AC_SUBST([DUMPBIN])
  3858. if test "$DUMPBIN" != ":"; then
  3859. NM="$DUMPBIN"
  3860. fi
  3861. fi
  3862. test -z "$NM" && NM=nm
  3863. AC_SUBST([NM])
  3864. _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
  3865. AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
  3866. [lt_cv_nm_interface="BSD nm"
  3867. echo "int some_variable = 0;" > conftest.$ac_ext
  3868. (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
  3869. (eval "$ac_compile" 2>conftest.err)
  3870. cat conftest.err >&AS_MESSAGE_LOG_FD
  3871. (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
  3872. (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  3873. cat conftest.err >&AS_MESSAGE_LOG_FD
  3874. (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
  3875. cat conftest.out >&AS_MESSAGE_LOG_FD
  3876. if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  3877. lt_cv_nm_interface="MS dumpbin"
  3878. fi
  3879. rm -f conftest*])
  3880. ])# LT_PATH_NM
  3881. # Old names:
  3882. AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
  3883. AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
  3884. dnl aclocal-1.4 backwards compatibility:
  3885. dnl AC_DEFUN([AM_PROG_NM], [])
  3886. dnl AC_DEFUN([AC_PROG_NM], [])
  3887. # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3888. # --------------------------------
  3889. # how to determine the name of the shared library
  3890. # associated with a specific link library.
  3891. # -- PORTME fill in with the dynamic library characteristics
  3892. m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
  3893. [m4_require([_LT_DECL_EGREP])
  3894. m4_require([_LT_DECL_OBJDUMP])
  3895. m4_require([_LT_DECL_DLLTOOL])
  3896. AC_CACHE_CHECK([how to associate runtime and link libraries],
  3897. lt_cv_sharedlib_from_linklib_cmd,
  3898. [lt_cv_sharedlib_from_linklib_cmd='unknown'
  3899. case $host_os in
  3900. cygwin* | mingw* | pw32* | cegcc*)
  3901. # two different shell functions defined in ltmain.sh
  3902. # decide which to use based on capabilities of $DLLTOOL
  3903. case `$DLLTOOL --help 2>&1` in
  3904. *--identify-strict*)
  3905. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
  3906. ;;
  3907. *)
  3908. lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
  3909. ;;
  3910. esac
  3911. ;;
  3912. *)
  3913. # fallback: assume linklib IS sharedlib
  3914. lt_cv_sharedlib_from_linklib_cmd="$ECHO"
  3915. ;;
  3916. esac
  3917. ])
  3918. sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
  3919. test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
  3920. _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
  3921. [Command to associate shared and link libraries])
  3922. ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
  3923. # _LT_PATH_MANIFEST_TOOL
  3924. # ----------------------
  3925. # locate the manifest tool
  3926. m4_defun([_LT_PATH_MANIFEST_TOOL],
  3927. [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
  3928. test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
  3929. AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
  3930. [lt_cv_path_mainfest_tool=no
  3931. echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
  3932. $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
  3933. cat conftest.err >&AS_MESSAGE_LOG_FD
  3934. if $GREP 'Manifest Tool' conftest.out > /dev/null; then
  3935. lt_cv_path_mainfest_tool=yes
  3936. fi
  3937. rm -f conftest*])
  3938. if test "x$lt_cv_path_mainfest_tool" != xyes; then
  3939. MANIFEST_TOOL=:
  3940. fi
  3941. _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
  3942. ])# _LT_PATH_MANIFEST_TOOL
  3943. # LT_LIB_M
  3944. # --------
  3945. # check for math library
  3946. AC_DEFUN([LT_LIB_M],
  3947. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3948. LIBM=
  3949. case $host in
  3950. *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
  3951. # These system don't have libm, or don't need it
  3952. ;;
  3953. *-ncr-sysv4.3*)
  3954. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  3955. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  3956. ;;
  3957. *)
  3958. AC_CHECK_LIB(m, cos, LIBM="-lm")
  3959. ;;
  3960. esac
  3961. AC_SUBST([LIBM])
  3962. ])# LT_LIB_M
  3963. # Old name:
  3964. AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
  3965. dnl aclocal-1.4 backwards compatibility:
  3966. dnl AC_DEFUN([AC_CHECK_LIBM], [])
  3967. # _LT_COMPILER_NO_RTTI([TAGNAME])
  3968. # -------------------------------
  3969. m4_defun([_LT_COMPILER_NO_RTTI],
  3970. [m4_require([_LT_TAG_COMPILER])dnl
  3971. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  3972. if test "$GCC" = yes; then
  3973. case $cc_basename in
  3974. nvcc*)
  3975. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
  3976. *)
  3977. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
  3978. esac
  3979. _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  3980. lt_cv_prog_compiler_rtti_exceptions,
  3981. [-fno-rtti -fno-exceptions], [],
  3982. [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  3983. fi
  3984. _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
  3985. [Compiler flag to turn off builtin functions])
  3986. ])# _LT_COMPILER_NO_RTTI
  3987. # _LT_CMD_GLOBAL_SYMBOLS
  3988. # ----------------------
  3989. m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
  3990. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3991. AC_REQUIRE([AC_PROG_CC])dnl
  3992. AC_REQUIRE([AC_PROG_AWK])dnl
  3993. AC_REQUIRE([LT_PATH_NM])dnl
  3994. AC_REQUIRE([LT_PATH_LD])dnl
  3995. m4_require([_LT_DECL_SED])dnl
  3996. m4_require([_LT_DECL_EGREP])dnl
  3997. m4_require([_LT_TAG_COMPILER])dnl
  3998. # Check for command to grab the raw symbol name followed by C symbol from nm.
  3999. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  4000. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  4001. [
  4002. # These are sane defaults that work on at least a few old systems.
  4003. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  4004. # Character class describing NM global symbol codes.
  4005. symcode='[[BCDEGRST]]'
  4006. # Regexp to match symbols that can be accessed directly from C.
  4007. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  4008. # Define system-specific variables.
  4009. case $host_os in
  4010. aix*)
  4011. symcode='[[BCDT]]'
  4012. ;;
  4013. cygwin* | mingw* | pw32* | cegcc*)
  4014. symcode='[[ABCDGISTW]]'
  4015. ;;
  4016. hpux*)
  4017. if test "$host_cpu" = ia64; then
  4018. symcode='[[ABCDEGRST]]'
  4019. fi
  4020. ;;
  4021. irix* | nonstopux*)
  4022. symcode='[[BCDEGRST]]'
  4023. ;;
  4024. osf*)
  4025. symcode='[[BCDEGQRST]]'
  4026. ;;
  4027. solaris*)
  4028. symcode='[[BDRT]]'
  4029. ;;
  4030. sco3.2v5*)
  4031. symcode='[[DT]]'
  4032. ;;
  4033. sysv4.2uw2*)
  4034. symcode='[[DT]]'
  4035. ;;
  4036. sysv5* | sco5v6* | unixware* | OpenUNIX*)
  4037. symcode='[[ABDT]]'
  4038. ;;
  4039. sysv4)
  4040. symcode='[[DFNSTU]]'
  4041. ;;
  4042. esac
  4043. # If we're using GNU nm, then use its standard symbol codes.
  4044. case `$NM -V 2>&1` in
  4045. *GNU* | *'with BFD'*)
  4046. symcode='[[ABCDGIRSTW]]' ;;
  4047. esac
  4048. # Transform an extracted symbol line into a proper C declaration.
  4049. # Some systems (esp. on ia64) link data and code symbols differently,
  4050. # so use this general approach.
  4051. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  4052. # Transform an extracted symbol line into symbol name and symbol address
  4053. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
  4054. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
  4055. # Handle CRLF in mingw tool chain
  4056. opt_cr=
  4057. case $build_os in
  4058. mingw*)
  4059. opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  4060. ;;
  4061. esac
  4062. # Try without a prefix underscore, then with it.
  4063. for ac_symprfx in "" "_"; do
  4064. # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
  4065. symxfrm="\\1 $ac_symprfx\\2 \\2"
  4066. # Write the raw and C identifiers.
  4067. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  4068. # Fake it for dumpbin and say T for any non-static function
  4069. # and D for any global variable.
  4070. # Also find C++ and __fastcall symbols from MSVC++,
  4071. # which start with @ or ?.
  4072. lt_cv_sys_global_symbol_pipe="$AWK ['"\
  4073. " {last_section=section; section=\$ 3};"\
  4074. " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
  4075. " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
  4076. " \$ 0!~/External *\|/{next};"\
  4077. " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
  4078. " {if(hide[section]) next};"\
  4079. " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
  4080. " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
  4081. " s[1]~/^[@?]/{print s[1], s[1]; next};"\
  4082. " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
  4083. " ' prfx=^$ac_symprfx]"
  4084. else
  4085. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
  4086. fi
  4087. lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
  4088. # Check to see that the pipe works correctly.
  4089. pipe_works=no
  4090. rm -f conftest*
  4091. cat > conftest.$ac_ext <<_LT_EOF
  4092. #ifdef __cplusplus
  4093. extern "C" {
  4094. #endif
  4095. char nm_test_var;
  4096. void nm_test_func(void);
  4097. void nm_test_func(void){}
  4098. #ifdef __cplusplus
  4099. }
  4100. #endif
  4101. int main(){nm_test_var='a';nm_test_func();return(0);}
  4102. _LT_EOF
  4103. if AC_TRY_EVAL(ac_compile); then
  4104. # Now try to grab the symbols.
  4105. nlist=conftest.nm
  4106. if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
  4107. # Try sorting and uniquifying the output.
  4108. if sort "$nlist" | uniq > "$nlist"T; then
  4109. mv -f "$nlist"T "$nlist"
  4110. else
  4111. rm -f "$nlist"T
  4112. fi
  4113. # Make sure that we snagged all the symbols we need.
  4114. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  4115. if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  4116. cat <<_LT_EOF > conftest.$ac_ext
  4117. /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
  4118. #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
  4119. /* DATA imports from DLLs on WIN32 con't be const, because runtime
  4120. relocations are performed -- see ld's documentation on pseudo-relocs. */
  4121. # define LT@&t@_DLSYM_CONST
  4122. #elif defined(__osf__)
  4123. /* This system does not cope well with relocations in const data. */
  4124. # define LT@&t@_DLSYM_CONST
  4125. #else
  4126. # define LT@&t@_DLSYM_CONST const
  4127. #endif
  4128. #ifdef __cplusplus
  4129. extern "C" {
  4130. #endif
  4131. _LT_EOF
  4132. # Now generate the symbol file.
  4133. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
  4134. cat <<_LT_EOF >> conftest.$ac_ext
  4135. /* The mapping between symbol names and symbols. */
  4136. LT@&t@_DLSYM_CONST struct {
  4137. const char *name;
  4138. void *address;
  4139. }
  4140. lt__PROGRAM__LTX_preloaded_symbols[[]] =
  4141. {
  4142. { "@PROGRAM@", (void *) 0 },
  4143. _LT_EOF
  4144. $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
  4145. cat <<\_LT_EOF >> conftest.$ac_ext
  4146. {0, (void *) 0}
  4147. };
  4148. /* This works around a problem in FreeBSD linker */
  4149. #ifdef FREEBSD_WORKAROUND
  4150. static const void *lt_preloaded_setup() {
  4151. return lt__PROGRAM__LTX_preloaded_symbols;
  4152. }
  4153. #endif
  4154. #ifdef __cplusplus
  4155. }
  4156. #endif
  4157. _LT_EOF
  4158. # Now try linking the two files.
  4159. mv conftest.$ac_objext conftstm.$ac_objext
  4160. lt_globsym_save_LIBS=$LIBS
  4161. lt_globsym_save_CFLAGS=$CFLAGS
  4162. LIBS="conftstm.$ac_objext"
  4163. CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  4164. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  4165. pipe_works=yes
  4166. fi
  4167. LIBS=$lt_globsym_save_LIBS
  4168. CFLAGS=$lt_globsym_save_CFLAGS
  4169. else
  4170. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  4171. fi
  4172. else
  4173. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  4174. fi
  4175. else
  4176. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  4177. fi
  4178. else
  4179. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  4180. cat conftest.$ac_ext >&5
  4181. fi
  4182. rm -rf conftest* conftst*
  4183. # Do not use the global_symbol_pipe unless it works.
  4184. if test "$pipe_works" = yes; then
  4185. break
  4186. else
  4187. lt_cv_sys_global_symbol_pipe=
  4188. fi
  4189. done
  4190. ])
  4191. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  4192. lt_cv_sys_global_symbol_to_cdecl=
  4193. fi
  4194. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  4195. AC_MSG_RESULT(failed)
  4196. else
  4197. AC_MSG_RESULT(ok)
  4198. fi
  4199. # Response file support.
  4200. if test "$lt_cv_nm_interface" = "MS dumpbin"; then
  4201. nm_file_list_spec='@'
  4202. elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
  4203. nm_file_list_spec='@'
  4204. fi
  4205. _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
  4206. [Take the output of nm and produce a listing of raw symbols and C names])
  4207. _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
  4208. [Transform the output of nm in a proper C declaration])
  4209. _LT_DECL([global_symbol_to_c_name_address],
  4210. [lt_cv_sys_global_symbol_to_c_name_address], [1],
  4211. [Transform the output of nm in a C name address pair])
  4212. _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
  4213. [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
  4214. [Transform the output of nm in a C name address pair when lib prefix is needed])
  4215. _LT_DECL([], [nm_file_list_spec], [1],
  4216. [Specify filename containing input files for $NM])
  4217. ]) # _LT_CMD_GLOBAL_SYMBOLS
  4218. # _LT_COMPILER_PIC([TAGNAME])
  4219. # ---------------------------
  4220. m4_defun([_LT_COMPILER_PIC],
  4221. [m4_require([_LT_TAG_COMPILER])dnl
  4222. _LT_TAGVAR(lt_prog_compiler_wl, $1)=
  4223. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4224. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  4225. m4_if([$1], [CXX], [
  4226. # C++ specific cases for pic, static, wl, etc.
  4227. if test "$GXX" = yes; then
  4228. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4229. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4230. case $host_os in
  4231. aix*)
  4232. # All AIX code is PIC.
  4233. if test "$host_cpu" = ia64; then
  4234. # AIX 5 now supports IA64 processor
  4235. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4236. fi
  4237. ;;
  4238. amigaos*)
  4239. case $host_cpu in
  4240. powerpc)
  4241. # see comment about AmigaOS4 .so support
  4242. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4243. ;;
  4244. m68k)
  4245. # FIXME: we need at least 68020 code to build shared libraries, but
  4246. # adding the `-m68020' flag to GCC prevents building anything better,
  4247. # like `-m68040'.
  4248. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4249. ;;
  4250. esac
  4251. ;;
  4252. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4253. # PIC is the default for these OSes.
  4254. ;;
  4255. mingw* | cygwin* | os2* | pw32* | cegcc*)
  4256. # This hack is so that the source file can tell whether it is being
  4257. # built for inclusion in a dll (and should export symbols for example).
  4258. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  4259. # (--disable-auto-import) libraries
  4260. m4_if([$1], [GCJ], [],
  4261. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4262. ;;
  4263. darwin* | rhapsody*)
  4264. # PIC is the default on this platform
  4265. # Common symbols not allowed in MH_DYLIB files
  4266. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4267. ;;
  4268. *djgpp*)
  4269. # DJGPP does not support shared libraries at all
  4270. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4271. ;;
  4272. haiku*)
  4273. # PIC is the default for Haiku.
  4274. # The "-static" flag exists, but is broken.
  4275. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  4276. ;;
  4277. interix[[3-9]]*)
  4278. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  4279. # Instead, we relocate shared libraries at runtime.
  4280. ;;
  4281. sysv4*MP*)
  4282. if test -d /usr/nec; then
  4283. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4284. fi
  4285. ;;
  4286. hpux*)
  4287. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  4288. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  4289. # sets the default TLS model and affects inlining.
  4290. case $host_cpu in
  4291. hppa*64*)
  4292. ;;
  4293. *)
  4294. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4295. ;;
  4296. esac
  4297. ;;
  4298. *qnx* | *nto*)
  4299. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4300. # it will coredump.
  4301. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4302. ;;
  4303. *)
  4304. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4305. ;;
  4306. esac
  4307. else
  4308. case $host_os in
  4309. aix[[4-9]]*)
  4310. # All AIX code is PIC.
  4311. if test "$host_cpu" = ia64; then
  4312. # AIX 5 now supports IA64 processor
  4313. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4314. else
  4315. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4316. fi
  4317. ;;
  4318. chorus*)
  4319. case $cc_basename in
  4320. cxch68*)
  4321. # Green Hills C++ Compiler
  4322. # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
  4323. ;;
  4324. esac
  4325. ;;
  4326. mingw* | cygwin* | os2* | pw32* | cegcc*)
  4327. # This hack is so that the source file can tell whether it is being
  4328. # built for inclusion in a dll (and should export symbols for example).
  4329. m4_if([$1], [GCJ], [],
  4330. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4331. ;;
  4332. dgux*)
  4333. case $cc_basename in
  4334. ec++*)
  4335. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4336. ;;
  4337. ghcx*)
  4338. # Green Hills C++ Compiler
  4339. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4340. ;;
  4341. *)
  4342. ;;
  4343. esac
  4344. ;;
  4345. freebsd* | dragonfly*)
  4346. # FreeBSD uses GNU C++
  4347. ;;
  4348. hpux9* | hpux10* | hpux11*)
  4349. case $cc_basename in
  4350. CC*)
  4351. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4352. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  4353. if test "$host_cpu" != ia64; then
  4354. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4355. fi
  4356. ;;
  4357. aCC*)
  4358. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4359. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  4360. case $host_cpu in
  4361. hppa*64*|ia64*)
  4362. # +Z the default
  4363. ;;
  4364. *)
  4365. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4366. ;;
  4367. esac
  4368. ;;
  4369. *)
  4370. ;;
  4371. esac
  4372. ;;
  4373. interix*)
  4374. # This is c89, which is MS Visual C++ (no shared libs)
  4375. # Anyone wants to do a port?
  4376. ;;
  4377. irix5* | irix6* | nonstopux*)
  4378. case $cc_basename in
  4379. CC*)
  4380. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4381. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4382. # CC pic flag -KPIC is the default.
  4383. ;;
  4384. *)
  4385. ;;
  4386. esac
  4387. ;;
  4388. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  4389. case $cc_basename in
  4390. KCC*)
  4391. # KAI C++ Compiler
  4392. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4393. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4394. ;;
  4395. ecpc* )
  4396. # old Intel C++ for x86_64 which still supported -KPIC.
  4397. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4398. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4399. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4400. ;;
  4401. icpc* )
  4402. # Intel C++, used to be incompatible with GCC.
  4403. # ICC 10 doesn't accept -KPIC any more.
  4404. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4405. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4406. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4407. ;;
  4408. pgCC* | pgcpp*)
  4409. # Portland Group C++ compiler
  4410. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4411. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4412. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4413. ;;
  4414. cxx*)
  4415. # Compaq C++
  4416. # Make sure the PIC flag is empty. It appears that all Alpha
  4417. # Linux and Compaq Tru64 Unix objects are PIC.
  4418. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4419. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4420. ;;
  4421. xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
  4422. # IBM XL 8.0, 9.0 on PPC and BlueGene
  4423. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4424. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  4425. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  4426. ;;
  4427. *)
  4428. case `$CC -V 2>&1 | sed 5q` in
  4429. *Sun\ C*)
  4430. # Sun C++ 5.9
  4431. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4432. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4433. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4434. ;;
  4435. esac
  4436. ;;
  4437. esac
  4438. ;;
  4439. lynxos*)
  4440. ;;
  4441. m88k*)
  4442. ;;
  4443. mvs*)
  4444. case $cc_basename in
  4445. cxx*)
  4446. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  4447. ;;
  4448. *)
  4449. ;;
  4450. esac
  4451. ;;
  4452. netbsd*)
  4453. ;;
  4454. *qnx* | *nto*)
  4455. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4456. # it will coredump.
  4457. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4458. ;;
  4459. osf3* | osf4* | osf5*)
  4460. case $cc_basename in
  4461. KCC*)
  4462. _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4463. ;;
  4464. RCC*)
  4465. # Rational C++ 2.4.1
  4466. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4467. ;;
  4468. cxx*)
  4469. # Digital/Compaq C++
  4470. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4471. # Make sure the PIC flag is empty. It appears that all Alpha
  4472. # Linux and Compaq Tru64 Unix objects are PIC.
  4473. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4474. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4475. ;;
  4476. *)
  4477. ;;
  4478. esac
  4479. ;;
  4480. psos*)
  4481. ;;
  4482. solaris*)
  4483. case $cc_basename in
  4484. CC* | sunCC*)
  4485. # Sun C++ 4.2, 5.x and Centerline C++
  4486. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4487. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4488. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4489. ;;
  4490. gcx*)
  4491. # Green Hills C++ Compiler
  4492. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4493. ;;
  4494. *)
  4495. ;;
  4496. esac
  4497. ;;
  4498. sunos4*)
  4499. case $cc_basename in
  4500. CC*)
  4501. # Sun C++ 4.x
  4502. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4503. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4504. ;;
  4505. lcc*)
  4506. # Lucid
  4507. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4508. ;;
  4509. *)
  4510. ;;
  4511. esac
  4512. ;;
  4513. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4514. case $cc_basename in
  4515. CC*)
  4516. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4517. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4518. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4519. ;;
  4520. esac
  4521. ;;
  4522. tandem*)
  4523. case $cc_basename in
  4524. NCC*)
  4525. # NonStop-UX NCC 3.20
  4526. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4527. ;;
  4528. *)
  4529. ;;
  4530. esac
  4531. ;;
  4532. vxworks*)
  4533. ;;
  4534. *)
  4535. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4536. ;;
  4537. esac
  4538. fi
  4539. ],
  4540. [
  4541. if test "$GCC" = yes; then
  4542. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4543. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4544. case $host_os in
  4545. aix*)
  4546. # All AIX code is PIC.
  4547. if test "$host_cpu" = ia64; then
  4548. # AIX 5 now supports IA64 processor
  4549. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4550. fi
  4551. ;;
  4552. amigaos*)
  4553. case $host_cpu in
  4554. powerpc)
  4555. # see comment about AmigaOS4 .so support
  4556. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4557. ;;
  4558. m68k)
  4559. # FIXME: we need at least 68020 code to build shared libraries, but
  4560. # adding the `-m68020' flag to GCC prevents building anything better,
  4561. # like `-m68040'.
  4562. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4563. ;;
  4564. esac
  4565. ;;
  4566. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4567. # PIC is the default for these OSes.
  4568. ;;
  4569. mingw* | cygwin* | pw32* | os2* | cegcc*)
  4570. # This hack is so that the source file can tell whether it is being
  4571. # built for inclusion in a dll (and should export symbols for example).
  4572. # Although the cygwin gcc ignores -fPIC, still need this for old-style
  4573. # (--disable-auto-import) libraries
  4574. m4_if([$1], [GCJ], [],
  4575. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4576. ;;
  4577. darwin* | rhapsody*)
  4578. # PIC is the default on this platform
  4579. # Common symbols not allowed in MH_DYLIB files
  4580. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4581. ;;
  4582. haiku*)
  4583. # PIC is the default for Haiku.
  4584. # The "-static" flag exists, but is broken.
  4585. _LT_TAGVAR(lt_prog_compiler_static, $1)=
  4586. ;;
  4587. hpux*)
  4588. # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
  4589. # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
  4590. # sets the default TLS model and affects inlining.
  4591. case $host_cpu in
  4592. hppa*64*)
  4593. # +Z the default
  4594. ;;
  4595. *)
  4596. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4597. ;;
  4598. esac
  4599. ;;
  4600. interix[[3-9]]*)
  4601. # Interix 3.x gcc -fpic/-fPIC options generate broken code.
  4602. # Instead, we relocate shared libraries at runtime.
  4603. ;;
  4604. msdosdjgpp*)
  4605. # Just because we use GCC doesn't mean we suddenly get shared libraries
  4606. # on systems that don't support them.
  4607. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4608. enable_shared=no
  4609. ;;
  4610. *nto* | *qnx*)
  4611. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4612. # it will coredump.
  4613. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4614. ;;
  4615. sysv4*MP*)
  4616. if test -d /usr/nec; then
  4617. _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4618. fi
  4619. ;;
  4620. *)
  4621. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4622. ;;
  4623. esac
  4624. case $cc_basename in
  4625. nvcc*) # Cuda Compiler Driver 2.2
  4626. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
  4627. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4628. _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
  4629. fi
  4630. ;;
  4631. esac
  4632. else
  4633. # PORTME Check for flag to pass linker flags through the system compiler.
  4634. case $host_os in
  4635. aix*)
  4636. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4637. if test "$host_cpu" = ia64; then
  4638. # AIX 5 now supports IA64 processor
  4639. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4640. else
  4641. _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4642. fi
  4643. ;;
  4644. mingw* | cygwin* | pw32* | os2* | cegcc*)
  4645. # This hack is so that the source file can tell whether it is being
  4646. # built for inclusion in a dll (and should export symbols for example).
  4647. m4_if([$1], [GCJ], [],
  4648. [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
  4649. ;;
  4650. hpux9* | hpux10* | hpux11*)
  4651. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4652. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4653. # not for PA HP-UX.
  4654. case $host_cpu in
  4655. hppa*64*|ia64*)
  4656. # +Z the default
  4657. ;;
  4658. *)
  4659. _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4660. ;;
  4661. esac
  4662. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  4663. _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  4664. ;;
  4665. irix5* | irix6* | nonstopux*)
  4666. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4667. # PIC (with -KPIC) is the default.
  4668. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4669. ;;
  4670. linux* | k*bsd*-gnu | kopensolaris*-gnu)
  4671. case $cc_basename in
  4672. # old Intel for x86_64 which still supported -KPIC.
  4673. ecc*)
  4674. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4675. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4676. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4677. ;;
  4678. # icc used to be incompatible with GCC.
  4679. # ICC 10 doesn't accept -KPIC any more.
  4680. icc* | ifort*)
  4681. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4682. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4683. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4684. ;;
  4685. # Lahey Fortran 8.1.
  4686. lf95*)
  4687. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4688. _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
  4689. _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
  4690. ;;
  4691. nagfor*)
  4692. # NAG Fortran compiler
  4693. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
  4694. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4695. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4696. ;;
  4697. pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
  4698. # Portland Group compilers (*not* the Pentium gcc compiler,
  4699. # which looks to be a dead project)
  4700. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4701. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4702. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4703. ;;
  4704. ccc*)
  4705. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4706. # All Alpha code is PIC.
  4707. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4708. ;;
  4709. xl* | bgxl* | bgf* | mpixl*)
  4710. # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
  4711. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4712. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
  4713. _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
  4714. ;;
  4715. *)
  4716. case `$CC -V 2>&1 | sed 5q` in
  4717. *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
  4718. # Sun Fortran 8.3 passes all unrecognized flags to the linker
  4719. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4720. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4721. _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
  4722. ;;
  4723. *Sun\ F* | *Sun*Fortran*)
  4724. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4725. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4726. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4727. ;;
  4728. *Sun\ C*)
  4729. # Sun C 5.9
  4730. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4731. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4732. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4733. ;;
  4734. *Intel*\ [[CF]]*Compiler*)
  4735. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4736. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4737. _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4738. ;;
  4739. *Portland\ Group*)
  4740. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4741. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
  4742. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4743. ;;
  4744. esac
  4745. ;;
  4746. esac
  4747. ;;
  4748. newsos6)
  4749. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4750. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4751. ;;
  4752. *nto* | *qnx*)
  4753. # QNX uses GNU C++, but need to define -shared option too, otherwise
  4754. # it will coredump.
  4755. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
  4756. ;;
  4757. osf3* | osf4* | osf5*)
  4758. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4759. # All OSF/1 code is PIC.
  4760. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4761. ;;
  4762. rdos*)
  4763. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4764. ;;
  4765. solaris*)
  4766. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4767. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4768. case $cc_basename in
  4769. f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
  4770. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
  4771. *)
  4772. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
  4773. esac
  4774. ;;
  4775. sunos4*)
  4776. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4777. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4778. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4779. ;;
  4780. sysv4 | sysv4.2uw2* | sysv4.3*)
  4781. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4782. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4783. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4784. ;;
  4785. sysv4*MP*)
  4786. if test -d /usr/nec ;then
  4787. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4788. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4789. fi
  4790. ;;
  4791. sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
  4792. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4793. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4794. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4795. ;;
  4796. unicos*)
  4797. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4798. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4799. ;;
  4800. uts4*)
  4801. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4802. _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4803. ;;
  4804. *)
  4805. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4806. ;;
  4807. esac
  4808. fi
  4809. ])
  4810. case $host_os in
  4811. # For platforms which do not support PIC, -DPIC is meaningless:
  4812. *djgpp*)
  4813. _LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4814. ;;
  4815. *)
  4816. _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
  4817. ;;
  4818. esac
  4819. AC_CACHE_CHECK([for $compiler option to produce PIC],
  4820. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
  4821. [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
  4822. _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
  4823. #
  4824. # Check to make sure the PIC flag actually works.
  4825. #
  4826. if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4827. _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
  4828. [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
  4829. [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
  4830. [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
  4831. "" | " "*) ;;
  4832. *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4833. esac],
  4834. [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
  4835. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4836. fi
  4837. _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
  4838. [Additional compiler flags for building library objects])
  4839. _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
  4840. [How to pass a linker flag through the compiler])
  4841. #
  4842. # Check to make sure the static flag actually works.
  4843. #
  4844. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
  4845. _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
  4846. _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
  4847. $lt_tmp_static_flag,
  4848. [],
  4849. [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
  4850. _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
  4851. [Compiler flag to prevent dynamic linking])
  4852. ])# _LT_COMPILER_PIC
  4853. # _LT_LINKER_SHLIBS([TAGNAME])
  4854. # ----------------------------
  4855. # See if the linker supports building shared libraries.
  4856. m4_defun([_LT_LINKER_SHLIBS],
  4857. [AC_REQUIRE([LT_PATH_LD])dnl
  4858. AC_REQUIRE([LT_PATH_NM])dnl
  4859. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  4860. m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  4861. m4_require([_LT_DECL_EGREP])dnl
  4862. m4_require([_LT_DECL_SED])dnl
  4863. m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
  4864. m4_require([_LT_TAG_COMPILER])dnl
  4865. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4866. m4_if([$1], [CXX], [
  4867. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4868. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4869. case $host_os in
  4870. aix[[4-9]]*)
  4871. # If we're using GNU nm, then we don't want the "-C" option.
  4872. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4873. # Also, AIX nm treats weak defined symbols like other global defined
  4874. # symbols, whereas GNU nm marks them as "W".
  4875. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  4876. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  4877. else
  4878. _LT_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'
  4879. fi
  4880. ;;
  4881. pw32*)
  4882. _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  4883. ;;
  4884. cygwin* | mingw* | cegcc*)
  4885. case $cc_basename in
  4886. cl*)
  4887. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  4888. ;;
  4889. *)
  4890. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
  4891. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  4892. ;;
  4893. esac
  4894. ;;
  4895. *)
  4896. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4897. ;;
  4898. esac
  4899. ], [
  4900. runpath_var=
  4901. _LT_TAGVAR(allow_undefined_flag, $1)=
  4902. _LT_TAGVAR(always_export_symbols, $1)=no
  4903. _LT_TAGVAR(archive_cmds, $1)=
  4904. _LT_TAGVAR(archive_expsym_cmds, $1)=
  4905. _LT_TAGVAR(compiler_needs_object, $1)=no
  4906. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4907. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  4908. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4909. _LT_TAGVAR(hardcode_automatic, $1)=no
  4910. _LT_TAGVAR(hardcode_direct, $1)=no
  4911. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  4912. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4913. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  4914. _LT_TAGVAR(hardcode_minus_L, $1)=no
  4915. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4916. _LT_TAGVAR(inherit_rpath, $1)=no
  4917. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  4918. _LT_TAGVAR(module_cmds, $1)=
  4919. _LT_TAGVAR(module_expsym_cmds, $1)=
  4920. _LT_TAGVAR(old_archive_from_new_cmds, $1)=
  4921. _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  4922. _LT_TAGVAR(thread_safe_flag_spec, $1)=
  4923. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4924. # include_expsyms should be a list of space-separated symbols to be *always*
  4925. # included in the symbol list
  4926. _LT_TAGVAR(include_expsyms, $1)=
  4927. # exclude_expsyms can be an extended regexp of symbols to exclude
  4928. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  4929. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  4930. # as well as any symbol that contains `d'.
  4931. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
  4932. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  4933. # platforms (ab)use it in PIC code, but their linkers get confused if
  4934. # the symbol is explicitly referenced. Since portable code cannot
  4935. # rely on this symbol name, it's probably fine to never include it in
  4936. # preloaded symbol tables.
  4937. # Exclude shared library initialization/finalization symbols.
  4938. dnl Note also adjust exclude_expsyms for C++ above.
  4939. extract_expsyms_cmds=
  4940. case $host_os in
  4941. cygwin* | mingw* | pw32* | cegcc*)
  4942. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  4943. # When not using gcc, we currently assume that we are using
  4944. # Microsoft Visual C++.
  4945. if test "$GCC" != yes; then
  4946. with_gnu_ld=no
  4947. fi
  4948. ;;
  4949. interix*)
  4950. # we just hope/assume this is gcc and not c89 (= MSVC++)
  4951. with_gnu_ld=yes
  4952. ;;
  4953. openbsd*)
  4954. with_gnu_ld=no
  4955. ;;
  4956. esac
  4957. _LT_TAGVAR(ld_shlibs, $1)=yes
  4958. # On some targets, GNU ld is compatible enough with the native linker
  4959. # that we're better off using the native interface for both.
  4960. lt_use_gnu_ld_interface=no
  4961. if test "$with_gnu_ld" = yes; then
  4962. case $host_os in
  4963. aix*)
  4964. # The AIX port of GNU ld has always aspired to compatibility
  4965. # with the native linker. However, as the warning in the GNU ld
  4966. # block says, versions before 2.19.5* couldn't really create working
  4967. # shared libraries, regardless of the interface used.
  4968. case `$LD -v 2>&1` in
  4969. *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
  4970. *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
  4971. *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
  4972. *)
  4973. lt_use_gnu_ld_interface=yes
  4974. ;;
  4975. esac
  4976. ;;
  4977. *)
  4978. lt_use_gnu_ld_interface=yes
  4979. ;;
  4980. esac
  4981. fi
  4982. if test "$lt_use_gnu_ld_interface" = yes; then
  4983. # If archive_cmds runs LD, not CC, wlarc should be empty
  4984. wlarc='${wl}'
  4985. # Set some defaults for GNU ld with shared library support. These
  4986. # are reset later if shared libraries are not supported. Putting them
  4987. # here allows them to be overridden if necessary.
  4988. runpath_var=LD_RUN_PATH
  4989. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4990. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  4991. # ancient GNU ld didn't support --whole-archive et. al.
  4992. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
  4993. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  4994. else
  4995. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  4996. fi
  4997. supports_anon_versioning=no
  4998. case `$LD -v 2>&1` in
  4999. *GNU\ gold*) supports_anon_versioning=yes ;;
  5000. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  5001. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  5002. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  5003. *\ 2.11.*) ;; # other 2.11 versions
  5004. *) supports_anon_versioning=yes ;;
  5005. esac
  5006. # See if GNU ld supports shared libraries.
  5007. case $host_os in
  5008. aix[[3-9]]*)
  5009. # On AIX/PPC, the GNU linker is very broken
  5010. if test "$host_cpu" != ia64; then
  5011. _LT_TAGVAR(ld_shlibs, $1)=no
  5012. cat <<_LT_EOF 1>&2
  5013. *** Warning: the GNU linker, at least up to release 2.19, is reported
  5014. *** to be unable to reliably create shared libraries on AIX.
  5015. *** Therefore, libtool is disabling shared libraries support. If you
  5016. *** really care for shared libraries, you may want to install binutils
  5017. *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
  5018. *** You will then need to restart the configuration process.
  5019. _LT_EOF
  5020. fi
  5021. ;;
  5022. amigaos*)
  5023. case $host_cpu in
  5024. powerpc)
  5025. # see comment about AmigaOS4 .so support
  5026. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5027. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  5028. ;;
  5029. m68k)
  5030. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  5031. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5032. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5033. ;;
  5034. esac
  5035. ;;
  5036. beos*)
  5037. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  5038. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5039. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  5040. # support --undefined. This deserves some investigation. FIXME
  5041. _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5042. else
  5043. _LT_TAGVAR(ld_shlibs, $1)=no
  5044. fi
  5045. ;;
  5046. cygwin* | mingw* | pw32* | cegcc*)
  5047. # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  5048. # as there is no search path for DLLs.
  5049. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5050. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
  5051. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5052. _LT_TAGVAR(always_export_symbols, $1)=no
  5053. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5054. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
  5055. _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
  5056. if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
  5057. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  5058. # If the export-symbols file already is a .def file (1st line
  5059. # is EXPORTS), use it as is; otherwise, prepend...
  5060. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5061. cp $export_symbols $output_objdir/$soname.def;
  5062. else
  5063. echo EXPORTS > $output_objdir/$soname.def;
  5064. cat $export_symbols >> $output_objdir/$soname.def;
  5065. fi~
  5066. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
  5067. else
  5068. _LT_TAGVAR(ld_shlibs, $1)=no
  5069. fi
  5070. ;;
  5071. haiku*)
  5072. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5073. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5074. ;;
  5075. interix[[3-9]]*)
  5076. _LT_TAGVAR(hardcode_direct, $1)=no
  5077. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5078. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5079. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5080. # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
  5081. # Instead, shared libraries are loaded at an image base (0x10000000 by
  5082. # default) and relocated if they conflict, which is a slow very memory
  5083. # consuming and fragmenting process. To avoid this, we pick a random,
  5084. # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
  5085. # time. Moving up from 0x10000000 also allows more sbrk(2) space.
  5086. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  5087. _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
  5088. ;;
  5089. gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
  5090. tmp_diet=no
  5091. if test "$host_os" = linux-dietlibc; then
  5092. case $cc_basename in
  5093. diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
  5094. esac
  5095. fi
  5096. if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
  5097. && test "$tmp_diet" = no
  5098. then
  5099. tmp_addflag=' $pic_flag'
  5100. tmp_sharedflag='-shared'
  5101. case $cc_basename,$host_cpu in
  5102. pgcc*) # Portland Group C compiler
  5103. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
  5104. tmp_addflag=' $pic_flag'
  5105. ;;
  5106. pgf77* | pgf90* | pgf95* | pgfortran*)
  5107. # Portland Group f77 and f90 compilers
  5108. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
  5109. tmp_addflag=' $pic_flag -Mnomain' ;;
  5110. ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
  5111. tmp_addflag=' -i_dynamic' ;;
  5112. efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
  5113. tmp_addflag=' -i_dynamic -nofor_main' ;;
  5114. ifc* | ifort*) # Intel Fortran compiler
  5115. tmp_addflag=' -nofor_main' ;;
  5116. lf95*) # Lahey Fortran 8.1
  5117. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5118. tmp_sharedflag='--shared' ;;
  5119. xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
  5120. tmp_sharedflag='-qmkshrobj'
  5121. tmp_addflag= ;;
  5122. nvcc*) # Cuda Compiler Driver 2.2
  5123. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
  5124. _LT_TAGVAR(compiler_needs_object, $1)=yes
  5125. ;;
  5126. esac
  5127. case `$CC -V 2>&1 | sed 5q` in
  5128. *Sun\ C*) # Sun C 5.9
  5129. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
  5130. _LT_TAGVAR(compiler_needs_object, $1)=yes
  5131. tmp_sharedflag='-G' ;;
  5132. *Sun\ F*) # Sun Fortran 8.3
  5133. tmp_sharedflag='-G' ;;
  5134. esac
  5135. _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5136. if test "x$supports_anon_versioning" = xyes; then
  5137. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  5138. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  5139. echo "local: *; };" >> $output_objdir/$libname.ver~
  5140. $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  5141. fi
  5142. case $cc_basename in
  5143. xlf* | bgf* | bgxlf* | mpixlf*)
  5144. # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
  5145. _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  5146. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5147. _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
  5148. if test "x$supports_anon_versioning" = xyes; then
  5149. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
  5150. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  5151. echo "local: *; };" >> $output_objdir/$libname.ver~
  5152. $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
  5153. fi
  5154. ;;
  5155. esac
  5156. else
  5157. _LT_TAGVAR(ld_shlibs, $1)=no
  5158. fi
  5159. ;;
  5160. netbsd*)
  5161. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5162. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  5163. wlarc=
  5164. else
  5165. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5166. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  5167. fi
  5168. ;;
  5169. solaris*)
  5170. if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
  5171. _LT_TAGVAR(ld_shlibs, $1)=no
  5172. cat <<_LT_EOF 1>&2
  5173. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  5174. *** create shared libraries on Solaris systems. Therefore, libtool
  5175. *** is disabling shared libraries support. We urge you to upgrade GNU
  5176. *** binutils to release 2.9.1 or newer. Another option is to modify
  5177. *** your PATH or compiler configuration so that the native linker is
  5178. *** used, and then restart.
  5179. _LT_EOF
  5180. elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  5181. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5182. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  5183. else
  5184. _LT_TAGVAR(ld_shlibs, $1)=no
  5185. fi
  5186. ;;
  5187. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
  5188. case `$LD -v 2>&1` in
  5189. *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
  5190. _LT_TAGVAR(ld_shlibs, $1)=no
  5191. cat <<_LT_EOF 1>&2
  5192. *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
  5193. *** reliably create shared libraries on SCO systems. Therefore, libtool
  5194. *** is disabling shared libraries support. We urge you to upgrade GNU
  5195. *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
  5196. *** your PATH or compiler configuration so that the native linker is
  5197. *** used, and then restart.
  5198. _LT_EOF
  5199. ;;
  5200. *)
  5201. # For security reasons, it is highly recommended that you always
  5202. # use absolute paths for naming shared libraries, and exclude the
  5203. # DT_RUNPATH tag from executables and libraries. But doing so
  5204. # requires that you compile everything twice, which is a pain.
  5205. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  5206. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5207. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5208. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  5209. else
  5210. _LT_TAGVAR(ld_shlibs, $1)=no
  5211. fi
  5212. ;;
  5213. esac
  5214. ;;
  5215. sunos4*)
  5216. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5217. wlarc=
  5218. _LT_TAGVAR(hardcode_direct, $1)=yes
  5219. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5220. ;;
  5221. *)
  5222. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
  5223. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5224. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  5225. else
  5226. _LT_TAGVAR(ld_shlibs, $1)=no
  5227. fi
  5228. ;;
  5229. esac
  5230. if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
  5231. runpath_var=
  5232. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5233. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  5234. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  5235. fi
  5236. else
  5237. # PORTME fill in a description of your system's linker (not GNU ld)
  5238. case $host_os in
  5239. aix3*)
  5240. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5241. _LT_TAGVAR(always_export_symbols, $1)=yes
  5242. _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
  5243. # Note: this linker hardcodes the directories in LIBPATH if there
  5244. # are no directories specified by -L.
  5245. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5246. if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
  5247. # Neither direct hardcoding nor static linking is supported with a
  5248. # broken collect2.
  5249. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5250. fi
  5251. ;;
  5252. aix[[4-9]]*)
  5253. if test "$host_cpu" = ia64; then
  5254. # On IA64, the linker does run time linking by default, so we don't
  5255. # have to do anything special.
  5256. aix_use_runtimelinking=no
  5257. exp_sym_flag='-Bexport'
  5258. no_entry_flag=""
  5259. else
  5260. # If we're using GNU nm, then we don't want the "-C" option.
  5261. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  5262. # Also, AIX nm treats weak defined symbols like other global
  5263. # defined symbols, whereas GNU nm marks them as "W".
  5264. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
  5265. _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
  5266. else
  5267. _LT_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'
  5268. fi
  5269. aix_use_runtimelinking=no
  5270. # Test if we are trying to use run time linking or normal
  5271. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5272. # need to do runtime linking.
  5273. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  5274. for ld_flag in $LDFLAGS; do
  5275. if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  5276. aix_use_runtimelinking=yes
  5277. break
  5278. fi
  5279. done
  5280. ;;
  5281. esac
  5282. exp_sym_flag='-bexport'
  5283. no_entry_flag='-bnoentry'
  5284. fi
  5285. # When large executables or shared objects are built, AIX ld can
  5286. # have problems creating the table of contents. If linking a library
  5287. # or program results in "error TOC overflow" add -mminimal-toc to
  5288. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  5289. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5290. _LT_TAGVAR(archive_cmds, $1)=''
  5291. _LT_TAGVAR(hardcode_direct, $1)=yes
  5292. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5293. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5294. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5295. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  5296. if test "$GCC" = yes; then
  5297. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  5298. # We only want to do this on AIX 4.2 and lower, the check
  5299. # below for broken collect2 doesn't work under 4.3+
  5300. collect2name=`${CC} -print-prog-name=collect2`
  5301. if test -f "$collect2name" &&
  5302. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  5303. then
  5304. # We have reworked collect2
  5305. :
  5306. else
  5307. # We have old collect2
  5308. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  5309. # It fails to find uninstalled libraries when the uninstalled
  5310. # path is not listed in the libpath. Setting hardcode_minus_L
  5311. # to unsupported forces relinking
  5312. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5313. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5314. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  5315. fi
  5316. ;;
  5317. esac
  5318. shared_flag='-shared'
  5319. if test "$aix_use_runtimelinking" = yes; then
  5320. shared_flag="$shared_flag "'${wl}-G'
  5321. fi
  5322. else
  5323. # not using gcc
  5324. if test "$host_cpu" = ia64; then
  5325. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5326. # chokes on -Wl,-G. The following line is correct:
  5327. shared_flag='-G'
  5328. else
  5329. if test "$aix_use_runtimelinking" = yes; then
  5330. shared_flag='${wl}-G'
  5331. else
  5332. shared_flag='${wl}-bM:SRE'
  5333. fi
  5334. fi
  5335. fi
  5336. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  5337. # It seems that -bexpall does not export symbols beginning with
  5338. # underscore (_), so it is better to generate a list of symbols to export.
  5339. _LT_TAGVAR(always_export_symbols, $1)=yes
  5340. if test "$aix_use_runtimelinking" = yes; then
  5341. # Warning - without using the other runtime loading flags (-brtl),
  5342. # -berok will link without error, but may produce a broken library.
  5343. _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
  5344. # Determine the default libpath from the value encoded in an
  5345. # empty executable.
  5346. _LT_SYS_MODULE_PATH_AIX([$1])
  5347. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5348. _LT_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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  5349. else
  5350. if test "$host_cpu" = ia64; then
  5351. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  5352. _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5353. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
  5354. else
  5355. # Determine the default libpath from the value encoded in an
  5356. # empty executable.
  5357. _LT_SYS_MODULE_PATH_AIX([$1])
  5358. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5359. # Warning - without using the other run time loading flags,
  5360. # -berok will link without error, but may produce a broken library.
  5361. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  5362. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  5363. if test "$with_gnu_ld" = yes; then
  5364. # We only use this code for GNU lds that support --whole-archive.
  5365. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  5366. else
  5367. # Exported symbols can be pulled into shared objects from archives
  5368. _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
  5369. fi
  5370. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5371. # This is similar to how AIX traditionally builds its shared libraries.
  5372. _LT_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'
  5373. fi
  5374. fi
  5375. ;;
  5376. amigaos*)
  5377. case $host_cpu in
  5378. powerpc)
  5379. # see comment about AmigaOS4 .so support
  5380. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5381. _LT_TAGVAR(archive_expsym_cmds, $1)=''
  5382. ;;
  5383. m68k)
  5384. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  5385. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5386. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5387. ;;
  5388. esac
  5389. ;;
  5390. bsdi[[45]]*)
  5391. _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  5392. ;;
  5393. cygwin* | mingw* | pw32* | cegcc*)
  5394. # When not using gcc, we currently assume that we are using
  5395. # Microsoft Visual C++.
  5396. # hardcode_libdir_flag_spec is actually meaningless, as there is
  5397. # no search path for DLLs.
  5398. case $cc_basename in
  5399. cl*)
  5400. # Native MSVC
  5401. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5402. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5403. _LT_TAGVAR(always_export_symbols, $1)=yes
  5404. _LT_TAGVAR(file_list_spec, $1)='@'
  5405. # Tell ltmain to make .lib files, not .a files.
  5406. libext=lib
  5407. # Tell ltmain to make .dll files, not .so files.
  5408. shrext_cmds=".dll"
  5409. # FIXME: Setting linknames here is a bad hack.
  5410. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
  5411. _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5412. sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
  5413. else
  5414. sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
  5415. fi~
  5416. $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
  5417. linknames='
  5418. # The linker will not automatically build a static lib if we build a DLL.
  5419. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5420. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5421. _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
  5422. _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
  5423. # Don't use ranlib
  5424. _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
  5425. _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
  5426. lt_tool_outputfile="@TOOL_OUTPUT@"~
  5427. case $lt_outputfile in
  5428. *.exe|*.EXE) ;;
  5429. *)
  5430. lt_outputfile="$lt_outputfile.exe"
  5431. lt_tool_outputfile="$lt_tool_outputfile.exe"
  5432. ;;
  5433. esac~
  5434. if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
  5435. $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
  5436. $RM "$lt_outputfile.manifest";
  5437. fi'
  5438. ;;
  5439. *)
  5440. # Assume MSVC wrapper
  5441. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5442. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5443. # Tell ltmain to make .lib files, not .a files.
  5444. libext=lib
  5445. # Tell ltmain to make .dll files, not .so files.
  5446. shrext_cmds=".dll"
  5447. # FIXME: Setting linknames here is a bad hack.
  5448. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
  5449. # The linker will automatically build a .lib file if we build a DLL.
  5450. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
  5451. # FIXME: Should let the user specify the lib program.
  5452. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
  5453. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5454. ;;
  5455. esac
  5456. ;;
  5457. darwin* | rhapsody*)
  5458. _LT_DARWIN_LINKER_FEATURES($1)
  5459. ;;
  5460. dgux*)
  5461. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5462. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5463. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5464. ;;
  5465. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  5466. # support. Future versions do this automatically, but an explicit c++rt0.o
  5467. # does not break anything, and helps significantly (at the cost of a little
  5468. # extra space).
  5469. freebsd2.2*)
  5470. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  5471. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5472. _LT_TAGVAR(hardcode_direct, $1)=yes
  5473. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5474. ;;
  5475. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  5476. freebsd2.*)
  5477. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5478. _LT_TAGVAR(hardcode_direct, $1)=yes
  5479. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5480. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5481. ;;
  5482. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  5483. freebsd* | dragonfly*)
  5484. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5485. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5486. _LT_TAGVAR(hardcode_direct, $1)=yes
  5487. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5488. ;;
  5489. hpux9*)
  5490. if test "$GCC" = yes; then
  5491. _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  5492. else
  5493. _LT_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'
  5494. fi
  5495. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5496. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5497. _LT_TAGVAR(hardcode_direct, $1)=yes
  5498. # hardcode_minus_L: Not really in the search PATH,
  5499. # but as the default location of the library.
  5500. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5501. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5502. ;;
  5503. hpux10*)
  5504. if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  5505. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5506. else
  5507. _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  5508. fi
  5509. if test "$with_gnu_ld" = no; then
  5510. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5511. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5512. _LT_TAGVAR(hardcode_direct, $1)=yes
  5513. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5514. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5515. # hardcode_minus_L: Not really in the search PATH,
  5516. # but as the default location of the library.
  5517. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5518. fi
  5519. ;;
  5520. hpux11*)
  5521. if test "$GCC" = yes && test "$with_gnu_ld" = no; then
  5522. case $host_cpu in
  5523. hppa*64*)
  5524. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5525. ;;
  5526. ia64*)
  5527. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5528. ;;
  5529. *)
  5530. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  5531. ;;
  5532. esac
  5533. else
  5534. case $host_cpu in
  5535. hppa*64*)
  5536. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5537. ;;
  5538. ia64*)
  5539. _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
  5540. ;;
  5541. *)
  5542. m4_if($1, [], [
  5543. # Older versions of the 11.00 compiler do not understand -b yet
  5544. # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
  5545. _LT_LINKER_OPTION([if $CC understands -b],
  5546. _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
  5547. [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
  5548. [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
  5549. [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
  5550. ;;
  5551. esac
  5552. fi
  5553. if test "$with_gnu_ld" = no; then
  5554. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  5555. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5556. case $host_cpu in
  5557. hppa*64*|ia64*)
  5558. _LT_TAGVAR(hardcode_direct, $1)=no
  5559. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5560. ;;
  5561. *)
  5562. _LT_TAGVAR(hardcode_direct, $1)=yes
  5563. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5564. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5565. # hardcode_minus_L: Not really in the search PATH,
  5566. # but as the default location of the library.
  5567. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5568. ;;
  5569. esac
  5570. fi
  5571. ;;
  5572. irix5* | irix6* | nonstopux*)
  5573. if test "$GCC" = yes; then
  5574. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5575. # Try to use the -exported_symbol ld option, if it does not
  5576. # work, assume that -exports_file does not work either and
  5577. # implicitly export all symbols.
  5578. # This should be the same for all languages, so no per-tag cache variable.
  5579. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
  5580. [lt_cv_irix_exported_symbol],
  5581. [save_LDFLAGS="$LDFLAGS"
  5582. LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
  5583. AC_LINK_IFELSE(
  5584. [AC_LANG_SOURCE(
  5585. [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
  5586. [C++], [[int foo (void) { return 0; }]],
  5587. [Fortran 77], [[
  5588. subroutine foo
  5589. end]],
  5590. [Fortran], [[
  5591. subroutine foo
  5592. end]])])],
  5593. [lt_cv_irix_exported_symbol=yes],
  5594. [lt_cv_irix_exported_symbol=no])
  5595. LDFLAGS="$save_LDFLAGS"])
  5596. if test "$lt_cv_irix_exported_symbol" = yes; then
  5597. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
  5598. fi
  5599. else
  5600. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  5601. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
  5602. fi
  5603. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5604. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5605. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5606. _LT_TAGVAR(inherit_rpath, $1)=yes
  5607. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5608. ;;
  5609. netbsd*)
  5610. if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
  5611. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  5612. else
  5613. _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  5614. fi
  5615. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5616. _LT_TAGVAR(hardcode_direct, $1)=yes
  5617. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5618. ;;
  5619. newsos6)
  5620. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5621. _LT_TAGVAR(hardcode_direct, $1)=yes
  5622. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5623. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5624. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5625. ;;
  5626. *nto* | *qnx*)
  5627. ;;
  5628. openbsd*)
  5629. if test -f /usr/libexec/ld.so; then
  5630. _LT_TAGVAR(hardcode_direct, $1)=yes
  5631. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5632. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  5633. if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  5634. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5635. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
  5636. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5637. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  5638. else
  5639. case $host_os in
  5640. openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  5641. _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5642. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5643. ;;
  5644. *)
  5645. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  5646. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  5647. ;;
  5648. esac
  5649. fi
  5650. else
  5651. _LT_TAGVAR(ld_shlibs, $1)=no
  5652. fi
  5653. ;;
  5654. os2*)
  5655. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5656. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5657. _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
  5658. _LT_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'
  5659. _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  5660. ;;
  5661. osf3*)
  5662. if test "$GCC" = yes; then
  5663. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5664. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5665. else
  5666. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5667. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  5668. fi
  5669. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5670. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5671. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5672. ;;
  5673. osf4* | osf5*) # as osf3* with the addition of -msym flag
  5674. if test "$GCC" = yes; then
  5675. _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5676. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5677. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5678. else
  5679. _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5680. _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  5681. _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
  5682. $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
  5683. # Both c and cxx compiler support -rpath directly
  5684. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5685. fi
  5686. _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
  5687. _LT_TAGVAR(hardcode_libdir_separator, $1)=:
  5688. ;;
  5689. solaris*)
  5690. _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
  5691. if test "$GCC" = yes; then
  5692. wlarc='${wl}'
  5693. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5694. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5695. $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  5696. else
  5697. case `$CC -V 2>&1` in
  5698. *"Compilers 5.0"*)
  5699. wlarc=''
  5700. _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5701. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5702. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
  5703. ;;
  5704. *)
  5705. wlarc='${wl}'
  5706. _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5707. _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
  5708. $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
  5709. ;;
  5710. esac
  5711. fi
  5712. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5713. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5714. case $host_os in
  5715. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  5716. *)
  5717. # The compiler driver will combine and reorder linker options,
  5718. # but understands `-z linker_flag'. GCC discards it without `$wl',
  5719. # but is careful enough not to reorder.
  5720. # Supported since Solaris 2.6 (maybe 2.5.1?)
  5721. if test "$GCC" = yes; then
  5722. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  5723. else
  5724. _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
  5725. fi
  5726. ;;
  5727. esac
  5728. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5729. ;;
  5730. sunos4*)
  5731. if test "x$host_vendor" = xsequent; then
  5732. # Use $CC to link under sequent, because it throws in some extra .o
  5733. # files that make .init and .fini sections work.
  5734. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5735. else
  5736. _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  5737. fi
  5738. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5739. _LT_TAGVAR(hardcode_direct, $1)=yes
  5740. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  5741. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5742. ;;
  5743. sysv4)
  5744. case $host_vendor in
  5745. sni)
  5746. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5747. _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5748. ;;
  5749. siemens)
  5750. ## LD is ld it makes a PLAMLIB
  5751. ## CC just makes a GrossModule.
  5752. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5753. _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5754. _LT_TAGVAR(hardcode_direct, $1)=no
  5755. ;;
  5756. motorola)
  5757. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5758. _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5759. ;;
  5760. esac
  5761. runpath_var='LD_RUN_PATH'
  5762. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5763. ;;
  5764. sysv4.3*)
  5765. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5766. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5767. _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5768. ;;
  5769. sysv4*MP*)
  5770. if test -d /usr/nec; then
  5771. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5772. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5773. runpath_var=LD_RUN_PATH
  5774. hardcode_runpath_var=yes
  5775. _LT_TAGVAR(ld_shlibs, $1)=yes
  5776. fi
  5777. ;;
  5778. sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
  5779. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5780. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5781. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5782. runpath_var='LD_RUN_PATH'
  5783. if test "$GCC" = yes; then
  5784. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5785. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5786. else
  5787. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5788. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5789. fi
  5790. ;;
  5791. sysv5* | sco3.2v5* | sco5v6*)
  5792. # Note: We can NOT use -z defs as we might desire, because we do not
  5793. # link with -lc, and that would cause any symbols used from libc to
  5794. # always be unresolved, which means just about no library would
  5795. # ever link correctly. If we're not using GNU ld we use -z text
  5796. # though, which does catch some bad symbols but isn't as heavy-handed
  5797. # as -z defs.
  5798. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
  5799. _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
  5800. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5801. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5802. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
  5803. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  5804. _LT_TAGVAR(link_all_deplibs, $1)=yes
  5805. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  5806. runpath_var='LD_RUN_PATH'
  5807. if test "$GCC" = yes; then
  5808. _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5809. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5810. else
  5811. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5812. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
  5813. fi
  5814. ;;
  5815. uts4*)
  5816. _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5817. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5818. _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
  5819. ;;
  5820. *)
  5821. _LT_TAGVAR(ld_shlibs, $1)=no
  5822. ;;
  5823. esac
  5824. if test x$host_vendor = xsni; then
  5825. case $host in
  5826. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  5827. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
  5828. ;;
  5829. esac
  5830. fi
  5831. fi
  5832. ])
  5833. AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
  5834. test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  5835. _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
  5836. _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
  5837. _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
  5838. _LT_DECL([], [extract_expsyms_cmds], [2],
  5839. [The commands to extract the exported symbol list from a shared archive])
  5840. #
  5841. # Do we need to explicitly link libc?
  5842. #
  5843. case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
  5844. x|xyes)
  5845. # Assume -lc should be added
  5846. _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5847. if test "$enable_shared" = yes && test "$GCC" = yes; then
  5848. case $_LT_TAGVAR(archive_cmds, $1) in
  5849. *'~'*)
  5850. # FIXME: we may have to deal with multi-command sequences.
  5851. ;;
  5852. '$CC '*)
  5853. # Test whether the compiler implicitly links with -lc since on some
  5854. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5855. # to ld, don't add -lc before -lgcc.
  5856. AC_CACHE_CHECK([whether -lc should be explicitly linked in],
  5857. [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
  5858. [$RM conftest*
  5859. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  5860. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5861. soname=conftest
  5862. lib=conftest
  5863. libobjs=conftest.$ac_objext
  5864. deplibs=
  5865. wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
  5866. pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
  5867. compiler_flags=-v
  5868. linker_flags=-v
  5869. verstring=
  5870. output_objdir=.
  5871. libname=conftest
  5872. lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
  5873. _LT_TAGVAR(allow_undefined_flag, $1)=
  5874. if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
  5875. then
  5876. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
  5877. else
  5878. lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
  5879. fi
  5880. _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5881. else
  5882. cat conftest.err 1>&5
  5883. fi
  5884. $RM conftest*
  5885. ])
  5886. _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
  5887. ;;
  5888. esac
  5889. fi
  5890. ;;
  5891. esac
  5892. _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
  5893. [Whether or not to add -lc for building shared libraries])
  5894. _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
  5895. [enable_shared_with_static_runtimes], [0],
  5896. [Whether or not to disallow shared libs when runtime libs are static])
  5897. _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
  5898. [Compiler flag to allow reflexive dlopens])
  5899. _LT_TAGDECL([], [whole_archive_flag_spec], [1],
  5900. [Compiler flag to generate shared objects directly from archives])
  5901. _LT_TAGDECL([], [compiler_needs_object], [1],
  5902. [Whether the compiler copes with passing no objects directly])
  5903. _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
  5904. [Create an old-style archive from a shared archive])
  5905. _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
  5906. [Create a temporary old-style archive to link instead of a shared archive])
  5907. _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
  5908. _LT_TAGDECL([], [archive_expsym_cmds], [2])
  5909. _LT_TAGDECL([], [module_cmds], [2],
  5910. [Commands used to build a loadable module if different from building
  5911. a shared archive.])
  5912. _LT_TAGDECL([], [module_expsym_cmds], [2])
  5913. _LT_TAGDECL([], [with_gnu_ld], [1],
  5914. [Whether we are building with GNU ld or not])
  5915. _LT_TAGDECL([], [allow_undefined_flag], [1],
  5916. [Flag that allows shared libraries with undefined symbols to be built])
  5917. _LT_TAGDECL([], [no_undefined_flag], [1],
  5918. [Flag that enforces no undefined symbols])
  5919. _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
  5920. [Flag to hardcode $libdir into a binary during linking.
  5921. This must work even if $libdir does not exist])
  5922. _LT_TAGDECL([], [hardcode_libdir_separator], [1],
  5923. [Whether we need a single "-rpath" flag with a separated argument])
  5924. _LT_TAGDECL([], [hardcode_direct], [0],
  5925. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  5926. DIR into the resulting binary])
  5927. _LT_TAGDECL([], [hardcode_direct_absolute], [0],
  5928. [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
  5929. DIR into the resulting binary and the resulting library dependency is
  5930. "absolute", i.e impossible to change by setting ${shlibpath_var} if the
  5931. library is relocated])
  5932. _LT_TAGDECL([], [hardcode_minus_L], [0],
  5933. [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
  5934. into the resulting binary])
  5935. _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
  5936. [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
  5937. into the resulting binary])
  5938. _LT_TAGDECL([], [hardcode_automatic], [0],
  5939. [Set to "yes" if building a shared library automatically hardcodes DIR
  5940. into the library and all subsequent libraries and executables linked
  5941. against it])
  5942. _LT_TAGDECL([], [inherit_rpath], [0],
  5943. [Set to yes if linker adds runtime paths of dependent libraries
  5944. to runtime path list])
  5945. _LT_TAGDECL([], [link_all_deplibs], [0],
  5946. [Whether libtool must link a program against all its dependency libraries])
  5947. _LT_TAGDECL([], [always_export_symbols], [0],
  5948. [Set to "yes" if exported symbols are required])
  5949. _LT_TAGDECL([], [export_symbols_cmds], [2],
  5950. [The commands to list exported symbols])
  5951. _LT_TAGDECL([], [exclude_expsyms], [1],
  5952. [Symbols that should not be listed in the preloaded symbols])
  5953. _LT_TAGDECL([], [include_expsyms], [1],
  5954. [Symbols that must always be exported])
  5955. _LT_TAGDECL([], [prelink_cmds], [2],
  5956. [Commands necessary for linking programs (against libraries) with templates])
  5957. _LT_TAGDECL([], [postlink_cmds], [2],
  5958. [Commands necessary for finishing linking programs])
  5959. _LT_TAGDECL([], [file_list_spec], [1],
  5960. [Specify filename containing input files])
  5961. dnl FIXME: Not yet implemented
  5962. dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
  5963. dnl [Compiler flag to generate thread safe objects])
  5964. ])# _LT_LINKER_SHLIBS
  5965. # _LT_LANG_C_CONFIG([TAG])
  5966. # ------------------------
  5967. # Ensure that the configuration variables for a C compiler are suitably
  5968. # defined. These variables are subsequently used by _LT_CONFIG to write
  5969. # the compiler configuration to `libtool'.
  5970. m4_defun([_LT_LANG_C_CONFIG],
  5971. [m4_require([_LT_DECL_EGREP])dnl
  5972. lt_save_CC="$CC"
  5973. AC_LANG_PUSH(C)
  5974. # Source file extension for C test sources.
  5975. ac_ext=c
  5976. # Object file extension for compiled C test sources.
  5977. objext=o
  5978. _LT_TAGVAR(objext, $1)=$objext
  5979. # Code to be used in simple compile tests
  5980. lt_simple_compile_test_code="int some_variable = 0;"
  5981. # Code to be used in simple link tests
  5982. lt_simple_link_test_code='int main(){return(0);}'
  5983. _LT_TAG_COMPILER
  5984. # Save the default compiler, since it gets overwritten when the other
  5985. # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
  5986. compiler_DEFAULT=$CC
  5987. # save warnings/boilerplate of simple test code
  5988. _LT_COMPILER_BOILERPLATE
  5989. _LT_LINKER_BOILERPLATE
  5990. if test -n "$compiler"; then
  5991. _LT_COMPILER_NO_RTTI($1)
  5992. _LT_COMPILER_PIC($1)
  5993. _LT_COMPILER_C_O($1)
  5994. _LT_COMPILER_FILE_LOCKS($1)
  5995. _LT_LINKER_SHLIBS($1)
  5996. _LT_SYS_DYNAMIC_LINKER($1)
  5997. _LT_LINKER_HARDCODE_LIBPATH($1)
  5998. LT_SYS_DLOPEN_SELF
  5999. _LT_CMD_STRIPLIB
  6000. # Report which library types will actually be built
  6001. AC_MSG_CHECKING([if libtool supports shared libraries])
  6002. AC_MSG_RESULT([$can_build_shared])
  6003. AC_MSG_CHECKING([whether to build shared libraries])
  6004. test "$can_build_shared" = "no" && enable_shared=no
  6005. # On AIX, shared libraries and static libraries use the same namespace, and
  6006. # are all built from PIC.
  6007. case $host_os in
  6008. aix3*)
  6009. test "$enable_shared" = yes && enable_static=no
  6010. if test -n "$RANLIB"; then
  6011. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  6012. postinstall_cmds='$RANLIB $lib'
  6013. fi
  6014. ;;
  6015. aix[[4-9]]*)
  6016. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  6017. test "$enable_shared" = yes && enable_static=no
  6018. fi
  6019. ;;
  6020. esac
  6021. AC_MSG_RESULT([$enable_shared])
  6022. AC_MSG_CHECKING([whether to build static libraries])
  6023. # Make sure either enable_shared or enable_static is yes.
  6024. test "$enable_shared" = yes || enable_static=yes
  6025. AC_MSG_RESULT([$enable_static])
  6026. _LT_CONFIG($1)
  6027. fi
  6028. AC_LANG_POP
  6029. CC="$lt_save_CC"
  6030. ])# _LT_LANG_C_CONFIG
  6031. # _LT_LANG_CXX_CONFIG([TAG])
  6032. # --------------------------
  6033. # Ensure that the configuration variables for a C++ compiler are suitably
  6034. # defined. These variables are subsequently used by _LT_CONFIG to write
  6035. # the compiler configuration to `libtool'.
  6036. m4_defun([_LT_LANG_CXX_CONFIG],
  6037. [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
  6038. m4_require([_LT_DECL_EGREP])dnl
  6039. m4_require([_LT_PATH_MANIFEST_TOOL])dnl
  6040. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  6041. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  6042. (test "X$CXX" != "Xg++"))) ; then
  6043. AC_PROG_CXXCPP
  6044. else
  6045. _lt_caught_CXX_error=yes
  6046. fi
  6047. AC_LANG_PUSH(C++)
  6048. _LT_TAGVAR(archive_cmds_need_lc, $1)=no
  6049. _LT_TAGVAR(allow_undefined_flag, $1)=
  6050. _LT_TAGVAR(always_export_symbols, $1)=no
  6051. _LT_TAGVAR(archive_expsym_cmds, $1)=
  6052. _LT_TAGVAR(compiler_needs_object, $1)=no
  6053. _LT_TAGVAR(export_dynamic_flag_spec, $1)=
  6054. _LT_TAGVAR(hardcode_direct, $1)=no
  6055. _LT_TAGVAR(hardcode_direct_absolute, $1)=no
  6056. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6057. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6058. _LT_TAGVAR(hardcode_minus_L, $1)=no
  6059. _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  6060. _LT_TAGVAR(hardcode_automatic, $1)=no
  6061. _LT_TAGVAR(inherit_rpath, $1)=no
  6062. _LT_TAGVAR(module_cmds, $1)=
  6063. _LT_TAGVAR(module_expsym_cmds, $1)=
  6064. _LT_TAGVAR(link_all_deplibs, $1)=unknown
  6065. _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  6066. _LT_TAGVAR(reload_flag, $1)=$reload_flag
  6067. _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
  6068. _LT_TAGVAR(no_undefined_flag, $1)=
  6069. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6070. _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  6071. # Source file extension for C++ test sources.
  6072. ac_ext=cpp
  6073. # Object file extension for compiled C++ test sources.
  6074. objext=o
  6075. _LT_TAGVAR(objext, $1)=$objext
  6076. # No sense in running all these tests if we already determined that
  6077. # the CXX compiler isn't working. Some variables (like enable_shared)
  6078. # are currently assumed to apply to all compilers on this platform,
  6079. # and will be corrupted by setting them based on a non-working compiler.
  6080. if test "$_lt_caught_CXX_error" != yes; then
  6081. # Code to be used in simple compile tests
  6082. lt_simple_compile_test_code="int some_variable = 0;"
  6083. # Code to be used in simple link tests
  6084. lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
  6085. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  6086. _LT_TAG_COMPILER
  6087. # save warnings/boilerplate of simple test code
  6088. _LT_COMPILER_BOILERPLATE
  6089. _LT_LINKER_BOILERPLATE
  6090. # Allow CC to be a program name with arguments.
  6091. lt_save_CC=$CC
  6092. lt_save_CFLAGS=$CFLAGS
  6093. lt_save_LD=$LD
  6094. lt_save_GCC=$GCC
  6095. GCC=$GXX
  6096. lt_save_with_gnu_ld=$with_gnu_ld
  6097. lt_save_path_LD=$lt_cv_path_LD
  6098. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  6099. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  6100. else
  6101. $as_unset lt_cv_prog_gnu_ld
  6102. fi
  6103. if test -n "${lt_cv_path_LDCXX+set}"; then
  6104. lt_cv_path_LD=$lt_cv_path_LDCXX
  6105. else
  6106. $as_unset lt_cv_path_LD
  6107. fi
  6108. test -z "${LDCXX+set}" || LD=$LDCXX
  6109. CC=${CXX-"c++"}
  6110. CFLAGS=$CXXFLAGS
  6111. compiler=$CC
  6112. _LT_TAGVAR(compiler, $1)=$CC
  6113. _LT_CC_BASENAME([$compiler])
  6114. if test -n "$compiler"; then
  6115. # We don't want -fno-exception when compiling C++ code, so set the
  6116. # no_builtin_flag separately
  6117. if test "$GXX" = yes; then
  6118. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  6119. else
  6120. _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  6121. fi
  6122. if test "$GXX" = yes; then
  6123. # Set up default GNU C++ configuration
  6124. LT_PATH_LD
  6125. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  6126. # archiving commands below assume that GNU ld is being used.
  6127. if test "$with_gnu_ld" = yes; then
  6128. _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  6129. _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  6130. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6131. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  6132. # If archive_cmds runs LD, not CC, wlarc should be empty
  6133. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  6134. # investigate it a little bit more. (MM)
  6135. wlarc='${wl}'
  6136. # ancient GNU ld didn't support --whole-archive et. al.
  6137. if eval "`$CC -print-prog-name=ld` --help 2>&1" |
  6138. $GREP 'no-whole-archive' > /dev/null; then
  6139. _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  6140. else
  6141. _LT_TAGVAR(whole_archive_flag_spec, $1)=
  6142. fi
  6143. else
  6144. with_gnu_ld=no
  6145. wlarc=
  6146. # A generic and very simple default shared library creation
  6147. # command for GNU C++ for the case where it uses the native
  6148. # linker, instead of GNU ld. If possible, this setting should
  6149. # overridden to take advantage of the native linker features on
  6150. # the platform it is being used on.
  6151. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  6152. fi
  6153. # Commands to make compiler produce verbose output that lists
  6154. # what "hidden" libraries, object files and flags are used when
  6155. # linking a shared library.
  6156. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
  6157. else
  6158. GXX=no
  6159. with_gnu_ld=no
  6160. wlarc=
  6161. fi
  6162. # PORTME: fill in a description of your system's C++ link characteristics
  6163. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  6164. _LT_TAGVAR(ld_shlibs, $1)=yes
  6165. case $host_os in
  6166. aix3*)
  6167. # FIXME: insert proper C++ library support
  6168. _LT_TAGVAR(ld_shlibs, $1)=no
  6169. ;;
  6170. aix[[4-9]]*)
  6171. if test "$host_cpu" = ia64; then
  6172. # On IA64, the linker does run time linking by default, so we don't
  6173. # have to do anything special.
  6174. aix_use_runtimelinking=no
  6175. exp_sym_flag='-Bexport'
  6176. no_entry_flag=""
  6177. else
  6178. aix_use_runtimelinking=no
  6179. # Test if we are trying to use run time linking or normal
  6180. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  6181. # need to do runtime linking.
  6182. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
  6183. for ld_flag in $LDFLAGS; do
  6184. case $ld_flag in
  6185. *-brtl*)
  6186. aix_use_runtimelinking=yes
  6187. break
  6188. ;;
  6189. esac
  6190. done
  6191. ;;
  6192. esac
  6193. exp_sym_flag='-bexport'
  6194. no_entry_flag='-bnoentry'
  6195. fi
  6196. # When large executables or shared objects are built, AIX ld can
  6197. # have problems creating the table of contents. If linking a library
  6198. # or program results in "error TOC overflow" add -mminimal-toc to
  6199. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  6200. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  6201. _LT_TAGVAR(archive_cmds, $1)=''
  6202. _LT_TAGVAR(hardcode_direct, $1)=yes
  6203. _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
  6204. _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
  6205. _LT_TAGVAR(link_all_deplibs, $1)=yes
  6206. _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
  6207. if test "$GXX" = yes; then
  6208. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  6209. # We only want to do this on AIX 4.2 and lower, the check
  6210. # below for broken collect2 doesn't work under 4.3+
  6211. collect2name=`${CC} -print-prog-name=collect2`
  6212. if test -f "$collect2name" &&
  6213. strings "$collect2name" | $GREP resolve_lib_name >/dev/null
  6214. then
  6215. # We have reworked collect2
  6216. :
  6217. else
  6218. # We have old collect2
  6219. _LT_TAGVAR(hardcode_direct, $1)=unsupported
  6220. # It fails to find uninstalled libraries when the uninstalled
  6221. # path is not listed in the libpath. Setting hardcode_minus_L
  6222. # to unsupported forces relinking
  6223. _LT_TAGVAR(hardcode_minus_L, $1)=yes
  6224. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6225. _LT_TAGVAR(hardcode_libdir_separator, $1)=
  6226. fi
  6227. esac
  6228. shared_flag='-shared'
  6229. if test "$aix_use_runtimelinking" = yes; then
  6230. shared_flag="$shared_flag "'${wl}-G'
  6231. fi
  6232. else
  6233. # not using gcc
  6234. if test "$host_cpu" = ia64; then
  6235. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  6236. # chokes on -Wl,-G. The following line is correct:
  6237. shared_flag='-G'
  6238. else
  6239. if test "$aix_use_runtimelinking" = yes; then
  6240. shared_flag='${wl}-G'
  6241. else
  6242. shared_flag='${wl}-bM:SRE'
  6243. fi
  6244. fi
  6245. fi
  6246. _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
  6247. # It seems that -bexpall does not export symbols beginning with
  6248. # underscore (_), so it is better to generate a list of symbols to
  6249. # export.
  6250. _LT_TAGVAR(always_export_symbols, $1)=yes
  6251. if test "$aix_use_runtimelinking" = yes; then
  6252. # Warning - without using the other runtime loading fl