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

/Unittests/googletest/aclocal.m4

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