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.

5946 lines
205 KiB

  1. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  2. ## Copyright 1996, 1997, 1998, 1999, 2000, 2001
  3. ## Free Software Foundation, Inc.
  4. ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  5. ##
  6. ## This program is free software; you can redistribute it and/or modify
  7. ## it under the terms of the GNU General Public License as published by
  8. ## the Free Software Foundation; either version 2 of the License, or
  9. ## (at your option) any later version.
  10. ##
  11. ## This program is distributed in the hope that it will be useful, but
  12. ## WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. ## General Public License for more details.
  15. ##
  16. ## You should have received a copy of the GNU General Public License
  17. ## along with this program; if not, write to the Free Software
  18. ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  19. ##
  20. ## As a special exception to the GNU General Public License, if you
  21. ## distribute this file as part of a program that contains a
  22. ## configuration script generated by Autoconf, you may include it under
  23. ## the same distribution terms that you use for the rest of that program.
  24. # serial 47 AC_PROG_LIBTOOL
  25. # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
  26. # -----------------------------------------------------------
  27. # If this macro is not defined by Autoconf, define it here.
  28. m4_ifdef([AC_PROVIDE_IFELSE],
  29. [],
  30. [m4_define([AC_PROVIDE_IFELSE],
  31. [m4_ifdef([AC_PROVIDE_$1],
  32. [$2], [$3])])])
  33. # AC_PROG_LIBTOOL
  34. # ---------------
  35. AC_DEFUN([AC_PROG_LIBTOOL],
  36. [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
  37. dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
  38. dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
  39. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  40. [AC_LIBTOOL_CXX],
  41. [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
  42. ])])
  43. dnl And a similar setup for Fortran 77 support
  44. AC_PROVIDE_IFELSE([AC_PROG_F77],
  45. [AC_LIBTOOL_F77],
  46. [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
  47. ])])
  48. dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
  49. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
  50. dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
  51. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  52. [AC_LIBTOOL_GCJ],
  53. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  54. [AC_LIBTOOL_GCJ],
  55. [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
  56. [AC_LIBTOOL_GCJ],
  57. [ifdef([AC_PROG_GCJ],
  58. [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
  59. ifdef([A][M_PROG_GCJ],
  60. [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
  61. ifdef([LT_AC_PROG_GCJ],
  62. [define([LT_AC_PROG_GCJ],
  63. defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
  64. ])])# AC_PROG_LIBTOOL
  65. # _AC_PROG_LIBTOOL
  66. # ----------------
  67. AC_DEFUN([_AC_PROG_LIBTOOL],
  68. [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
  69. AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
  70. AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
  71. AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
  72. # This can be used to rebuild libtool when needed
  73. LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
  74. # Always use our own libtool.
  75. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  76. AC_SUBST(LIBTOOL)dnl
  77. # Prevent multiple expansion
  78. define([AC_PROG_LIBTOOL], [])
  79. ])# _AC_PROG_LIBTOOL
  80. # AC_LIBTOOL_SETUP
  81. # ----------------
  82. AC_DEFUN([AC_LIBTOOL_SETUP],
  83. [AC_PREREQ(2.50)dnl
  84. AC_REQUIRE([AC_ENABLE_SHARED])dnl
  85. AC_REQUIRE([AC_ENABLE_STATIC])dnl
  86. AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
  87. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  88. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  89. AC_REQUIRE([AC_PROG_CC])dnl
  90. AC_REQUIRE([AC_PROG_LD])dnl
  91. AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
  92. AC_REQUIRE([AC_PROG_NM])dnl
  93. AC_REQUIRE([AC_PROG_LN_S])dnl
  94. AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
  95. # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
  96. AC_REQUIRE([AC_OBJEXT])dnl
  97. AC_REQUIRE([AC_EXEEXT])dnl
  98. dnl
  99. AC_LIBTOOL_SYS_MAX_CMD_LEN
  100. AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  101. AC_LIBTOOL_OBJDIR
  102. AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  103. _LT_AC_PROG_ECHO_BACKSLASH
  104. case $host_os in
  105. aix3*)
  106. # AIX sometimes has problems with the GCC collect2 program. For some
  107. # reason, if we set the COLLECT_NAMES environment variable, the problems
  108. # vanish in a puff of smoke.
  109. if test "X${COLLECT_NAMES+set}" != Xset; then
  110. COLLECT_NAMES=
  111. export COLLECT_NAMES
  112. fi
  113. ;;
  114. esac
  115. # Sed substitution that helps us do robust quoting. It backslashifies
  116. # metacharacters that are still active within double-quoted strings.
  117. Xsed='sed -e s/^X//'
  118. [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
  119. # Same as above, but do not quote variable references.
  120. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
  121. # Sed substitution to delay expansion of an escaped shell variable in a
  122. # double_quote_subst'ed string.
  123. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  124. # Sed substitution to avoid accidental globbing in evaled expressions
  125. no_glob_subst='s/\*/\\\*/g'
  126. # Constants:
  127. rm="rm -f"
  128. # Global variables:
  129. default_ofile=libtool
  130. can_build_shared=yes
  131. # All known linkers require a `.a' archive for static linking (except M$VC,
  132. # which needs '.lib').
  133. libext=a
  134. ltmain="$ac_aux_dir/ltmain.sh"
  135. ofile="$default_ofile"
  136. with_gnu_ld="$lt_cv_prog_gnu_ld"
  137. AC_CHECK_TOOL(AR, ar, false)
  138. AC_CHECK_TOOL(RANLIB, ranlib, :)
  139. AC_CHECK_TOOL(STRIP, strip, :)
  140. old_CC="$CC"
  141. old_CFLAGS="$CFLAGS"
  142. # Set sane defaults for various variables
  143. test -z "$AR" && AR=ar
  144. test -z "$AR_FLAGS" && AR_FLAGS=cru
  145. test -z "$AS" && AS=as
  146. test -z "$CC" && CC=cc
  147. test -z "$LTCC" && LTCC=$CC
  148. test -z "$DLLTOOL" && DLLTOOL=dlltool
  149. test -z "$LD" && LD=ld
  150. test -z "$LN_S" && LN_S="ln -s"
  151. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  152. test -z "$NM" && NM=nm
  153. test -z "$SED" && SED=sed
  154. test -z "$OBJDUMP" && OBJDUMP=objdump
  155. test -z "$RANLIB" && RANLIB=:
  156. test -z "$STRIP" && STRIP=:
  157. test -z "$ac_objext" && ac_objext=o
  158. # Determine commands to create old-style static archives.
  159. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
  160. old_postinstall_cmds='chmod 644 $oldlib'
  161. old_postuninstall_cmds=
  162. if test -n "$RANLIB"; then
  163. case $host_os in
  164. openbsd*)
  165. old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
  166. ;;
  167. *)
  168. old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
  169. ;;
  170. esac
  171. old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
  172. fi
  173. # Only perform the check for file, if the check method requires it
  174. case $deplibs_check_method in
  175. file_magic*)
  176. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  177. AC_PATH_MAGIC
  178. fi
  179. ;;
  180. esac
  181. AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
  182. AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
  183. enable_win32_dll=yes, enable_win32_dll=no)
  184. AC_ARG_ENABLE([libtool-lock],
  185. [AC_HELP_STRING([--disable-libtool-lock],
  186. [avoid locking (might break parallel builds)])])
  187. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  188. AC_ARG_WITH([pic],
  189. [AC_HELP_STRING([--with-pic],
  190. [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
  191. [pic_mode="$withval"],
  192. [pic_mode=default])
  193. test -z "$pic_mode" && pic_mode=default
  194. # Use C for the default configuration in the libtool script
  195. tagname=
  196. AC_LIBTOOL_LANG_C_CONFIG
  197. _LT_AC_TAGCONFIG
  198. ])# AC_LIBTOOL_SETUP
  199. # _LT_AC_SYS_COMPILER
  200. # -------------------
  201. AC_DEFUN([_LT_AC_SYS_COMPILER],
  202. [AC_REQUIRE([AC_PROG_CC])dnl
  203. # If no C compiler was specified, use CC.
  204. LTCC=${LTCC-"$CC"}
  205. # Allow CC to be a program name with arguments.
  206. compiler=$CC
  207. ])# _LT_AC_SYS_COMPILER
  208. # _LT_AC_SYS_LIBPATH_AIX
  209. # ----------------------
  210. # Links a minimal program and checks the executable
  211. # for the system default hardcoded library path. In most cases,
  212. # this is /usr/lib:/lib, but when the MPI compilers are used
  213. # the location of the communication and MPI libs are included too.
  214. # If we don't find anything, use the default library path according
  215. # to the aix ld manual.
  216. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
  217. [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
  218. aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
  219. }'`
  220. # Check for a 64-bit object if we didn't find anything.
  221. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
  222. }'`; fi],[])
  223. if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  224. ])# _LT_AC_SYS_LIBPATH_AIX
  225. # _LT_AC_SHELL_INIT(ARG)
  226. # ----------------------
  227. AC_DEFUN([_LT_AC_SHELL_INIT],
  228. [ifdef([AC_DIVERSION_NOTICE],
  229. [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
  230. [AC_DIVERT_PUSH(NOTICE)])
  231. $1
  232. AC_DIVERT_POP
  233. ])# _LT_AC_SHELL_INIT
  234. # _LT_AC_PROG_ECHO_BACKSLASH
  235. # --------------------------
  236. # Add some code to the start of the generated configure script which
  237. # will find an echo command which doesn't interpret backslashes.
  238. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
  239. [_LT_AC_SHELL_INIT([
  240. # Check that we are running under the correct shell.
  241. SHELL=${CONFIG_SHELL-/bin/sh}
  242. case X$ECHO in
  243. X*--fallback-echo)
  244. # Remove one level of quotation (which was required for Make).
  245. ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
  246. ;;
  247. esac
  248. echo=${ECHO-echo}
  249. if test "X[$]1" = X--no-reexec; then
  250. # Discard the --no-reexec flag, and continue.
  251. shift
  252. elif test "X[$]1" = X--fallback-echo; then
  253. # Avoid inline document here, it may be left over
  254. :
  255. elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
  256. # Yippee, $echo works!
  257. :
  258. else
  259. # Restart under the correct shell.
  260. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
  261. fi
  262. if test "X[$]1" = X--fallback-echo; then
  263. # used as fallback echo
  264. shift
  265. cat <<EOF
  266. [$]*
  267. EOF
  268. exit 0
  269. fi
  270. # The HP-UX ksh and POSIX shell print the target directory to stdout
  271. # if CDPATH is set.
  272. if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  273. if test -z "$ECHO"; then
  274. if test "X${echo_test_string+set}" != Xset; then
  275. # find a string as large as possible, as long as the shell can cope with it
  276. for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
  277. # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
  278. if (echo_test_string="`eval $cmd`") 2>/dev/null &&
  279. echo_test_string="`eval $cmd`" &&
  280. (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
  281. then
  282. break
  283. fi
  284. done
  285. fi
  286. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  287. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  288. test "X$echo_testing_string" = "X$echo_test_string"; then
  289. :
  290. else
  291. # The Solaris, AIX, and Digital Unix default echo programs unquote
  292. # backslashes. This makes it impossible to quote backslashes using
  293. # echo "$something" | sed 's/\\/\\\\/g'
  294. #
  295. # So, first we look for a working echo in the user's PATH.
  296. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  297. for dir in $PATH /usr/ucb; do
  298. IFS="$lt_save_ifs"
  299. if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  300. test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
  301. echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
  302. test "X$echo_testing_string" = "X$echo_test_string"; then
  303. echo="$dir/echo"
  304. break
  305. fi
  306. done
  307. IFS="$lt_save_ifs"
  308. if test "X$echo" = Xecho; then
  309. # We didn't find a better echo, so look for alternatives.
  310. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
  311. echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
  312. test "X$echo_testing_string" = "X$echo_test_string"; then
  313. # This shell has a builtin print -r that does the trick.
  314. echo='print -r'
  315. elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
  316. test "X$CONFIG_SHELL" != X/bin/ksh; then
  317. # If we have ksh, try running configure again with it.
  318. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  319. export ORIGINAL_CONFIG_SHELL
  320. CONFIG_SHELL=/bin/ksh
  321. export CONFIG_SHELL
  322. exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
  323. else
  324. # Try using printf.
  325. echo='printf %s\n'
  326. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  327. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  328. test "X$echo_testing_string" = "X$echo_test_string"; then
  329. # Cool, printf works
  330. :
  331. elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  332. test "X$echo_testing_string" = 'X\t' &&
  333. echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  334. test "X$echo_testing_string" = "X$echo_test_string"; then
  335. CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
  336. export CONFIG_SHELL
  337. SHELL="$CONFIG_SHELL"
  338. export SHELL
  339. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  340. elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  341. test "X$echo_testing_string" = 'X\t' &&
  342. echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  343. test "X$echo_testing_string" = "X$echo_test_string"; then
  344. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  345. else
  346. # maybe with a smaller string...
  347. prev=:
  348. for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
  349. if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
  350. then
  351. break
  352. fi
  353. prev="$cmd"
  354. done
  355. if test "$prev" != 'sed 50q "[$]0"'; then
  356. echo_test_string=`eval $prev`
  357. export echo_test_string
  358. exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
  359. else
  360. # Oops. We lost completely, so just stick with echo.
  361. echo=echo
  362. fi
  363. fi
  364. fi
  365. fi
  366. fi
  367. fi
  368. # Copy echo and quote the copy suitably for passing to libtool from
  369. # the Makefile, instead of quoting the original, which is used later.
  370. ECHO=$echo
  371. if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
  372. ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
  373. fi
  374. AC_SUBST(ECHO)
  375. ])])# _LT_AC_PROG_ECHO_BACKSLASH
  376. # _LT_AC_LOCK
  377. # -----------
  378. AC_DEFUN([_LT_AC_LOCK],
  379. [AC_ARG_ENABLE([libtool-lock],
  380. [AC_HELP_STRING([--disable-libtool-lock],
  381. [avoid locking (might break parallel builds)])])
  382. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  383. # Some flags need to be propagated to the compiler or linker for good
  384. # libtool support.
  385. case $host in
  386. ia64-*-hpux*)
  387. # Find out which ABI we are using.
  388. echo 'int i;' > conftest.$ac_ext
  389. if AC_TRY_EVAL(ac_compile); then
  390. case `/usr/bin/file conftest.$ac_objext` in
  391. *ELF-32*)
  392. HPUX_IA64_MODE="32"
  393. ;;
  394. *ELF-64*)
  395. HPUX_IA64_MODE="64"
  396. ;;
  397. esac
  398. fi
  399. rm -rf conftest*
  400. ;;
  401. *-*-irix6*)
  402. # Find out which ABI we are using.
  403. echo '[#]line __oline__ "configure"' > conftest.$ac_ext
  404. if AC_TRY_EVAL(ac_compile); then
  405. if test "$lt_cv_prog_gnu_ld" = yes; then
  406. case `/usr/bin/file conftest.$ac_objext` in
  407. *32-bit*)
  408. LD="${LD-ld} -melf32bsmip"
  409. ;;
  410. *N32*)
  411. LD="${LD-ld} -melf32bmipn32"
  412. ;;
  413. *64-bit*)
  414. LD="${LD-ld} -melf64bmip"
  415. ;;
  416. esac
  417. else
  418. case `/usr/bin/file conftest.$ac_objext` in
  419. *32-bit*)
  420. LD="${LD-ld} -32"
  421. ;;
  422. *N32*)
  423. LD="${LD-ld} -n32"
  424. ;;
  425. *64-bit*)
  426. LD="${LD-ld} -64"
  427. ;;
  428. esac
  429. fi
  430. fi
  431. rm -rf conftest*
  432. ;;
  433. x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
  434. # Find out which ABI we are using.
  435. echo 'int i;' > conftest.$ac_ext
  436. if AC_TRY_EVAL(ac_compile); then
  437. case "`/usr/bin/file conftest.o`" in
  438. *32-bit*)
  439. case $host in
  440. x86_64-*linux*)
  441. LD="${LD-ld} -m elf_i386"
  442. ;;
  443. ppc64-*linux*|powerpc64-*linux*)
  444. LD="${LD-ld} -m elf32ppclinux"
  445. ;;
  446. s390x-*linux*)
  447. LD="${LD-ld} -m elf_s390"
  448. ;;
  449. sparc64-*linux*)
  450. LD="${LD-ld} -m elf32_sparc"
  451. ;;
  452. esac
  453. ;;
  454. *64-bit*)
  455. case $host in
  456. x86_64-*linux*)
  457. LD="${LD-ld} -m elf_x86_64"
  458. ;;
  459. ppc*-*linux*|powerpc*-*linux*)
  460. LD="${LD-ld} -m elf64ppc"
  461. ;;
  462. s390*-*linux*)
  463. LD="${LD-ld} -m elf64_s390"
  464. ;;
  465. sparc*-*linux*)
  466. LD="${LD-ld} -m elf64_sparc"
  467. ;;
  468. esac
  469. ;;
  470. esac
  471. fi
  472. rm -rf conftest*
  473. ;;
  474. *-*-sco3.2v5*)
  475. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  476. SAVE_CFLAGS="$CFLAGS"
  477. CFLAGS="$CFLAGS -belf"
  478. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  479. [AC_LANG_PUSH(C)
  480. AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  481. AC_LANG_POP])
  482. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  483. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  484. CFLAGS="$SAVE_CFLAGS"
  485. fi
  486. ;;
  487. AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
  488. [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
  489. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  490. AC_CHECK_TOOL(AS, as, false)
  491. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  492. ;;
  493. ])
  494. esac
  495. need_locks="$enable_libtool_lock"
  496. ])# _LT_AC_LOCK
  497. # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  498. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  499. # ----------------------------------------------------------------
  500. # Check whether the given compiler option works
  501. AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
  502. [AC_REQUIRE([LT_AC_PROG_SED])
  503. AC_CACHE_CHECK([$1], [$2],
  504. [$2=no
  505. ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  506. printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  507. lt_compiler_flag="$3"
  508. # Insert the option either (1) after the last *FLAGS variable, or
  509. # (2) before a word containing "conftest.", or (3) at the end.
  510. # Note that $ac_compile itself does not contain backslashes and begins
  511. # with a dollar sign (not a hyphen), so the echo should work correctly.
  512. # The option is referenced via a variable to avoid confusing sed.
  513. lt_compile=`echo "$ac_compile" | $SED \
  514. -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
  515. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  516. -e 's:$: $lt_compiler_flag:'`
  517. (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  518. (eval "$lt_compile" 2>conftest.err)
  519. ac_status=$?
  520. cat conftest.err >&AS_MESSAGE_LOG_FD
  521. echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  522. if (exit $ac_status) && test -s "$ac_outfile"; then
  523. # The compiler can only warn and ignore the option if not recognized
  524. # So say no if there are warnings
  525. if test ! -s conftest.err; then
  526. $2=yes
  527. fi
  528. fi
  529. $rm conftest*
  530. ])
  531. if test x"[$]$2" = xyes; then
  532. ifelse([$5], , :, [$5])
  533. else
  534. ifelse([$6], , :, [$6])
  535. fi
  536. ])# AC_LIBTOOL_COMPILER_OPTION
  537. # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  538. # [ACTION-SUCCESS], [ACTION-FAILURE])
  539. # ------------------------------------------------------------
  540. # Check whether the given compiler option works
  541. AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
  542. [AC_CACHE_CHECK([$1], [$2],
  543. [$2=no
  544. save_LDFLAGS="$LDFLAGS"
  545. LDFLAGS="$LDFLAGS $3"
  546. printf "$lt_simple_link_test_code" > conftest.$ac_ext
  547. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  548. # The compiler can only warn and ignore the option if not recognized
  549. # So say no if there are warnings
  550. if test -s conftest.err; then
  551. # Append any errors to the config.log.
  552. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  553. else
  554. $2=yes
  555. fi
  556. fi
  557. $rm conftest*
  558. LDFLAGS="$save_LDFLAGS"
  559. ])
  560. if test x"[$]$2" = xyes; then
  561. ifelse([$4], , :, [$4])
  562. else
  563. ifelse([$5], , :, [$5])
  564. fi
  565. ])# AC_LIBTOOL_LINKER_OPTION
  566. # AC_LIBTOOL_SYS_MAX_CMD_LEN
  567. # --------------------------
  568. AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
  569. [# find the maximum length of command line arguments
  570. AC_MSG_CHECKING([the maximum length of command line arguments])
  571. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  572. i=0
  573. teststring="ABCD"
  574. case $build_os in
  575. msdosdjgpp*)
  576. # On DJGPP, this test can blow up pretty badly due to problems in libc
  577. # (any single argument exceeding 2000 bytes causes a buffer overrun
  578. # during glob expansion). Even if it were fixed, the result of this
  579. # check would be larger than it should be.
  580. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  581. ;;
  582. gnu*)
  583. # Under GNU Hurd, this test is not required because there is
  584. # no limit to the length of command line arguments.
  585. # Libtool will interpret -1 as no limit whatsoever
  586. lt_cv_sys_max_cmd_len=-1;
  587. ;;
  588. cygwin* | mingw*)
  589. # On Win9x/ME, this test blows up -- it succeeds, but takes
  590. # about 5 minutes as the teststring grows exponentially.
  591. # Worse, since 9x/ME are not pre-emptively multitasking,
  592. # you end up with a "frozen" computer, even though with patience
  593. # the test eventually succeeds (with a max line length of 256k).
  594. # Instead, let's just punt: use the minimum linelength reported by
  595. # all of the supported platforms: 8192 (on NT/2K/XP).
  596. lt_cv_sys_max_cmd_len=8192;
  597. ;;
  598. amigaos*)
  599. # On AmigaOS with pdksh, this test takes hours, literally.
  600. # So we just punt and use a minimum line length of 8192.
  601. lt_cv_sys_max_cmd_len=8192;
  602. ;;
  603. *)
  604. # If test is not a shell built-in, we'll probably end up computing a
  605. # maximum length that is only half of the actual maximum length, but
  606. # we can't tell.
  607. while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
  608. = "XX$teststring") >/dev/null 2>&1 &&
  609. new_result=`expr "X$teststring" : ".*" 2>&1` &&
  610. lt_cv_sys_max_cmd_len=$new_result &&
  611. test $i != 17 # 1/2 MB should be enough
  612. do
  613. i=`expr $i + 1`
  614. teststring=$teststring$teststring
  615. done
  616. teststring=
  617. # Add a significant safety factor because C++ compilers can tack on massive
  618. # amounts of additional arguments before passing them to the linker.
  619. # It appears as though 1/2 is a usable value.
  620. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  621. ;;
  622. esac
  623. ])
  624. if test -n $lt_cv_sys_max_cmd_len ; then
  625. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  626. else
  627. AC_MSG_RESULT(none)
  628. fi
  629. ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
  630. # _LT_AC_CHECK_DLFCN
  631. # --------------------
  632. AC_DEFUN([_LT_AC_CHECK_DLFCN],
  633. [AC_CHECK_HEADERS(dlfcn.h)dnl
  634. ])# _LT_AC_CHECK_DLFCN
  635. # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  636. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  637. # ------------------------------------------------------------------
  638. AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
  639. [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  640. if test "$cross_compiling" = yes; then :
  641. [$4]
  642. else
  643. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  644. lt_status=$lt_dlunknown
  645. cat > conftest.$ac_ext <<EOF
  646. [#line __oline__ "configure"
  647. #include "confdefs.h"
  648. #if HAVE_DLFCN_H
  649. #include <dlfcn.h>
  650. #endif
  651. #include <stdio.h>
  652. #ifdef RTLD_GLOBAL
  653. # define LT_DLGLOBAL RTLD_GLOBAL
  654. #else
  655. # ifdef DL_GLOBAL
  656. # define LT_DLGLOBAL DL_GLOBAL
  657. # else
  658. # define LT_DLGLOBAL 0
  659. # endif
  660. #endif
  661. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  662. find out it does not work in some platform. */
  663. #ifndef LT_DLLAZY_OR_NOW
  664. # ifdef RTLD_LAZY
  665. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  666. # else
  667. # ifdef DL_LAZY
  668. # define LT_DLLAZY_OR_NOW DL_LAZY
  669. # else
  670. # ifdef RTLD_NOW
  671. # define LT_DLLAZY_OR_NOW RTLD_NOW
  672. # else
  673. # ifdef DL_NOW
  674. # define LT_DLLAZY_OR_NOW DL_NOW
  675. # else
  676. # define LT_DLLAZY_OR_NOW 0
  677. # endif
  678. # endif
  679. # endif
  680. # endif
  681. #endif
  682. #ifdef __cplusplus
  683. extern "C" void exit (int);
  684. #endif
  685. void fnord() { int i=42;}
  686. int main ()
  687. {
  688. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  689. int status = $lt_dlunknown;
  690. if (self)
  691. {
  692. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  693. else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  694. /* dlclose (self); */
  695. }
  696. exit (status);
  697. }]
  698. EOF
  699. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  700. (./conftest; exit; ) 2>/dev/null
  701. lt_status=$?
  702. case x$lt_status in
  703. x$lt_dlno_uscore) $1 ;;
  704. x$lt_dlneed_uscore) $2 ;;
  705. x$lt_unknown|x*) $3 ;;
  706. esac
  707. else :
  708. # compilation failed
  709. $3
  710. fi
  711. fi
  712. rm -fr conftest*
  713. ])# _LT_AC_TRY_DLOPEN_SELF
  714. # AC_LIBTOOL_DLOPEN_SELF
  715. # -------------------
  716. AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
  717. [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  718. if test "x$enable_dlopen" != xyes; then
  719. enable_dlopen=unknown
  720. enable_dlopen_self=unknown
  721. enable_dlopen_self_static=unknown
  722. else
  723. lt_cv_dlopen=no
  724. lt_cv_dlopen_libs=
  725. case $host_os in
  726. beos*)
  727. lt_cv_dlopen="load_add_on"
  728. lt_cv_dlopen_libs=
  729. lt_cv_dlopen_self=yes
  730. ;;
  731. mingw* | pw32*)
  732. lt_cv_dlopen="LoadLibrary"
  733. lt_cv_dlopen_libs=
  734. ;;
  735. cygwin*)
  736. lt_cv_dlopen="dlopen"
  737. lt_cv_dlopen_libs=
  738. ;;
  739. darwin*)
  740. # if libdl is installed we need to link against it
  741. AC_CHECK_LIB([dl], [dlopen],
  742. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
  743. lt_cv_dlopen="dyld"
  744. lt_cv_dlopen_libs=
  745. lt_cv_dlopen_self=yes
  746. ])
  747. ;;
  748. *)
  749. AC_CHECK_FUNC([shl_load],
  750. [lt_cv_dlopen="shl_load"],
  751. [AC_CHECK_LIB([dld], [shl_load],
  752. [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
  753. [AC_CHECK_FUNC([dlopen],
  754. [lt_cv_dlopen="dlopen"],
  755. [AC_CHECK_LIB([dl], [dlopen],
  756. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  757. [AC_CHECK_LIB([svld], [dlopen],
  758. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  759. [AC_CHECK_LIB([dld], [dld_link],
  760. [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
  761. ])
  762. ])
  763. ])
  764. ])
  765. ])
  766. ;;
  767. esac
  768. if test "x$lt_cv_dlopen" != xno; then
  769. enable_dlopen=yes
  770. else
  771. enable_dlopen=no
  772. fi
  773. case $lt_cv_dlopen in
  774. dlopen)
  775. save_CPPFLAGS="$CPPFLAGS"
  776. test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  777. save_LDFLAGS="$LDFLAGS"
  778. eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  779. save_LIBS="$LIBS"
  780. LIBS="$lt_cv_dlopen_libs $LIBS"
  781. AC_CACHE_CHECK([whether a program can dlopen itself],
  782. lt_cv_dlopen_self, [dnl
  783. _LT_AC_TRY_DLOPEN_SELF(
  784. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  785. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  786. ])
  787. if test "x$lt_cv_dlopen_self" = xyes; then
  788. LDFLAGS="$LDFLAGS $link_static_flag"
  789. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  790. lt_cv_dlopen_self_static, [dnl
  791. _LT_AC_TRY_DLOPEN_SELF(
  792. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  793. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  794. ])
  795. fi
  796. CPPFLAGS="$save_CPPFLAGS"
  797. LDFLAGS="$save_LDFLAGS"
  798. LIBS="$save_LIBS"
  799. ;;
  800. esac
  801. case $lt_cv_dlopen_self in
  802. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  803. *) enable_dlopen_self=unknown ;;
  804. esac
  805. case $lt_cv_dlopen_self_static in
  806. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  807. *) enable_dlopen_self_static=unknown ;;
  808. esac
  809. fi
  810. ])# AC_LIBTOOL_DLOPEN_SELF
  811. # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
  812. # ---------------------------------
  813. # Check to see if options -c and -o are simultaneously supported by compiler
  814. AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
  815. [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  816. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  817. [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  818. [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  819. $rm -r conftest 2>/dev/null
  820. mkdir conftest
  821. cd conftest
  822. mkdir out
  823. printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  824. lt_compiler_flag="-o out/conftest2.$ac_objext"
  825. # Insert the option either (1) after the last *FLAGS variable, or
  826. # (2) before a word containing "conftest.", or (3) at the end.
  827. # Note that $ac_compile itself does not contain backslashes and begins
  828. # with a dollar sign (not a hyphen), so the echo should work correctly.
  829. lt_compile=`echo "$ac_compile" | $SED \
  830. -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
  831. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  832. -e 's:$: $lt_compiler_flag:'`
  833. (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  834. (eval "$lt_compile" 2>out/conftest.err)
  835. ac_status=$?
  836. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  837. echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  838. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  839. then
  840. # The compiler can only warn and ignore the option if not recognized
  841. # So say no if there are warnings
  842. if test ! -s out/conftest.err; then
  843. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  844. fi
  845. fi
  846. chmod u+w .
  847. $rm conftest*
  848. # SGI C++ compiler will create directory out/ii_files/ for
  849. # template instantiation
  850. test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
  851. $rm out/* && rmdir out
  852. cd ..
  853. rmdir conftest
  854. $rm conftest*
  855. ])
  856. ])# AC_LIBTOOL_PROG_CC_C_O
  857. # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
  858. # -----------------------------------------
  859. # Check to see if we can do hard links to lock some files if needed
  860. AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
  861. [AC_REQUIRE([_LT_AC_LOCK])dnl
  862. hard_links="nottested"
  863. if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
  864. # do not overwrite the value of need_locks provided by the user
  865. AC_MSG_CHECKING([if we can lock with hard links])
  866. hard_links=yes
  867. $rm conftest*
  868. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  869. touch conftest.a
  870. ln conftest.a conftest.b 2>&5 || hard_links=no
  871. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  872. AC_MSG_RESULT([$hard_links])
  873. if test "$hard_links" = no; then
  874. AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
  875. need_locks=warn
  876. fi
  877. else
  878. need_locks=no
  879. fi
  880. ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
  881. # AC_LIBTOOL_OBJDIR
  882. # -----------------
  883. AC_DEFUN([AC_LIBTOOL_OBJDIR],
  884. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  885. [rm -f .libs 2>/dev/null
  886. mkdir .libs 2>/dev/null
  887. if test -d .libs; then
  888. lt_cv_objdir=.libs
  889. else
  890. # MS-DOS does not allow filenames that begin with a dot.
  891. lt_cv_objdir=_libs
  892. fi
  893. rmdir .libs 2>/dev/null])
  894. objdir=$lt_cv_objdir
  895. ])# AC_LIBTOOL_OBJDIR
  896. # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
  897. # ----------------------------------------------
  898. # Check hardcoding attributes.
  899. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
  900. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  901. _LT_AC_TAGVAR(hardcode_action, $1)=
  902. if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
  903. test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
  904. test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
  905. # We can hardcode non-existant directories.
  906. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
  907. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  908. # have to relink, otherwise we might link with an installed library
  909. # when we should be linking with a yet-to-be-installed one
  910. ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
  911. test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
  912. # Linking always hardcodes the temporary library directory.
  913. _LT_AC_TAGVAR(hardcode_action, $1)=relink
  914. else
  915. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  916. _LT_AC_TAGVAR(hardcode_action, $1)=immediate
  917. fi
  918. else
  919. # We cannot hardcode anything, or else we can only hardcode existing
  920. # directories.
  921. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
  922. fi
  923. AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
  924. if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
  925. # Fast installation is not supported
  926. enable_fast_install=no
  927. elif test "$shlibpath_overrides_runpath" = yes ||
  928. test "$enable_shared" = no; then
  929. # Fast installation is not necessary
  930. enable_fast_install=needless
  931. fi
  932. ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
  933. # AC_LIBTOOL_SYS_LIB_STRIP
  934. # ------------------------
  935. AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
  936. [striplib=
  937. old_striplib=
  938. AC_MSG_CHECKING([whether stripping libraries is possible])
  939. if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
  940. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  941. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  942. AC_MSG_RESULT([yes])
  943. else
  944. # FIXME - insert some real tests, host_os isn't really good enough
  945. case $host_os in
  946. darwin*)
  947. if test -n "$STRIP" ; then
  948. striplib="$STRIP -x"
  949. AC_MSG_RESULT([yes])
  950. else
  951. AC_MSG_RESULT([no])
  952. fi
  953. ;;
  954. *)
  955. AC_MSG_RESULT([no])
  956. ;;
  957. esac
  958. fi
  959. ])# AC_LIBTOOL_SYS_LIB_STRIP
  960. # AC_LIBTOOL_SYS_DYNAMIC_LINKER
  961. # -----------------------------
  962. # PORTME Fill in your ld.so characteristics
  963. AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
  964. [AC_MSG_CHECKING([dynamic linker characteristics])
  965. library_names_spec=
  966. libname_spec='lib$name'
  967. soname_spec=
  968. shrext_cmds=".so"
  969. postinstall_cmds=
  970. postuninstall_cmds=
  971. finish_cmds=
  972. finish_eval=
  973. shlibpath_var=
  974. shlibpath_overrides_runpath=unknown
  975. version_type=none
  976. dynamic_linker="$host_os ld.so"
  977. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  978. if test "$GCC" = yes; then
  979. sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  980. if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
  981. # if the path contains ";" then we assume it to be the separator
  982. # otherwise default to the standard path separator (i.e. ":") - it is
  983. # assumed that no part of a normal pathname contains ";" but that should
  984. # okay in the real world where ";" in dirpaths is itself problematic.
  985. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  986. else
  987. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  988. fi
  989. else
  990. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  991. fi
  992. need_lib_prefix=unknown
  993. hardcode_into_libs=no
  994. # when you set need_version to no, make sure it does not cause -set_version
  995. # flags to be left without arguments
  996. need_version=unknown
  997. case $host_os in
  998. aix3*)
  999. version_type=linux
  1000. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  1001. shlibpath_var=LIBPATH
  1002. # AIX 3 has no versioning support, so we append a major version to the name.
  1003. soname_spec='${libname}${release}${shared_ext}$major'
  1004. ;;
  1005. aix4* | aix5*)
  1006. version_type=linux
  1007. need_lib_prefix=no
  1008. need_version=no
  1009. hardcode_into_libs=yes
  1010. if test "$host_cpu" = ia64; then
  1011. # AIX 5 supports IA64
  1012. library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  1013. shlibpath_var=LD_LIBRARY_PATH
  1014. else
  1015. # With GCC up to 2.95.x, collect2 would create an import file
  1016. # for dependence libraries. The import file would start with
  1017. # the line `#! .'. This would cause the generated library to
  1018. # depend on `.', always an invalid library. This was fixed in
  1019. # development snapshots of GCC prior to 3.0.
  1020. case $host_os in
  1021. aix4 | aix4.[[01]] | aix4.[[01]].*)
  1022. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  1023. echo ' yes '
  1024. echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
  1025. :
  1026. else
  1027. can_build_shared=no
  1028. fi
  1029. ;;
  1030. esac
  1031. # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  1032. # soname into executable. Probably we can add versioning support to
  1033. # collect2, so additional links can be useful in future.
  1034. if test "$aix_use_runtimelinking" = yes; then
  1035. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  1036. # instead of lib<name>.a to let people know that these are not
  1037. # typical AIX shared libraries.
  1038. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1039. else
  1040. # We preserve .a as extension for shared libraries through AIX4.2
  1041. # and later when we are not doing run time linking.
  1042. library_names_spec='${libname}${release}.a $libname.a'
  1043. soname_spec='${libname}${release}${shared_ext}$major'
  1044. fi
  1045. shlibpath_var=LIBPATH
  1046. fi
  1047. ;;
  1048. amigaos*)
  1049. library_names_spec='$libname.ixlibrary $libname.a'
  1050. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  1051. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
  1052. ;;
  1053. beos*)
  1054. library_names_spec='${libname}${shared_ext}'
  1055. dynamic_linker="$host_os ld.so"
  1056. shlibpath_var=LIBRARY_PATH
  1057. ;;
  1058. bsdi4*)
  1059. version_type=linux
  1060. need_version=no
  1061. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1062. soname_spec='${libname}${release}${shared_ext}$major'
  1063. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  1064. shlibpath_var=LD_LIBRARY_PATH
  1065. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  1066. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  1067. # the default ld.so.conf also contains /usr/contrib/lib and
  1068. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  1069. # libtool to hard-code these into programs
  1070. ;;
  1071. cygwin* | mingw* | pw32*)
  1072. version_type=windows
  1073. shrext_cmds=".dll"
  1074. need_version=no
  1075. need_lib_prefix=no
  1076. case $GCC,$host_os in
  1077. yes,cygwin* | yes,mingw* | yes,pw32*)
  1078. library_names_spec='$libname.dll.a'
  1079. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  1080. postinstall_cmds='base_file=`basename \${file}`~
  1081. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
  1082. dldir=$destdir/`dirname \$dlpath`~
  1083. test -d \$dldir || mkdir -p \$dldir~
  1084. $install_prog $dir/$dlname \$dldir/$dlname'
  1085. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  1086. dlpath=$dir/\$dldll~
  1087. $rm \$dlpath'
  1088. shlibpath_overrides_runpath=yes
  1089. case $host_os in
  1090. cygwin*)
  1091. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  1092. soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  1093. sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
  1094. ;;
  1095. mingw*)
  1096. # MinGW DLLs use traditional 'lib' prefix
  1097. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  1098. sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  1099. if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
  1100. # It is most probably a Windows format PATH printed by
  1101. # mingw gcc, but we are running on Cygwin. Gcc prints its search
  1102. # path with ; separators, and with drive letters. We can handle the
  1103. # drive letters (cygwin fileutils understands them), so leave them,
  1104. # especially as we might pass files found there to a mingw objdump,
  1105. # which wouldn't understand a cygwinified path. Ahh.
  1106. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  1107. else
  1108. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  1109. fi
  1110. ;;
  1111. pw32*)
  1112. # pw32 DLLs use 'pw' prefix rather than 'lib'
  1113. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
  1114. ;;
  1115. esac
  1116. ;;
  1117. *)
  1118. library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  1119. ;;
  1120. esac
  1121. dynamic_linker='Win32 ld.exe'
  1122. # FIXME: first we should search . and the directory the executable is in
  1123. shlibpath_var=PATH
  1124. ;;
  1125. darwin* | rhapsody*)
  1126. dynamic_linker="$host_os dyld"
  1127. version_type=darwin
  1128. need_lib_prefix=no
  1129. need_version=no
  1130. library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  1131. soname_spec='${libname}${release}${major}$shared_ext'
  1132. shlibpath_overrides_runpath=yes
  1133. shlibpath_var=DYLD_LIBRARY_PATH
  1134. shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
  1135. # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
  1136. if test "$GCC" = yes; then
  1137. sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
  1138. else
  1139. sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
  1140. fi
  1141. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  1142. ;;
  1143. dgux*)
  1144. version_type=linux
  1145. need_lib_prefix=no
  1146. need_version=no
  1147. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  1148. soname_spec='${libname}${release}${shared_ext}$major'
  1149. shlibpath_var=LD_LIBRARY_PATH
  1150. ;;
  1151. freebsd1*)
  1152. dynamic_linker=no
  1153. ;;
  1154. kfreebsd*-gnu)
  1155. version_type=linux
  1156. need_lib_prefix=no
  1157. need_version=no
  1158. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  1159. soname_spec='${libname}${release}${shared_ext}$major'
  1160. shlibpath_var=LD_LIBRARY_PATH
  1161. shlibpath_overrides_runpath=no
  1162. hardcode_into_libs=yes
  1163. dynamic_linker='GNU ld.so'
  1164. ;;
  1165. freebsd*)
  1166. objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
  1167. version_type=freebsd-$objformat
  1168. case $version_type in
  1169. freebsd-elf*)
  1170. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  1171. need_version=no
  1172. need_lib_prefix=no
  1173. ;;
  1174. freebsd-*)
  1175. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  1176. need_version=yes
  1177. ;;
  1178. esac
  1179. shlibpath_var=LD_LIBRARY_PATH
  1180. case $host_os in
  1181. freebsd2*)
  1182. shlibpath_overrides_runpath=yes
  1183. ;;
  1184. freebsd3.[01]* | freebsdelf3.[01]*)
  1185. shlibpath_overrides_runpath=yes
  1186. hardcode_into_libs=yes
  1187. ;;
  1188. *) # from 3.2 on
  1189. shlibpath_overrides_runpath=no
  1190. hardcode_into_libs=yes
  1191. ;;
  1192. esac
  1193. ;;
  1194. gnu*)
  1195. version_type=linux
  1196. need_lib_prefix=no
  1197. need_version=no
  1198. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  1199. soname_spec='${libname}${release}${shared_ext}$major'
  1200. shlibpath_var=LD_LIBRARY_PATH
  1201. hardcode_into_libs=yes
  1202. ;;
  1203. hpux9* | hpux10* | hpux11*)
  1204. # Give a soname corresponding to the major version so that dld.sl refuses to
  1205. # link against other versions.
  1206. version_type=sunos
  1207. need_lib_prefix=no
  1208. need_version=no
  1209. case "$host_cpu" in
  1210. ia64*)
  1211. shrext_cmds='.so'
  1212. hardcode_into_libs=yes
  1213. dynamic_linker="$host_os dld.so"
  1214. shlibpath_var=LD_LIBRARY_PATH
  1215. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  1216. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1217. soname_spec='${libname}${release}${shared_ext}$major'
  1218. if test "X$HPUX_IA64_MODE" = X32; then
  1219. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  1220. else
  1221. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  1222. fi
  1223. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  1224. ;;
  1225. hppa*64*)
  1226. shrext_cmds='.sl'
  1227. hardcode_into_libs=yes
  1228. dynamic_linker="$host_os dld.sl"
  1229. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  1230. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  1231. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1232. soname_spec='${libname}${release}${shared_ext}$major'
  1233. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  1234. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  1235. ;;
  1236. *)
  1237. shrext_cmds='.sl'
  1238. dynamic_linker="$host_os dld.sl"
  1239. shlibpath_var=SHLIB_PATH
  1240. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  1241. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1242. soname_spec='${libname}${release}${shared_ext}$major'
  1243. ;;
  1244. esac
  1245. # HP-UX runs *really* slowly unless shared libraries are mode 555.
  1246. postinstall_cmds='chmod 555 $lib'
  1247. ;;
  1248. irix5* | irix6* | nonstopux*)
  1249. case $host_os in
  1250. nonstopux*) version_type=nonstopux ;;
  1251. *)
  1252. if test "$lt_cv_prog_gnu_ld" = yes; then
  1253. version_type=linux
  1254. else
  1255. version_type=irix
  1256. fi ;;
  1257. esac
  1258. need_lib_prefix=no
  1259. need_version=no
  1260. soname_spec='${libname}${release}${shared_ext}$major'
  1261. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  1262. case $host_os in
  1263. irix5* | nonstopux*)
  1264. libsuff= shlibsuff=
  1265. ;;
  1266. *)
  1267. case $LD in # libtool.m4 will add one of these switches to LD
  1268. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  1269. libsuff= shlibsuff= libmagic=32-bit;;
  1270. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  1271. libsuff=32 shlibsuff=N32 libmagic=N32;;
  1272. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  1273. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  1274. *) libsuff= shlibsuff= libmagic=never-match;;
  1275. esac
  1276. ;;
  1277. esac
  1278. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  1279. shlibpath_overrides_runpath=no
  1280. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  1281. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  1282. hardcode_into_libs=yes
  1283. ;;
  1284. # No shared lib support for Linux oldld, aout, or coff.
  1285. linux*oldld* | linux*aout* | linux*coff*)
  1286. dynamic_linker=no
  1287. ;;
  1288. # This must be Linux ELF.
  1289. linux*)
  1290. version_type=linux
  1291. need_lib_prefix=no
  1292. need_version=no
  1293. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1294. soname_spec='${libname}${release}${shared_ext}$major'
  1295. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  1296. shlibpath_var=LD_LIBRARY_PATH
  1297. shlibpath_overrides_runpath=no
  1298. # This implies no fast_install, which is unacceptable.
  1299. # Some rework will be needed to allow for fast_install
  1300. # before this can be enabled.
  1301. hardcode_into_libs=yes
  1302. # Append ld.so.conf contents to the search path
  1303. if test -f /etc/ld.so.conf; then
  1304. lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
  1305. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  1306. fi
  1307. # We used to test for /lib/ld.so.1 and disable shared libraries on
  1308. # powerpc, because MkLinux only supported shared libraries with the
  1309. # GNU dynamic linker. Since this was broken with cross compilers,
  1310. # most powerpc-linux boxes support dynamic linking these days and
  1311. # people can always --disable-shared, the test was removed, and we
  1312. # assume the GNU/Linux dynamic linker is in use.
  1313. dynamic_linker='GNU/Linux ld.so'
  1314. ;;
  1315. knetbsd*-gnu)
  1316. version_type=linux
  1317. need_lib_prefix=no
  1318. need_version=no
  1319. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  1320. soname_spec='${libname}${release}${shared_ext}$major'
  1321. shlibpath_var=LD_LIBRARY_PATH
  1322. shlibpath_overrides_runpath=no
  1323. hardcode_into_libs=yes
  1324. dynamic_linker='GNU ld.so'
  1325. ;;
  1326. netbsd*)
  1327. version_type=sunos
  1328. need_lib_prefix=no
  1329. need_version=no
  1330. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  1331. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  1332. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  1333. dynamic_linker='NetBSD (a.out) ld.so'
  1334. else
  1335. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  1336. soname_spec='${libname}${release}${shared_ext}$major'
  1337. dynamic_linker='NetBSD ld.elf_so'
  1338. fi
  1339. shlibpath_var=LD_LIBRARY_PATH
  1340. shlibpath_overrides_runpath=yes
  1341. hardcode_into_libs=yes
  1342. ;;
  1343. newsos6)
  1344. version_type=linux
  1345. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1346. shlibpath_var=LD_LIBRARY_PATH
  1347. shlibpath_overrides_runpath=yes
  1348. ;;
  1349. nto-qnx*)
  1350. version_type=linux
  1351. need_lib_prefix=no
  1352. need_version=no
  1353. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1354. soname_spec='${libname}${release}${shared_ext}$major'
  1355. shlibpath_var=LD_LIBRARY_PATH
  1356. shlibpath_overrides_runpath=yes
  1357. ;;
  1358. openbsd*)
  1359. version_type=sunos
  1360. need_lib_prefix=no
  1361. need_version=yes
  1362. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  1363. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  1364. shlibpath_var=LD_LIBRARY_PATH
  1365. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  1366. case $host_os in
  1367. openbsd2.[[89]] | openbsd2.[[89]].*)
  1368. shlibpath_overrides_runpath=no
  1369. ;;
  1370. *)
  1371. shlibpath_overrides_runpath=yes
  1372. ;;
  1373. esac
  1374. else
  1375. shlibpath_overrides_runpath=yes
  1376. fi
  1377. ;;
  1378. os2*)
  1379. libname_spec='$name'
  1380. shrext_cmds=".dll"
  1381. need_lib_prefix=no
  1382. library_names_spec='$libname${shared_ext} $libname.a'
  1383. dynamic_linker='OS/2 ld.exe'
  1384. shlibpath_var=LIBPATH
  1385. ;;
  1386. osf3* | osf4* | osf5*)
  1387. version_type=osf
  1388. need_lib_prefix=no
  1389. need_version=no
  1390. soname_spec='${libname}${release}${shared_ext}$major'
  1391. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1392. shlibpath_var=LD_LIBRARY_PATH
  1393. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  1394. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  1395. ;;
  1396. sco3.2v5*)
  1397. version_type=osf
  1398. soname_spec='${libname}${release}${shared_ext}$major'
  1399. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1400. shlibpath_var=LD_LIBRARY_PATH
  1401. ;;
  1402. solaris*)
  1403. version_type=linux
  1404. need_lib_prefix=no
  1405. need_version=no
  1406. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1407. soname_spec='${libname}${release}${shared_ext}$major'
  1408. shlibpath_var=LD_LIBRARY_PATH
  1409. shlibpath_overrides_runpath=yes
  1410. hardcode_into_libs=yes
  1411. # ldd complains unless libraries are executable
  1412. postinstall_cmds='chmod +x $lib'
  1413. ;;
  1414. sunos4*)
  1415. version_type=sunos
  1416. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  1417. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  1418. shlibpath_var=LD_LIBRARY_PATH
  1419. shlibpath_overrides_runpath=yes
  1420. if test "$with_gnu_ld" = yes; then
  1421. need_lib_prefix=no
  1422. fi
  1423. need_version=yes
  1424. ;;
  1425. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  1426. version_type=linux
  1427. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1428. soname_spec='${libname}${release}${shared_ext}$major'
  1429. shlibpath_var=LD_LIBRARY_PATH
  1430. case $host_vendor in
  1431. sni)
  1432. shlibpath_overrides_runpath=no
  1433. need_lib_prefix=no
  1434. export_dynamic_flag_spec='${wl}-Blargedynsym'
  1435. runpath_var=LD_RUN_PATH
  1436. ;;
  1437. siemens)
  1438. need_lib_prefix=no
  1439. ;;
  1440. motorola)
  1441. need_lib_prefix=no
  1442. need_version=no
  1443. shlibpath_overrides_runpath=no
  1444. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  1445. ;;
  1446. esac
  1447. ;;
  1448. sysv4*MP*)
  1449. if test -d /usr/nec ;then
  1450. version_type=linux
  1451. library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  1452. soname_spec='$libname${shared_ext}.$major'
  1453. shlibpath_var=LD_LIBRARY_PATH
  1454. fi
  1455. ;;
  1456. uts4*)
  1457. version_type=linux
  1458. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1459. soname_spec='${libname}${release}${shared_ext}$major'
  1460. shlibpath_var=LD_LIBRARY_PATH
  1461. ;;
  1462. *)
  1463. dynamic_linker=no
  1464. ;;
  1465. esac
  1466. AC_MSG_RESULT([$dynamic_linker])
  1467. test "$dynamic_linker" = no && can_build_shared=no
  1468. ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
  1469. # _LT_AC_TAGCONFIG
  1470. # ----------------
  1471. AC_DEFUN([_LT_AC_TAGCONFIG],
  1472. [AC_ARG_WITH([tags],
  1473. [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
  1474. [include additional configurations @<:@automatic@:>@])],
  1475. [tagnames="$withval"])
  1476. if test -f "$ltmain" && test -n "$tagnames"; then
  1477. if test ! -f "${ofile}"; then
  1478. AC_MSG_WARN([output file `$ofile' does not exist])
  1479. fi
  1480. if test -z "$LTCC"; then
  1481. eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
  1482. if test -z "$LTCC"; then
  1483. AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
  1484. else
  1485. AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
  1486. fi
  1487. fi
  1488. # Extract list of available tagged configurations in $ofile.
  1489. # Note that this assumes the entire list is on one line.
  1490. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
  1491. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1492. for tagname in $tagnames; do
  1493. IFS="$lt_save_ifs"
  1494. # Check whether tagname contains only valid characters
  1495. case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
  1496. "") ;;
  1497. *) AC_MSG_ERROR([invalid tag name: $tagname])
  1498. ;;
  1499. esac
  1500. if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
  1501. then
  1502. AC_MSG_ERROR([tag name \"$tagname\" already exists])
  1503. fi
  1504. # Update the list of available tags.
  1505. if test -n "$tagname"; then
  1506. echo appending configuration tag \"$tagname\" to $ofile
  1507. case $tagname in
  1508. CXX)
  1509. if test -n "$CXX" && test "X$CXX" != "Xno"; then
  1510. AC_LIBTOOL_LANG_CXX_CONFIG
  1511. else
  1512. tagname=""
  1513. fi
  1514. ;;
  1515. F77)
  1516. if test -n "$F77" && test "X$F77" != "Xno"; then
  1517. AC_LIBTOOL_LANG_F77_CONFIG
  1518. else
  1519. tagname=""
  1520. fi
  1521. ;;
  1522. GCJ)
  1523. if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
  1524. AC_LIBTOOL_LANG_GCJ_CONFIG
  1525. else
  1526. tagname=""
  1527. fi
  1528. ;;
  1529. RC)
  1530. AC_LIBTOOL_LANG_RC_CONFIG
  1531. ;;
  1532. *)
  1533. AC_MSG_ERROR([Unsupported tag name: $tagname])
  1534. ;;
  1535. esac
  1536. # Append the new tag name to the list of available tags.
  1537. if test -n "$tagname" ; then
  1538. available_tags="$available_tags $tagname"
  1539. fi
  1540. fi
  1541. done
  1542. IFS="$lt_save_ifs"
  1543. # Now substitute the updated list of available tags.
  1544. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
  1545. mv "${ofile}T" "$ofile"
  1546. chmod +x "$ofile"
  1547. else
  1548. rm -f "${ofile}T"
  1549. AC_MSG_ERROR([unable to update list of available tagged configurations.])
  1550. fi
  1551. fi
  1552. ])# _LT_AC_TAGCONFIG
  1553. # AC_LIBTOOL_DLOPEN
  1554. # -----------------
  1555. # enable checks for dlopen support
  1556. AC_DEFUN([AC_LIBTOOL_DLOPEN],
  1557. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
  1558. ])# AC_LIBTOOL_DLOPEN
  1559. # AC_LIBTOOL_WIN32_DLL
  1560. # --------------------
  1561. # declare package support for building win32 dll's
  1562. AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
  1563. [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
  1564. ])# AC_LIBTOOL_WIN32_DLL
  1565. # AC_ENABLE_SHARED([DEFAULT])
  1566. # ---------------------------
  1567. # implement the --enable-shared flag
  1568. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  1569. AC_DEFUN([AC_ENABLE_SHARED],
  1570. [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
  1571. AC_ARG_ENABLE([shared],
  1572. [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
  1573. [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
  1574. [p=${PACKAGE-default}
  1575. case $enableval in
  1576. yes) enable_shared=yes ;;
  1577. no) enable_shared=no ;;
  1578. *)
  1579. enable_shared=no
  1580. # Look at the argument we got. We use all the common list separators.
  1581. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1582. for pkg in $enableval; do
  1583. IFS="$lt_save_ifs"
  1584. if test "X$pkg" = "X$p"; then
  1585. enable_shared=yes
  1586. fi
  1587. done
  1588. IFS="$lt_save_ifs"
  1589. ;;
  1590. esac],
  1591. [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
  1592. ])# AC_ENABLE_SHARED
  1593. # AC_DISABLE_SHARED
  1594. # -----------------
  1595. #- set the default shared flag to --disable-shared
  1596. AC_DEFUN([AC_DISABLE_SHARED],
  1597. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1598. AC_ENABLE_SHARED(no)
  1599. ])# AC_DISABLE_SHARED
  1600. # AC_ENABLE_STATIC([DEFAULT])
  1601. # ---------------------------
  1602. # implement the --enable-static flag
  1603. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  1604. AC_DEFUN([AC_ENABLE_STATIC],
  1605. [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
  1606. AC_ARG_ENABLE([static],
  1607. [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
  1608. [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
  1609. [p=${PACKAGE-default}
  1610. case $enableval in
  1611. yes) enable_static=yes ;;
  1612. no) enable_static=no ;;
  1613. *)
  1614. enable_static=no
  1615. # Look at the argument we got. We use all the common list separators.
  1616. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1617. for pkg in $enableval; do
  1618. IFS="$lt_save_ifs"
  1619. if test "X$pkg" = "X$p"; then
  1620. enable_static=yes
  1621. fi
  1622. done
  1623. IFS="$lt_save_ifs"
  1624. ;;
  1625. esac],
  1626. [enable_static=]AC_ENABLE_STATIC_DEFAULT)
  1627. ])# AC_ENABLE_STATIC
  1628. # AC_DISABLE_STATIC
  1629. # -----------------
  1630. # set the default static flag to --disable-static
  1631. AC_DEFUN([AC_DISABLE_STATIC],
  1632. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1633. AC_ENABLE_STATIC(no)
  1634. ])# AC_DISABLE_STATIC
  1635. # AC_ENABLE_FAST_INSTALL([DEFAULT])
  1636. # ---------------------------------
  1637. # implement the --enable-fast-install flag
  1638. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  1639. AC_DEFUN([AC_ENABLE_FAST_INSTALL],
  1640. [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
  1641. AC_ARG_ENABLE([fast-install],
  1642. [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
  1643. [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
  1644. [p=${PACKAGE-default}
  1645. case $enableval in
  1646. yes) enable_fast_install=yes ;;
  1647. no) enable_fast_install=no ;;
  1648. *)
  1649. enable_fast_install=no
  1650. # Look at the argument we got. We use all the common list separators.
  1651. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1652. for pkg in $enableval; do
  1653. IFS="$lt_save_ifs"
  1654. if test "X$pkg" = "X$p"; then
  1655. enable_fast_install=yes
  1656. fi
  1657. done
  1658. IFS="$lt_save_ifs"
  1659. ;;
  1660. esac],
  1661. [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
  1662. ])# AC_ENABLE_FAST_INSTALL
  1663. # AC_DISABLE_FAST_INSTALL
  1664. # -----------------------
  1665. # set the default to --disable-fast-install
  1666. AC_DEFUN([AC_DISABLE_FAST_INSTALL],
  1667. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1668. AC_ENABLE_FAST_INSTALL(no)
  1669. ])# AC_DISABLE_FAST_INSTALL
  1670. # AC_LIBTOOL_PICMODE([MODE])
  1671. # --------------------------
  1672. # implement the --with-pic flag
  1673. # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
  1674. AC_DEFUN([AC_LIBTOOL_PICMODE],
  1675. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1676. pic_mode=ifelse($#,1,$1,default)
  1677. ])# AC_LIBTOOL_PICMODE
  1678. # AC_PROG_EGREP
  1679. # -------------
  1680. # This is predefined starting with Autoconf 2.54, so this conditional
  1681. # definition can be removed once we require Autoconf 2.54 or later.
  1682. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
  1683. [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
  1684. [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
  1685. then ac_cv_prog_egrep='grep -E'
  1686. else ac_cv_prog_egrep='egrep'
  1687. fi])
  1688. EGREP=$ac_cv_prog_egrep
  1689. AC_SUBST([EGREP])
  1690. ])])
  1691. # AC_PATH_TOOL_PREFIX
  1692. # -------------------
  1693. # find a file program which can recognise shared library
  1694. AC_DEFUN([AC_PATH_TOOL_PREFIX],
  1695. [AC_REQUIRE([AC_PROG_EGREP])dnl
  1696. AC_MSG_CHECKING([for $1])
  1697. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  1698. [case $MAGIC_CMD in
  1699. [[\\/*] | ?:[\\/]*])
  1700. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  1701. ;;
  1702. *)
  1703. lt_save_MAGIC_CMD="$MAGIC_CMD"
  1704. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  1705. dnl $ac_dummy forces splitting on constant user-supplied paths.
  1706. dnl POSIX.2 word splitting is done only on the output of word expansions,
  1707. dnl not every word. This closes a longstanding sh security hole.
  1708. ac_dummy="ifelse([$2], , $PATH, [$2])"
  1709. for ac_dir in $ac_dummy; do
  1710. IFS="$lt_save_ifs"
  1711. test -z "$ac_dir" && ac_dir=.
  1712. if test -f $ac_dir/$1; then
  1713. lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  1714. if test -n "$file_magic_test_file"; then
  1715. case $deplibs_check_method in
  1716. "file_magic "*)
  1717. file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
  1718. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  1719. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  1720. $EGREP "$file_magic_regex" > /dev/null; then
  1721. :
  1722. else
  1723. cat <<EOF 1>&2
  1724. *** Warning: the command libtool uses to detect shared libraries,
  1725. *** $file_magic_cmd, produces output that libtool cannot recognize.
  1726. *** The result is that libtool may fail to recognize shared libraries
  1727. *** as such. This will affect the creation of libtool libraries that
  1728. *** depend on shared libraries, but programs linked with such libtool
  1729. *** libraries will work regardless of this problem. Nevertheless, you
  1730. *** may want to report the problem to your system manager and/or to
  1731. *** bug-libtool@gnu.org
  1732. EOF
  1733. fi ;;
  1734. esac
  1735. fi
  1736. break
  1737. fi
  1738. done
  1739. IFS="$lt_save_ifs"
  1740. MAGIC_CMD="$lt_save_MAGIC_CMD"
  1741. ;;
  1742. esac])
  1743. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  1744. if test -n "$MAGIC_CMD"; then
  1745. AC_MSG_RESULT($MAGIC_CMD)
  1746. else
  1747. AC_MSG_RESULT(no)
  1748. fi
  1749. ])# AC_PATH_TOOL_PREFIX
  1750. # AC_PATH_MAGIC
  1751. # -------------
  1752. # find a file program which can recognise a shared library
  1753. AC_DEFUN([AC_PATH_MAGIC],
  1754. [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  1755. if test -z "$lt_cv_path_MAGIC_CMD"; then
  1756. if test -n "$ac_tool_prefix"; then
  1757. AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  1758. else
  1759. MAGIC_CMD=:
  1760. fi
  1761. fi
  1762. ])# AC_PATH_MAGIC
  1763. # AC_PROG_LD
  1764. # ----------
  1765. # find the pathname to the GNU or non-GNU linker
  1766. AC_DEFUN([AC_PROG_LD],
  1767. [AC_ARG_WITH([gnu-ld],
  1768. [AC_HELP_STRING([--with-gnu-ld],
  1769. [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  1770. [test "$withval" = no || with_gnu_ld=yes],
  1771. [with_gnu_ld=no])
  1772. AC_REQUIRE([LT_AC_PROG_SED])dnl
  1773. AC_REQUIRE([AC_PROG_CC])dnl
  1774. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  1775. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  1776. ac_prog=ld
  1777. if test "$GCC" = yes; then
  1778. # Check if gcc -print-prog-name=ld gives a path.
  1779. AC_MSG_CHECKING([for ld used by $CC])
  1780. case $host in
  1781. *-*-mingw*)
  1782. # gcc leaves a trailing carriage return which upsets mingw
  1783. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  1784. *)
  1785. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  1786. esac
  1787. case $ac_prog in
  1788. # Accept absolute paths.
  1789. [[\\/]]* | ?:[[\\/]]*)
  1790. re_direlt='/[[^/]][[^/]]*/\.\./'
  1791. # Canonicalize the pathname of ld
  1792. ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
  1793. while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
  1794. ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
  1795. done
  1796. test -z "$LD" && LD="$ac_prog"
  1797. ;;
  1798. "")
  1799. # If it fails, then pretend we aren't using GCC.
  1800. ac_prog=ld
  1801. ;;
  1802. *)
  1803. # If it is relative, then search for the first ld in PATH.
  1804. with_gnu_ld=unknown
  1805. ;;
  1806. esac
  1807. elif test "$with_gnu_ld" = yes; then
  1808. AC_MSG_CHECKING([for GNU ld])
  1809. else
  1810. AC_MSG_CHECKING([for non-GNU ld])
  1811. fi
  1812. AC_CACHE_VAL(lt_cv_path_LD,
  1813. [if test -z "$LD"; then
  1814. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  1815. for ac_dir in $PATH; do
  1816. IFS="$lt_save_ifs"
  1817. test -z "$ac_dir" && ac_dir=.
  1818. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  1819. lt_cv_path_LD="$ac_dir/$ac_prog"
  1820. # Check to see if the program is GNU ld. I'd rather use --version,
  1821. # but apparently some GNU ld's only accept -v.
  1822. # Break only if it was the GNU/non-GNU ld that we prefer.
  1823. case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  1824. *GNU* | *'with BFD'*)
  1825. test "$with_gnu_ld" != no && break
  1826. ;;
  1827. *)
  1828. test "$with_gnu_ld" != yes && break
  1829. ;;
  1830. esac
  1831. fi
  1832. done
  1833. IFS="$lt_save_ifs"
  1834. else
  1835. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  1836. fi])
  1837. LD="$lt_cv_path_LD"
  1838. if test -n "$LD"; then
  1839. AC_MSG_RESULT($LD)
  1840. else
  1841. AC_MSG_RESULT(no)
  1842. fi
  1843. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  1844. AC_PROG_LD_GNU
  1845. ])# AC_PROG_LD
  1846. # AC_PROG_LD_GNU
  1847. # --------------
  1848. AC_DEFUN([AC_PROG_LD_GNU],
  1849. [AC_REQUIRE([AC_PROG_EGREP])dnl
  1850. AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  1851. [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
  1852. case `$LD -v 2>&1 </dev/null` in
  1853. *GNU* | *'with BFD'*)
  1854. lt_cv_prog_gnu_ld=yes
  1855. ;;
  1856. *)
  1857. lt_cv_prog_gnu_ld=no
  1858. ;;
  1859. esac])
  1860. with_gnu_ld=$lt_cv_prog_gnu_ld
  1861. ])# AC_PROG_LD_GNU
  1862. # AC_PROG_LD_RELOAD_FLAG
  1863. # ----------------------
  1864. # find reload flag for linker
  1865. # -- PORTME Some linkers may need a different reload flag.
  1866. AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
  1867. [AC_CACHE_CHECK([for $LD option to reload object files],
  1868. lt_cv_ld_reload_flag,
  1869. [lt_cv_ld_reload_flag='-r'])
  1870. reload_flag=$lt_cv_ld_reload_flag
  1871. case $reload_flag in
  1872. "" | " "*) ;;
  1873. *) reload_flag=" $reload_flag" ;;
  1874. esac
  1875. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  1876. ])# AC_PROG_LD_RELOAD_FLAG
  1877. # AC_DEPLIBS_CHECK_METHOD
  1878. # -----------------------
  1879. # how to check for library dependencies
  1880. # -- PORTME fill in with the dynamic library characteristics
  1881. AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
  1882. [AC_CACHE_CHECK([how to recognise dependent libraries],
  1883. lt_cv_deplibs_check_method,
  1884. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  1885. lt_cv_file_magic_test_file=
  1886. lt_cv_deplibs_check_method='unknown'
  1887. # Need to set the preceding variable on all platforms that support
  1888. # interlibrary dependencies.
  1889. # 'none' -- dependencies not supported.
  1890. # `unknown' -- same as none, but documents that we really don't know.
  1891. # 'pass_all' -- all dependencies passed with no checks.
  1892. # 'test_compile' -- check by making test program.
  1893. # 'file_magic [[regex]]' -- check by looking for files in library path
  1894. # which responds to the $file_magic_cmd with a given extended regex.
  1895. # If you have `file' or equivalent on your system and you're not sure
  1896. # whether `pass_all' will *always* work, you probably want this one.
  1897. case $host_os in
  1898. aix4* | aix5*)
  1899. lt_cv_deplibs_check_method=pass_all
  1900. ;;
  1901. beos*)
  1902. lt_cv_deplibs_check_method=pass_all
  1903. ;;
  1904. bsdi4*)
  1905. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  1906. lt_cv_file_magic_cmd='/usr/bin/file -L'
  1907. lt_cv_file_magic_test_file=/shlib/libc.so
  1908. ;;
  1909. cygwin*)
  1910. # func_win32_libid is a shell function defined in ltmain.sh
  1911. lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  1912. lt_cv_file_magic_cmd='func_win32_libid'
  1913. ;;
  1914. mingw* | pw32*)
  1915. # Base MSYS/MinGW do not provide the 'file' command needed by
  1916. # func_win32_libid shell function, so use a weaker test based on 'objdump'.
  1917. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
  1918. lt_cv_file_magic_cmd='$OBJDUMP -f'
  1919. ;;
  1920. darwin* | rhapsody*)
  1921. lt_cv_deplibs_check_method=pass_all
  1922. ;;
  1923. freebsd* | kfreebsd*-gnu)
  1924. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  1925. case $host_cpu in
  1926. i*86 )
  1927. # Not sure whether the presence of OpenBSD here was a mistake.
  1928. # Let's accept both of them until this is cleared up.
  1929. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
  1930. lt_cv_file_magic_cmd=/usr/bin/file
  1931. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  1932. ;;
  1933. esac
  1934. else
  1935. lt_cv_deplibs_check_method=pass_all
  1936. fi
  1937. ;;
  1938. gnu*)
  1939. lt_cv_deplibs_check_method=pass_all
  1940. ;;
  1941. hpux10.20* | hpux11*)
  1942. lt_cv_file_magic_cmd=/usr/bin/file
  1943. case "$host_cpu" in
  1944. ia64*)
  1945. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  1946. lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  1947. ;;
  1948. hppa*64*)
  1949. [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
  1950. lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  1951. ;;
  1952. *)
  1953. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
  1954. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  1955. ;;
  1956. esac
  1957. ;;
  1958. irix5* | irix6* | nonstopux*)
  1959. case $LD in
  1960. *-32|*"-32 ") libmagic=32-bit;;
  1961. *-n32|*"-n32 ") libmagic=N32;;
  1962. *-64|*"-64 ") libmagic=64-bit;;
  1963. *) libmagic=never-match;;
  1964. esac
  1965. lt_cv_deplibs_check_method=pass_all
  1966. ;;
  1967. # This must be Linux ELF.
  1968. linux*)
  1969. case $host_cpu in
  1970. alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*)
  1971. lt_cv_deplibs_check_method=pass_all ;;
  1972. *)
  1973. # glibc up to 2.1.1 does not perform some relocations on ARM
  1974. # this will be overridden with pass_all, but let us keep it just in case
  1975. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
  1976. esac
  1977. lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  1978. lt_cv_deplibs_check_method=pass_all
  1979. ;;
  1980. netbsd*)
  1981. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  1982. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  1983. else
  1984. lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  1985. fi
  1986. ;;
  1987. newos6*)
  1988. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  1989. lt_cv_file_magic_cmd=/usr/bin/file
  1990. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  1991. ;;
  1992. nto-qnx*)
  1993. lt_cv_deplibs_check_method=unknown
  1994. ;;
  1995. openbsd*)
  1996. lt_cv_file_magic_cmd=/usr/bin/file
  1997. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  1998. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  1999. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
  2000. else
  2001. lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
  2002. fi
  2003. ;;
  2004. osf3* | osf4* | osf5*)
  2005. lt_cv_deplibs_check_method=pass_all
  2006. ;;
  2007. sco3.2v5*)
  2008. lt_cv_deplibs_check_method=pass_all
  2009. ;;
  2010. solaris*)
  2011. lt_cv_deplibs_check_method=pass_all
  2012. ;;
  2013. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  2014. case $host_vendor in
  2015. motorola)
  2016. 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]]'
  2017. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  2018. ;;
  2019. ncr)
  2020. lt_cv_deplibs_check_method=pass_all
  2021. ;;
  2022. sequent)
  2023. lt_cv_file_magic_cmd='/bin/file'
  2024. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  2025. ;;
  2026. sni)
  2027. lt_cv_file_magic_cmd='/bin/file'
  2028. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  2029. lt_cv_file_magic_test_file=/lib/libc.so
  2030. ;;
  2031. siemens)
  2032. lt_cv_deplibs_check_method=pass_all
  2033. ;;
  2034. esac
  2035. ;;
  2036. sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
  2037. lt_cv_deplibs_check_method=pass_all
  2038. ;;
  2039. esac
  2040. ])
  2041. file_magic_cmd=$lt_cv_file_magic_cmd
  2042. deplibs_check_method=$lt_cv_deplibs_check_method
  2043. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  2044. ])# AC_DEPLIBS_CHECK_METHOD
  2045. # AC_PROG_NM
  2046. # ----------
  2047. # find the pathname to a BSD-compatible name lister
  2048. AC_DEFUN([AC_PROG_NM],
  2049. [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
  2050. [if test -n "$NM"; then
  2051. # Let the user override the test.
  2052. lt_cv_path_NM="$NM"
  2053. else
  2054. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2055. for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
  2056. IFS="$lt_save_ifs"
  2057. test -z "$ac_dir" && ac_dir=.
  2058. tmp_nm="$ac_dir/${ac_tool_prefix}nm"
  2059. if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  2060. # Check to see if the nm accepts a BSD-compat flag.
  2061. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  2062. # nm: unknown option "B" ignored
  2063. # Tru64's nm complains that /dev/null is an invalid object file
  2064. case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  2065. */dev/null* | *'Invalid file or object type'*)
  2066. lt_cv_path_NM="$tmp_nm -B"
  2067. break
  2068. ;;
  2069. *)
  2070. case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  2071. */dev/null*)
  2072. lt_cv_path_NM="$tmp_nm -p"
  2073. break
  2074. ;;
  2075. *)
  2076. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  2077. continue # so that we can try to find one that supports BSD flags
  2078. ;;
  2079. esac
  2080. esac
  2081. fi
  2082. done
  2083. IFS="$lt_save_ifs"
  2084. test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
  2085. fi])
  2086. NM="$lt_cv_path_NM"
  2087. ])# AC_PROG_NM
  2088. # AC_CHECK_LIBM
  2089. # -------------
  2090. # check for math library
  2091. AC_DEFUN([AC_CHECK_LIBM],
  2092. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2093. LIBM=
  2094. case $host in
  2095. *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
  2096. # These system don't have libm, or don't need it
  2097. ;;
  2098. *-ncr-sysv4.3*)
  2099. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  2100. AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  2101. ;;
  2102. *)
  2103. AC_CHECK_LIB(m, cos, LIBM="-lm")
  2104. ;;
  2105. esac
  2106. ])# AC_CHECK_LIBM
  2107. # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
  2108. # -----------------------------------
  2109. # sets LIBLTDL to the link flags for the libltdl convenience library and
  2110. # LTDLINCL to the include flags for the libltdl header and adds
  2111. # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
  2112. # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
  2113. # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
  2114. # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
  2115. # '${top_srcdir}/' (note the single quotes!). If your package is not
  2116. # flat and you're not using automake, define top_builddir and
  2117. # top_srcdir appropriately in the Makefiles.
  2118. AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
  2119. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  2120. case $enable_ltdl_convenience in
  2121. no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
  2122. "") enable_ltdl_convenience=yes
  2123. ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
  2124. esac
  2125. LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
  2126. LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
  2127. # For backwards non-gettext consistent compatibility...
  2128. INCLTDL="$LTDLINCL"
  2129. ])# AC_LIBLTDL_CONVENIENCE
  2130. # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
  2131. # -----------------------------------
  2132. # sets LIBLTDL to the link flags for the libltdl installable library and
  2133. # LTDLINCL to the include flags for the libltdl header and adds
  2134. # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
  2135. # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
  2136. # DIRECTORY is not provided and an installed libltdl is not found, it is
  2137. # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
  2138. # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
  2139. # quotes!). If your package is not flat and you're not using automake,
  2140. # define top_builddir and top_srcdir appropriately in the Makefiles.
  2141. # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
  2142. AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
  2143. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  2144. AC_CHECK_LIB(ltdl, lt_dlinit,
  2145. [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
  2146. [if test x"$enable_ltdl_install" = xno; then
  2147. AC_MSG_WARN([libltdl not installed, but installation disabled])
  2148. else
  2149. enable_ltdl_install=yes
  2150. fi
  2151. ])
  2152. if test x"$enable_ltdl_install" = x"yes"; then
  2153. ac_configure_args="$ac_configure_args --enable-ltdl-install"
  2154. LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
  2155. LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
  2156. else
  2157. ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
  2158. LIBLTDL="-lltdl"
  2159. LTDLINCL=
  2160. fi
  2161. # For backwards non-gettext consistent compatibility...
  2162. INCLTDL="$LTDLINCL"
  2163. ])# AC_LIBLTDL_INSTALLABLE
  2164. # AC_LIBTOOL_CXX
  2165. # --------------
  2166. # enable support for C++ libraries
  2167. AC_DEFUN([AC_LIBTOOL_CXX],
  2168. [AC_REQUIRE([_LT_AC_LANG_CXX])
  2169. ])# AC_LIBTOOL_CXX
  2170. # _LT_AC_LANG_CXX
  2171. # ---------------
  2172. AC_DEFUN([_LT_AC_LANG_CXX],
  2173. [AC_REQUIRE([AC_PROG_CXX])
  2174. AC_REQUIRE([AC_PROG_CXXCPP])
  2175. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
  2176. ])# _LT_AC_LANG_CXX
  2177. # AC_LIBTOOL_F77
  2178. # --------------
  2179. # enable support for Fortran 77 libraries
  2180. AC_DEFUN([AC_LIBTOOL_F77],
  2181. [AC_REQUIRE([_LT_AC_LANG_F77])
  2182. ])# AC_LIBTOOL_F77
  2183. # _LT_AC_LANG_F77
  2184. # ---------------
  2185. AC_DEFUN([_LT_AC_LANG_F77],
  2186. [AC_REQUIRE([AC_PROG_F77])
  2187. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
  2188. ])# _LT_AC_LANG_F77
  2189. # AC_LIBTOOL_GCJ
  2190. # --------------
  2191. # enable support for GCJ libraries
  2192. AC_DEFUN([AC_LIBTOOL_GCJ],
  2193. [AC_REQUIRE([_LT_AC_LANG_GCJ])
  2194. ])# AC_LIBTOOL_GCJ
  2195. # _LT_AC_LANG_GCJ
  2196. # ---------------
  2197. AC_DEFUN([_LT_AC_LANG_GCJ],
  2198. [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
  2199. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
  2200. [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
  2201. [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
  2202. [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
  2203. [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
  2204. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
  2205. ])# _LT_AC_LANG_GCJ
  2206. # AC_LIBTOOL_RC
  2207. # --------------
  2208. # enable support for Windows resource files
  2209. AC_DEFUN([AC_LIBTOOL_RC],
  2210. [AC_REQUIRE([LT_AC_PROG_RC])
  2211. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
  2212. ])# AC_LIBTOOL_RC
  2213. # AC_LIBTOOL_LANG_C_CONFIG
  2214. # ------------------------
  2215. # Ensure that the configuration vars for the C compiler are
  2216. # suitably defined. Those variables are subsequently used by
  2217. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  2218. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
  2219. AC_DEFUN([_LT_AC_LANG_C_CONFIG],
  2220. [lt_save_CC="$CC"
  2221. AC_LANG_PUSH(C)
  2222. # Source file extension for C test sources.
  2223. ac_ext=c
  2224. # Object file extension for compiled C test sources.
  2225. objext=o
  2226. _LT_AC_TAGVAR(objext, $1)=$objext
  2227. # Code to be used in simple compile tests
  2228. lt_simple_compile_test_code="int some_variable = 0;\n"
  2229. # Code to be used in simple link tests
  2230. lt_simple_link_test_code='int main(){return(0);}\n'
  2231. _LT_AC_SYS_COMPILER
  2232. #
  2233. # Check for any special shared library compilation flags.
  2234. #
  2235. _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
  2236. if test "$GCC" = no; then
  2237. case $host_os in
  2238. sco3.2v5*)
  2239. _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
  2240. ;;
  2241. esac
  2242. fi
  2243. if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
  2244. AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
  2245. if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
  2246. else
  2247. AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
  2248. _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
  2249. fi
  2250. fi
  2251. #
  2252. # Check to make sure the static flag actually works.
  2253. #
  2254. AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
  2255. _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
  2256. $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
  2257. [],
  2258. [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
  2259. ## CAVEAT EMPTOR:
  2260. ## There is no encapsulation within the following macros, do not change
  2261. ## the running order or otherwise move them around unless you know exactly
  2262. ## what you are doing...
  2263. AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
  2264. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  2265. AC_LIBTOOL_PROG_CC_C_O($1)
  2266. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  2267. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  2268. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  2269. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  2270. AC_LIBTOOL_SYS_LIB_STRIP
  2271. AC_LIBTOOL_DLOPEN_SELF($1)
  2272. # Report which librarie types wil actually be built
  2273. AC_MSG_CHECKING([if libtool supports shared libraries])
  2274. AC_MSG_RESULT([$can_build_shared])
  2275. AC_MSG_CHECKING([whether to build shared libraries])
  2276. test "$can_build_shared" = "no" && enable_shared=no
  2277. # On AIX, shared libraries and static libraries use the same namespace, and
  2278. # are all built from PIC.
  2279. case "$host_os" in
  2280. aix3*)
  2281. test "$enable_shared" = yes && enable_static=no
  2282. if test -n "$RANLIB"; then
  2283. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  2284. postinstall_cmds='$RANLIB $lib'
  2285. fi
  2286. ;;
  2287. aix4* | aix5*)
  2288. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  2289. test "$enable_shared" = yes && enable_static=no
  2290. fi
  2291. ;;
  2292. darwin* | rhapsody*)
  2293. if test "$GCC" = yes; then
  2294. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2295. case "$host_os" in
  2296. rhapsody* | darwin1.[[012]])
  2297. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
  2298. ;;
  2299. *) # Darwin 1.3 on
  2300. if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
  2301. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
  2302. else
  2303. case ${MACOSX_DEPLOYMENT_TARGET} in
  2304. 10.[[012]])
  2305. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
  2306. ;;
  2307. 10.*)
  2308. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
  2309. ;;
  2310. esac
  2311. fi
  2312. ;;
  2313. esac
  2314. output_verbose_link_cmd='echo'
  2315. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
  2316. _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  2317. # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  2318. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2319. _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2320. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2321. _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
  2322. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  2323. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
  2324. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  2325. else
  2326. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2327. fi
  2328. ;;
  2329. esac
  2330. AC_MSG_RESULT([$enable_shared])
  2331. AC_MSG_CHECKING([whether to build static libraries])
  2332. # Make sure either enable_shared or enable_static is yes.
  2333. test "$enable_shared" = yes || enable_static=yes
  2334. AC_MSG_RESULT([$enable_static])
  2335. AC_LIBTOOL_CONFIG($1)
  2336. AC_LANG_POP
  2337. CC="$lt_save_CC"
  2338. ])# AC_LIBTOOL_LANG_C_CONFIG
  2339. # AC_LIBTOOL_LANG_CXX_CONFIG
  2340. # --------------------------
  2341. # Ensure that the configuration vars for the C compiler are
  2342. # suitably defined. Those variables are subsequently used by
  2343. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  2344. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
  2345. AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
  2346. [AC_LANG_PUSH(C++)
  2347. AC_REQUIRE([AC_PROG_CXX])
  2348. AC_REQUIRE([AC_PROG_CXXCPP])
  2349. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2350. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  2351. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  2352. _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  2353. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  2354. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2355. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  2356. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  2357. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  2358. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  2359. _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  2360. _LT_AC_TAGVAR(module_cmds, $1)=
  2361. _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  2362. _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  2363. _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  2364. _LT_AC_TAGVAR(no_undefined_flag, $1)=
  2365. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  2366. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  2367. # Dependencies to place before and after the object being linked:
  2368. _LT_AC_TAGVAR(predep_objects, $1)=
  2369. _LT_AC_TAGVAR(postdep_objects, $1)=
  2370. _LT_AC_TAGVAR(predeps, $1)=
  2371. _LT_AC_TAGVAR(postdeps, $1)=
  2372. _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
  2373. # Source file extension for C++ test sources.
  2374. ac_ext=cc
  2375. # Object file extension for compiled C++ test sources.
  2376. objext=o
  2377. _LT_AC_TAGVAR(objext, $1)=$objext
  2378. # Code to be used in simple compile tests
  2379. lt_simple_compile_test_code="int some_variable = 0;\n"
  2380. # Code to be used in simple link tests
  2381. lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
  2382. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  2383. _LT_AC_SYS_COMPILER
  2384. # Allow CC to be a program name with arguments.
  2385. lt_save_CC=$CC
  2386. lt_save_LD=$LD
  2387. lt_save_GCC=$GCC
  2388. GCC=$GXX
  2389. lt_save_with_gnu_ld=$with_gnu_ld
  2390. lt_save_path_LD=$lt_cv_path_LD
  2391. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  2392. lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  2393. else
  2394. unset lt_cv_prog_gnu_ld
  2395. fi
  2396. if test -n "${lt_cv_path_LDCXX+set}"; then
  2397. lt_cv_path_LD=$lt_cv_path_LDCXX
  2398. else
  2399. unset lt_cv_path_LD
  2400. fi
  2401. test -z "${LDCXX+set}" || LD=$LDCXX
  2402. CC=${CXX-"c++"}
  2403. compiler=$CC
  2404. _LT_AC_TAGVAR(compiler, $1)=$CC
  2405. cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
  2406. # We don't want -fno-exception wen compiling C++ code, so set the
  2407. # no_builtin_flag separately
  2408. if test "$GXX" = yes; then
  2409. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  2410. else
  2411. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  2412. fi
  2413. if test "$GXX" = yes; then
  2414. # Set up default GNU C++ configuration
  2415. AC_PROG_LD
  2416. # Check if GNU C++ uses GNU ld as the underlying linker, since the
  2417. # archiving commands below assume that GNU ld is being used.
  2418. if test "$with_gnu_ld" = yes; then
  2419. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  2420. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  2421. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  2422. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  2423. # If archive_cmds runs LD, not CC, wlarc should be empty
  2424. # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  2425. # investigate it a little bit more. (MM)
  2426. wlarc='${wl}'
  2427. # ancient GNU ld didn't support --whole-archive et. al.
  2428. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
  2429. grep 'no-whole-archive' > /dev/null; then
  2430. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  2431. else
  2432. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  2433. fi
  2434. else
  2435. with_gnu_ld=no
  2436. wlarc=
  2437. # A generic and very simple default shared library creation
  2438. # command for GNU C++ for the case where it uses the native
  2439. # linker, instead of GNU ld. If possible, this setting should
  2440. # overridden to take advantage of the native linker features on
  2441. # the platform it is being used on.
  2442. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  2443. fi
  2444. # Commands to make compiler produce verbose output that lists
  2445. # what "hidden" libraries, object files and flags are used when
  2446. # linking a shared library.
  2447. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  2448. else
  2449. GXX=no
  2450. with_gnu_ld=no
  2451. wlarc=
  2452. fi
  2453. # PORTME: fill in a description of your system's C++ link characteristics
  2454. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  2455. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  2456. case $host_os in
  2457. aix3*)
  2458. # FIXME: insert proper C++ library support
  2459. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2460. ;;
  2461. aix4* | aix5*)
  2462. if test "$host_cpu" = ia64; then
  2463. # On IA64, the linker does run time linking by default, so we don't
  2464. # have to do anything special.
  2465. aix_use_runtimelinking=no
  2466. exp_sym_flag='-Bexport'
  2467. no_entry_flag=""
  2468. else
  2469. aix_use_runtimelinking=no
  2470. # Test if we are trying to use run time linking or normal
  2471. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  2472. # need to do runtime linking.
  2473. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
  2474. for ld_flag in $LDFLAGS; do
  2475. case $ld_flag in
  2476. *-brtl*)
  2477. aix_use_runtimelinking=yes
  2478. break
  2479. ;;
  2480. esac
  2481. done
  2482. esac
  2483. exp_sym_flag='-bexport'
  2484. no_entry_flag='-bnoentry'
  2485. fi
  2486. # When large executables or shared objects are built, AIX ld can
  2487. # have problems creating the table of contents. If linking a library
  2488. # or program results in "error TOC overflow" add -mminimal-toc to
  2489. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  2490. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  2491. _LT_AC_TAGVAR(archive_cmds, $1)=''
  2492. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2493. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  2494. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  2495. if test "$GXX" = yes; then
  2496. case $host_os in aix4.[012]|aix4.[012].*)
  2497. # We only want to do this on AIX 4.2 and lower, the check
  2498. # below for broken collect2 doesn't work under 4.3+
  2499. collect2name=`${CC} -print-prog-name=collect2`
  2500. if test -f "$collect2name" && \
  2501. strings "$collect2name" | grep resolve_lib_name >/dev/null
  2502. then
  2503. # We have reworked collect2
  2504. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2505. else
  2506. # We have old collect2
  2507. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  2508. # It fails to find uninstalled libraries when the uninstalled
  2509. # path is not listed in the libpath. Setting hardcode_minus_L
  2510. # to unsupported forces relinking
  2511. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  2512. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2513. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  2514. fi
  2515. esac
  2516. shared_flag='-shared'
  2517. else
  2518. # not using gcc
  2519. if test "$host_cpu" = ia64; then
  2520. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  2521. # chokes on -Wl,-G. The following line is correct:
  2522. shared_flag='-G'
  2523. else
  2524. if test "$aix_use_runtimelinking" = yes; then
  2525. shared_flag='${wl}-G'
  2526. else
  2527. shared_flag='${wl}-bM:SRE'
  2528. fi
  2529. fi
  2530. fi
  2531. # It seems that -bexpall does not export symbols beginning with
  2532. # underscore (_), so it is better to generate a list of symbols to export.
  2533. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  2534. if test "$aix_use_runtimelinking" = yes; then
  2535. # Warning - without using the other runtime loading flags (-brtl),
  2536. # -berok will link without error, but may produce a broken library.
  2537. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
  2538. # Determine the default libpath from the value encoded in an empty executable.
  2539. _LT_AC_SYS_LIBPATH_AIX
  2540. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  2541. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  2542. else
  2543. if test "$host_cpu" = ia64; then
  2544. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  2545. _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  2546. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
  2547. else
  2548. # Determine the default libpath from the value encoded in an empty executable.
  2549. _LT_AC_SYS_LIBPATH_AIX
  2550. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  2551. # Warning - without using the other run time loading flags,
  2552. # -berok will link without error, but may produce a broken library.
  2553. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  2554. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  2555. # -bexpall does not export symbols beginning with underscore (_)
  2556. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  2557. # Exported symbols can be pulled into shared objects from archives
  2558. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
  2559. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  2560. # This is similar to how AIX traditionally builds it's shared libraries.
  2561. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  2562. fi
  2563. fi
  2564. ;;
  2565. chorus*)
  2566. case $cc_basename in
  2567. *)
  2568. # FIXME: insert proper C++ library support
  2569. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2570. ;;
  2571. esac
  2572. ;;
  2573. cygwin* | mingw* | pw32*)
  2574. # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  2575. # as there is no search path for DLLs.
  2576. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2577. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  2578. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  2579. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  2580. if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
  2581. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
  2582. # If the export-symbols file already is a .def file (1st line
  2583. # is EXPORTS), use it as is; otherwise, prepend...
  2584. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  2585. cp $export_symbols $output_objdir/$soname.def;
  2586. else
  2587. echo EXPORTS > $output_objdir/$soname.def;
  2588. cat $export_symbols >> $output_objdir/$soname.def;
  2589. fi~
  2590. $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
  2591. else
  2592. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2593. fi
  2594. ;;
  2595. darwin* | rhapsody*)
  2596. if test "$GXX" = yes; then
  2597. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2598. case "$host_os" in
  2599. rhapsody* | darwin1.[[012]])
  2600. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
  2601. ;;
  2602. *) # Darwin 1.3 on
  2603. if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
  2604. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
  2605. else
  2606. case ${MACOSX_DEPLOYMENT_TARGET} in
  2607. 10.[[012]])
  2608. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
  2609. ;;
  2610. 10.*)
  2611. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
  2612. ;;
  2613. esac
  2614. fi
  2615. ;;
  2616. esac
  2617. lt_int_apple_cc_single_mod=no
  2618. output_verbose_link_cmd='echo'
  2619. if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
  2620. lt_int_apple_cc_single_mod=yes
  2621. fi
  2622. if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
  2623. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
  2624. else
  2625. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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'
  2626. fi
  2627. _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  2628. # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  2629. if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
  2630. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2631. else
  2632. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2633. fi
  2634. _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  2635. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2636. _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
  2637. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  2638. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
  2639. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  2640. else
  2641. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2642. fi
  2643. ;;
  2644. dgux*)
  2645. case $cc_basename in
  2646. ec++)
  2647. # FIXME: insert proper C++ library support
  2648. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2649. ;;
  2650. ghcx)
  2651. # Green Hills C++ Compiler
  2652. # FIXME: insert proper C++ library support
  2653. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2654. ;;
  2655. *)
  2656. # FIXME: insert proper C++ library support
  2657. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2658. ;;
  2659. esac
  2660. ;;
  2661. freebsd[12]*)
  2662. # C++ shared libraries reported to be fairly broken before switch to ELF
  2663. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2664. ;;
  2665. freebsd-elf*)
  2666. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2667. ;;
  2668. freebsd* | kfreebsd*-gnu)
  2669. # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  2670. # conventions
  2671. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  2672. ;;
  2673. gnu*)
  2674. ;;
  2675. hpux9*)
  2676. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  2677. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2678. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  2679. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2680. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  2681. # but as the default
  2682. # location of the library.
  2683. case $cc_basename in
  2684. CC)
  2685. # FIXME: insert proper C++ library support
  2686. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2687. ;;
  2688. aCC)
  2689. _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  2690. # Commands to make compiler produce verbose output that lists
  2691. # what "hidden" libraries, object files and flags are used when
  2692. # linking a shared library.
  2693. #
  2694. # There doesn't appear to be a way to prevent this compiler from
  2695. # explicitly linking system object files so we need to strip them
  2696. # from the output so that they don't get included in the library
  2697. # dependencies.
  2698. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  2699. ;;
  2700. *)
  2701. if test "$GXX" = yes; then
  2702. _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  2703. else
  2704. # FIXME: insert proper C++ library support
  2705. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2706. fi
  2707. ;;
  2708. esac
  2709. ;;
  2710. hpux10*|hpux11*)
  2711. if test $with_gnu_ld = no; then
  2712. case "$host_cpu" in
  2713. hppa*64*)
  2714. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  2715. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
  2716. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2717. ;;
  2718. ia64*)
  2719. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  2720. ;;
  2721. *)
  2722. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  2723. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2724. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  2725. ;;
  2726. esac
  2727. fi
  2728. case "$host_cpu" in
  2729. hppa*64*)
  2730. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2731. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2732. ;;
  2733. ia64*)
  2734. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  2735. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2736. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  2737. # but as the default
  2738. # location of the library.
  2739. ;;
  2740. *)
  2741. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2742. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  2743. # but as the default
  2744. # location of the library.
  2745. ;;
  2746. esac
  2747. case $cc_basename in
  2748. CC)
  2749. # FIXME: insert proper C++ library support
  2750. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2751. ;;
  2752. aCC)
  2753. case "$host_cpu" in
  2754. hppa*64*|ia64*)
  2755. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
  2756. ;;
  2757. *)
  2758. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  2759. ;;
  2760. esac
  2761. # Commands to make compiler produce verbose output that lists
  2762. # what "hidden" libraries, object files and flags are used when
  2763. # linking a shared library.
  2764. #
  2765. # There doesn't appear to be a way to prevent this compiler from
  2766. # explicitly linking system object files so we need to strip them
  2767. # from the output so that they don't get included in the library
  2768. # dependencies.
  2769. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  2770. ;;
  2771. *)
  2772. if test "$GXX" = yes; then
  2773. if test $with_gnu_ld = no; then
  2774. case "$host_cpu" in
  2775. ia64*|hppa*64*)
  2776. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
  2777. ;;
  2778. *)
  2779. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  2780. ;;
  2781. esac
  2782. fi
  2783. else
  2784. # FIXME: insert proper C++ library support
  2785. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2786. fi
  2787. ;;
  2788. esac
  2789. ;;
  2790. irix5* | irix6*)
  2791. case $cc_basename in
  2792. CC)
  2793. # SGI C++
  2794. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  2795. # Archives containing C++ object files must be created using
  2796. # "CC -ar", where "CC" is the IRIX C++ compiler. This is
  2797. # necessary to make sure instantiated templates are included
  2798. # in the archive.
  2799. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  2800. ;;
  2801. *)
  2802. if test "$GXX" = yes; then
  2803. if test "$with_gnu_ld" = no; then
  2804. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  2805. else
  2806. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
  2807. fi
  2808. fi
  2809. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  2810. ;;
  2811. esac
  2812. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  2813. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2814. ;;
  2815. linux*)
  2816. case $cc_basename in
  2817. KCC)
  2818. # Kuck and Associates, Inc. (KAI) C++ Compiler
  2819. # KCC will only create a shared library if the output file
  2820. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  2821. # to its proper name (with version) after linking.
  2822. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  2823. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
  2824. # Commands to make compiler produce verbose output that lists
  2825. # what "hidden" libraries, object files and flags are used when
  2826. # linking a shared library.
  2827. #
  2828. # There doesn't appear to be a way to prevent this compiler from
  2829. # explicitly linking system object files so we need to strip them
  2830. # from the output so that they don't get included in the library
  2831. # dependencies.
  2832. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  2833. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
  2834. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  2835. # Archives containing C++ object files must be created using
  2836. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  2837. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  2838. ;;
  2839. icpc)
  2840. # Intel C++
  2841. with_gnu_ld=yes
  2842. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  2843. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  2844. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  2845. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  2846. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  2847. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  2848. ;;
  2849. cxx)
  2850. # Compaq C++
  2851. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  2852. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
  2853. runpath_var=LD_RUN_PATH
  2854. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  2855. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2856. # Commands to make compiler produce verbose output that lists
  2857. # what "hidden" libraries, object files and flags are used when
  2858. # linking a shared library.
  2859. #
  2860. # There doesn't appear to be a way to prevent this compiler from
  2861. # explicitly linking system object files so we need to strip them
  2862. # from the output so that they don't get included in the library
  2863. # dependencies.
  2864. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  2865. ;;
  2866. esac
  2867. ;;
  2868. lynxos*)
  2869. # FIXME: insert proper C++ library support
  2870. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2871. ;;
  2872. m88k*)
  2873. # FIXME: insert proper C++ library support
  2874. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2875. ;;
  2876. mvs*)
  2877. case $cc_basename in
  2878. cxx)
  2879. # FIXME: insert proper C++ library support
  2880. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2881. ;;
  2882. *)
  2883. # FIXME: insert proper C++ library support
  2884. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2885. ;;
  2886. esac
  2887. ;;
  2888. netbsd*)
  2889. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  2890. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  2891. wlarc=
  2892. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  2893. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  2894. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  2895. fi
  2896. # Workaround some broken pre-1.5 toolchains
  2897. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  2898. ;;
  2899. osf3*)
  2900. case $cc_basename in
  2901. KCC)
  2902. # Kuck and Associates, Inc. (KAI) C++ Compiler
  2903. # KCC will only create a shared library if the output file
  2904. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  2905. # to its proper name (with version) after linking.
  2906. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  2907. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  2908. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2909. # Archives containing C++ object files must be created using
  2910. # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  2911. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  2912. ;;
  2913. RCC)
  2914. # Rational C++ 2.4.1
  2915. # FIXME: insert proper C++ library support
  2916. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2917. ;;
  2918. cxx)
  2919. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  2920. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  2921. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  2922. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2923. # Commands to make compiler produce verbose output that lists
  2924. # what "hidden" libraries, object files and flags are used when
  2925. # linking a shared library.
  2926. #
  2927. # There doesn't appear to be a way to prevent this compiler from
  2928. # explicitly linking system object files so we need to strip them
  2929. # from the output so that they don't get included in the library
  2930. # dependencies.
  2931. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  2932. ;;
  2933. *)
  2934. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  2935. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  2936. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  2937. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  2938. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2939. # Commands to make compiler produce verbose output that lists
  2940. # what "hidden" libraries, object files and flags are used when
  2941. # linking a shared library.
  2942. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  2943. else
  2944. # FIXME: insert proper C++ library support
  2945. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2946. fi
  2947. ;;
  2948. esac
  2949. ;;
  2950. osf4* | osf5*)
  2951. case $cc_basename in
  2952. KCC)
  2953. # Kuck and Associates, Inc. (KAI) C++ Compiler
  2954. # KCC will only create a shared library if the output file
  2955. # ends with ".so" (or ".sl" for HP-UX), so rename the library
  2956. # to its proper name (with version) after linking.
  2957. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
  2958. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  2959. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2960. # Archives containing C++ object files must be created using
  2961. # the KAI C++ compiler.
  2962. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
  2963. ;;
  2964. RCC)
  2965. # Rational C++ 2.4.1
  2966. # FIXME: insert proper C++ library support
  2967. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  2968. ;;
  2969. cxx)
  2970. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  2971. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  2972. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  2973. echo "-hidden">> $lib.exp~
  2974. $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
  2975. $rm $lib.exp'
  2976. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  2977. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2978. # Commands to make compiler produce verbose output that lists
  2979. # what "hidden" libraries, object files and flags are used when
  2980. # linking a shared library.
  2981. #
  2982. # There doesn't appear to be a way to prevent this compiler from
  2983. # explicitly linking system object files so we need to strip them
  2984. # from the output so that they don't get included in the library
  2985. # dependencies.
  2986. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  2987. ;;
  2988. *)
  2989. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  2990. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  2991. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  2992. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  2993. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  2994. # Commands to make compiler produce verbose output that lists
  2995. # what "hidden" libraries, object files and flags are used when
  2996. # linking a shared library.
  2997. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  2998. else
  2999. # FIXME: insert proper C++ library support
  3000. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3001. fi
  3002. ;;
  3003. esac
  3004. ;;
  3005. psos*)
  3006. # FIXME: insert proper C++ library support
  3007. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3008. ;;
  3009. sco*)
  3010. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3011. case $cc_basename in
  3012. CC)
  3013. # FIXME: insert proper C++ library support
  3014. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3015. ;;
  3016. *)
  3017. # FIXME: insert proper C++ library support
  3018. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3019. ;;
  3020. esac
  3021. ;;
  3022. sunos4*)
  3023. case $cc_basename in
  3024. CC)
  3025. # Sun C++ 4.x
  3026. # FIXME: insert proper C++ library support
  3027. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3028. ;;
  3029. lcc)
  3030. # Lucid
  3031. # FIXME: insert proper C++ library support
  3032. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3033. ;;
  3034. *)
  3035. # FIXME: insert proper C++ library support
  3036. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3037. ;;
  3038. esac
  3039. ;;
  3040. solaris*)
  3041. case $cc_basename in
  3042. CC)
  3043. # Sun C++ 4.2, 5.x and Centerline C++
  3044. _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  3045. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  3046. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  3047. $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  3048. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  3049. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  3050. case $host_os in
  3051. solaris2.[0-5] | solaris2.[0-5].*) ;;
  3052. *)
  3053. # The C++ compiler is used as linker so we must use $wl
  3054. # flag to pass the commands to the underlying system
  3055. # linker.
  3056. # Supported since Solaris 2.6 (maybe 2.5.1?)
  3057. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  3058. ;;
  3059. esac
  3060. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  3061. # Commands to make compiler produce verbose output that lists
  3062. # what "hidden" libraries, object files and flags are used when
  3063. # linking a shared library.
  3064. #
  3065. # There doesn't appear to be a way to prevent this compiler from
  3066. # explicitly linking system object files so we need to strip them
  3067. # from the output so that they don't get included in the library
  3068. # dependencies.
  3069. output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
  3070. # Archives containing C++ object files must be created using
  3071. # "CC -xar", where "CC" is the Sun C++ compiler. This is
  3072. # necessary to make sure instantiated templates are included
  3073. # in the archive.
  3074. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  3075. ;;
  3076. gcx)
  3077. # Green Hills C++ Compiler
  3078. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  3079. # The C++ compiler must be used to create the archive.
  3080. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  3081. ;;
  3082. *)
  3083. # GNU C++ compiler with Solaris linker
  3084. if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  3085. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
  3086. if $CC --version | grep -v '^2\.7' > /dev/null; then
  3087. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  3088. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  3089. $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  3090. # Commands to make compiler produce verbose output that lists
  3091. # what "hidden" libraries, object files and flags are used when
  3092. # linking a shared library.
  3093. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
  3094. else
  3095. # g++ 2.7 appears to require `-G' NOT `-shared' on this
  3096. # platform.
  3097. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  3098. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  3099. $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  3100. # Commands to make compiler produce verbose output that lists
  3101. # what "hidden" libraries, object files and flags are used when
  3102. # linking a shared library.
  3103. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
  3104. fi
  3105. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
  3106. fi
  3107. ;;
  3108. esac
  3109. ;;
  3110. sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
  3111. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3112. ;;
  3113. tandem*)
  3114. case $cc_basename in
  3115. NCC)
  3116. # NonStop-UX NCC 3.20
  3117. # FIXME: insert proper C++ library support
  3118. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3119. ;;
  3120. *)
  3121. # FIXME: insert proper C++ library support
  3122. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3123. ;;
  3124. esac
  3125. ;;
  3126. vxworks*)
  3127. # FIXME: insert proper C++ library support
  3128. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3129. ;;
  3130. *)
  3131. # FIXME: insert proper C++ library support
  3132. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3133. ;;
  3134. esac
  3135. AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
  3136. test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  3137. _LT_AC_TAGVAR(GCC, $1)="$GXX"
  3138. _LT_AC_TAGVAR(LD, $1)="$LD"
  3139. ## CAVEAT EMPTOR:
  3140. ## There is no encapsulation within the following macros, do not change
  3141. ## the running order or otherwise move them around unless you know exactly
  3142. ## what you are doing...
  3143. AC_LIBTOOL_POSTDEP_PREDEP($1)
  3144. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  3145. AC_LIBTOOL_PROG_CC_C_O($1)
  3146. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  3147. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  3148. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  3149. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  3150. AC_LIBTOOL_SYS_LIB_STRIP
  3151. AC_LIBTOOL_DLOPEN_SELF($1)
  3152. AC_LIBTOOL_CONFIG($1)
  3153. AC_LANG_POP
  3154. CC=$lt_save_CC
  3155. LDCXX=$LD
  3156. LD=$lt_save_LD
  3157. GCC=$lt_save_GCC
  3158. with_gnu_ldcxx=$with_gnu_ld
  3159. with_gnu_ld=$lt_save_with_gnu_ld
  3160. lt_cv_path_LDCXX=$lt_cv_path_LD
  3161. lt_cv_path_LD=$lt_save_path_LD
  3162. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  3163. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  3164. ])# AC_LIBTOOL_LANG_CXX_CONFIG
  3165. # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
  3166. # ------------------------
  3167. # Figure out "hidden" library dependencies from verbose
  3168. # compiler output when linking a shared library.
  3169. # Parse the compiler output and extract the necessary
  3170. # objects, libraries and library flags.
  3171. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
  3172. dnl we can't use the lt_simple_compile_test_code here,
  3173. dnl because it contains code intended for an executable,
  3174. dnl not a library. It's possible we should let each
  3175. dnl tag define a new lt_????_link_test_code variable,
  3176. dnl but it's only used here...
  3177. ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
  3178. int a;
  3179. void foo (void) { a = 0; }
  3180. EOF
  3181. ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
  3182. class Foo
  3183. {
  3184. public:
  3185. Foo (void) { a = 0; }
  3186. private:
  3187. int a;
  3188. };
  3189. EOF
  3190. ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
  3191. subroutine foo
  3192. implicit none
  3193. integer*4 a
  3194. a=0
  3195. return
  3196. end
  3197. EOF
  3198. ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
  3199. public class foo {
  3200. private int a;
  3201. public void bar (void) {
  3202. a = 0;
  3203. }
  3204. };
  3205. EOF
  3206. ])
  3207. dnl Parse the compiler output and extract the necessary
  3208. dnl objects, libraries and library flags.
  3209. if AC_TRY_EVAL(ac_compile); then
  3210. # Parse the compiler output and extract the necessary
  3211. # objects, libraries and library flags.
  3212. # Sentinel used to keep track of whether or not we are before
  3213. # the conftest object file.
  3214. pre_test_object_deps_done=no
  3215. # The `*' in the case matches for architectures that use `case' in
  3216. # $output_verbose_cmd can trigger glob expansion during the loop
  3217. # eval without this substitution.
  3218. output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
  3219. for p in `eval $output_verbose_link_cmd`; do
  3220. case $p in
  3221. -L* | -R* | -l*)
  3222. # Some compilers place space between "-{L,R}" and the path.
  3223. # Remove the space.
  3224. if test $p = "-L" \
  3225. || test $p = "-R"; then
  3226. prev=$p
  3227. continue
  3228. else
  3229. prev=
  3230. fi
  3231. if test "$pre_test_object_deps_done" = no; then
  3232. case $p in
  3233. -L* | -R*)
  3234. # Internal compiler library paths should come after those
  3235. # provided the user. The postdeps already come after the
  3236. # user supplied libs so there is no need to process them.
  3237. if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
  3238. _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
  3239. else
  3240. _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
  3241. fi
  3242. ;;
  3243. # The "-l" case would never come before the object being
  3244. # linked, so don't bother handling this case.
  3245. esac
  3246. else
  3247. if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
  3248. _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
  3249. else
  3250. _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
  3251. fi
  3252. fi
  3253. ;;
  3254. *.$objext)
  3255. # This assumes that the test object file only shows up
  3256. # once in the compiler output.
  3257. if test "$p" = "conftest.$objext"; then
  3258. pre_test_object_deps_done=yes
  3259. continue
  3260. fi
  3261. if test "$pre_test_object_deps_done" = no; then
  3262. if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
  3263. _LT_AC_TAGVAR(predep_objects, $1)="$p"
  3264. else
  3265. _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
  3266. fi
  3267. else
  3268. if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
  3269. _LT_AC_TAGVAR(postdep_objects, $1)="$p"
  3270. else
  3271. _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
  3272. fi
  3273. fi
  3274. ;;
  3275. *) ;; # Ignore the rest.
  3276. esac
  3277. done
  3278. # Clean up.
  3279. rm -f a.out a.exe
  3280. else
  3281. echo "libtool.m4: error: problem compiling $1 test program"
  3282. fi
  3283. $rm -f confest.$objext
  3284. case " $_LT_AC_TAGVAR(postdeps, $1) " in
  3285. *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  3286. esac
  3287. ])# AC_LIBTOOL_POSTDEP_PREDEP
  3288. # AC_LIBTOOL_LANG_F77_CONFIG
  3289. # ------------------------
  3290. # Ensure that the configuration vars for the C compiler are
  3291. # suitably defined. Those variables are subsequently used by
  3292. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  3293. AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
  3294. AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
  3295. [AC_REQUIRE([AC_PROG_F77])
  3296. AC_LANG_PUSH(Fortran 77)
  3297. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3298. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  3299. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  3300. _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  3301. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  3302. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  3303. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  3304. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  3305. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  3306. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  3307. _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  3308. _LT_AC_TAGVAR(module_cmds, $1)=
  3309. _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  3310. _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  3311. _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  3312. _LT_AC_TAGVAR(no_undefined_flag, $1)=
  3313. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  3314. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  3315. # Source file extension for f77 test sources.
  3316. ac_ext=f
  3317. # Object file extension for compiled f77 test sources.
  3318. objext=o
  3319. _LT_AC_TAGVAR(objext, $1)=$objext
  3320. # Code to be used in simple compile tests
  3321. lt_simple_compile_test_code=" subroutine t\n return\n end\n"
  3322. # Code to be used in simple link tests
  3323. lt_simple_link_test_code=" program t\n end\n"
  3324. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  3325. _LT_AC_SYS_COMPILER
  3326. # Allow CC to be a program name with arguments.
  3327. lt_save_CC="$CC"
  3328. CC=${F77-"f77"}
  3329. compiler=$CC
  3330. _LT_AC_TAGVAR(compiler, $1)=$CC
  3331. cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
  3332. AC_MSG_CHECKING([if libtool supports shared libraries])
  3333. AC_MSG_RESULT([$can_build_shared])
  3334. AC_MSG_CHECKING([whether to build shared libraries])
  3335. test "$can_build_shared" = "no" && enable_shared=no
  3336. # On AIX, shared libraries and static libraries use the same namespace, and
  3337. # are all built from PIC.
  3338. case "$host_os" in
  3339. aix3*)
  3340. test "$enable_shared" = yes && enable_static=no
  3341. if test -n "$RANLIB"; then
  3342. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  3343. postinstall_cmds='$RANLIB $lib'
  3344. fi
  3345. ;;
  3346. aix4* | aix5*)
  3347. test "$enable_shared" = yes && enable_static=no
  3348. ;;
  3349. esac
  3350. AC_MSG_RESULT([$enable_shared])
  3351. AC_MSG_CHECKING([whether to build static libraries])
  3352. # Make sure either enable_shared or enable_static is yes.
  3353. test "$enable_shared" = yes || enable_static=yes
  3354. AC_MSG_RESULT([$enable_static])
  3355. test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  3356. _LT_AC_TAGVAR(GCC, $1)="$G77"
  3357. _LT_AC_TAGVAR(LD, $1)="$LD"
  3358. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  3359. AC_LIBTOOL_PROG_CC_C_O($1)
  3360. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  3361. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  3362. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  3363. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  3364. AC_LIBTOOL_SYS_LIB_STRIP
  3365. AC_LIBTOOL_CONFIG($1)
  3366. AC_LANG_POP
  3367. CC="$lt_save_CC"
  3368. ])# AC_LIBTOOL_LANG_F77_CONFIG
  3369. # AC_LIBTOOL_LANG_GCJ_CONFIG
  3370. # --------------------------
  3371. # Ensure that the configuration vars for the C compiler are
  3372. # suitably defined. Those variables are subsequently used by
  3373. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  3374. AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
  3375. AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
  3376. [AC_LANG_SAVE
  3377. # Source file extension for Java test sources.
  3378. ac_ext=java
  3379. # Object file extension for compiled Java test sources.
  3380. objext=o
  3381. _LT_AC_TAGVAR(objext, $1)=$objext
  3382. # Code to be used in simple compile tests
  3383. lt_simple_compile_test_code="class foo {}\n"
  3384. # Code to be used in simple link tests
  3385. lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
  3386. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  3387. _LT_AC_SYS_COMPILER
  3388. # Allow CC to be a program name with arguments.
  3389. lt_save_CC="$CC"
  3390. CC=${GCJ-"gcj"}
  3391. compiler=$CC
  3392. _LT_AC_TAGVAR(compiler, $1)=$CC
  3393. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  3394. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3395. ## CAVEAT EMPTOR:
  3396. ## There is no encapsulation within the following macros, do not change
  3397. ## the running order or otherwise move them around unless you know exactly
  3398. ## what you are doing...
  3399. AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
  3400. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  3401. AC_LIBTOOL_PROG_CC_C_O($1)
  3402. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  3403. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  3404. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  3405. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  3406. AC_LIBTOOL_SYS_LIB_STRIP
  3407. AC_LIBTOOL_DLOPEN_SELF($1)
  3408. AC_LIBTOOL_CONFIG($1)
  3409. AC_LANG_RESTORE
  3410. CC="$lt_save_CC"
  3411. ])# AC_LIBTOOL_LANG_GCJ_CONFIG
  3412. # AC_LIBTOOL_LANG_RC_CONFIG
  3413. # --------------------------
  3414. # Ensure that the configuration vars for the Windows resource compiler are
  3415. # suitably defined. Those variables are subsequently used by
  3416. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  3417. AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
  3418. AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
  3419. [AC_LANG_SAVE
  3420. # Source file extension for RC test sources.
  3421. ac_ext=rc
  3422. # Object file extension for compiled RC test sources.
  3423. objext=o
  3424. _LT_AC_TAGVAR(objext, $1)=$objext
  3425. # Code to be used in simple compile tests
  3426. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
  3427. # Code to be used in simple link tests
  3428. lt_simple_link_test_code="$lt_simple_compile_test_code"
  3429. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  3430. _LT_AC_SYS_COMPILER
  3431. # Allow CC to be a program name with arguments.
  3432. lt_save_CC="$CC"
  3433. CC=${RC-"windres"}
  3434. compiler=$CC
  3435. _LT_AC_TAGVAR(compiler, $1)=$CC
  3436. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  3437. AC_LIBTOOL_CONFIG($1)
  3438. AC_LANG_RESTORE
  3439. CC="$lt_save_CC"
  3440. ])# AC_LIBTOOL_LANG_RC_CONFIG
  3441. # AC_LIBTOOL_CONFIG([TAGNAME])
  3442. # ----------------------------
  3443. # If TAGNAME is not passed, then create an initial libtool script
  3444. # with a default configuration from the untagged config vars. Otherwise
  3445. # add code to config.status for appending the configuration named by
  3446. # TAGNAME from the matching tagged config vars.
  3447. AC_DEFUN([AC_LIBTOOL_CONFIG],
  3448. [# The else clause should only fire when bootstrapping the
  3449. # libtool distribution, otherwise you forgot to ship ltmain.sh
  3450. # with your package, and you will get complaints that there are
  3451. # no rules to generate ltmain.sh.
  3452. if test -f "$ltmain"; then
  3453. # See if we are running on zsh, and set the options which allow our commands through
  3454. # without removal of \ escapes.
  3455. if test -n "${ZSH_VERSION+set}" ; then
  3456. setopt NO_GLOB_SUBST
  3457. fi
  3458. # Now quote all the things that may contain metacharacters while being
  3459. # careful not to overquote the AC_SUBSTed values. We take copies of the
  3460. # variables and quote the copies for generation of the libtool script.
  3461. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
  3462. SED SHELL STRIP \
  3463. libname_spec library_names_spec soname_spec extract_expsyms_cmds \
  3464. old_striplib striplib file_magic_cmd finish_cmds finish_eval \
  3465. deplibs_check_method reload_flag reload_cmds need_locks \
  3466. lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
  3467. lt_cv_sys_global_symbol_to_c_name_address \
  3468. sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
  3469. old_postinstall_cmds old_postuninstall_cmds \
  3470. _LT_AC_TAGVAR(compiler, $1) \
  3471. _LT_AC_TAGVAR(CC, $1) \
  3472. _LT_AC_TAGVAR(LD, $1) \
  3473. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
  3474. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
  3475. _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
  3476. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
  3477. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
  3478. _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
  3479. _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
  3480. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
  3481. _LT_AC_TAGVAR(old_archive_cmds, $1) \
  3482. _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
  3483. _LT_AC_TAGVAR(predep_objects, $1) \
  3484. _LT_AC_TAGVAR(postdep_objects, $1) \
  3485. _LT_AC_TAGVAR(predeps, $1) \
  3486. _LT_AC_TAGVAR(postdeps, $1) \
  3487. _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
  3488. _LT_AC_TAGVAR(archive_cmds, $1) \
  3489. _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
  3490. _LT_AC_TAGVAR(postinstall_cmds, $1) \
  3491. _LT_AC_TAGVAR(postuninstall_cmds, $1) \
  3492. _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
  3493. _LT_AC_TAGVAR(allow_undefined_flag, $1) \
  3494. _LT_AC_TAGVAR(no_undefined_flag, $1) \
  3495. _LT_AC_TAGVAR(export_symbols_cmds, $1) \
  3496. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
  3497. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
  3498. _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
  3499. _LT_AC_TAGVAR(hardcode_automatic, $1) \
  3500. _LT_AC_TAGVAR(module_cmds, $1) \
  3501. _LT_AC_TAGVAR(module_expsym_cmds, $1) \
  3502. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
  3503. _LT_AC_TAGVAR(exclude_expsyms, $1) \
  3504. _LT_AC_TAGVAR(include_expsyms, $1); do
  3505. case $var in
  3506. _LT_AC_TAGVAR(old_archive_cmds, $1) | \
  3507. _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
  3508. _LT_AC_TAGVAR(archive_cmds, $1) | \
  3509. _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
  3510. _LT_AC_TAGVAR(module_cmds, $1) | \
  3511. _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
  3512. _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
  3513. _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
  3514. extract_expsyms_cmds | reload_cmds | finish_cmds | \
  3515. postinstall_cmds | postuninstall_cmds | \
  3516. old_postinstall_cmds | old_postuninstall_cmds | \
  3517. sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
  3518. # Double-quote double-evaled strings.
  3519. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
  3520. ;;
  3521. *)
  3522. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
  3523. ;;
  3524. esac
  3525. done
  3526. case $lt_echo in
  3527. *'\[$]0 --fallback-echo"')
  3528. lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
  3529. ;;
  3530. esac
  3531. ifelse([$1], [],
  3532. [cfgfile="${ofile}T"
  3533. trap "$rm \"$cfgfile\"; exit 1" 1 2 15
  3534. $rm -f "$cfgfile"
  3535. AC_MSG_NOTICE([creating $ofile])],
  3536. [cfgfile="$ofile"])
  3537. cat <<__EOF__ >> "$cfgfile"
  3538. ifelse([$1], [],
  3539. [#! $SHELL
  3540. # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  3541. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
  3542. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  3543. #
  3544. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
  3545. # Free Software Foundation, Inc.
  3546. #
  3547. # This file is part of GNU Libtool:
  3548. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  3549. #
  3550. # This program is free software; you can redistribute it and/or modify
  3551. # it under the terms of the GNU General Public License as published by
  3552. # the Free Software Foundation; either version 2 of the License, or
  3553. # (at your option) any later version.
  3554. #
  3555. # This program is distributed in the hope that it will be useful, but
  3556. # WITHOUT ANY WARRANTY; without even the implied warranty of
  3557. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  3558. # General Public License for more details.
  3559. #
  3560. # You should have received a copy of the GNU General Public License
  3561. # along with this program; if not, write to the Free Software
  3562. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  3563. #
  3564. # As a special exception to the GNU General Public License, if you
  3565. # distribute this file as part of a program that contains a
  3566. # configuration script generated by Autoconf, you may include it under
  3567. # the same distribution terms that you use for the rest of that program.
  3568. # A sed program that does not truncate output.
  3569. SED=$lt_SED
  3570. # Sed that helps us avoid accidentally triggering echo(1) options like -n.
  3571. Xsed="$SED -e s/^X//"
  3572. # The HP-UX ksh and POSIX shell print the target directory to stdout
  3573. # if CDPATH is set.
  3574. if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  3575. # The names of the tagged configurations supported by this script.
  3576. available_tags=
  3577. # ### BEGIN LIBTOOL CONFIG],
  3578. [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
  3579. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  3580. # Shell to use when invoking shell scripts.
  3581. SHELL=$lt_SHELL
  3582. # Whether or not to build shared libraries.
  3583. build_libtool_libs=$enable_shared
  3584. # Whether or not to build static libraries.
  3585. build_old_libs=$enable_static
  3586. # Whether or not to add -lc for building shared libraries.
  3587. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
  3588. # Whether or not to disallow shared libs when runtime libs are static
  3589. allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
  3590. # Whether or not to optimize for fast installation.
  3591. fast_install=$enable_fast_install
  3592. # The host system.
  3593. host_alias=$host_alias
  3594. host=$host
  3595. # An echo program that does not interpret backslashes.
  3596. echo=$lt_echo
  3597. # The archiver.
  3598. AR=$lt_AR
  3599. AR_FLAGS=$lt_AR_FLAGS
  3600. # A C compiler.
  3601. LTCC=$lt_LTCC
  3602. # A language-specific compiler.
  3603. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
  3604. # Is the compiler the GNU C compiler?
  3605. with_gcc=$_LT_AC_TAGVAR(GCC, $1)
  3606. # An ERE matcher.
  3607. EGREP=$lt_EGREP
  3608. # The linker used to build libraries.
  3609. LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
  3610. # Whether we need hard or soft links.
  3611. LN_S=$lt_LN_S
  3612. # A BSD-compatible nm program.
  3613. NM=$lt_NM
  3614. # A symbol stripping program
  3615. STRIP=$lt_STRIP
  3616. # Used to examine libraries when file_magic_cmd begins "file"
  3617. MAGIC_CMD=$MAGIC_CMD
  3618. # Used on cygwin: DLL creation program.
  3619. DLLTOOL="$DLLTOOL"
  3620. # Used on cygwin: object dumper.
  3621. OBJDUMP="$OBJDUMP"
  3622. # Used on cygwin: assembler.
  3623. AS="$AS"
  3624. # The name of the directory that contains temporary libtool files.
  3625. objdir=$objdir
  3626. # How to create reloadable object files.
  3627. reload_flag=$lt_reload_flag
  3628. reload_cmds=$lt_reload_cmds
  3629. # How to pass a linker flag through the compiler.
  3630. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
  3631. # Object file suffix (normally "o").
  3632. objext="$ac_objext"
  3633. # Old archive suffix (normally "a").
  3634. libext="$libext"
  3635. # Shared library suffix (normally ".so").
  3636. shrext_cmds='$shrext_cmds'
  3637. # Executable file suffix (normally "").
  3638. exeext="$exeext"
  3639. # Additional compiler flags for building library objects.
  3640. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
  3641. pic_mode=$pic_mode
  3642. # What is the maximum length of a command?
  3643. max_cmd_len=$lt_cv_sys_max_cmd_len
  3644. # Does compiler simultaneously support -c and -o options?
  3645. compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
  3646. # Must we lock files when doing compilation ?
  3647. need_locks=$lt_need_locks
  3648. # Do we need the lib prefix for modules?
  3649. need_lib_prefix=$need_lib_prefix
  3650. # Do we need a version for libraries?
  3651. need_version=$need_version
  3652. # Whether dlopen is supported.
  3653. dlopen_support=$enable_dlopen
  3654. # Whether dlopen of programs is supported.
  3655. dlopen_self=$enable_dlopen_self
  3656. # Whether dlopen of statically linked programs is supported.
  3657. dlopen_self_static=$enable_dlopen_self_static
  3658. # Compiler flag to prevent dynamic linking.
  3659. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
  3660. # Compiler flag to turn off builtin functions.
  3661. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
  3662. # Compiler flag to allow reflexive dlopens.
  3663. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
  3664. # Compiler flag to generate shared objects directly from archives.
  3665. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
  3666. # Compiler flag to generate thread-safe objects.
  3667. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
  3668. # Library versioning type.
  3669. version_type=$version_type
  3670. # Format of library name prefix.
  3671. libname_spec=$lt_libname_spec
  3672. # List of archive names. First name is the real one, the rest are links.
  3673. # The last name is the one that the linker finds with -lNAME.
  3674. library_names_spec=$lt_library_names_spec
  3675. # The coded name of the library, if different from the real name.
  3676. soname_spec=$lt_soname_spec
  3677. # Commands used to build and install an old-style archive.
  3678. RANLIB=$lt_RANLIB
  3679. old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
  3680. old_postinstall_cmds=$lt_old_postinstall_cmds
  3681. old_postuninstall_cmds=$lt_old_postuninstall_cmds
  3682. # Create an old-style archive from a shared archive.
  3683. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
  3684. # Create a temporary old-style archive to link instead of a shared archive.
  3685. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
  3686. # Commands used to build and install a shared archive.
  3687. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
  3688. archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
  3689. postinstall_cmds=$lt_postinstall_cmds
  3690. postuninstall_cmds=$lt_postuninstall_cmds
  3691. # Commands used to build a loadable module (assumed same as above if empty)
  3692. module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
  3693. module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
  3694. # Commands to strip libraries.
  3695. old_striplib=$lt_old_striplib
  3696. striplib=$lt_striplib
  3697. # Dependencies to place before the objects being linked to create a
  3698. # shared library.
  3699. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
  3700. # Dependencies to place after the objects being linked to create a
  3701. # shared library.
  3702. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
  3703. # Dependencies to place before the objects being linked to create a
  3704. # shared library.
  3705. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
  3706. # Dependencies to place after the objects being linked to create a
  3707. # shared library.
  3708. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
  3709. # The library search path used internally by the compiler when linking
  3710. # a shared library.
  3711. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
  3712. # Method to check whether dependent libraries are shared objects.
  3713. deplibs_check_method=$lt_deplibs_check_method
  3714. # Command to use when deplibs_check_method == file_magic.
  3715. file_magic_cmd=$lt_file_magic_cmd
  3716. # Flag that allows shared libraries with undefined symbols to be built.
  3717. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
  3718. # Flag that forces no undefined symbols.
  3719. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
  3720. # Commands used to finish a libtool library installation in a directory.
  3721. finish_cmds=$lt_finish_cmds
  3722. # Same as above, but a single script fragment to be evaled but not shown.
  3723. finish_eval=$lt_finish_eval
  3724. # Take the output of nm and produce a listing of raw symbols and C names.
  3725. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
  3726. # Transform the output of nm in a proper C declaration
  3727. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
  3728. # Transform the output of nm in a C name address pair
  3729. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  3730. # This is the shared library runtime path variable.
  3731. runpath_var=$runpath_var
  3732. # This is the shared library path variable.
  3733. shlibpath_var=$shlibpath_var
  3734. # Is shlibpath searched before the hard-coded library search path?
  3735. shlibpath_overrides_runpath=$shlibpath_overrides_runpath
  3736. # How to hardcode a shared library path into an executable.
  3737. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
  3738. # Whether we should hardcode library paths into libraries.
  3739. hardcode_into_libs=$hardcode_into_libs
  3740. # Flag to hardcode \$libdir into a binary during linking.
  3741. # This must work even if \$libdir does not exist.
  3742. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
  3743. # If ld is used when linking, flag to hardcode \$libdir into
  3744. # a binary during linking. This must work even if \$libdir does
  3745. # not exist.
  3746. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
  3747. # Whether we need a single -rpath flag with a separated argument.
  3748. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
  3749. # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
  3750. # resulting binary.
  3751. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
  3752. # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
  3753. # resulting binary.
  3754. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
  3755. # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  3756. # the resulting binary.
  3757. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
  3758. # Set to yes if building a shared library automatically hardcodes DIR into the library
  3759. # and all subsequent libraries and executables linked against it.
  3760. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
  3761. # Variables whose values should be saved in libtool wrapper scripts and
  3762. # restored at relink time.
  3763. variables_saved_for_relink="$variables_saved_for_relink"
  3764. # Whether libtool must link a program against all its dependency libraries.
  3765. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
  3766. # Compile-time system search path for libraries
  3767. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
  3768. # Run-time system search path for libraries
  3769. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
  3770. # Fix the shell variable \$srcfile for the compiler.
  3771. fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
  3772. # Set to yes if exported symbols are required.
  3773. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
  3774. # The commands to list exported symbols.
  3775. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
  3776. # The commands to extract the exported symbol list from a shared archive.
  3777. extract_expsyms_cmds=$lt_extract_expsyms_cmds
  3778. # Symbols that should not be listed in the preloaded symbols.
  3779. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
  3780. # Symbols that must always be exported.
  3781. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
  3782. ifelse([$1],[],
  3783. [# ### END LIBTOOL CONFIG],
  3784. [# ### END LIBTOOL TAG CONFIG: $tagname])
  3785. __EOF__
  3786. ifelse([$1],[], [
  3787. case $host_os in
  3788. aix3*)
  3789. cat <<\EOF >> "$cfgfile"
  3790. # AIX sometimes has problems with the GCC collect2 program. For some
  3791. # reason, if we set the COLLECT_NAMES environment variable, the problems
  3792. # vanish in a puff of smoke.
  3793. if test "X${COLLECT_NAMES+set}" != Xset; then
  3794. COLLECT_NAMES=
  3795. export COLLECT_NAMES
  3796. fi
  3797. EOF
  3798. ;;
  3799. esac
  3800. # We use sed instead of cat because bash on DJGPP gets confused if
  3801. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  3802. # text mode, it properly converts lines to CR/LF. This bash problem
  3803. # is reportedly fixed, but why not run on old versions too?
  3804. sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
  3805. mv -f "$cfgfile" "$ofile" || \
  3806. (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  3807. chmod +x "$ofile"
  3808. ])
  3809. else
  3810. # If there is no Makefile yet, we rely on a make rule to execute
  3811. # `config.status --recheck' to rerun these tests and create the
  3812. # libtool script then.
  3813. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
  3814. if test -f "$ltmain_in"; then
  3815. test -f Makefile && make "$ltmain"
  3816. fi
  3817. fi
  3818. ])# AC_LIBTOOL_CONFIG
  3819. # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
  3820. # -------------------------------------------
  3821. AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
  3822. [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  3823. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  3824. if test "$GCC" = yes; then
  3825. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  3826. AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  3827. lt_cv_prog_compiler_rtti_exceptions,
  3828. [-fno-rtti -fno-exceptions], [],
  3829. [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  3830. fi
  3831. ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
  3832. # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  3833. # ---------------------------------
  3834. AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
  3835. [AC_REQUIRE([AC_CANONICAL_HOST])
  3836. AC_REQUIRE([AC_PROG_NM])
  3837. AC_REQUIRE([AC_OBJEXT])
  3838. # Check for command to grab the raw symbol name followed by C symbol from nm.
  3839. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  3840. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  3841. [
  3842. # These are sane defaults that work on at least a few old systems.
  3843. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  3844. # Character class describing NM global symbol codes.
  3845. symcode='[[BCDEGRST]]'
  3846. # Regexp to match symbols that can be accessed directly from C.
  3847. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  3848. # Transform the above into a raw symbol and a C symbol.
  3849. symxfrm='\1 \2\3 \3'
  3850. # Transform an extracted symbol line into a proper C declaration
  3851. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
  3852. # Transform an extracted symbol line into symbol name and symbol address
  3853. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
  3854. # Define system-specific variables.
  3855. case $host_os in
  3856. aix*)
  3857. symcode='[[BCDT]]'
  3858. ;;
  3859. cygwin* | mingw* | pw32*)
  3860. symcode='[[ABCDGISTW]]'
  3861. ;;
  3862. hpux*) # Its linker distinguishes data from code symbols
  3863. if test "$host_cpu" = ia64; then
  3864. symcode='[[ABCDEGRST]]'
  3865. fi
  3866. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  3867. lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
  3868. ;;
  3869. irix* | nonstopux*)
  3870. symcode='[[BCDEGRST]]'
  3871. ;;
  3872. osf*)
  3873. symcode='[[BCDEGQRST]]'
  3874. ;;
  3875. solaris* | sysv5*)
  3876. symcode='[[BDRT]]'
  3877. ;;
  3878. sysv4)
  3879. symcode='[[DFNSTU]]'
  3880. ;;
  3881. esac
  3882. # Handle CRLF in mingw tool chain
  3883. opt_cr=
  3884. case $build_os in
  3885. mingw*)
  3886. opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  3887. ;;
  3888. esac
  3889. # If we're using GNU nm, then use its standard symbol codes.
  3890. case `$NM -V 2>&1` in
  3891. *GNU* | *'with BFD'*)
  3892. symcode='[[ABCDGIRSTW]]' ;;
  3893. esac
  3894. # Try without a prefix undercore, then with it.
  3895. for ac_symprfx in "" "_"; do
  3896. # Write the raw and C identifiers.
  3897. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
  3898. # Check to see that the pipe works correctly.
  3899. pipe_works=no
  3900. rm -f conftest*
  3901. cat > conftest.$ac_ext <<EOF
  3902. #ifdef __cplusplus
  3903. extern "C" {
  3904. #endif
  3905. char nm_test_var;
  3906. void nm_test_func(){}
  3907. #ifdef __cplusplus
  3908. }
  3909. #endif
  3910. int main(){nm_test_var='a';nm_test_func();return(0);}
  3911. EOF
  3912. if AC_TRY_EVAL(ac_compile); then
  3913. # Now try to grab the symbols.
  3914. nlist=conftest.nm
  3915. if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
  3916. # Try sorting and uniquifying the output.
  3917. if sort "$nlist" | uniq > "$nlist"T; then
  3918. mv -f "$nlist"T "$nlist"
  3919. else
  3920. rm -f "$nlist"T
  3921. fi
  3922. # Make sure that we snagged all the symbols we need.
  3923. if grep ' nm_test_var$' "$nlist" >/dev/null; then
  3924. if grep ' nm_test_func$' "$nlist" >/dev/null; then
  3925. cat <<EOF > conftest.$ac_ext
  3926. #ifdef __cplusplus
  3927. extern "C" {
  3928. #endif
  3929. EOF
  3930. # Now generate the symbol file.
  3931. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
  3932. cat <<EOF >> conftest.$ac_ext
  3933. #if defined (__STDC__) && __STDC__
  3934. # define lt_ptr_t void *
  3935. #else
  3936. # define lt_ptr_t char *
  3937. # define const
  3938. #endif
  3939. /* The mapping between symbol names and symbols. */
  3940. const struct {
  3941. const char *name;
  3942. lt_ptr_t address;
  3943. }
  3944. lt_preloaded_symbols[[]] =
  3945. {
  3946. EOF
  3947. $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
  3948. cat <<\EOF >> conftest.$ac_ext
  3949. {0, (lt_ptr_t) 0}
  3950. };
  3951. #ifdef __cplusplus
  3952. }
  3953. #endif
  3954. EOF
  3955. # Now try linking the two files.
  3956. mv conftest.$ac_objext conftstm.$ac_objext
  3957. lt_save_LIBS="$LIBS"
  3958. lt_save_CFLAGS="$CFLAGS"
  3959. LIBS="conftstm.$ac_objext"
  3960. CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  3961. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  3962. pipe_works=yes
  3963. fi
  3964. LIBS="$lt_save_LIBS"
  3965. CFLAGS="$lt_save_CFLAGS"
  3966. else
  3967. echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  3968. fi
  3969. else
  3970. echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  3971. fi
  3972. else
  3973. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  3974. fi
  3975. else
  3976. echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  3977. cat conftest.$ac_ext >&5
  3978. fi
  3979. rm -f conftest* conftst*
  3980. # Do not use the global_symbol_pipe unless it works.
  3981. if test "$pipe_works" = yes; then
  3982. break
  3983. else
  3984. lt_cv_sys_global_symbol_pipe=
  3985. fi
  3986. done
  3987. ])
  3988. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  3989. lt_cv_sys_global_symbol_to_cdecl=
  3990. fi
  3991. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  3992. AC_MSG_RESULT(failed)
  3993. else
  3994. AC_MSG_RESULT(ok)
  3995. fi
  3996. ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  3997. # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
  3998. # ---------------------------------------
  3999. AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
  4000. [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
  4001. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4002. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
  4003. AC_MSG_CHECKING([for $compiler option to produce PIC])
  4004. ifelse([$1],[CXX],[
  4005. # C++ specific cases for pic, static, wl, etc.
  4006. if test "$GXX" = yes; then
  4007. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4008. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4009. case $host_os in
  4010. aix*)
  4011. # All AIX code is PIC.
  4012. if test "$host_cpu" = ia64; then
  4013. # AIX 5 now supports IA64 processor
  4014. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4015. fi
  4016. ;;
  4017. amigaos*)
  4018. # FIXME: we need at least 68020 code to build shared libraries, but
  4019. # adding the `-m68020' flag to GCC prevents building anything better,
  4020. # like `-m68040'.
  4021. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4022. ;;
  4023. beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4024. # PIC is the default for these OSes.
  4025. ;;
  4026. mingw* | os2* | pw32*)
  4027. # This hack is so that the source file can tell whether it is being
  4028. # built for inclusion in a dll (and should export symbols for example).
  4029. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  4030. ;;
  4031. darwin* | rhapsody*)
  4032. # PIC is the default on this platform
  4033. # Common symbols not allowed in MH_DYLIB files
  4034. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4035. ;;
  4036. *djgpp*)
  4037. # DJGPP does not support shared libraries at all
  4038. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4039. ;;
  4040. sysv4*MP*)
  4041. if test -d /usr/nec; then
  4042. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4043. fi
  4044. ;;
  4045. hpux*)
  4046. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4047. # not for PA HP-UX.
  4048. case "$host_cpu" in
  4049. hppa*64*|ia64*)
  4050. ;;
  4051. *)
  4052. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4053. ;;
  4054. esac
  4055. ;;
  4056. *)
  4057. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4058. ;;
  4059. esac
  4060. else
  4061. case $host_os in
  4062. aix4* | aix5*)
  4063. # All AIX code is PIC.
  4064. if test "$host_cpu" = ia64; then
  4065. # AIX 5 now supports IA64 processor
  4066. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4067. else
  4068. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4069. fi
  4070. ;;
  4071. chorus*)
  4072. case $cc_basename in
  4073. cxch68)
  4074. # Green Hills C++ Compiler
  4075. # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
  4076. ;;
  4077. esac
  4078. ;;
  4079. dgux*)
  4080. case $cc_basename in
  4081. ec++)
  4082. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4083. ;;
  4084. ghcx)
  4085. # Green Hills C++ Compiler
  4086. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4087. ;;
  4088. *)
  4089. ;;
  4090. esac
  4091. ;;
  4092. freebsd* | kfreebsd*-gnu)
  4093. # FreeBSD uses GNU C++
  4094. ;;
  4095. hpux9* | hpux10* | hpux11*)
  4096. case $cc_basename in
  4097. CC)
  4098. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4099. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
  4100. if test "$host_cpu" != ia64; then
  4101. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4102. fi
  4103. ;;
  4104. aCC)
  4105. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4106. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
  4107. case "$host_cpu" in
  4108. hppa*64*|ia64*)
  4109. # +Z the default
  4110. ;;
  4111. *)
  4112. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4113. ;;
  4114. esac
  4115. ;;
  4116. *)
  4117. ;;
  4118. esac
  4119. ;;
  4120. irix5* | irix6* | nonstopux*)
  4121. case $cc_basename in
  4122. CC)
  4123. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4124. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4125. # CC pic flag -KPIC is the default.
  4126. ;;
  4127. *)
  4128. ;;
  4129. esac
  4130. ;;
  4131. linux*)
  4132. case $cc_basename in
  4133. KCC)
  4134. # KAI C++ Compiler
  4135. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4136. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4137. ;;
  4138. icpc)
  4139. # Intel C++
  4140. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4141. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4142. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4143. ;;
  4144. cxx)
  4145. # Compaq C++
  4146. # Make sure the PIC flag is empty. It appears that all Alpha
  4147. # Linux and Compaq Tru64 Unix objects are PIC.
  4148. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4149. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4150. ;;
  4151. *)
  4152. ;;
  4153. esac
  4154. ;;
  4155. lynxos*)
  4156. ;;
  4157. m88k*)
  4158. ;;
  4159. mvs*)
  4160. case $cc_basename in
  4161. cxx)
  4162. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  4163. ;;
  4164. *)
  4165. ;;
  4166. esac
  4167. ;;
  4168. netbsd*)
  4169. ;;
  4170. osf3* | osf4* | osf5*)
  4171. case $cc_basename in
  4172. KCC)
  4173. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  4174. ;;
  4175. RCC)
  4176. # Rational C++ 2.4.1
  4177. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4178. ;;
  4179. cxx)
  4180. # Digital/Compaq C++
  4181. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4182. # Make sure the PIC flag is empty. It appears that all Alpha
  4183. # Linux and Compaq Tru64 Unix objects are PIC.
  4184. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4185. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4186. ;;
  4187. *)
  4188. ;;
  4189. esac
  4190. ;;
  4191. psos*)
  4192. ;;
  4193. sco*)
  4194. case $cc_basename in
  4195. CC)
  4196. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4197. ;;
  4198. *)
  4199. ;;
  4200. esac
  4201. ;;
  4202. solaris*)
  4203. case $cc_basename in
  4204. CC)
  4205. # Sun C++ 4.2, 5.x and Centerline C++
  4206. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4207. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4208. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4209. ;;
  4210. gcx)
  4211. # Green Hills C++ Compiler
  4212. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4213. ;;
  4214. *)
  4215. ;;
  4216. esac
  4217. ;;
  4218. sunos4*)
  4219. case $cc_basename in
  4220. CC)
  4221. # Sun C++ 4.x
  4222. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4223. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4224. ;;
  4225. lcc)
  4226. # Lucid
  4227. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4228. ;;
  4229. *)
  4230. ;;
  4231. esac
  4232. ;;
  4233. tandem*)
  4234. case $cc_basename in
  4235. NCC)
  4236. # NonStop-UX NCC 3.20
  4237. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4238. ;;
  4239. *)
  4240. ;;
  4241. esac
  4242. ;;
  4243. unixware*)
  4244. ;;
  4245. vxworks*)
  4246. ;;
  4247. *)
  4248. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4249. ;;
  4250. esac
  4251. fi
  4252. ],
  4253. [
  4254. if test "$GCC" = yes; then
  4255. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4256. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4257. case $host_os in
  4258. aix*)
  4259. # All AIX code is PIC.
  4260. if test "$host_cpu" = ia64; then
  4261. # AIX 5 now supports IA64 processor
  4262. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4263. fi
  4264. ;;
  4265. amigaos*)
  4266. # FIXME: we need at least 68020 code to build shared libraries, but
  4267. # adding the `-m68020' flag to GCC prevents building anything better,
  4268. # like `-m68040'.
  4269. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  4270. ;;
  4271. beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  4272. # PIC is the default for these OSes.
  4273. ;;
  4274. mingw* | pw32* | os2*)
  4275. # This hack is so that the source file can tell whether it is being
  4276. # built for inclusion in a dll (and should export symbols for example).
  4277. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  4278. ;;
  4279. darwin* | rhapsody*)
  4280. # PIC is the default on this platform
  4281. # Common symbols not allowed in MH_DYLIB files
  4282. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  4283. ;;
  4284. msdosdjgpp*)
  4285. # Just because we use GCC doesn't mean we suddenly get shared libraries
  4286. # on systems that don't support them.
  4287. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4288. enable_shared=no
  4289. ;;
  4290. sysv4*MP*)
  4291. if test -d /usr/nec; then
  4292. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  4293. fi
  4294. ;;
  4295. hpux*)
  4296. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4297. # not for PA HP-UX.
  4298. case "$host_cpu" in
  4299. hppa*64*|ia64*)
  4300. # +Z the default
  4301. ;;
  4302. *)
  4303. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4304. ;;
  4305. esac
  4306. ;;
  4307. *)
  4308. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  4309. ;;
  4310. esac
  4311. else
  4312. # PORTME Check for flag to pass linker flags through the system compiler.
  4313. case $host_os in
  4314. aix*)
  4315. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4316. if test "$host_cpu" = ia64; then
  4317. # AIX 5 now supports IA64 processor
  4318. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4319. else
  4320. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  4321. fi
  4322. ;;
  4323. mingw* | pw32* | os2*)
  4324. # This hack is so that the source file can tell whether it is being
  4325. # built for inclusion in a dll (and should export symbols for example).
  4326. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  4327. ;;
  4328. hpux9* | hpux10* | hpux11*)
  4329. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4330. # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  4331. # not for PA HP-UX.
  4332. case "$host_cpu" in
  4333. hppa*64*|ia64*)
  4334. # +Z the default
  4335. ;;
  4336. *)
  4337. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  4338. ;;
  4339. esac
  4340. # Is there a better lt_prog_compiler_static that works with the bundled CC?
  4341. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  4342. ;;
  4343. irix5* | irix6* | nonstopux*)
  4344. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4345. # PIC (with -KPIC) is the default.
  4346. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4347. ;;
  4348. newsos6)
  4349. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4350. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4351. ;;
  4352. linux*)
  4353. case $CC in
  4354. icc* | ecc*)
  4355. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4356. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4357. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  4358. ;;
  4359. ccc*)
  4360. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4361. # All Alpha code is PIC.
  4362. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4363. ;;
  4364. como)
  4365. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-lopt='
  4366. ;;
  4367. esac
  4368. ;;
  4369. osf3* | osf4* | osf5*)
  4370. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4371. # All OSF/1 code is PIC.
  4372. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  4373. ;;
  4374. sco3.2v5*)
  4375. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
  4376. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
  4377. ;;
  4378. solaris*)
  4379. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4380. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4381. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4382. ;;
  4383. sunos4*)
  4384. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  4385. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  4386. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4387. ;;
  4388. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  4389. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  4390. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  4391. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4392. ;;
  4393. sysv4*MP*)
  4394. if test -d /usr/nec ;then
  4395. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  4396. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4397. fi
  4398. ;;
  4399. uts4*)
  4400. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  4401. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  4402. ;;
  4403. *)
  4404. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  4405. ;;
  4406. esac
  4407. fi
  4408. ])
  4409. AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
  4410. #
  4411. # Check to make sure the PIC flag actually works.
  4412. #
  4413. if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
  4414. AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
  4415. _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
  4416. [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
  4417. [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
  4418. "" | " "*) ;;
  4419. *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  4420. esac],
  4421. [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4422. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  4423. fi
  4424. case "$host_os" in
  4425. # For platforms which do not support PIC, -DPIC is meaningless:
  4426. *djgpp*)
  4427. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  4428. ;;
  4429. *)
  4430. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
  4431. ;;
  4432. esac
  4433. ])
  4434. # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
  4435. # ------------------------------------
  4436. # See if the linker supports building shared libraries.
  4437. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
  4438. [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  4439. ifelse([$1],[CXX],[
  4440. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4441. case $host_os in
  4442. aix4* | aix5*)
  4443. # If we're using GNU nm, then we don't want the "-C" option.
  4444. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4445. if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
  4446. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
  4447. else
  4448. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
  4449. fi
  4450. ;;
  4451. pw32*)
  4452. _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  4453. ;;
  4454. cygwin* | mingw*)
  4455. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
  4456. ;;
  4457. *)
  4458. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4459. ;;
  4460. esac
  4461. ],[
  4462. runpath_var=
  4463. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  4464. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4465. _LT_AC_TAGVAR(archive_cmds, $1)=
  4466. _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  4467. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
  4468. _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  4469. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  4470. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  4471. _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
  4472. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4473. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  4474. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  4475. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  4476. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  4477. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4478. _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  4479. _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  4480. _LT_AC_TAGVAR(module_cmds, $1)=
  4481. _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  4482. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  4483. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  4484. # include_expsyms should be a list of space-separated symbols to be *always*
  4485. # included in the symbol list
  4486. _LT_AC_TAGVAR(include_expsyms, $1)=
  4487. # exclude_expsyms can be an extended regexp of symbols to exclude
  4488. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  4489. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  4490. # as well as any symbol that contains `d'.
  4491. _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
  4492. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  4493. # platforms (ab)use it in PIC code, but their linkers get confused if
  4494. # the symbol is explicitly referenced. Since portable code cannot
  4495. # rely on this symbol name, it's probably fine to never include it in
  4496. # preloaded symbol tables.
  4497. extract_expsyms_cmds=
  4498. case $host_os in
  4499. cygwin* | mingw* | pw32*)
  4500. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  4501. # When not using gcc, we currently assume that we are using
  4502. # Microsoft Visual C++.
  4503. if test "$GCC" != yes; then
  4504. with_gnu_ld=no
  4505. fi
  4506. ;;
  4507. openbsd*)
  4508. with_gnu_ld=no
  4509. ;;
  4510. esac
  4511. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  4512. if test "$with_gnu_ld" = yes; then
  4513. # If archive_cmds runs LD, not CC, wlarc should be empty
  4514. wlarc='${wl}'
  4515. # See if GNU ld supports shared libraries.
  4516. case $host_os in
  4517. aix3* | aix4* | aix5*)
  4518. # On AIX/PPC, the GNU linker is very broken
  4519. if test "$host_cpu" != ia64; then
  4520. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4521. cat <<EOF 1>&2
  4522. *** Warning: the GNU linker, at least up to release 2.9.1, is reported
  4523. *** to be unable to reliably create shared libraries on AIX.
  4524. *** Therefore, libtool is disabling shared libraries support. If you
  4525. *** really care for shared libraries, you may want to modify your PATH
  4526. *** so that a non-GNU linker is found, and then restart.
  4527. EOF
  4528. fi
  4529. ;;
  4530. amigaos*)
  4531. _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  4532. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4533. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  4534. # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
  4535. # that the semantics of dynamic libraries on AmigaOS, at least up
  4536. # to version 4, is to share data among multiple programs linked
  4537. # with the same dynamic library. Since this doesn't match the
  4538. # behavior of shared libraries on other platforms, we can't use
  4539. # them.
  4540. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4541. ;;
  4542. beos*)
  4543. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  4544. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  4545. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  4546. # support --undefined. This deserves some investigation. FIXME
  4547. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4548. else
  4549. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4550. fi
  4551. ;;
  4552. cygwin* | mingw* | pw32*)
  4553. # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  4554. # as there is no search path for DLLs.
  4555. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4556. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  4557. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  4558. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4559. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
  4560. if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
  4561. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
  4562. # If the export-symbols file already is a .def file (1st line
  4563. # is EXPORTS), use it as is; otherwise, prepend...
  4564. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  4565. cp $export_symbols $output_objdir/$soname.def;
  4566. else
  4567. echo EXPORTS > $output_objdir/$soname.def;
  4568. cat $export_symbols >> $output_objdir/$soname.def;
  4569. fi~
  4570. $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
  4571. else
  4572. ld_shlibs=no
  4573. fi
  4574. ;;
  4575. netbsd*)
  4576. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  4577. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  4578. wlarc=
  4579. else
  4580. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4581. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  4582. fi
  4583. ;;
  4584. solaris* | sysv5*)
  4585. if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
  4586. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4587. cat <<EOF 1>&2
  4588. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  4589. *** create shared libraries on Solaris systems. Therefore, libtool
  4590. *** is disabling shared libraries support. We urge you to upgrade GNU
  4591. *** binutils to release 2.9.1 or newer. Another option is to modify
  4592. *** your PATH or compiler configuration so that the native linker is
  4593. *** used, and then restart.
  4594. EOF
  4595. elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  4596. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4597. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  4598. else
  4599. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4600. fi
  4601. ;;
  4602. sunos4*)
  4603. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4604. wlarc=
  4605. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  4606. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  4607. ;;
  4608. linux*)
  4609. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  4610. tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4611. _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
  4612. supports_anon_versioning=no
  4613. case `$LD -v 2>/dev/null` in
  4614. *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  4615. *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  4616. *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  4617. *\ 2.11.*) ;; # other 2.11 versions
  4618. *) supports_anon_versioning=yes ;;
  4619. esac
  4620. if test $supports_anon_versioning = yes; then
  4621. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
  4622. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  4623. $echo "local: *; };" >> $output_objdir/$libname.ver~
  4624. $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  4625. else
  4626. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
  4627. fi
  4628. else
  4629. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4630. fi
  4631. ;;
  4632. *)
  4633. if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  4634. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  4635. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  4636. else
  4637. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4638. fi
  4639. ;;
  4640. esac
  4641. if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
  4642. runpath_var=LD_RUN_PATH
  4643. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  4644. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  4645. # ancient GNU ld didn't support --whole-archive et. al.
  4646. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
  4647. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  4648. else
  4649. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  4650. fi
  4651. fi
  4652. else
  4653. # PORTME fill in a description of your system's linker (not GNU ld)
  4654. case $host_os in
  4655. aix3*)
  4656. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  4657. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  4658. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
  4659. # Note: this linker hardcodes the directories in LIBPATH if there
  4660. # are no directories specified by -L.
  4661. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  4662. if test "$GCC" = yes && test -z "$link_static_flag"; then
  4663. # Neither direct hardcoding nor static linking is supported with a
  4664. # broken collect2.
  4665. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  4666. fi
  4667. ;;
  4668. aix4* | aix5*)
  4669. if test "$host_cpu" = ia64; then
  4670. # On IA64, the linker does run time linking by default, so we don't
  4671. # have to do anything special.
  4672. aix_use_runtimelinking=no
  4673. exp_sym_flag='-Bexport'
  4674. no_entry_flag=""
  4675. else
  4676. # If we're using GNU nm, then we don't want the "-C" option.
  4677. # -C means demangle to AIX nm, but means don't demangle with GNU nm
  4678. if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
  4679. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
  4680. else
  4681. _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
  4682. fi
  4683. aix_use_runtimelinking=no
  4684. # Test if we are trying to use run time linking or normal
  4685. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  4686. # need to do runtime linking.
  4687. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
  4688. for ld_flag in $LDFLAGS; do
  4689. if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  4690. aix_use_runtimelinking=yes
  4691. break
  4692. fi
  4693. done
  4694. esac
  4695. exp_sym_flag='-bexport'
  4696. no_entry_flag='-bnoentry'
  4697. fi
  4698. # When large executables or shared objects are built, AIX ld can
  4699. # have problems creating the table of contents. If linking a library
  4700. # or program results in "error TOC overflow" add -mminimal-toc to
  4701. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  4702. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  4703. _LT_AC_TAGVAR(archive_cmds, $1)=''
  4704. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  4705. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  4706. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  4707. if test "$GCC" = yes; then
  4708. case $host_os in aix4.[012]|aix4.[012].*)
  4709. # We only want to do this on AIX 4.2 and lower, the check
  4710. # below for broken collect2 doesn't work under 4.3+
  4711. collect2name=`${CC} -print-prog-name=collect2`
  4712. if test -f "$collect2name" && \
  4713. strings "$collect2name" | grep resolve_lib_name >/dev/null
  4714. then
  4715. # We have reworked collect2
  4716. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  4717. else
  4718. # We have old collect2
  4719. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  4720. # It fails to find uninstalled libraries when the uninstalled
  4721. # path is not listed in the libpath. Setting hardcode_minus_L
  4722. # to unsupported forces relinking
  4723. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  4724. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4725. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  4726. fi
  4727. esac
  4728. shared_flag='-shared'
  4729. else
  4730. # not using gcc
  4731. if test "$host_cpu" = ia64; then
  4732. # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  4733. # chokes on -Wl,-G. The following line is correct:
  4734. shared_flag='-G'
  4735. else
  4736. if test "$aix_use_runtimelinking" = yes; then
  4737. shared_flag='${wl}-G'
  4738. else
  4739. shared_flag='${wl}-bM:SRE'
  4740. fi
  4741. fi
  4742. fi
  4743. # It seems that -bexpall does not export symbols beginning with
  4744. # underscore (_), so it is better to generate a list of symbols to export.
  4745. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  4746. if test "$aix_use_runtimelinking" = yes; then
  4747. # Warning - without using the other runtime loading flags (-brtl),
  4748. # -berok will link without error, but may produce a broken library.
  4749. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
  4750. # Determine the default libpath from the value encoded in an empty executable.
  4751. _LT_AC_SYS_LIBPATH_AIX
  4752. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4753. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  4754. else
  4755. if test "$host_cpu" = ia64; then
  4756. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  4757. _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  4758. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
  4759. else
  4760. # Determine the default libpath from the value encoded in an empty executable.
  4761. _LT_AC_SYS_LIBPATH_AIX
  4762. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  4763. # Warning - without using the other run time loading flags,
  4764. # -berok will link without error, but may produce a broken library.
  4765. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  4766. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  4767. # -bexpall does not export symbols beginning with underscore (_)
  4768. _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  4769. # Exported symbols can be pulled into shared objects from archives
  4770. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
  4771. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  4772. # This is similar to how AIX traditionally builds it's shared libraries.
  4773. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
  4774. fi
  4775. fi
  4776. ;;
  4777. amigaos*)
  4778. _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  4779. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4780. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  4781. # see comment about different semantics on the GNU ld section
  4782. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4783. ;;
  4784. bsdi4*)
  4785. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  4786. ;;
  4787. cygwin* | mingw* | pw32*)
  4788. # When not using gcc, we currently assume that we are using
  4789. # Microsoft Visual C++.
  4790. # hardcode_libdir_flag_spec is actually meaningless, as there is
  4791. # no search path for DLLs.
  4792. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  4793. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  4794. # Tell ltmain to make .lib files, not .a files.
  4795. libext=lib
  4796. # Tell ltmain to make .dll files, not .so files.
  4797. shrext_cmds=".dll"
  4798. # FIXME: Setting linknames here is a bad hack.
  4799. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
  4800. # The linker will automatically build a .lib file if we build a DLL.
  4801. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
  4802. # FIXME: Should let the user specify the lib program.
  4803. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
  4804. fix_srcfile_path='`cygpath -w "$srcfile"`'
  4805. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  4806. ;;
  4807. darwin* | rhapsody*)
  4808. if test "$GXX" = yes ; then
  4809. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  4810. case "$host_os" in
  4811. rhapsody* | darwin1.[[012]])
  4812. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
  4813. ;;
  4814. *) # Darwin 1.3 on
  4815. if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
  4816. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
  4817. else
  4818. case ${MACOSX_DEPLOYMENT_TARGET} in
  4819. 10.[[012]])
  4820. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
  4821. ;;
  4822. 10.*)
  4823. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
  4824. ;;
  4825. esac
  4826. fi
  4827. ;;
  4828. esac
  4829. lt_int_apple_cc_single_mod=no
  4830. output_verbose_link_cmd='echo'
  4831. if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
  4832. lt_int_apple_cc_single_mod=yes
  4833. fi
  4834. if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
  4835. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
  4836. else
  4837. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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'
  4838. fi
  4839. _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  4840. # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  4841. if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
  4842. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  4843. else
  4844. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  4845. fi
  4846. _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  4847. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  4848. _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
  4849. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  4850. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
  4851. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  4852. else
  4853. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4854. fi
  4855. ;;
  4856. dgux*)
  4857. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4858. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4859. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  4860. ;;
  4861. freebsd1*)
  4862. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4863. ;;
  4864. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  4865. # support. Future versions do this automatically, but an explicit c++rt0.o
  4866. # does not break anything, and helps significantly (at the cost of a little
  4867. # extra space).
  4868. freebsd2.2*)
  4869. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  4870. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4871. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  4872. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  4873. ;;
  4874. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  4875. freebsd2*)
  4876. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4877. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  4878. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  4879. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  4880. ;;
  4881. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  4882. freebsd* | kfreebsd*-gnu)
  4883. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
  4884. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4885. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  4886. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  4887. ;;
  4888. hpux9*)
  4889. if test "$GCC" = yes; then
  4890. _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  4891. else
  4892. _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
  4893. fi
  4894. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4895. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  4896. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  4897. # hardcode_minus_L: Not really in the search PATH,
  4898. # but as the default location of the library.
  4899. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  4900. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4901. ;;
  4902. hpux10* | hpux11*)
  4903. if test "$GCC" = yes -a "$with_gnu_ld" = no; then
  4904. case "$host_cpu" in
  4905. hppa*64*|ia64*)
  4906. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  4907. ;;
  4908. *)
  4909. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  4910. ;;
  4911. esac
  4912. else
  4913. case "$host_cpu" in
  4914. hppa*64*|ia64*)
  4915. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
  4916. ;;
  4917. *)
  4918. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  4919. ;;
  4920. esac
  4921. fi
  4922. if test "$with_gnu_ld" = no; then
  4923. case "$host_cpu" in
  4924. hppa*64*)
  4925. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4926. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
  4927. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  4928. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  4929. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  4930. ;;
  4931. ia64*)
  4932. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  4933. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  4934. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  4935. # hardcode_minus_L: Not really in the search PATH,
  4936. # but as the default location of the library.
  4937. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  4938. ;;
  4939. *)
  4940. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  4941. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  4942. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  4943. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4944. # hardcode_minus_L: Not really in the search PATH,
  4945. # but as the default location of the library.
  4946. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  4947. ;;
  4948. esac
  4949. fi
  4950. ;;
  4951. irix5* | irix6* | nonstopux*)
  4952. if test "$GCC" = yes; then
  4953. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  4954. else
  4955. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  4956. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
  4957. fi
  4958. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4959. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  4960. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  4961. ;;
  4962. netbsd*)
  4963. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  4964. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  4965. else
  4966. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  4967. fi
  4968. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4969. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  4970. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  4971. ;;
  4972. newsos6)
  4973. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  4974. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  4975. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  4976. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  4977. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  4978. ;;
  4979. openbsd*)
  4980. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  4981. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  4982. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  4983. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4984. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4985. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  4986. else
  4987. case $host_os in
  4988. openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  4989. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  4990. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  4991. ;;
  4992. *)
  4993. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  4994. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  4995. ;;
  4996. esac
  4997. fi
  4998. ;;
  4999. os2*)
  5000. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5001. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5002. _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  5003. _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
  5004. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  5005. ;;
  5006. osf3*)
  5007. if test "$GCC" = yes; then
  5008. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5009. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5010. else
  5011. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5012. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  5013. fi
  5014. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5015. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5016. ;;
  5017. osf4* | osf5*) # as osf3* with the addition of -msym flag
  5018. if test "$GCC" = yes; then
  5019. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  5020. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  5021. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  5022. else
  5023. _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  5024. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  5025. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
  5026. $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
  5027. # Both c and cxx compiler support -rpath directly
  5028. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  5029. fi
  5030. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  5031. ;;
  5032. sco3.2v5*)
  5033. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5034. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5035. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  5036. runpath_var=LD_RUN_PATH
  5037. hardcode_runpath_var=yes
  5038. ;;
  5039. solaris*)
  5040. _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
  5041. if test "$GCC" = yes; then
  5042. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5043. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  5044. $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
  5045. else
  5046. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5047. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  5048. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
  5049. fi
  5050. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  5051. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5052. case $host_os in
  5053. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  5054. *) # Supported since Solaris 2.6 (maybe 2.5.1?)
  5055. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
  5056. esac
  5057. _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5058. ;;
  5059. sunos4*)
  5060. if test "x$host_vendor" = xsequent; then
  5061. # Use $CC to link under sequent, because it throws in some extra .o
  5062. # files that make .init and .fini sections work.
  5063. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  5064. else
  5065. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  5066. fi
  5067. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5068. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5069. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5070. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5071. ;;
  5072. sysv4)
  5073. case $host_vendor in
  5074. sni)
  5075. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5076. _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  5077. ;;
  5078. siemens)
  5079. ## LD is ld it makes a PLAMLIB
  5080. ## CC just makes a GrossModule.
  5081. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5082. _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  5083. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5084. ;;
  5085. motorola)
  5086. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5087. _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  5088. ;;
  5089. esac
  5090. runpath_var='LD_RUN_PATH'
  5091. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5092. ;;
  5093. sysv4.3*)
  5094. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5095. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5096. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  5097. ;;
  5098. sysv4*MP*)
  5099. if test -d /usr/nec; then
  5100. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5101. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5102. runpath_var=LD_RUN_PATH
  5103. hardcode_runpath_var=yes
  5104. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  5105. fi
  5106. ;;
  5107. sysv4.2uw2*)
  5108. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  5109. _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5110. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  5111. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5112. hardcode_runpath_var=yes
  5113. runpath_var=LD_RUN_PATH
  5114. ;;
  5115. sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
  5116. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
  5117. if test "$GCC" = yes; then
  5118. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5119. else
  5120. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  5121. fi
  5122. runpath_var='LD_RUN_PATH'
  5123. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5124. ;;
  5125. sysv5*)
  5126. _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
  5127. # $CC -shared without GNU ld will not create a library from C++
  5128. # object files and a static libstdc++, better avoid it by now
  5129. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5130. _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  5131. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
  5132. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5133. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5134. runpath_var='LD_RUN_PATH'
  5135. ;;
  5136. uts4*)
  5137. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  5138. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5139. _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5140. ;;
  5141. *)
  5142. _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5143. ;;
  5144. esac
  5145. fi
  5146. ])
  5147. AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
  5148. test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  5149. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  5150. if test "$GCC" = yes; then
  5151. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  5152. fi
  5153. #
  5154. # Do we need to explicitly link libc?
  5155. #
  5156. case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
  5157. x|xyes)
  5158. # Assume -lc should be added
  5159. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  5160. if test "$enable_shared" = yes && test "$GCC" = yes; then
  5161. case $_LT_AC_TAGVAR(archive_cmds, $1) in
  5162. *'~'*)
  5163. # FIXME: we may have to deal with multi-command sequences.
  5164. ;;
  5165. '$CC '*)
  5166. # Test whether the compiler implicitly links with -lc since on some
  5167. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  5168. # to ld, don't add -lc before -lgcc.
  5169. AC_MSG_CHECKING([whether -lc should be explicitly linked in])
  5170. $rm conftest*
  5171. printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  5172. if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  5173. soname=conftest
  5174. lib=conftest
  5175. libobjs=conftest.$ac_objext
  5176. deplibs=
  5177. wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
  5178. compiler_flags=-v
  5179. linker_flags=-v
  5180. verstring=
  5181. output_objdir=.
  5182. libname=conftest
  5183. lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
  5184. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  5185. if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
  5186. then
  5187. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  5188. else
  5189. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  5190. fi
  5191. _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  5192. else
  5193. cat conftest.err 1>&5
  5194. fi
  5195. $rm conftest*
  5196. AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
  5197. ;;
  5198. esac
  5199. fi
  5200. ;;
  5201. esac
  5202. ])# AC_LIBTOOL_PROG_LD_SHLIBS
  5203. # _LT_AC_FILE_LTDLL_C
  5204. # -------------------
  5205. # Be careful that the start marker always follows a newline.
  5206. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
  5207. # /* ltdll.c starts here */
  5208. # #define WIN32_LEAN_AND_MEAN
  5209. # #include <windows.h>
  5210. # #undef WIN32_LEAN_AND_MEAN
  5211. # #include <stdio.h>
  5212. #
  5213. # #ifndef __CYGWIN__
  5214. # # ifdef __CYGWIN32__
  5215. # # define __CYGWIN__ __CYGWIN32__
  5216. # # endif
  5217. # #endif
  5218. #
  5219. # #ifdef __cplusplus
  5220. # extern "C" {
  5221. # #endif
  5222. # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
  5223. # #ifdef __cplusplus
  5224. # }
  5225. # #endif
  5226. #
  5227. # #ifdef __CYGWIN__
  5228. # #include <cygwin/cygwin_dll.h>
  5229. # DECLARE_CYGWIN_DLL( DllMain );
  5230. # #endif
  5231. # HINSTANCE __hDllInstance_base;
  5232. #
  5233. # BOOL APIENTRY
  5234. # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
  5235. # {
  5236. # __hDllInstance_base = hInst;
  5237. # return TRUE;
  5238. # }
  5239. # /* ltdll.c ends here */
  5240. ])# _LT_AC_FILE_LTDLL_C
  5241. # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
  5242. # ---------------------------------
  5243. AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
  5244. # old names
  5245. AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
  5246. AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
  5247. AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
  5248. AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
  5249. AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
  5250. AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
  5251. AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
  5252. # This is just to silence aclocal about the macro not being used
  5253. ifelse([AC_DISABLE_FAST_INSTALL])
  5254. AC_DEFUN([LT_AC_PROG_GCJ],
  5255. [AC_CHECK_TOOL(GCJ, gcj, no)
  5256. test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
  5257. AC_SUBST(GCJFLAGS)
  5258. ])
  5259. AC_DEFUN([LT_AC_PROG_RC],
  5260. [AC_CHECK_TOOL(RC, windres, no)
  5261. ])
  5262. ############################################################
  5263. # NOTE: This macro has been submitted for inclusion into #
  5264. # GNU Autoconf as AC_PROG_SED. When it is available in #
  5265. # a released version of Autoconf we should remove this #
  5266. # macro and use it instead. #
  5267. ############################################################
  5268. # LT_AC_PROG_SED
  5269. # --------------
  5270. # Check for a fully-functional sed program, that truncates
  5271. # as few characters as possible. Prefer GNU sed if found.
  5272. AC_DEFUN([LT_AC_PROG_SED],
  5273. [AC_MSG_CHECKING([for a sed that does not truncate output])
  5274. AC_CACHE_VAL(lt_cv_path_SED,
  5275. [# Loop through the user's path and test for sed and gsed.
  5276. # Then use that list of sed's as ones to test for truncation.
  5277. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  5278. for as_dir in $PATH
  5279. do
  5280. IFS=$as_save_IFS
  5281. test -z "$as_dir" && as_dir=.
  5282. for lt_ac_prog in sed gsed; do
  5283. for ac_exec_ext in '' $ac_executable_extensions; do
  5284. if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  5285. lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  5286. fi
  5287. done
  5288. done
  5289. done
  5290. lt_ac_max=0
  5291. lt_ac_count=0
  5292. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  5293. # along with /bin/sed that truncates output.
  5294. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  5295. test ! -f $lt_ac_sed && break
  5296. cat /dev/null > conftest.in
  5297. lt_ac_count=0
  5298. echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  5299. # Check for GNU sed and select it if it is found.
  5300. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  5301. lt_cv_path_SED=$lt_ac_sed
  5302. break
  5303. fi
  5304. while true; do
  5305. cat conftest.in conftest.in >conftest.tmp
  5306. mv conftest.tmp conftest.in
  5307. cp conftest.in conftest.nl
  5308. echo >>conftest.nl
  5309. $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  5310. cmp -s conftest.out conftest.nl || break
  5311. # 10000 chars as input seems more than enough
  5312. test $lt_ac_count -gt 10 && break
  5313. lt_ac_count=`expr $lt_ac_count + 1`
  5314. if test $lt_ac_count -gt $lt_ac_max; then
  5315. lt_ac_max=$lt_ac_count
  5316. lt_cv_path_SED=$lt_ac_sed
  5317. fi
  5318. done
  5319. done
  5320. SED=$lt_cv_path_SED
  5321. ])
  5322. AC_MSG_RESULT([$SED])
  5323. ])