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.

11300 lines
405KB

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