PageRenderTime 90ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 1ms

/aclocal.m4

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