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.

6054 lines
210 KiB

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