Testing out the PPD42 Air Quality Sensor, with an MSP430 Launchpad and graphing the data with GNUplot.
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.

6600 lines
234 KiB

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