Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

6849 lines
238 KiB

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