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.

6246 lines
216 KiB

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