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.
 
 
 
 
 
 

11736 lines
418 KiB

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