PageRenderTime 149ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 2ms

/contrib/ntp/aclocal.m4

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