PageRenderTime 86ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 1ms

/contrib/bind9/libtool.m4

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