/contrib/bind9/libtool.m4

https://bitbucket.org/freebsd/freebsd-head/ · m4 · 6656 lines · 4709 code · 666 blank · 1281 comment · 0 complexity · bea718707c482a30dbc14533bd2fcd4c MD5 · raw file

Large files are truncated click here to view the full file

  1. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  2. ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007,
  3. ## 2008 Free Software Foundation, Inc.
  4. ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  5. ##
  6. ## This file is free software; the Free Software Foundation gives
  7. ## unlimited permission to copy and/or distribute it, with or without
  8. ## modifications, as long as this notice is preserved.
  9. # serial 52 AC_PROG_LIBTOOL
  10. # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
  11. # -----------------------------------------------------------
  12. # If this macro is not defined by Autoconf, define it here.
  13. m4_ifdef([AC_PROVIDE_IFELSE],
  14. [],
  15. [m4_define([AC_PROVIDE_IFELSE],
  16. [m4_ifdef([AC_PROVIDE_$1],
  17. [$2], [$3])])])
  18. # AC_PROG_LIBTOOL
  19. # ---------------
  20. AC_DEFUN([AC_PROG_LIBTOOL],
  21. [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
  22. dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
  23. dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
  24. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  25. [AC_LIBTOOL_CXX],
  26. [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
  27. ])])
  28. dnl And a similar setup for Fortran 77 support
  29. AC_PROVIDE_IFELSE([AC_PROG_F77],
  30. [AC_LIBTOOL_F77],
  31. [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
  32. ])])
  33. dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
  34. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
  35. dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
  36. AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  37. [AC_LIBTOOL_GCJ],
  38. [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  39. [AC_LIBTOOL_GCJ],
  40. [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
  41. [AC_LIBTOOL_GCJ],
  42. [ifdef([AC_PROG_GCJ],
  43. [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
  44. ifdef([A][M_PROG_GCJ],
  45. [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
  46. ifdef([LT_AC_PROG_GCJ],
  47. [define([LT_AC_PROG_GCJ],
  48. defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
  49. ])])# AC_PROG_LIBTOOL
  50. # _AC_PROG_LIBTOOL
  51. # ----------------
  52. AC_DEFUN([_AC_PROG_LIBTOOL],
  53. [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
  54. AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
  55. AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
  56. AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
  57. # This can be used to rebuild libtool when needed
  58. LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
  59. # Always use our own libtool.
  60. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  61. AC_SUBST(LIBTOOL)dnl
  62. # Prevent multiple expansion
  63. define([AC_PROG_LIBTOOL], [])
  64. ])# _AC_PROG_LIBTOOL
  65. # AC_LIBTOOL_SETUP
  66. # ----------------
  67. AC_DEFUN([AC_LIBTOOL_SETUP],
  68. [AC_PREREQ(2.50)dnl
  69. AC_REQUIRE([AC_ENABLE_SHARED])dnl
  70. AC_REQUIRE([AC_ENABLE_STATIC])dnl
  71. AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
  72. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  73. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  74. AC_REQUIRE([AC_PROG_CC])dnl
  75. AC_REQUIRE([AC_PROG_LD])dnl
  76. AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
  77. AC_REQUIRE([AC_PROG_NM])dnl
  78. AC_REQUIRE([AC_PROG_LN_S])dnl
  79. AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
  80. # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
  81. AC_REQUIRE([AC_OBJEXT])dnl
  82. AC_REQUIRE([AC_EXEEXT])dnl
  83. dnl
  84. AC_LIBTOOL_SYS_MAX_CMD_LEN
  85. AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  86. AC_LIBTOOL_OBJDIR
  87. AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  88. _LT_AC_PROG_ECHO_BACKSLASH
  89. case $host_os in
  90. aix3*)
  91. # AIX sometimes has problems with the GCC collect2 program. For some
  92. # reason, if we set the COLLECT_NAMES environment variable, the problems
  93. # vanish in a puff of smoke.
  94. if test "X${COLLECT_NAMES+set}" != Xset; then
  95. COLLECT_NAMES=
  96. export COLLECT_NAMES
  97. fi
  98. ;;
  99. esac
  100. # Sed substitution that helps us do robust quoting. It backslashifies
  101. # metacharacters that are still active within double-quoted strings.
  102. Xsed='sed -e 1s/^X//'
  103. [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
  104. # Same as above, but do not quote variable references.
  105. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
  106. # Sed substitution to delay expansion of an escaped shell variable in a
  107. # double_quote_subst'ed string.
  108. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  109. # Sed substitution to avoid accidental globbing in evaled expressions
  110. no_glob_subst='s/\*/\\\*/g'
  111. # Constants:
  112. rm="rm -f"
  113. # Global variables:
  114. default_ofile=libtool
  115. can_build_shared=yes
  116. # All known linkers require a `.a' archive for static linking (except MSVC,
  117. # which needs '.lib').
  118. libext=a
  119. ltmain="$ac_aux_dir/ltmain.sh"
  120. ofile="$default_ofile"
  121. with_gnu_ld="$lt_cv_prog_gnu_ld"
  122. AC_CHECK_TOOL(AR, ar, false)
  123. AC_CHECK_TOOL(RANLIB, ranlib, :)
  124. AC_CHECK_TOOL(STRIP, strip, :)
  125. old_CC="$CC"
  126. old_CFLAGS="$CFLAGS"
  127. # Set sane defaults for various variables
  128. test -z "$AR" && AR=ar
  129. test -z "$AR_FLAGS" && AR_FLAGS=cru
  130. test -z "$AS" && AS=as
  131. test -z "$CC" && CC=cc
  132. test -z "$LTCC" && LTCC=$CC
  133. test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
  134. test -z "$DLLTOOL" && DLLTOOL=dlltool
  135. test -z "$LD" && LD=ld
  136. test -z "$LN_S" && LN_S="ln -s"
  137. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  138. test -z "$NM" && NM=nm
  139. test -z "$SED" && SED=sed
  140. test -z "$OBJDUMP" && OBJDUMP=objdump
  141. test -z "$RANLIB" && RANLIB=:
  142. test -z "$STRIP" && STRIP=:
  143. test -z "$ac_objext" && ac_objext=o
  144. # Determine commands to create old-style static archives.
  145. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
  146. old_postinstall_cmds='chmod 644 $oldlib'
  147. old_postuninstall_cmds=
  148. if test -n "$RANLIB"; then
  149. case $host_os in
  150. openbsd*)
  151. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
  152. ;;
  153. *)
  154. old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
  155. ;;
  156. esac
  157. old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
  158. fi
  159. _LT_CC_BASENAME([$compiler])
  160. # Only perform the check for file, if the check method requires it
  161. case $deplibs_check_method in
  162. file_magic*)
  163. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  164. AC_PATH_MAGIC
  165. fi
  166. ;;
  167. esac
  168. _LT_REQUIRED_DARWIN_CHECKS
  169. AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
  170. AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
  171. enable_win32_dll=yes, enable_win32_dll=no)
  172. AC_ARG_ENABLE([libtool-lock],
  173. [AC_HELP_STRING([--disable-libtool-lock],
  174. [avoid locking (might break parallel builds)])])
  175. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  176. AC_ARG_WITH([pic],
  177. [AC_HELP_STRING([--with-pic],
  178. [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
  179. [pic_mode="$withval"],
  180. [pic_mode=default])
  181. test -z "$pic_mode" && pic_mode=default
  182. # Use C for the default configuration in the libtool script
  183. tagname=
  184. AC_LIBTOOL_LANG_C_CONFIG
  185. _LT_AC_TAGCONFIG
  186. ])# AC_LIBTOOL_SETUP
  187. # _LT_AC_SYS_COMPILER
  188. # -------------------
  189. AC_DEFUN([_LT_AC_SYS_COMPILER],
  190. [AC_REQUIRE([AC_PROG_CC])dnl
  191. # If no C compiler was specified, use CC.
  192. LTCC=${LTCC-"$CC"}
  193. # If no C compiler flags were specified, use CFLAGS.
  194. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  195. # Allow CC to be a program name with arguments.
  196. compiler=$CC
  197. ])# _LT_AC_SYS_COMPILER
  198. # _LT_CC_BASENAME(CC)
  199. # -------------------
  200. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  201. AC_DEFUN([_LT_CC_BASENAME],
  202. [for cc_temp in $1""; do
  203. case $cc_temp in
  204. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  205. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  206. \-*) ;;
  207. *) break;;
  208. esac
  209. done
  210. cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
  211. ])
  212. # _LT_COMPILER_BOILERPLATE
  213. # ------------------------
  214. # Check for compiler boilerplate output or warnings with
  215. # the simple compiler test code.
  216. AC_DEFUN([_LT_COMPILER_BOILERPLATE],
  217. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  218. ac_outfile=conftest.$ac_objext
  219. echo "$lt_simple_compile_test_code" >conftest.$ac_ext
  220. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  221. _lt_compiler_boilerplate=`cat conftest.err`
  222. $rm conftest*
  223. ])# _LT_COMPILER_BOILERPLATE
  224. # _LT_LINKER_BOILERPLATE
  225. # ----------------------
  226. # Check for linker boilerplate output or warnings with
  227. # the simple link test code.
  228. AC_DEFUN([_LT_LINKER_BOILERPLATE],
  229. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  230. ac_outfile=conftest.$ac_objext
  231. echo "$lt_simple_link_test_code" >conftest.$ac_ext
  232. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  233. _lt_linker_boilerplate=`cat conftest.err`
  234. $rm -r conftest*
  235. ])# _LT_LINKER_BOILERPLATE
  236. # _LT_REQUIRED_DARWIN_CHECKS
  237. # --------------------------
  238. # Check for some things on darwin
  239. AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
  240. case $host_os in
  241. rhapsody* | darwin*)
  242. AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
  243. AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
  244. AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
  245. [lt_cv_apple_cc_single_mod=no
  246. if test -z "${LT_MULTI_MODULE}"; then
  247. # By default we will add the -single_module flag. You can override
  248. # by either setting the environment variable LT_MULTI_MODULE
  249. # non-empty at configure time, or by adding -multi_module to the
  250. # link flags.
  251. echo "int foo(void){return 1;}" > conftest.c
  252. $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
  253. -dynamiclib ${wl}-single_module conftest.c
  254. if test -f libconftest.dylib; then
  255. lt_cv_apple_cc_single_mod=yes
  256. rm -rf libconftest.dylib*
  257. fi
  258. rm conftest.c
  259. fi])
  260. AC_CACHE_CHECK([for -exported_symbols_list linker flag],
  261. [lt_cv_ld_exported_symbols_list],
  262. [lt_cv_ld_exported_symbols_list=no
  263. save_LDFLAGS=$LDFLAGS
  264. echo "_main" > conftest.sym
  265. LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
  266. AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
  267. [lt_cv_ld_exported_symbols_list=yes],
  268. [lt_cv_ld_exported_symbols_list=no])
  269. LDFLAGS="$save_LDFLAGS"
  270. ])
  271. case $host_os in
  272. rhapsody* | darwin1.[[0123]])
  273. _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
  274. darwin1.*)
  275. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  276. darwin*)
  277. # if running on 10.5 or later, the deployment target defaults
  278. # to the OS version, if on x86, and 10.4, the deployment
  279. # target defaults to 10.4. Don't you love it?
  280. case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
  281. 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
  282. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  283. 10.[[012]]*)
  284. _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
  285. 10.*)
  286. _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
  287. esac
  288. ;;
  289. esac
  290. if test "$lt_cv_apple_cc_single_mod" = "yes"; then
  291. _lt_dar_single_mod='$single_module'
  292. fi
  293. if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
  294. _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
  295. else
  296. _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
  297. fi
  298. if test "$DSYMUTIL" != ":"; then
  299. _lt_dsymutil="~$DSYMUTIL \$lib || :"
  300. else
  301. _lt_dsymutil=
  302. fi
  303. ;;
  304. esac
  305. ])
  306. # _LT_AC_SYS_LIBPATH_AIX
  307. # ----------------------
  308. # Links a minimal program and checks the executable
  309. # for the system default hardcoded library path. In most cases,
  310. # this is /usr/lib:/lib, but when the MPI compilers are used
  311. # the location of the communication and MPI libs are included too.
  312. # If we don't find anything, use the default library path according
  313. # to the aix ld manual.
  314. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
  315. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  316. AC_LINK_IFELSE(AC_LANG_PROGRAM,[
  317. lt_aix_libpath_sed='
  318. /Import File Strings/,/^$/ {
  319. /^0/ {
  320. s/^0 *\(.*\)$/\1/
  321. p
  322. }
  323. }'
  324. aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  325. # Check for a 64-bit object if we didn't find anything.
  326. if test -z "$aix_libpath"; then
  327. aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
  328. fi],[])
  329. if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  330. ])# _LT_AC_SYS_LIBPATH_AIX
  331. # _LT_AC_SHELL_INIT(ARG)
  332. # ----------------------
  333. AC_DEFUN([_LT_AC_SHELL_INIT],
  334. [ifdef([AC_DIVERSION_NOTICE],
  335. [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
  336. [AC_DIVERT_PUSH(NOTICE)])
  337. $1
  338. AC_DIVERT_POP
  339. ])# _LT_AC_SHELL_INIT
  340. # _LT_AC_PROG_ECHO_BACKSLASH
  341. # --------------------------
  342. # Add some code to the start of the generated configure script which
  343. # will find an echo command which doesn't interpret backslashes.
  344. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
  345. [_LT_AC_SHELL_INIT([
  346. # Check that we are running under the correct shell.
  347. SHELL=${CONFIG_SHELL-/bin/sh}
  348. case X$ECHO in
  349. X*--fallback-echo)
  350. # Remove one level of quotation (which was required for Make).
  351. ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
  352. ;;
  353. esac
  354. echo=${ECHO-echo}
  355. if test "X[$]1" = X--no-reexec; then
  356. # Discard the --no-reexec flag, and continue.
  357. shift
  358. elif test "X[$]1" = X--fallback-echo; then
  359. # Avoid inline document here, it may be left over
  360. :
  361. elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
  362. # Yippee, $echo works!
  363. :
  364. else
  365. # Restart under the correct shell.
  366. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
  367. fi
  368. if test "X[$]1" = X--fallback-echo; then
  369. # used as fallback echo
  370. shift
  371. cat <<EOF
  372. [$]*
  373. EOF
  374. exit 0
  375. fi
  376. # The HP-UX ksh and POSIX shell print the target directory to stdout
  377. # if CDPATH is set.
  378. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  379. if test -z "$ECHO"; then
  380. if test "X${echo_test_string+set}" != Xset; then
  381. # find a string as large as possible, as long as the shell can cope with it
  382. for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
  383. # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
  384. if (echo_test_string=`eval $cmd`) 2>/dev/null &&
  385. echo_test_string=`eval $cmd` &&
  386. (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
  387. then
  388. break
  389. fi
  390. done
  391. fi
  392. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  393. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  394. test "X$echo_testing_string" = "X$echo_test_string"; then
  395. :
  396. else
  397. # The Solaris, AIX, and Digital Unix default echo programs unquote
  398. # backslashes. This makes it impossible to quote backslashes using
  399. # echo "$something" | sed 's/\\/\\\\/g'
  400. #
  401. # So, first we look for a working echo in the user's PATH.
  402. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  403. for dir in $PATH /usr/ucb; do
  404. IFS="$lt_save_ifs"
  405. if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  406. test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
  407. echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
  408. test "X$echo_testing_string" = "X$echo_test_string"; then
  409. echo="$dir/echo"
  410. break
  411. fi
  412. done
  413. IFS="$lt_save_ifs"
  414. if test "X$echo" = Xecho; then
  415. # We didn't find a better echo, so look for alternatives.
  416. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
  417. echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
  418. test "X$echo_testing_string" = "X$echo_test_string"; then
  419. # This shell has a builtin print -r that does the trick.
  420. echo='print -r'
  421. elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
  422. test "X$CONFIG_SHELL" != X/bin/ksh; then
  423. # If we have ksh, try running configure again with it.
  424. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  425. export ORIGINAL_CONFIG_SHELL
  426. CONFIG_SHELL=/bin/ksh
  427. export CONFIG_SHELL
  428. exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
  429. else
  430. # Try using printf.
  431. echo='printf %s\n'
  432. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  433. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  434. test "X$echo_testing_string" = "X$echo_test_string"; then
  435. # Cool, printf works
  436. :
  437. elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  438. test "X$echo_testing_string" = 'X\t' &&
  439. echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  440. test "X$echo_testing_string" = "X$echo_test_string"; then
  441. CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
  442. export CONFIG_SHELL
  443. SHELL="$CONFIG_SHELL"
  444. export SHELL
  445. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  446. elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  447. test "X$echo_testing_string" = 'X\t' &&
  448. echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  449. test "X$echo_testing_string" = "X$echo_test_string"; then
  450. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  451. else
  452. # maybe with a smaller string...
  453. prev=:
  454. for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
  455. if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
  456. then
  457. break
  458. fi
  459. prev="$cmd"
  460. done
  461. if test "$prev" != 'sed 50q "[$]0"'; then
  462. echo_test_string=`eval $prev`
  463. export echo_test_string
  464. exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
  465. else
  466. # Oops. We lost completely, so just stick with echo.
  467. echo=echo
  468. fi
  469. fi
  470. fi
  471. fi
  472. fi
  473. fi
  474. # Copy echo and quote the copy suitably for passing to libtool from
  475. # the Makefile, instead of quoting the original, which is used later.
  476. ECHO=$echo
  477. if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
  478. ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
  479. fi
  480. AC_SUBST(ECHO)
  481. ])])# _LT_AC_PROG_ECHO_BACKSLASH
  482. # _LT_AC_LOCK
  483. # -----------
  484. AC_DEFUN([_LT_AC_LOCK],
  485. [AC_ARG_ENABLE([libtool-lock],
  486. [AC_HELP_STRING([--disable-libtool-lock],
  487. [avoid locking (might break parallel builds)])])
  488. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  489. # Some flags need to be propagated to the compiler or linker for good
  490. # libtool support.
  491. case $host in
  492. ia64-*-hpux*)
  493. # Find out which ABI we are using.
  494. echo 'int i;' > conftest.$ac_ext
  495. if AC_TRY_EVAL(ac_compile); then
  496. case `/usr/bin/file conftest.$ac_objext` in
  497. *ELF-32*)
  498. HPUX_IA64_MODE="32"
  499. ;;
  500. *ELF-64*)
  501. HPUX_IA64_MODE="64"
  502. ;;
  503. esac
  504. fi
  505. rm -rf conftest*
  506. ;;
  507. *-*-irix6*)
  508. # Find out which ABI we are using.
  509. echo '[#]line __oline__ "configure"' > conftest.$ac_ext
  510. if AC_TRY_EVAL(ac_compile); then
  511. if test "$lt_cv_prog_gnu_ld" = yes; then
  512. case `/usr/bin/file conftest.$ac_objext` in
  513. *32-bit*)
  514. LD="${LD-ld} -melf32bsmip"
  515. ;;
  516. *N32*)
  517. LD="${LD-ld} -melf32bmipn32"
  518. ;;
  519. *64-bit*)
  520. LD="${LD-ld} -melf64bmip"
  521. ;;
  522. esac
  523. else
  524. case `/usr/bin/file conftest.$ac_objext` in
  525. *32-bit*)
  526. LD="${LD-ld} -32"
  527. ;;
  528. *N32*)
  529. LD="${LD-ld} -n32"
  530. ;;
  531. *64-bit*)
  532. LD="${LD-ld} -64"
  533. ;;
  534. esac
  535. fi
  536. fi
  537. rm -rf conftest*
  538. ;;
  539. x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
  540. s390*-*linux*|sparc*-*linux*)
  541. # Find out which ABI we are using.
  542. echo 'int i;' > conftest.$ac_ext
  543. if AC_TRY_EVAL(ac_compile); then
  544. case `/usr/bin/file conftest.o` in
  545. *32-bit*)
  546. case $host in
  547. x86_64-*kfreebsd*-gnu)
  548. LD="${LD-ld} -m elf_i386_fbsd"
  549. ;;
  550. x86_64-*linux*)
  551. LD="${LD-ld} -m elf_i386"
  552. ;;
  553. ppc64-*linux*|powerpc64-*linux*)
  554. LD="${LD-ld} -m elf32ppclinux"
  555. ;;
  556. s390x-*linux*)
  557. LD="${LD-ld} -m elf_s390"
  558. ;;
  559. sparc64-*linux*)
  560. LD="${LD-ld} -m elf32_sparc"
  561. ;;
  562. esac
  563. ;;
  564. *64-bit*)
  565. case $host in
  566. x86_64-*kfreebsd*-gnu)
  567. LD="${LD-ld} -m elf_x86_64_fbsd"
  568. ;;
  569. x86_64-*linux*)
  570. LD="${LD-ld} -m elf_x86_64"
  571. ;;
  572. ppc*-*linux*|powerpc*-*linux*)
  573. LD="${LD-ld} -m elf64ppc"
  574. ;;
  575. s390*-*linux*)
  576. LD="${LD-ld} -m elf64_s390"
  577. ;;
  578. sparc*-*linux*)
  579. LD="${LD-ld} -m elf64_sparc"
  580. ;;
  581. esac
  582. ;;
  583. esac
  584. fi
  585. rm -rf conftest*
  586. ;;
  587. *-*-sco3.2v5*)
  588. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  589. SAVE_CFLAGS="$CFLAGS"
  590. CFLAGS="$CFLAGS -belf"
  591. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  592. [AC_LANG_PUSH(C)
  593. AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  594. AC_LANG_POP])
  595. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  596. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  597. CFLAGS="$SAVE_CFLAGS"
  598. fi
  599. ;;
  600. sparc*-*solaris*)
  601. # Find out which ABI we are using.
  602. echo 'int i;' > conftest.$ac_ext
  603. if AC_TRY_EVAL(ac_compile); then
  604. case `/usr/bin/file conftest.o` in
  605. *64-bit*)
  606. case $lt_cv_prog_gnu_ld in
  607. yes*) LD="${LD-ld} -m elf64_sparc" ;;
  608. *)
  609. if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
  610. LD="${LD-ld} -64"
  611. fi
  612. ;;
  613. esac
  614. ;;
  615. esac
  616. fi
  617. rm -rf conftest*
  618. ;;
  619. AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
  620. [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
  621. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  622. AC_CHECK_TOOL(AS, as, false)
  623. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  624. ;;
  625. ])
  626. esac
  627. need_locks="$enable_libtool_lock"
  628. ])# _LT_AC_LOCK
  629. # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  630. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  631. # ----------------------------------------------------------------
  632. # Check whether the given compiler option works
  633. AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
  634. [AC_REQUIRE([LT_AC_PROG_SED])
  635. AC_CACHE_CHECK([$1], [$2],
  636. [$2=no
  637. ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  638. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  639. lt_compiler_flag="$3"
  640. # Insert the option either (1) after the last *FLAGS variable, or
  641. # (2) before a word containing "conftest.", or (3) at the end.
  642. # Note that $ac_compile itself does not contain backslashes and begins
  643. # with a dollar sign (not a hyphen), so the echo should work correctly.
  644. # The option is referenced via a variable to avoid confusing sed.
  645. lt_compile=`echo "$ac_compile" | $SED \
  646. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  647. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  648. -e 's:$: $lt_compiler_flag:'`
  649. (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  650. (eval "$lt_compile" 2>conftest.err)
  651. ac_status=$?
  652. cat conftest.err >&AS_MESSAGE_LOG_FD
  653. echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  654. if (exit $ac_status) && test -s "$ac_outfile"; then
  655. # The compiler can only warn and ignore the option if not recognized
  656. # So say no if there are warnings other than the usual output.
  657. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
  658. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  659. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  660. $2=yes
  661. fi
  662. fi
  663. $rm conftest*
  664. ])
  665. if test x"[$]$2" = xyes; then
  666. ifelse([$5], , :, [$5])
  667. else
  668. ifelse([$6], , :, [$6])
  669. fi
  670. ])# AC_LIBTOOL_COMPILER_OPTION
  671. # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  672. # [ACTION-SUCCESS], [ACTION-FAILURE])
  673. # ------------------------------------------------------------
  674. # Check whether the given compiler option works
  675. AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
  676. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  677. AC_CACHE_CHECK([$1], [$2],
  678. [$2=no
  679. save_LDFLAGS="$LDFLAGS"
  680. LDFLAGS="$LDFLAGS $3"
  681. echo "$lt_simple_link_test_code" > conftest.$ac_ext
  682. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  683. # The linker can only warn and ignore the option if not recognized
  684. # So say no if there are warnings
  685. if test -s conftest.err; then
  686. # Append any errors to the config.log.
  687. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  688. $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
  689. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  690. if diff conftest.exp conftest.er2 >/dev/null; then
  691. $2=yes
  692. fi
  693. else
  694. $2=yes
  695. fi
  696. fi
  697. $rm -r conftest*
  698. LDFLAGS="$save_LDFLAGS"
  699. ])
  700. if test x"[$]$2" = xyes; then
  701. ifelse([$4], , :, [$4])
  702. else
  703. ifelse([$5], , :, [$5])
  704. fi
  705. ])# AC_LIBTOOL_LINKER_OPTION
  706. # AC_LIBTOOL_SYS_MAX_CMD_LEN
  707. # --------------------------
  708. AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
  709. [# find the maximum length of command line arguments
  710. AC_MSG_CHECKING([the maximum length of command line arguments])
  711. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  712. i=0
  713. teststring="ABCD"
  714. case $build_os in
  715. msdosdjgpp*)
  716. # On DJGPP, this test can blow up pretty badly due to problems in libc
  717. # (any single argument exceeding 2000 bytes causes a buffer overrun
  718. # during glob expansion). Even if it were fixed, the result of this
  719. # check would be larger than it should be.
  720. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  721. ;;
  722. gnu*)
  723. # Under GNU Hurd, this test is not required because there is
  724. # no limit to the length of command line arguments.
  725. # Libtool will interpret -1 as no limit whatsoever
  726. lt_cv_sys_max_cmd_len=-1;
  727. ;;
  728. cygwin* | mingw*)
  729. # On Win9x/ME, this test blows up -- it succeeds, but takes
  730. # about 5 minutes as the teststring grows exponentially.
  731. # Worse, since 9x/ME are not pre-emptively multitasking,
  732. # you end up with a "frozen" computer, even though with patience
  733. # the test eventually succeeds (with a max line length of 256k).
  734. # Instead, let's just punt: use the minimum linelength reported by
  735. # all of the supported platforms: 8192 (on NT/2K/XP).
  736. lt_cv_sys_max_cmd_len=8192;
  737. ;;
  738. amigaos*)
  739. # On AmigaOS with pdksh, this test takes hours, literally.
  740. # So we just punt and use a minimum line length of 8192.
  741. lt_cv_sys_max_cmd_len=8192;
  742. ;;
  743. netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
  744. # This has been around since 386BSD, at least. Likely further.
  745. if test -x /sbin/sysctl; then
  746. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  747. elif test -x /usr/sbin/sysctl; then
  748. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  749. else
  750. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  751. fi
  752. # And add a safety zone
  753. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  754. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  755. ;;
  756. interix*)
  757. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  758. lt_cv_sys_max_cmd_len=196608
  759. ;;
  760. osf*)
  761. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  762. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  763. # nice to cause kernel panics so lets avoid the loop below.
  764. # First set a reasonable default.
  765. lt_cv_sys_max_cmd_len=16384
  766. #
  767. if test -x /sbin/sysconfig; then
  768. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  769. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  770. esac
  771. fi
  772. ;;
  773. sco3.2v5*)
  774. lt_cv_sys_max_cmd_len=102400
  775. ;;
  776. sysv5* | sco5v6* | sysv4.2uw2*)
  777. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  778. if test -n "$kargmax"; then
  779. lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
  780. else
  781. lt_cv_sys_max_cmd_len=32768
  782. fi
  783. ;;
  784. *)
  785. lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
  786. if test -n "$lt_cv_sys_max_cmd_len"; then
  787. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  788. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  789. else
  790. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  791. while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
  792. = "XX$teststring") >/dev/null 2>&1 &&
  793. new_result=`expr "X$teststring" : ".*" 2>&1` &&
  794. lt_cv_sys_max_cmd_len=$new_result &&
  795. test $i != 17 # 1/2 MB should be enough
  796. do
  797. i=`expr $i + 1`
  798. teststring=$teststring$teststring
  799. done
  800. teststring=
  801. # Add a significant safety factor because C++ compilers can tack on massive
  802. # amounts of additional arguments before passing them to the linker.
  803. # It appears as though 1/2 is a usable value.
  804. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  805. fi
  806. ;;
  807. esac
  808. ])
  809. if test -n $lt_cv_sys_max_cmd_len ; then
  810. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  811. else
  812. AC_MSG_RESULT(none)
  813. fi
  814. ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
  815. # _LT_AC_CHECK_DLFCN
  816. # ------------------
  817. AC_DEFUN([_LT_AC_CHECK_DLFCN],
  818. [AC_CHECK_HEADERS(dlfcn.h)dnl
  819. ])# _LT_AC_CHECK_DLFCN
  820. # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  821. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  822. # ---------------------------------------------------------------------
  823. AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
  824. [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  825. if test "$cross_compiling" = yes; then :
  826. [$4]
  827. else
  828. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  829. lt_status=$lt_dlunknown
  830. cat > conftest.$ac_ext <<EOF
  831. [#line __oline__ "configure"
  832. #include "confdefs.h"
  833. #if HAVE_DLFCN_H
  834. #include <dlfcn.h>
  835. #endif
  836. #include <stdio.h>
  837. #ifdef RTLD_GLOBAL
  838. # define LT_DLGLOBAL RTLD_GLOBAL
  839. #else
  840. # ifdef DL_GLOBAL
  841. # define LT_DLGLOBAL DL_GLOBAL
  842. # else
  843. # define LT_DLGLOBAL 0
  844. # endif
  845. #endif
  846. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  847. find out it does not work in some platform. */
  848. #ifndef LT_DLLAZY_OR_NOW
  849. # ifdef RTLD_LAZY
  850. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  851. # else
  852. # ifdef DL_LAZY
  853. # define LT_DLLAZY_OR_NOW DL_LAZY
  854. # else
  855. # ifdef RTLD_NOW
  856. # define LT_DLLAZY_OR_NOW RTLD_NOW
  857. # else
  858. # ifdef DL_NOW
  859. # define LT_DLLAZY_OR_NOW DL_NOW
  860. # else
  861. # define LT_DLLAZY_OR_NOW 0
  862. # endif
  863. # endif
  864. # endif
  865. # endif
  866. #endif
  867. #ifdef __cplusplus
  868. extern "C" void exit (int);
  869. #endif
  870. void fnord() { int i=42;}
  871. int main ()
  872. {
  873. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  874. int status = $lt_dlunknown;
  875. if (self)
  876. {
  877. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  878. else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  879. /* dlclose (self); */
  880. }
  881. else
  882. puts (dlerror ());
  883. exit (status);
  884. }]
  885. EOF
  886. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  887. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  888. lt_status=$?
  889. case x$lt_status in
  890. x$lt_dlno_uscore) $1 ;;
  891. x$lt_dlneed_uscore) $2 ;;
  892. x$lt_dlunknown|x*) $3 ;;
  893. esac
  894. else :
  895. # compilation failed
  896. $3
  897. fi
  898. fi
  899. rm -fr conftest*
  900. ])# _LT_AC_TRY_DLOPEN_SELF
  901. # AC_LIBTOOL_DLOPEN_SELF
  902. # ----------------------
  903. AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
  904. [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  905. if test "x$enable_dlopen" != xyes; then
  906. enable_dlopen=unknown
  907. enable_dlopen_self=unknown
  908. enable_dlopen_self_static=unknown
  909. else
  910. lt_cv_dlopen=no
  911. lt_cv_dlopen_libs=
  912. case $host_os in
  913. beos*)
  914. lt_cv_dlopen="load_add_on"
  915. lt_cv_dlopen_libs=
  916. lt_cv_dlopen_self=yes
  917. ;;
  918. mingw* | pw32*)
  919. lt_cv_dlopen="LoadLibrary"
  920. lt_cv_dlopen_libs=
  921. ;;
  922. cygwin*)
  923. lt_cv_dlopen="dlopen"
  924. lt_cv_dlopen_libs=
  925. ;;
  926. darwin*)
  927. # if libdl is installed we need to link against it
  928. AC_CHECK_LIB([dl], [dlopen],
  929. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
  930. lt_cv_dlopen="dyld"
  931. lt_cv_dlopen_libs=
  932. lt_cv_dlopen_self=yes
  933. ])
  934. ;;
  935. *)
  936. AC_CHECK_FUNC([shl_load],
  937. [lt_cv_dlopen="shl_load"],
  938. [AC_CHECK_LIB([dld], [shl_load],
  939. [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
  940. [AC_CHECK_FUNC([dlopen],
  941. [lt_cv_dlopen="dlopen"],
  942. [AC_CHECK_LIB([dl], [dlopen],
  943. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  944. [AC_CHECK_LIB([svld], [dlopen],
  945. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  946. [AC_CHECK_LIB([dld], [dld_link],
  947. [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
  948. ])
  949. ])
  950. ])
  951. ])
  952. ])
  953. ;;
  954. esac
  955. if test "x$lt_cv_dlopen" != xno; then
  956. enable_dlopen=yes
  957. else
  958. enable_dlopen=no
  959. fi
  960. case $lt_cv_dlopen in
  961. dlopen)
  962. save_CPPFLAGS="$CPPFLAGS"
  963. test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  964. save_LDFLAGS="$LDFLAGS"
  965. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  966. save_LIBS="$LIBS"
  967. LIBS="$lt_cv_dlopen_libs $LIBS"
  968. AC_CACHE_CHECK([whether a program can dlopen itself],
  969. lt_cv_dlopen_self, [dnl
  970. _LT_AC_TRY_DLOPEN_SELF(
  971. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  972. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  973. ])
  974. if test "x$lt_cv_dlopen_self" = xyes; then
  975. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  976. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  977. lt_cv_dlopen_self_static, [dnl
  978. _LT_AC_TRY_DLOPEN_SELF(
  979. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  980. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  981. ])
  982. fi
  983. CPPFLAGS="$save_CPPFLAGS"
  984. LDFLAGS="$save_LDFLAGS"
  985. LIBS="$save_LIBS"
  986. ;;
  987. esac
  988. case $lt_cv_dlopen_self in
  989. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  990. *) enable_dlopen_self=unknown ;;
  991. esac
  992. case $lt_cv_dlopen_self_static in
  993. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  994. *) enable_dlopen_self_static=unknown ;;
  995. esac
  996. fi
  997. ])# AC_LIBTOOL_DLOPEN_SELF
  998. # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
  999. # ---------------------------------
  1000. # Check to see if options -c and -o are simultaneously supported by compiler
  1001. AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
  1002. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  1003. AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  1004. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  1005. [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  1006. [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  1007. $rm -r conftest 2>/dev/null
  1008. mkdir conftest
  1009. cd conftest
  1010. mkdir out
  1011. echo "$lt_simple_compile_test_code" > conftest.$ac_ext
  1012. lt_compiler_flag="-o out/conftest2.$ac_objext"
  1013. # Insert the option either (1) after the last *FLAGS variable, or
  1014. # (2) before a word containing "conftest.", or (3) at the end.
  1015. # Note that $ac_compile itself does not contain backslashes and begins
  1016. # with a dollar sign (not a hyphen), so the echo should work correctly.
  1017. lt_compile=`echo "$ac_compile" | $SED \
  1018. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  1019. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1020. -e 's:$: $lt_compiler_flag:'`
  1021. (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1022. (eval "$lt_compile" 2>out/conftest.err)
  1023. ac_status=$?
  1024. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  1025. echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1026. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  1027. then
  1028. # The compiler can only warn and ignore the option if not recognized
  1029. # So say no if there are warnings
  1030. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
  1031. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  1032. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  1033. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  1034. fi
  1035. fi
  1036. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  1037. $rm conftest*
  1038. # SGI C++ compiler will create directory out/ii_files/ for
  1039. # template instantiation
  1040. test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
  1041. $rm out/* && rmdir out
  1042. cd ..
  1043. rmdir conftest
  1044. $rm conftest*
  1045. ])
  1046. ])# AC_LIBTOOL_PROG_CC_C_O
  1047. # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
  1048. # -----------------------------------------
  1049. # Check to see if we can do hard links to lock some files if needed
  1050. AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
  1051. [AC_REQUIRE([_LT_AC_LOCK])dnl
  1052. hard_links="nottested"
  1053. if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
  1054. # do not overwrite the value of need_locks provided by the user
  1055. AC_MSG_CHECKING([if we can lock with hard links])
  1056. hard_links=yes
  1057. $rm conftest*
  1058. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1059. touch conftest.a
  1060. ln conftest.a conftest.b 2>&5 || hard_links=no
  1061. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1062. AC_MSG_RESULT([$hard_links])
  1063. if test "$hard_links" = no; then
  1064. AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
  1065. need_locks=warn
  1066. fi
  1067. else
  1068. need_locks=no
  1069. fi
  1070. ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
  1071. # AC_LIBTOOL_OBJDIR
  1072. # -----------------
  1073. AC_DEFUN([AC_LIBTOOL_OBJDIR],
  1074. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  1075. [rm -f .libs 2>/dev/null
  1076. mkdir .libs 2>/dev/null
  1077. if test -d .libs; then
  1078. lt_cv_objdir=.libs
  1079. else
  1080. # MS-DOS does not allow filenames that begin with a dot.
  1081. lt_cv_objdir=_libs
  1082. fi
  1083. rmdir .libs 2>/dev/null])
  1084. objdir=$lt_cv_objdir
  1085. ])# AC_LIBTOOL_OBJDIR
  1086. # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
  1087. # ----------------------------------------------
  1088. # Check hardcoding attributes.
  1089. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
  1090. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  1091. _LT_AC_TAGVAR(hardcode_action, $1)=
  1092. if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
  1093. test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
  1094. test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
  1095. # We can hardcode non-existant directories.
  1096. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
  1097. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  1098. # have to relink, otherwise we might link with an installed library
  1099. # when we should be linking with a yet-to-be-installed one
  1100. ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
  1101. test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
  1102. # Linking always hardcodes the temporary library directory.
  1103. _LT_AC_TAGVAR(hardcode_action, $1)=relink
  1104. else
  1105. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  1106. _LT_AC_TAGVAR(hardcode_action, $1)=immediate
  1107. fi
  1108. else
  1109. # We cannot hardcode anything, or else we can only hardcode existing
  1110. # directories.
  1111. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
  1112. fi
  1113. AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
  1114. if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
  1115. # Fast installation is not supported
  1116. enable_fast_install=no
  1117. elif test "$shlibpath_overrides_runpath" = yes ||
  1118. test "$enable_shared" = no; then
  1119. # Fast installation is not necessary
  1120. enable_fast_install=needless
  1121. fi
  1122. ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
  1123. # AC_LIBTOOL_SYS_LIB_STRIP
  1124. # ------------------------
  1125. AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
  1126. [striplib=
  1127. old_striplib=
  1128. AC_MSG_CHECKING([whether stripping libraries is possible])
  1129. if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
  1130. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  1131. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  1132. AC_MSG_RESULT([yes])
  1133. else
  1134. # FIXME - insert some real tests, host_os isn't really good enough
  1135. case $host_os in
  1136. darwin*)
  1137. if test -n "$STRIP" ; then
  1138. striplib="$STRIP -x"
  1139. old_striplib="$STRIP -S"
  1140. AC_MSG_RESULT([yes])
  1141. else
  1142. AC_MSG_RESULT([no])
  1143. fi
  1144. ;;
  1145. *)
  1146. AC_MSG_RESULT([no])
  1147. ;;
  1148. esac
  1149. fi
  1150. ])# AC_LIBTOOL_SYS_LIB_STRIP
  1151. # AC_LIBTOOL_SYS_DYNAMIC_LINKER
  1152. # -----------------------------
  1153. # PORTME Fill in your ld.so characteristics
  1154. AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
  1155. [AC_REQUIRE([LT_AC_PROG_SED])dnl
  1156. AC_MSG_CHECKING([dynamic linker characteristics])
  1157. library_names_spec=
  1158. libname_spec='lib$name'
  1159. soname_spec=
  1160. shrext_cmds=".so"
  1161. postinstall_cmds=
  1162. postuninstall_cmds=
  1163. finish_cmds=
  1164. finish_eval=
  1165. shlibpath_var=
  1166. shlibpath_overrides_runpath=unknown
  1167. version_type=none
  1168. dynamic_linker="$host_os ld.so"
  1169. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  1170. m4_if($1,[],[
  1171. if test "$GCC" = yes; then
  1172. case $host_os in
  1173. darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
  1174. *) lt_awk_arg="/^libraries:/" ;;
  1175. esac
  1176. lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  1177. if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
  1178. # if the path contains ";" then we assume it to be the separator
  1179. # otherwise default to the standard path separator (i.e. ":") - it is
  1180. # assumed that no part of a normal pathname contains ";" but that should
  1181. # okay in the real world where ";" in dirpaths is itself problematic.
  1182. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
  1183. else
  1184. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  1185. fi
  1186. # Ok, now we have the path, separated by spaces, we can step through it
  1187. # and add multilib dir if necessary.
  1188. lt_tmp_lt_search_path_spec=
  1189. lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
  1190. for lt_sys_path in $lt_search_path_spec; do
  1191. if test -d "$lt_sys_path/$lt_multi_os_dir"; then
  1192. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
  1193. else
  1194. test -d "$lt_sys_path" && \
  1195. lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
  1196. fi
  1197. done
  1198. lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
  1199. BEGIN {RS=" "; FS="/|\n";} {
  1200. lt_foo="";
  1201. lt_count=0;
  1202. for (lt_i = NF; lt_i > 0; lt_i--) {
  1203. if ($lt_i != "" && $lt_i != ".") {
  1204. if ($lt_i == "..") {
  1205. lt_count++;
  1206. } else {
  1207. if (lt_count == 0) {
  1208. lt_foo="/" $lt_i lt_foo;
  1209. } else {
  1210. lt_count--;
  1211. }
  1212. }
  1213. }
  1214. }
  1215. if (lt_foo != "") { lt_freq[[lt_foo]]++; }
  1216. if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
  1217. }'`
  1218. sys_lib_search_path_spec=`echo $lt_search_path_spec`
  1219. else
  1220. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  1221. fi])
  1222. need_lib_prefix=unknown
  1223. hardcode_into_libs=no
  1224. # when you set need_version to no, make sure it does not cause -set_version
  1225. # flags to be left without arguments
  1226. need_version=unknown
  1227. case $host_os in
  1228. aix3*)
  1229. version_type=linux
  1230. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  1231. shlibpath_var=LIBPATH
  1232. # AIX 3 has no versioning support, so we append a major version to the name.
  1233. soname_spec='${libname}${release}${shared_ext}$major'
  1234. ;;
  1235. aix[[4-9]]*)
  1236. version_type=linux
  1237. need_lib_prefix=no
  1238. need_version=no
  1239. hardcode_into_libs=yes
  1240. if test "$host_cpu" = ia64; then
  1241. # AIX 5 supports IA64
  1242. library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  1243. shlibpath_var=LD_LIBRARY_PATH
  1244. else
  1245. # With GCC up to 2.95.x, collect2 would create an import file
  1246. # for dependence libraries. The import file would start with
  1247. # the line `#! .'. This would cause the generated library to
  1248. # depend on `.', always an invalid library. This was fixed in
  1249. # development snapshots of GCC prior to 3.0.
  1250. case $host_os in
  1251. aix4 | aix4.[[01]] | aix4.[[01]].*)
  1252. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  1253. echo ' yes '
  1254. echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
  1255. :
  1256. else
  1257. can_build_shared=no
  1258. fi
  1259. ;;
  1260. esac
  1261. # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  1262. # soname into executable. Probably we can add versioning support to
  1263. # collect2, so additional links can be useful in future.
  1264. if test "$aix_use_runtimelinking" = yes; then
  1265. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  1266. # instead of lib<name>.a to let people know that these are not
  1267. # typical AIX shared libraries.
  1268. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1269. else
  1270. # We preserve .a as extension for shared libraries through AIX4.2
  1271. # and later when we are not doing run time linking.
  1272. library_names_spec='${libname}${release}.a $libname.a'
  1273. soname_spec='${libname}${release}${shared_ext}$major'
  1274. fi
  1275. shlibpath_var=LIBPATH
  1276. fi
  1277. ;;
  1278. amigaos*)
  1279. library_names_spec='$libname.ixlibrary $libname.a'
  1280. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  1281. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
  1282. ;;
  1283. beos*)
  1284. library_names_spec='${libname}${shared_ext}'
  1285. dynamic_linker="$host_os ld.so"
  1286. shlibpath_var=LIBRARY_PATH
  1287. ;;
  1288. bsdi[[45]]*)
  1289. version_type=linux
  1290. need_version=no
  1291. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1292. soname_spec='${libname}${release}${shared_ext}$major'
  1293. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  1294. shlibpath_var=LD_LIBRARY_PATH
  1295. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  1296. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  1297. # the default ld.so.conf also contains /usr/contrib/lib and
  1298. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  1299. # libtool to hard-code these into programs
  1300. ;;
  1301. cygwin* | mingw* | pw32*)
  1302. version_type=windows
  1303. shrext_cmds=".dll"
  1304. need_version=no
  1305. need_lib_prefix=no
  1306. case $GCC,$host_os in
  1307. yes,cygwin* | yes,mingw* | yes,pw32*)
  1308. library_names_spec='$libname.dll.a'
  1309. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  1310. postinstall_cmds='base_file=`basename \${file}`~
  1311. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
  1312. dldir=$destdir/`dirname \$dlpath`~
  1313. test -d \$dldir || mkdir -p \$dldir~
  1314. $install_prog $dir/$dlname \$dldir/$dlname~
  1315. chmod a+x \$dldir/$dlname'
  1316. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  1317. dlpath=$dir/\$dldll~
  1318. $rm \$dlpath'
  1319. shlibpath_overrides_runpath=yes
  1320. case $host_os in
  1321. cygwin*)
  1322. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  1323. soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  1324. sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
  1325. ;;
  1326. mingw*)
  1327. # MinGW DLLs use traditional 'lib' prefix
  1328. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  1329. sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  1330. if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
  1331. # It is most probably a Windows format PATH printed by
  1332. # mingw gcc, but we are running on Cygwin. Gcc prints its search
  1333. # path with ; separators, and with drive letters. We can handle the
  1334. # drive letters (cygwin fileutils understands them), so leave them,
  1335. # especially as we might pass files found there to a mingw objdump,
  1336. # which wouldn't understand a cygwinified path. Ahh.
  1337. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  1338. else
  1339. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  1340. fi
  1341. ;;
  1342. pw32*)
  1343. # pw32 DLLs use 'pw' prefix rather than 'lib'
  1344. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  1345. ;;
  1346. esac
  1347. ;;
  1348. *)
  1349. library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  1350. ;;
  1351. esac
  1352. dynamic_linker='Win32 ld.exe'
  1353. # FIXME: first we should search . and the directory the executable is in
  1354. shlibpath_var=PATH
  1355. ;;
  1356. darwin* | rhapsody*)
  1357. dynamic_linker="$host_os dyld"
  1358. version_type=darwin
  1359. need_lib_prefix=no
  1360. need_version=no
  1361. library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  1362. soname_spec='${libname}${release}${major}$shared_ext'
  1363. shlibpath_overrides_runpath=yes
  1364. shlibpath_var=DYLD_LIBRARY_PATH
  1365. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  1366. m4_if([$1], [],[
  1367. sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
  1368. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  1369. ;;
  1370. dgux*)
  1371. version_type=linux
  1372. need_lib_prefix=no
  1373. need_version=no
  1374. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  1375. soname_spec='${libname}${release}${shared_ext}$major'
  1376. shlibpath_var=LD_LIBRARY_PATH
  1377. ;;
  1378. freebsd1*)
  1379. dynamic_linker=no
  1380. ;;
  1381. freebsd* | dragonfly*)
  1382. # DragonFly does not have aout. When/if they implement a new
  1383. # versioning mechanism, adjust this.
  1384. if test -x /usr/bin/objformat; then
  1385. objformat=`/usr/bin/objformat`
  1386. else
  1387. case $host_os in
  1388. freebsd[[123]]*) objformat=aout ;;
  1389. *) objformat=elf ;;
  1390. esac
  1391. fi
  1392. version_type=freebsd-$objformat
  1393. case $version_type in
  1394. freebsd-elf*)
  1395. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  1396. need_version=no
  1397. need_lib_prefix=no
  1398. ;;
  1399. freebsd-*)
  1400. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  1401. need_version=yes
  1402. ;;
  1403. esac
  1404. shlibpath_var=LD_LIBRARY_PATH
  1405. case $host_os in
  1406. freebsd2*)
  1407. shlibpath_overrides_runpath=yes
  1408. ;;
  1409. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  1410. shlibpath_overrides_runpath=yes
  1411. hardcode_into_libs=yes
  1412. ;;
  1413. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  1414. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  1415. shlibpath_overrides_runpath=no
  1416. hardcode_into_libs=yes
  1417. ;;
  1418. *) # from 4.6 on, and DragonFly
  1419. shlibpath_overrides_runpath=yes
  1420. hardcode_into_libs=yes
  1421. ;;
  1422. esac
  1423. ;;
  1424. gnu*)
  1425. version_type=linux
  1426. need_lib_prefix=no
  1427. need_version=no
  1428. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  1429. soname_spec='${libname}${release}${shared_ext}$major'
  1430. shlibpath_var=LD_LIBRARY_PATH
  1431. hardcode_into_libs=yes
  1432. ;;
  1433. hpux9* | hpux10* | hpux11*)
  1434. # Give a soname corresponding to the major version so that dld.sl refuses to
  1435. # link against other versions.
  1436. version_type=sunos
  1437. need_lib_prefix=no
  1438. need_version=no
  1439. case $host_cp…