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.

6163 lines
214 KiB

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