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.

6585 lines
230 KiB

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