PageRenderTime 51ms CodeModel.GetById 9ms RepoModel.GetById 1ms app.codeStats 0ms

/config/libtool.m4

https://code.google.com/
m4 | 2074 lines | 1524 code | 208 blank | 342 comment | 0 complexity | 46735e03ccac848a0241937fdc7b25cf MD5 | raw file
Possible License(s): GPL-2.0
  1. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  2. ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
  3. ## 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 48 Debian 1.5.22-2 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$old_deplibs'
  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. AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
  169. AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
  170. enable_win32_dll=yes, enable_win32_dll=no)
  171. AC_ARG_ENABLE([libtool-lock],
  172. [AC_HELP_STRING([--disable-libtool-lock],
  173. [avoid locking (might break parallel builds)])])
  174. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  175. AC_ARG_WITH([pic],
  176. [AC_HELP_STRING([--with-pic],
  177. [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
  178. [pic_mode="$withval"],
  179. [pic_mode=default])
  180. test -z "$pic_mode" && pic_mode=default
  181. # Use C for the default configuration in the libtool script
  182. tagname=
  183. AC_LIBTOOL_LANG_C_CONFIG
  184. _LT_AC_TAGCONFIG
  185. ])# AC_LIBTOOL_SETUP
  186. # _LT_AC_SYS_COMPILER
  187. # -------------------
  188. AC_DEFUN([_LT_AC_SYS_COMPILER],
  189. [AC_REQUIRE([AC_PROG_CC])dnl
  190. # If no C compiler was specified, use CC.
  191. LTCC=${LTCC-"$CC"}
  192. # If no C compiler flags were specified, use CFLAGS.
  193. LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
  194. # Allow CC to be a program name with arguments.
  195. compiler=$CC
  196. ])# _LT_AC_SYS_COMPILER
  197. # _LT_CC_BASENAME(CC)
  198. # -------------------
  199. # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
  200. AC_DEFUN([_LT_CC_BASENAME],
  201. [for cc_temp in $1""; do
  202. case $cc_temp in
  203. compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
  204. distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
  205. \-*) ;;
  206. *) break;;
  207. esac
  208. done
  209. cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
  210. ])
  211. # _LT_COMPILER_BOILERPLATE
  212. # ------------------------
  213. # Check for compiler boilerplate output or warnings with
  214. # the simple compiler test code.
  215. AC_DEFUN([_LT_COMPILER_BOILERPLATE],
  216. [ac_outfile=conftest.$ac_objext
  217. printf "$lt_simple_compile_test_code" >conftest.$ac_ext
  218. eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  219. _lt_compiler_boilerplate=`cat conftest.err`
  220. $rm conftest*
  221. ])# _LT_COMPILER_BOILERPLATE
  222. # _LT_LINKER_BOILERPLATE
  223. # ----------------------
  224. # Check for linker boilerplate output or warnings with
  225. # the simple link test code.
  226. AC_DEFUN([_LT_LINKER_BOILERPLATE],
  227. [ac_outfile=conftest.$ac_objext
  228. printf "$lt_simple_link_test_code" >conftest.$ac_ext
  229. eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
  230. _lt_linker_boilerplate=`cat conftest.err`
  231. $rm conftest*
  232. ])# _LT_LINKER_BOILERPLATE
  233. # _LT_AC_SYS_LIBPATH_AIX
  234. # ----------------------
  235. # Links a minimal program and checks the executable
  236. # for the system default hardcoded library path. In most cases,
  237. # this is /usr/lib:/lib, but when the MPI compilers are used
  238. # the location of the communication and MPI libs are included too.
  239. # If we don't find anything, use the default library path according
  240. # to the aix ld manual.
  241. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
  242. [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
  243. aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
  244. }'`
  245. # Check for a 64-bit object if we didn't find anything.
  246. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
  247. }'`; fi],[])
  248. if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  249. ])# _LT_AC_SYS_LIBPATH_AIX
  250. # _LT_AC_SHELL_INIT(ARG)
  251. # ----------------------
  252. AC_DEFUN([_LT_AC_SHELL_INIT],
  253. [ifdef([AC_DIVERSION_NOTICE],
  254. [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
  255. [AC_DIVERT_PUSH(NOTICE)])
  256. $1
  257. AC_DIVERT_POP
  258. ])# _LT_AC_SHELL_INIT
  259. # _LT_AC_PROG_ECHO_BACKSLASH
  260. # --------------------------
  261. # Add some code to the start of the generated configure script which
  262. # will find an echo command which doesn't interpret backslashes.
  263. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
  264. [_LT_AC_SHELL_INIT([
  265. # Check that we are running under the correct shell.
  266. SHELL=${CONFIG_SHELL-/bin/sh}
  267. case X$ECHO in
  268. X*--fallback-echo)
  269. # Remove one level of quotation (which was required for Make).
  270. ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
  271. ;;
  272. esac
  273. echo=${ECHO-echo}
  274. if test "X[$]1" = X--no-reexec; then
  275. # Discard the --no-reexec flag, and continue.
  276. shift
  277. elif test "X[$]1" = X--fallback-echo; then
  278. # Avoid inline document here, it may be left over
  279. :
  280. elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
  281. # Yippee, $echo works!
  282. :
  283. else
  284. # Restart under the correct shell.
  285. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
  286. fi
  287. if test "X[$]1" = X--fallback-echo; then
  288. # used as fallback echo
  289. shift
  290. cat <<EOF
  291. [$]*
  292. EOF
  293. exit 0
  294. fi
  295. # The HP-UX ksh and POSIX shell print the target directory to stdout
  296. # if CDPATH is set.
  297. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  298. if test -z "$ECHO"; then
  299. if test "X${echo_test_string+set}" != Xset; then
  300. # find a string as large as possible, as long as the shell can cope with it
  301. for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
  302. # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
  303. if (echo_test_string=`eval $cmd`) 2>/dev/null &&
  304. echo_test_string=`eval $cmd` &&
  305. (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
  306. then
  307. break
  308. fi
  309. done
  310. fi
  311. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  312. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  313. test "X$echo_testing_string" = "X$echo_test_string"; then
  314. :
  315. else
  316. # The Solaris, AIX, and Digital Unix default echo programs unquote
  317. # backslashes. This makes it impossible to quote backslashes using
  318. # echo "$something" | sed 's/\\/\\\\/g'
  319. #
  320. # So, first we look for a working echo in the user's PATH.
  321. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  322. for dir in $PATH /usr/ucb; do
  323. IFS="$lt_save_ifs"
  324. if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  325. test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
  326. echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
  327. test "X$echo_testing_string" = "X$echo_test_string"; then
  328. echo="$dir/echo"
  329. break
  330. fi
  331. done
  332. IFS="$lt_save_ifs"
  333. if test "X$echo" = Xecho; then
  334. # We didn't find a better echo, so look for alternatives.
  335. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
  336. echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
  337. test "X$echo_testing_string" = "X$echo_test_string"; then
  338. # This shell has a builtin print -r that does the trick.
  339. echo='print -r'
  340. elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
  341. test "X$CONFIG_SHELL" != X/bin/ksh; then
  342. # If we have ksh, try running configure again with it.
  343. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  344. export ORIGINAL_CONFIG_SHELL
  345. CONFIG_SHELL=/bin/ksh
  346. export CONFIG_SHELL
  347. exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
  348. else
  349. # Try using printf.
  350. echo='printf %s\n'
  351. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  352. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  353. test "X$echo_testing_string" = "X$echo_test_string"; then
  354. # Cool, printf works
  355. :
  356. elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  357. test "X$echo_testing_string" = 'X\t' &&
  358. echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  359. test "X$echo_testing_string" = "X$echo_test_string"; then
  360. CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
  361. export CONFIG_SHELL
  362. SHELL="$CONFIG_SHELL"
  363. export SHELL
  364. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  365. elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  366. test "X$echo_testing_string" = 'X\t' &&
  367. echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  368. test "X$echo_testing_string" = "X$echo_test_string"; then
  369. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  370. else
  371. # maybe with a smaller string...
  372. prev=:
  373. for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
  374. if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
  375. then
  376. break
  377. fi
  378. prev="$cmd"
  379. done
  380. if test "$prev" != 'sed 50q "[$]0"'; then
  381. echo_test_string=`eval $prev`
  382. export echo_test_string
  383. exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
  384. else
  385. # Oops. We lost completely, so just stick with echo.
  386. echo=echo
  387. fi
  388. fi
  389. fi
  390. fi
  391. fi
  392. fi
  393. # Copy echo and quote the copy suitably for passing to libtool from
  394. # the Makefile, instead of quoting the original, which is used later.
  395. ECHO=$echo
  396. if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
  397. ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
  398. fi
  399. AC_SUBST(ECHO)
  400. ])])# _LT_AC_PROG_ECHO_BACKSLASH
  401. # _LT_AC_LOCK
  402. # -----------
  403. AC_DEFUN([_LT_AC_LOCK],
  404. [AC_ARG_ENABLE([libtool-lock],
  405. [AC_HELP_STRING([--disable-libtool-lock],
  406. [avoid locking (might break parallel builds)])])
  407. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  408. # Some flags need to be propagated to the compiler or linker for good
  409. # libtool support.
  410. case $host in
  411. ia64-*-hpux*)
  412. # Find out which ABI we are using.
  413. echo 'int i;' > conftest.$ac_ext
  414. if AC_TRY_EVAL(ac_compile); then
  415. case `/usr/bin/file conftest.$ac_objext` in
  416. *ELF-32*)
  417. HPUX_IA64_MODE="32"
  418. ;;
  419. *ELF-64*)
  420. HPUX_IA64_MODE="64"
  421. ;;
  422. esac
  423. fi
  424. rm -rf conftest*
  425. ;;
  426. *-*-irix6*)
  427. # Find out which ABI we are using.
  428. echo '[#]line __oline__ "configure"' > conftest.$ac_ext
  429. if AC_TRY_EVAL(ac_compile); then
  430. if test "$lt_cv_prog_gnu_ld" = yes; then
  431. case `/usr/bin/file conftest.$ac_objext` in
  432. *32-bit*)
  433. LD="${LD-ld} -melf32bsmip"
  434. ;;
  435. *N32*)
  436. LD="${LD-ld} -melf32bmipn32"
  437. ;;
  438. *64-bit*)
  439. LD="${LD-ld} -melf64bmip"
  440. ;;
  441. esac
  442. else
  443. case `/usr/bin/file conftest.$ac_objext` in
  444. *32-bit*)
  445. LD="${LD-ld} -32"
  446. ;;
  447. *N32*)
  448. LD="${LD-ld} -n32"
  449. ;;
  450. *64-bit*)
  451. LD="${LD-ld} -64"
  452. ;;
  453. esac
  454. fi
  455. fi
  456. rm -rf conftest*
  457. ;;
  458. x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
  459. # Find out which ABI we are using.
  460. echo 'int i;' > conftest.$ac_ext
  461. if AC_TRY_EVAL(ac_compile); then
  462. case `/usr/bin/file conftest.o` in
  463. *32-bit*)
  464. case $host in
  465. x86_64-*linux*)
  466. LD="${LD-ld} -m elf_i386"
  467. ;;
  468. ppc64-*linux*|powerpc64-*linux*)
  469. LD="${LD-ld} -m elf32ppclinux"
  470. ;;
  471. s390x-*linux*)
  472. LD="${LD-ld} -m elf_s390"
  473. ;;
  474. sparc64-*linux*)
  475. LD="${LD-ld} -m elf32_sparc"
  476. ;;
  477. esac
  478. ;;
  479. *64-bit*)
  480. case $host in
  481. x86_64-*linux*)
  482. LD="${LD-ld} -m elf_x86_64"
  483. ;;
  484. ppc*-*linux*|powerpc*-*linux*)
  485. LD="${LD-ld} -m elf64ppc"
  486. ;;
  487. s390*-*linux*)
  488. LD="${LD-ld} -m elf64_s390"
  489. ;;
  490. sparc*-*linux*)
  491. LD="${LD-ld} -m elf64_sparc"
  492. ;;
  493. esac
  494. ;;
  495. esac
  496. fi
  497. rm -rf conftest*
  498. ;;
  499. *-*-sco3.2v5*)
  500. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  501. SAVE_CFLAGS="$CFLAGS"
  502. CFLAGS="$CFLAGS -belf"
  503. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  504. [AC_LANG_PUSH(C)
  505. AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  506. AC_LANG_POP])
  507. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  508. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  509. CFLAGS="$SAVE_CFLAGS"
  510. fi
  511. ;;
  512. sparc*-*solaris*)
  513. # Find out which ABI we are using.
  514. echo 'int i;' > conftest.$ac_ext
  515. if AC_TRY_EVAL(ac_compile); then
  516. case `/usr/bin/file conftest.o` in
  517. *64-bit*)
  518. case $lt_cv_prog_gnu_ld in
  519. yes*) LD="${LD-ld} -m elf64_sparc" ;;
  520. *) LD="${LD-ld} -64" ;;
  521. esac
  522. ;;
  523. esac
  524. fi
  525. rm -rf conftest*
  526. ;;
  527. AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
  528. [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
  529. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  530. AC_CHECK_TOOL(AS, as, false)
  531. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  532. ;;
  533. ])
  534. esac
  535. need_locks="$enable_libtool_lock"
  536. ])# _LT_AC_LOCK
  537. # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  538. # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  539. # ----------------------------------------------------------------
  540. # Check whether the given compiler option works
  541. AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
  542. [AC_REQUIRE([LT_AC_PROG_SED])
  543. AC_CACHE_CHECK([$1], [$2],
  544. [$2=no
  545. ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  546. printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  547. lt_compiler_flag="$3"
  548. # Insert the option either (1) after the last *FLAGS variable, or
  549. # (2) before a word containing "conftest.", or (3) at the end.
  550. # Note that $ac_compile itself does not contain backslashes and begins
  551. # with a dollar sign (not a hyphen), so the echo should work correctly.
  552. # The option is referenced via a variable to avoid confusing sed.
  553. lt_compile=`echo "$ac_compile" | $SED \
  554. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  555. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  556. -e 's:$: $lt_compiler_flag:'`
  557. (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  558. (eval "$lt_compile" 2>conftest.err)
  559. ac_status=$?
  560. cat conftest.err >&AS_MESSAGE_LOG_FD
  561. echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  562. if (exit $ac_status) && test -s "$ac_outfile"; then
  563. # The compiler can only warn and ignore the option if not recognized
  564. # So say no if there are warnings other than the usual output.
  565. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
  566. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  567. if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  568. $2=yes
  569. fi
  570. fi
  571. $rm conftest*
  572. ])
  573. if test x"[$]$2" = xyes; then
  574. ifelse([$5], , :, [$5])
  575. else
  576. ifelse([$6], , :, [$6])
  577. fi
  578. ])# AC_LIBTOOL_COMPILER_OPTION
  579. # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  580. # [ACTION-SUCCESS], [ACTION-FAILURE])
  581. # ------------------------------------------------------------
  582. # Check whether the given compiler option works
  583. AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
  584. [AC_CACHE_CHECK([$1], [$2],
  585. [$2=no
  586. save_LDFLAGS="$LDFLAGS"
  587. LDFLAGS="$LDFLAGS $3"
  588. printf "$lt_simple_link_test_code" > conftest.$ac_ext
  589. if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  590. # The linker can only warn and ignore the option if not recognized
  591. # So say no if there are warnings
  592. if test -s conftest.err; then
  593. # Append any errors to the config.log.
  594. cat conftest.err 1>&AS_MESSAGE_LOG_FD
  595. $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
  596. $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  597. if diff conftest.exp conftest.er2 >/dev/null; then
  598. $2=yes
  599. fi
  600. else
  601. $2=yes
  602. fi
  603. fi
  604. $rm conftest*
  605. LDFLAGS="$save_LDFLAGS"
  606. ])
  607. if test x"[$]$2" = xyes; then
  608. ifelse([$4], , :, [$4])
  609. else
  610. ifelse([$5], , :, [$5])
  611. fi
  612. ])# AC_LIBTOOL_LINKER_OPTION
  613. # AC_LIBTOOL_SYS_MAX_CMD_LEN
  614. # --------------------------
  615. AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
  616. [# find the maximum length of command line arguments
  617. AC_MSG_CHECKING([the maximum length of command line arguments])
  618. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  619. i=0
  620. teststring="ABCD"
  621. case $build_os in
  622. msdosdjgpp*)
  623. # On DJGPP, this test can blow up pretty badly due to problems in libc
  624. # (any single argument exceeding 2000 bytes causes a buffer overrun
  625. # during glob expansion). Even if it were fixed, the result of this
  626. # check would be larger than it should be.
  627. lt_cv_sys_max_cmd_len=12288; # 12K is about right
  628. ;;
  629. gnu*)
  630. # Under GNU Hurd, this test is not required because there is
  631. # no limit to the length of command line arguments.
  632. # Libtool will interpret -1 as no limit whatsoever
  633. lt_cv_sys_max_cmd_len=-1;
  634. ;;
  635. cygwin* | mingw*)
  636. # On Win9x/ME, this test blows up -- it succeeds, but takes
  637. # about 5 minutes as the teststring grows exponentially.
  638. # Worse, since 9x/ME are not pre-emptively multitasking,
  639. # you end up with a "frozen" computer, even though with patience
  640. # the test eventually succeeds (with a max line length of 256k).
  641. # Instead, let's just punt: use the minimum linelength reported by
  642. # all of the supported platforms: 8192 (on NT/2K/XP).
  643. lt_cv_sys_max_cmd_len=8192;
  644. ;;
  645. amigaos*)
  646. # On AmigaOS with pdksh, this test takes hours, literally.
  647. # So we just punt and use a minimum line length of 8192.
  648. lt_cv_sys_max_cmd_len=8192;
  649. ;;
  650. netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
  651. # This has been around since 386BSD, at least. Likely further.
  652. if test -x /sbin/sysctl; then
  653. lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
  654. elif test -x /usr/sbin/sysctl; then
  655. lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
  656. else
  657. lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
  658. fi
  659. # And add a safety zone
  660. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
  661. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
  662. ;;
  663. interix*)
  664. # We know the value 262144 and hardcode it with a safety zone (like BSD)
  665. lt_cv_sys_max_cmd_len=196608
  666. ;;
  667. osf*)
  668. # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
  669. # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
  670. # nice to cause kernel panics so lets avoid the loop below.
  671. # First set a reasonable default.
  672. lt_cv_sys_max_cmd_len=16384
  673. #
  674. if test -x /sbin/sysconfig; then
  675. case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
  676. *1*) lt_cv_sys_max_cmd_len=-1 ;;
  677. esac
  678. fi
  679. ;;
  680. sco3.2v5*)
  681. lt_cv_sys_max_cmd_len=102400
  682. ;;
  683. sysv5* | sco5v6* | sysv4.2uw2*)
  684. kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
  685. if test -n "$kargmax"; then
  686. lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
  687. else
  688. lt_cv_sys_max_cmd_len=32768
  689. fi
  690. ;;
  691. *)
  692. # If test is not a shell built-in, we'll probably end up computing a
  693. # maximum length that is only half of the actual maximum length, but
  694. # we can't tell.
  695. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
  696. while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
  697. = "XX$teststring") >/dev/null 2>&1 &&
  698. new_result=`expr "X$teststring" : ".*" 2>&1` &&
  699. lt_cv_sys_max_cmd_len=$new_result &&
  700. test $i != 17 # 1/2 MB should be enough
  701. do
  702. i=`expr $i + 1`
  703. teststring=$teststring$teststring
  704. done
  705. teststring=
  706. # Add a significant safety factor because C++ compilers can tack on massive
  707. # amounts of additional arguments before passing them to the linker.
  708. # It appears as though 1/2 is a usable value.
  709. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  710. ;;
  711. esac
  712. ])
  713. if test -n $lt_cv_sys_max_cmd_len ; then
  714. AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  715. else
  716. AC_MSG_RESULT(none)
  717. fi
  718. ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
  719. # _LT_AC_CHECK_DLFCN
  720. # ------------------
  721. AC_DEFUN([_LT_AC_CHECK_DLFCN],
  722. [AC_CHECK_HEADERS(dlfcn.h)dnl
  723. ])# _LT_AC_CHECK_DLFCN
  724. # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  725. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  726. # ---------------------------------------------------------------------
  727. AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
  728. [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  729. if test "$cross_compiling" = yes; then :
  730. [$4]
  731. else
  732. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  733. lt_status=$lt_dlunknown
  734. cat > conftest.$ac_ext <<EOF
  735. [#line __oline__ "configure"
  736. #include "confdefs.h"
  737. #if HAVE_DLFCN_H
  738. #include <dlfcn.h>
  739. #endif
  740. #include <stdio.h>
  741. #ifdef RTLD_GLOBAL
  742. # define LT_DLGLOBAL RTLD_GLOBAL
  743. #else
  744. # ifdef DL_GLOBAL
  745. # define LT_DLGLOBAL DL_GLOBAL
  746. # else
  747. # define LT_DLGLOBAL 0
  748. # endif
  749. #endif
  750. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  751. find out it does not work in some platform. */
  752. #ifndef LT_DLLAZY_OR_NOW
  753. # ifdef RTLD_LAZY
  754. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  755. # else
  756. # ifdef DL_LAZY
  757. # define LT_DLLAZY_OR_NOW DL_LAZY
  758. # else
  759. # ifdef RTLD_NOW
  760. # define LT_DLLAZY_OR_NOW RTLD_NOW
  761. # else
  762. # ifdef DL_NOW
  763. # define LT_DLLAZY_OR_NOW DL_NOW
  764. # else
  765. # define LT_DLLAZY_OR_NOW 0
  766. # endif
  767. # endif
  768. # endif
  769. # endif
  770. #endif
  771. #ifdef __cplusplus
  772. extern "C" void exit (int);
  773. #endif
  774. void fnord() { int i=42;}
  775. int main ()
  776. {
  777. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  778. int status = $lt_dlunknown;
  779. if (self)
  780. {
  781. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  782. else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  783. /* dlclose (self); */
  784. }
  785. else
  786. puts (dlerror ());
  787. exit (status);
  788. }]
  789. EOF
  790. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  791. (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
  792. lt_status=$?
  793. case x$lt_status in
  794. x$lt_dlno_uscore) $1 ;;
  795. x$lt_dlneed_uscore) $2 ;;
  796. x$lt_dlunknown|x*) $3 ;;
  797. esac
  798. else :
  799. # compilation failed
  800. $3
  801. fi
  802. fi
  803. rm -fr conftest*
  804. ])# _LT_AC_TRY_DLOPEN_SELF
  805. # AC_LIBTOOL_DLOPEN_SELF
  806. # ----------------------
  807. AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
  808. [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  809. if test "x$enable_dlopen" != xyes; then
  810. enable_dlopen=unknown
  811. enable_dlopen_self=unknown
  812. enable_dlopen_self_static=unknown
  813. else
  814. lt_cv_dlopen=no
  815. lt_cv_dlopen_libs=
  816. case $host_os in
  817. beos*)
  818. lt_cv_dlopen="load_add_on"
  819. lt_cv_dlopen_libs=
  820. lt_cv_dlopen_self=yes
  821. ;;
  822. mingw* | pw32*)
  823. lt_cv_dlopen="LoadLibrary"
  824. lt_cv_dlopen_libs=
  825. ;;
  826. cygwin*)
  827. lt_cv_dlopen="dlopen"
  828. lt_cv_dlopen_libs=
  829. ;;
  830. darwin*)
  831. # if libdl is installed we need to link against it
  832. AC_CHECK_LIB([dl], [dlopen],
  833. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
  834. lt_cv_dlopen="dyld"
  835. lt_cv_dlopen_libs=
  836. lt_cv_dlopen_self=yes
  837. ])
  838. ;;
  839. *)
  840. AC_CHECK_FUNC([shl_load],
  841. [lt_cv_dlopen="shl_load"],
  842. [AC_CHECK_LIB([dld], [shl_load],
  843. [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
  844. [AC_CHECK_FUNC([dlopen],
  845. [lt_cv_dlopen="dlopen"],
  846. [AC_CHECK_LIB([dl], [dlopen],
  847. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  848. [AC_CHECK_LIB([svld], [dlopen],
  849. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  850. [AC_CHECK_LIB([dld], [dld_link],
  851. [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
  852. ])
  853. ])
  854. ])
  855. ])
  856. ])
  857. ;;
  858. esac
  859. if test "x$lt_cv_dlopen" != xno; then
  860. enable_dlopen=yes
  861. else
  862. enable_dlopen=no
  863. fi
  864. case $lt_cv_dlopen in
  865. dlopen)
  866. save_CPPFLAGS="$CPPFLAGS"
  867. test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  868. save_LDFLAGS="$LDFLAGS"
  869. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  870. save_LIBS="$LIBS"
  871. LIBS="$lt_cv_dlopen_libs $LIBS"
  872. AC_CACHE_CHECK([whether a program can dlopen itself],
  873. lt_cv_dlopen_self, [dnl
  874. _LT_AC_TRY_DLOPEN_SELF(
  875. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  876. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  877. ])
  878. if test "x$lt_cv_dlopen_self" = xyes; then
  879. wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
  880. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  881. lt_cv_dlopen_self_static, [dnl
  882. _LT_AC_TRY_DLOPEN_SELF(
  883. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  884. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  885. ])
  886. fi
  887. CPPFLAGS="$save_CPPFLAGS"
  888. LDFLAGS="$save_LDFLAGS"
  889. LIBS="$save_LIBS"
  890. ;;
  891. esac
  892. case $lt_cv_dlopen_self in
  893. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  894. *) enable_dlopen_self=unknown ;;
  895. esac
  896. case $lt_cv_dlopen_self_static in
  897. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  898. *) enable_dlopen_self_static=unknown ;;
  899. esac
  900. fi
  901. ])# AC_LIBTOOL_DLOPEN_SELF
  902. # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
  903. # ---------------------------------
  904. # Check to see if options -c and -o are simultaneously supported by compiler
  905. AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
  906. [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  907. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  908. [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  909. [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  910. $rm -r conftest 2>/dev/null
  911. mkdir conftest
  912. cd conftest
  913. mkdir out
  914. printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  915. lt_compiler_flag="-o out/conftest2.$ac_objext"
  916. # Insert the option either (1) after the last *FLAGS variable, or
  917. # (2) before a word containing "conftest.", or (3) at the end.
  918. # Note that $ac_compile itself does not contain backslashes and begins
  919. # with a dollar sign (not a hyphen), so the echo should work correctly.
  920. lt_compile=`echo "$ac_compile" | $SED \
  921. -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  922. -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  923. -e 's:$: $lt_compiler_flag:'`
  924. (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  925. (eval "$lt_compile" 2>out/conftest.err)
  926. ac_status=$?
  927. cat out/conftest.err >&AS_MESSAGE_LOG_FD
  928. echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  929. if (exit $ac_status) && test -s out/conftest2.$ac_objext
  930. then
  931. # The compiler can only warn and ignore the option if not recognized
  932. # So say no if there are warnings
  933. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
  934. $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  935. if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
  936. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  937. fi
  938. fi
  939. chmod u+w . 2>&AS_MESSAGE_LOG_FD
  940. $rm conftest*
  941. # SGI C++ compiler will create directory out/ii_files/ for
  942. # template instantiation
  943. test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
  944. $rm out/* && rmdir out
  945. cd ..
  946. rmdir conftest
  947. $rm conftest*
  948. ])
  949. ])# AC_LIBTOOL_PROG_CC_C_O
  950. # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
  951. # -----------------------------------------
  952. # Check to see if we can do hard links to lock some files if needed
  953. AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
  954. [AC_REQUIRE([_LT_AC_LOCK])dnl
  955. hard_links="nottested"
  956. if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
  957. # do not overwrite the value of need_locks provided by the user
  958. AC_MSG_CHECKING([if we can lock with hard links])
  959. hard_links=yes
  960. $rm conftest*
  961. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  962. touch conftest.a
  963. ln conftest.a conftest.b 2>&5 || hard_links=no
  964. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  965. AC_MSG_RESULT([$hard_links])
  966. if test "$hard_links" = no; then
  967. AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
  968. need_locks=warn
  969. fi
  970. else
  971. need_locks=no
  972. fi
  973. ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
  974. # AC_LIBTOOL_OBJDIR
  975. # -----------------
  976. AC_DEFUN([AC_LIBTOOL_OBJDIR],
  977. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  978. [rm -f .libs 2>/dev/null
  979. mkdir .libs 2>/dev/null
  980. if test -d .libs; then
  981. lt_cv_objdir=.libs
  982. else
  983. # MS-DOS does not allow filenames that begin with a dot.
  984. lt_cv_objdir=_libs
  985. fi
  986. rmdir .libs 2>/dev/null])
  987. objdir=$lt_cv_objdir
  988. ])# AC_LIBTOOL_OBJDIR
  989. # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
  990. # ----------------------------------------------
  991. # Check hardcoding attributes.
  992. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
  993. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  994. _LT_AC_TAGVAR(hardcode_action, $1)=
  995. if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
  996. test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
  997. test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
  998. # We can hardcode non-existant directories.
  999. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
  1000. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  1001. # have to relink, otherwise we might link with an installed library
  1002. # when we should be linking with a yet-to-be-installed one
  1003. ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
  1004. test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
  1005. # Linking always hardcodes the temporary library directory.
  1006. _LT_AC_TAGVAR(hardcode_action, $1)=relink
  1007. else
  1008. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  1009. _LT_AC_TAGVAR(hardcode_action, $1)=immediate
  1010. fi
  1011. else
  1012. # We cannot hardcode anything, or else we can only hardcode existing
  1013. # directories.
  1014. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
  1015. fi
  1016. AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
  1017. if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
  1018. # Fast installation is not supported
  1019. enable_fast_install=no
  1020. elif test "$shlibpath_overrides_runpath" = yes ||
  1021. test "$enable_shared" = no; then
  1022. # Fast installation is not necessary
  1023. enable_fast_install=needless
  1024. fi
  1025. ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
  1026. # AC_LIBTOOL_SYS_LIB_STRIP
  1027. # ------------------------
  1028. AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
  1029. [striplib=
  1030. old_striplib=
  1031. AC_MSG_CHECKING([whether stripping libraries is possible])
  1032. if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
  1033. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  1034. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  1035. AC_MSG_RESULT([yes])
  1036. else
  1037. # FIXME - insert some real tests, host_os isn't really good enough
  1038. case $host_os in
  1039. darwin*)
  1040. if test -n "$STRIP" ; then
  1041. striplib="$STRIP -x"
  1042. AC_MSG_RESULT([yes])
  1043. else
  1044. AC_MSG_RESULT([no])
  1045. fi
  1046. ;;
  1047. *)
  1048. AC_MSG_RESULT([no])
  1049. ;;
  1050. esac
  1051. fi
  1052. ])# AC_LIBTOOL_SYS_LIB_STRIP
  1053. # AC_LIBTOOL_SYS_DYNAMIC_LINKER
  1054. # -----------------------------
  1055. # PORTME Fill in your ld.so characteristics
  1056. AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
  1057. [AC_MSG_CHECKING([dynamic linker characteristics])
  1058. library_names_spec=
  1059. libname_spec='lib$name'
  1060. soname_spec=
  1061. shrext_cmds=".so"
  1062. postinstall_cmds=
  1063. postuninstall_cmds=
  1064. finish_cmds=
  1065. finish_eval=
  1066. shlibpath_var=
  1067. shlibpath_overrides_runpath=unknown
  1068. version_type=none
  1069. dynamic_linker="$host_os ld.so"
  1070. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  1071. if test "$GCC" = yes; then
  1072. sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  1073. if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
  1074. # if the path contains ";" then we assume it to be the separator
  1075. # otherwise default to the standard path separator (i.e. ":") - it is
  1076. # assumed that no part of a normal pathname contains ";" but that should
  1077. # okay in the real world where ";" in dirpaths is itself problematic.
  1078. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  1079. else
  1080. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  1081. fi
  1082. else
  1083. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  1084. fi
  1085. need_lib_prefix=unknown
  1086. hardcode_into_libs=no
  1087. # when you set need_version to no, make sure it does not cause -set_version
  1088. # flags to be left without arguments
  1089. need_version=unknown
  1090. case $host_os in
  1091. aix3*)
  1092. version_type=linux
  1093. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  1094. shlibpath_var=LIBPATH
  1095. # AIX 3 has no versioning support, so we append a major version to the name.
  1096. soname_spec='${libname}${release}${shared_ext}$major'
  1097. ;;
  1098. aix4* | aix5*)
  1099. version_type=linux
  1100. need_lib_prefix=no
  1101. need_version=no
  1102. hardcode_into_libs=yes
  1103. if test "$host_cpu" = ia64; then
  1104. # AIX 5 supports IA64
  1105. library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  1106. shlibpath_var=LD_LIBRARY_PATH
  1107. else
  1108. # With GCC up to 2.95.x, collect2 would create an import file
  1109. # for dependence libraries. The import file would start with
  1110. # the line `#! .'. This would cause the generated library to
  1111. # depend on `.', always an invalid library. This was fixed in
  1112. # development snapshots of GCC prior to 3.0.
  1113. case $host_os in
  1114. aix4 | aix4.[[01]] | aix4.[[01]].*)
  1115. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  1116. echo ' yes '
  1117. echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
  1118. :
  1119. else
  1120. can_build_shared=no
  1121. fi
  1122. ;;
  1123. esac
  1124. # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  1125. # soname into executable. Probably we can add versioning support to
  1126. # collect2, so additional links can be useful in future.
  1127. if test "$aix_use_runtimelinking" = yes; then
  1128. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  1129. # instead of lib<name>.a to let people know that these are not
  1130. # typical AIX shared libraries.
  1131. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1132. else
  1133. # We preserve .a as extension for shared libraries through AIX4.2
  1134. # and later when we are not doing run time linking.
  1135. library_names_spec='${libname}${release}.a $libname.a'
  1136. soname_spec='${libname}${release}${shared_ext}$major'
  1137. fi
  1138. shlibpath_var=LIBPATH
  1139. fi
  1140. ;;
  1141. amigaos*)
  1142. library_names_spec='$libname.ixlibrary $libname.a'
  1143. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  1144. 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'
  1145. ;;
  1146. beos*)
  1147. library_names_spec='${libname}${shared_ext}'
  1148. dynamic_linker="$host_os ld.so"
  1149. shlibpath_var=LIBRARY_PATH
  1150. ;;
  1151. bsdi[[45]]*)
  1152. version_type=linux
  1153. need_version=no
  1154. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1155. soname_spec='${libname}${release}${shared_ext}$major'
  1156. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  1157. shlibpath_var=LD_LIBRARY_PATH
  1158. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  1159. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  1160. # the default ld.so.conf also contains /usr/contrib/lib and
  1161. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  1162. # libtool to hard-code these into programs
  1163. ;;
  1164. cygwin* | mingw* | pw32*)
  1165. version_type=windows
  1166. shrext_cmds=".dll"
  1167. need_version=no
  1168. need_lib_prefix=no
  1169. case $GCC,$host_os in
  1170. yes,cygwin* | yes,mingw* | yes,pw32*)
  1171. library_names_spec='$libname.dll.a'
  1172. # DLL is installed to $(libdir)/../bin by postinstall_cmds
  1173. postinstall_cmds='base_file=`basename \${file}`~
  1174. dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
  1175. dldir=$destdir/`dirname \$dlpath`~
  1176. test -d \$dldir || mkdir -p \$dldir~
  1177. $install_prog $dir/$dlname \$dldir/$dlname~
  1178. chmod a+x \$dldir/$dlname'
  1179. postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  1180. dlpath=$dir/\$dldll~
  1181. $rm \$dlpath'
  1182. shlibpath_overrides_runpath=yes
  1183. case $host_os in
  1184. cygwin*)
  1185. # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  1186. soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  1187. sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
  1188. ;;
  1189. mingw*)
  1190. # MinGW DLLs use traditional 'lib' prefix
  1191. soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  1192. sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  1193. if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
  1194. # It is most probably a Windows format PATH printed by
  1195. # mingw gcc, but we are running on Cygwin. Gcc prints its search
  1196. # path with ; separators, and with drive letters. We can handle the
  1197. # drive letters (cygwin fileutils understands them), so leave them,
  1198. # especially as we might pass files found there to a mingw objdump,
  1199. # which wouldn't understand a cygwinified path. Ahh.
  1200. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  1201. else
  1202. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
  1203. fi
  1204. ;;
  1205. pw32*)
  1206. # pw32 DLLs use 'pw' prefix rather than 'lib'
  1207. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  1208. ;;
  1209. esac
  1210. ;;
  1211. *)
  1212. library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  1213. ;;
  1214. esac
  1215. dynamic_linker='Win32 ld.exe'
  1216. # FIXME: first we should search . and the directory the executable is in
  1217. shlibpath_var=PATH
  1218. ;;
  1219. darwin* | rhapsody*)
  1220. dynamic_linker="$host_os dyld"
  1221. version_type=darwin
  1222. need_lib_prefix=no
  1223. need_version=no
  1224. library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  1225. soname_spec='${libname}${release}${major}$shared_ext'
  1226. shlibpath_overrides_runpath=yes
  1227. shlibpath_var=DYLD_LIBRARY_PATH
  1228. shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
  1229. # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
  1230. if test "$GCC" = yes; then
  1231. sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
  1232. else
  1233. sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
  1234. fi
  1235. sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  1236. ;;
  1237. dgux*)
  1238. version_type=linux
  1239. need_lib_prefix=no
  1240. need_version=no
  1241. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  1242. soname_spec='${libname}${release}${shared_ext}$major'
  1243. shlibpath_var=LD_LIBRARY_PATH
  1244. ;;
  1245. freebsd1*)
  1246. dynamic_linker=no
  1247. ;;
  1248. kfreebsd*-gnu)
  1249. version_type=linux
  1250. need_lib_prefix=no
  1251. need_version=no
  1252. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  1253. soname_spec='${libname}${release}${shared_ext}$major'
  1254. shlibpath_var=LD_LIBRARY_PATH
  1255. shlibpath_overrides_runpath=no
  1256. hardcode_into_libs=yes
  1257. dynamic_linker='GNU ld.so'
  1258. ;;
  1259. freebsd* | dragonfly*)
  1260. # DragonFly does not have aout. When/if they implement a new
  1261. # versioning mechanism, adjust this.
  1262. if test -x /usr/bin/objformat; then
  1263. objformat=`/usr/bin/objformat`
  1264. else
  1265. case $host_os in
  1266. freebsd[[123]]*) objformat=aout ;;
  1267. *) objformat=elf ;;
  1268. esac
  1269. fi
  1270. version_type=freebsd-$objformat
  1271. case $version_type in
  1272. freebsd-elf*)
  1273. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  1274. need_version=no
  1275. need_lib_prefix=no
  1276. ;;
  1277. freebsd-*)
  1278. library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  1279. need_version=yes
  1280. ;;
  1281. esac
  1282. shlibpath_var=LD_LIBRARY_PATH
  1283. case $host_os in
  1284. freebsd2*)
  1285. shlibpath_overrides_runpath=yes
  1286. ;;
  1287. freebsd3.[[01]]* | freebsdelf3.[[01]]*)
  1288. shlibpath_overrides_runpath=yes
  1289. hardcode_into_libs=yes
  1290. ;;
  1291. freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
  1292. freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
  1293. shlibpath_overrides_runpath=no
  1294. hardcode_into_libs=yes
  1295. ;;
  1296. freebsd*) # from 4.6 on
  1297. shlibpath_overrides_runpath=yes
  1298. hardcode_into_libs=yes
  1299. ;;
  1300. esac
  1301. ;;
  1302. gnu*)
  1303. version_type=linux
  1304. need_lib_prefix=no
  1305. need_version=no
  1306. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  1307. soname_spec='${libname}${release}${shared_ext}$major'
  1308. shlibpath_var=LD_LIBRARY_PATH
  1309. hardcode_into_libs=yes
  1310. ;;
  1311. hpux9* | hpux10* | hpux11*)
  1312. # Give a soname corresponding to the major version so that dld.sl refuses to
  1313. # link against other versions.
  1314. version_type=sunos
  1315. need_lib_prefix=no
  1316. need_version=no
  1317. case $host_cpu in
  1318. ia64*)
  1319. shrext_cmds='.so'
  1320. hardcode_into_libs=yes
  1321. dynamic_linker="$host_os dld.so"
  1322. shlibpath_var=LD_LIBRARY_PATH
  1323. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  1324. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1325. soname_spec='${libname}${release}${shared_ext}$major'
  1326. if test "X$HPUX_IA64_MODE" = X32; then
  1327. sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  1328. else
  1329. sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  1330. fi
  1331. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  1332. ;;
  1333. hppa*64*)
  1334. shrext_cmds='.sl'
  1335. hardcode_into_libs=yes
  1336. dynamic_linker="$host_os dld.sl"
  1337. shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  1338. shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  1339. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1340. soname_spec='${libname}${release}${shared_ext}$major'
  1341. sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  1342. sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  1343. ;;
  1344. *)
  1345. shrext_cmds='.sl'
  1346. dynamic_linker="$host_os dld.sl"
  1347. shlibpath_var=SHLIB_PATH
  1348. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  1349. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1350. soname_spec='${libname}${release}${shared_ext}$major'
  1351. ;;
  1352. esac
  1353. # HP-UX runs *really* slowly unless shared libraries are mode 555.
  1354. postinstall_cmds='chmod 555 $lib'
  1355. ;;
  1356. interix3*)
  1357. version_type=linux
  1358. need_lib_prefix=no
  1359. need_version=no
  1360. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  1361. soname_spec='${libname}${release}${shared_ext}$major'
  1362. dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
  1363. shlibpath_var=LD_LIBRARY_PATH
  1364. shlibpath_overrides_runpath=no
  1365. hardcode_into_libs=yes
  1366. ;;
  1367. irix5* | irix6* | nonstopux*)
  1368. case $host_os in
  1369. nonstopux*) version_type=nonstopux ;;
  1370. *)
  1371. if test "$lt_cv_prog_gnu_ld" = yes; then
  1372. version_type=linux
  1373. else
  1374. version_type=irix
  1375. fi ;;
  1376. esac
  1377. need_lib_prefix=no
  1378. need_version=no
  1379. soname_spec='${libname}${release}${shared_ext}$major'
  1380. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  1381. case $host_os in
  1382. irix5* | nonstopux*)
  1383. libsuff= shlibsuff=
  1384. ;;
  1385. *)
  1386. case $LD in # libtool.m4 will add one of these switches to LD
  1387. *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  1388. libsuff= shlibsuff= libmagic=32-bit;;
  1389. *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  1390. libsuff=32 shlibsuff=N32 libmagic=N32;;
  1391. *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  1392. libsuff=64 shlibsuff=64 libmagic=64-bit;;
  1393. *) libsuff= shlibsuff= libmagic=never-match;;
  1394. esac
  1395. ;;
  1396. esac
  1397. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  1398. shlibpath_overrides_runpath=no
  1399. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  1400. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  1401. hardcode_into_libs=yes
  1402. ;;
  1403. # No shared lib support for Linux oldld, aout, or coff.
  1404. linux*oldld* | linux*aout* | linux*coff*)
  1405. dynamic_linker=no
  1406. ;;
  1407. # This must be Linux ELF.
  1408. linux*)
  1409. version_type=linux
  1410. need_lib_prefix=no
  1411. need_version=no
  1412. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1413. soname_spec='${libname}${release}${shared_ext}$major'
  1414. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  1415. shlibpath_var=LD_LIBRARY_PATH
  1416. shlibpath_overrides_runpath=no
  1417. # This implies no fast_install, which is unacceptable.
  1418. # Some rework will be needed to allow for fast_install
  1419. # before this can be enabled.
  1420. hardcode_into_libs=yes
  1421. # Append ld.so.conf contents to the search path
  1422. if test -f /etc/ld.so.conf; then
  1423. lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
  1424. sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  1425. fi
  1426. # We used to test for /lib/ld.so.1 and disable shared libraries on
  1427. # powerpc, because MkLinux only supported shared libraries with the
  1428. # GNU dynamic linker. Since this was broken with cross compilers,
  1429. # most powerpc-linux boxes support dynamic linking these days and
  1430. # people can always --disable-shared, the test was removed, and we
  1431. # assume the GNU/Linux dynamic linker is in use.
  1432. dynamic_linker='GNU/Linux ld.so'
  1433. ;;
  1434. netbsdelf*-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. shlibpath_overrides_runpath=no
  1442. hardcode_into_libs=yes
  1443. dynamic_linker='NetBSD ld.elf_so'
  1444. ;;
  1445. knetbsd*-gnu)
  1446. version_type=linux
  1447. need_lib_prefix=no
  1448. need_version=no
  1449. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  1450. soname_spec='${libname}${release}${shared_ext}$major'
  1451. shlibpath_var=LD_LIBRARY_PATH
  1452. shlibpath_overrides_runpath=no
  1453. hardcode_into_libs=yes
  1454. dynamic_linker='GNU ld.so'
  1455. ;;
  1456. netbsd*)
  1457. version_type=sunos
  1458. need_lib_prefix=no
  1459. need_version=no
  1460. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  1461. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  1462. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  1463. dynamic_linker='NetBSD (a.out) ld.so'
  1464. else
  1465. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  1466. soname_spec='${libname}${release}${shared_ext}$major'
  1467. dynamic_linker='NetBSD ld.elf_so'
  1468. fi
  1469. shlibpath_var=LD_LIBRARY_PATH
  1470. shlibpath_overrides_runpath=yes
  1471. hardcode_into_libs=yes
  1472. ;;
  1473. newsos6)
  1474. version_type=linux
  1475. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1476. shlibpath_var=LD_LIBRARY_PATH
  1477. shlibpath_overrides_runpath=yes
  1478. ;;
  1479. nto-qnx*)
  1480. version_type=linux
  1481. need_lib_prefix=no
  1482. need_version=no
  1483. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1484. soname_spec='${libname}${release}${shared_ext}$major'
  1485. shlibpath_var=LD_LIBRARY_PATH
  1486. shlibpath_overrides_runpath=yes
  1487. ;;
  1488. openbsd*)
  1489. version_type=sunos
  1490. sys_lib_dlsearch_path_spec="/usr/lib"
  1491. need_lib_prefix=no
  1492. # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
  1493. case $host_os in
  1494. openbsd3.3 | openbsd3.3.*) need_version=yes ;;
  1495. *) need_version=no ;;
  1496. esac
  1497. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  1498. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  1499. shlibpath_var=LD_LIBRARY_PATH
  1500. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  1501. case $host_os in
  1502. openbsd2.[[89]] | openbsd2.[[89]].*)
  1503. shlibpath_overrides_runpath=no
  1504. ;;
  1505. *)
  1506. shlibpath_overrides_runpath=yes
  1507. ;;
  1508. esac
  1509. else
  1510. shlibpath_overrides_runpath=yes
  1511. fi
  1512. ;;
  1513. os2*)
  1514. libname_spec='$name'
  1515. shrext_cmds=".dll"
  1516. need_lib_prefix=no
  1517. library_names_spec='$libname${shared_ext} $libname.a'
  1518. dynamic_linker='OS/2 ld.exe'
  1519. shlibpath_var=LIBPATH
  1520. ;;
  1521. osf3* | osf4* | osf5*)
  1522. version_type=osf
  1523. need_lib_prefix=no
  1524. need_version=no
  1525. soname_spec='${libname}${release}${shared_ext}$major'
  1526. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1527. shlibpath_var=LD_LIBRARY_PATH
  1528. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  1529. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  1530. ;;
  1531. solaris*)
  1532. version_type=linux
  1533. need_lib_prefix=no
  1534. need_version=no
  1535. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1536. soname_spec='${libname}${release}${shared_ext}$major'
  1537. shlibpath_var=LD_LIBRARY_PATH
  1538. shlibpath_overrides_runpath=yes
  1539. hardcode_into_libs=yes
  1540. # ldd complains unless libraries are executable
  1541. postinstall_cmds='chmod +x $lib'
  1542. ;;
  1543. sunos4*)
  1544. version_type=sunos
  1545. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  1546. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  1547. shlibpath_var=LD_LIBRARY_PATH
  1548. shlibpath_overrides_runpath=yes
  1549. if test "$with_gnu_ld" = yes; then
  1550. need_lib_prefix=no
  1551. fi
  1552. need_version=yes
  1553. ;;
  1554. sysv4 | sysv4.3*)
  1555. version_type=linux
  1556. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1557. soname_spec='${libname}${release}${shared_ext}$major'
  1558. shlibpath_var=LD_LIBRARY_PATH
  1559. case $host_vendor in
  1560. sni)
  1561. shlibpath_overrides_runpath=no
  1562. need_lib_prefix=no
  1563. export_dynamic_flag_spec='${wl}-Blargedynsym'
  1564. runpath_var=LD_RUN_PATH
  1565. ;;
  1566. siemens)
  1567. need_lib_prefix=no
  1568. ;;
  1569. motorola)
  1570. need_lib_prefix=no
  1571. need_version=no
  1572. shlibpath_overrides_runpath=no
  1573. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  1574. ;;
  1575. esac
  1576. ;;
  1577. sysv4*MP*)
  1578. if test -d /usr/nec ;then
  1579. version_type=linux
  1580. library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  1581. soname_spec='$libname${shared_ext}.$major'
  1582. shlibpath_var=LD_LIBRARY_PATH
  1583. fi
  1584. ;;
  1585. sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
  1586. version_type=freebsd-elf
  1587. need_lib_prefix=no
  1588. need_version=no
  1589. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  1590. soname_spec='${libname}${release}${shared_ext}$major'
  1591. shlibpath_var=LD_LIBRARY_PATH
  1592. hardcode_into_libs=yes
  1593. if test "$with_gnu_ld" = yes; then
  1594. sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
  1595. shlibpath_overrides_runpath=no
  1596. else
  1597. sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
  1598. shlibpath_overrides_runpath=yes
  1599. case $host_os in
  1600. sco3.2v5*)
  1601. sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
  1602. ;;
  1603. esac
  1604. fi
  1605. sys_lib_dlsearch_path_spec='/usr/lib'
  1606. ;;
  1607. uts4*)
  1608. version_type=linux
  1609. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1610. soname_spec='${libname}${release}${shared_ext}$major'
  1611. shlibpath_var=LD_LIBRARY_PATH
  1612. ;;
  1613. *)
  1614. dynamic_linker=no
  1615. ;;
  1616. esac
  1617. AC_MSG_RESULT([$dynamic_linker])
  1618. test "$dynamic_linker" = no && can_build_shared=no
  1619. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  1620. if test "$GCC" = yes; then
  1621. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  1622. fi
  1623. ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
  1624. # _LT_AC_TAGCONFIG
  1625. # ----------------
  1626. AC_DEFUN([_LT_AC_TAGCONFIG],
  1627. [AC_ARG_WITH([tags],
  1628. [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
  1629. [include additional configurations @<:@automatic@:>@])],
  1630. [tagnames="$withval"])
  1631. if test -f "$ltmain" && test -n "$tagnames"; then
  1632. if test ! -f "${ofile}"; then
  1633. AC_MSG_WARN([output file `$ofile' does not exist])
  1634. fi
  1635. if test -z "$LTCC"; then
  1636. eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
  1637. if test -z "$LTCC"; then
  1638. AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
  1639. else
  1640. AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
  1641. fi
  1642. fi
  1643. if test -z "$LTCFLAGS"; then
  1644. eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
  1645. fi
  1646. # Extract list of available tagged configurations in $ofile.
  1647. # Note that this assumes the entire list is on one line.
  1648. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
  1649. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1650. for tagname in $tagnames; do
  1651. IFS="$lt_save_ifs"
  1652. # Check whether tagname contains only valid characters
  1653. case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
  1654. "") ;;
  1655. *) AC_MSG_ERROR([invalid tag name: $tagname])
  1656. ;;
  1657. esac
  1658. if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
  1659. then
  1660. AC_MSG_ERROR([tag name \"$tagname\" already exists])
  1661. fi
  1662. # Update the list of available tags.
  1663. if test -n "$tagname"; then
  1664. echo appending configuration tag \"$tagname\" to $ofile
  1665. case $tagname in
  1666. CXX)
  1667. if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
  1668. ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
  1669. (test "X$CXX" != "Xg++"))) ; then
  1670. AC_LIBTOOL_LANG_CXX_CONFIG
  1671. else
  1672. tagname=""
  1673. fi
  1674. ;;
  1675. F77)
  1676. if test -n "$F77" && test "X$F77" != "Xno"; then
  1677. AC_LIBTOOL_LANG_F77_CONFIG
  1678. else
  1679. tagname=""
  1680. fi
  1681. ;;
  1682. GCJ)
  1683. if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
  1684. AC_LIBTOOL_LANG_GCJ_CONFIG
  1685. else
  1686. tagname=""
  1687. fi
  1688. ;;
  1689. RC)
  1690. AC_LIBTOOL_LANG_RC_CONFIG
  1691. ;;
  1692. *)
  1693. AC_MSG_ERROR([Unsupported tag name: $tagname])
  1694. ;;
  1695. esac
  1696. # Append the new tag name to the list of available tags.
  1697. if test -n "$tagname" ; then
  1698. available_tags="$available_tags $tagname"
  1699. fi
  1700. fi
  1701. done
  1702. IFS="$lt_save_ifs"
  1703. # Now substitute the updated list of available tags.
  1704. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
  1705. mv "${ofile}T" "$ofile"
  1706. chmod +x "$ofile"
  1707. else
  1708. rm -f "${ofile}T"
  1709. AC_MSG_ERROR([unable to update list of available tagged configurations.])
  1710. fi
  1711. fi
  1712. ])# _LT_AC_TAGCONFIG
  1713. # AC_LIBTOOL_DLOPEN
  1714. # -----------------
  1715. # enable checks for dlopen support
  1716. AC_DEFUN([AC_LIBTOOL_DLOPEN],
  1717. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
  1718. ])# AC_LIBTOOL_DLOPEN
  1719. # AC_LIBTOOL_WIN32_DLL
  1720. # --------------------
  1721. # declare package support for building win32 DLLs
  1722. AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
  1723. [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
  1724. ])# AC_LIBTOOL_WIN32_DLL
  1725. # AC_ENABLE_SHARED([DEFAULT])
  1726. # ---------------------------
  1727. # implement the --enable-shared flag
  1728. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  1729. AC_DEFUN([AC_ENABLE_SHARED],
  1730. [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
  1731. AC_ARG_ENABLE([shared],
  1732. [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
  1733. [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
  1734. [p=${PACKAGE-default}
  1735. case $enableval in
  1736. yes) enable_shared=yes ;;
  1737. no) enable_shared=no ;;
  1738. *)
  1739. enable_shared=no
  1740. # Look at the argument we got. We use all the common list separators.
  1741. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1742. for pkg in $enableval; do
  1743. IFS="$lt_save_ifs"
  1744. if test "X$pkg" = "X$p"; then
  1745. enable_shared=yes
  1746. fi
  1747. done
  1748. IFS="$lt_save_ifs"
  1749. ;;
  1750. esac],
  1751. [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
  1752. ])# AC_ENABLE_SHARED
  1753. # AC_DISABLE_SHARED
  1754. # -----------------
  1755. # set the default shared flag to --disable-shared
  1756. AC_DEFUN([AC_DISABLE_SHARED],
  1757. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1758. AC_ENABLE_SHARED(no)
  1759. ])# AC_DISABLE_SHARED
  1760. # AC_ENABLE_STATIC([DEFAULT])
  1761. # ---------------------------
  1762. # implement the --enable-static flag
  1763. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  1764. AC_DEFUN([AC_ENABLE_STATIC],
  1765. [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
  1766. AC_ARG_ENABLE([static],
  1767. [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
  1768. [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
  1769. [p=${PACKAGE-default}
  1770. case $enableval in
  1771. yes) enable_static=yes ;;
  1772. no) enable_static=no ;;
  1773. *)
  1774. enable_static=no
  1775. # Look at the argument we got. We use all the common list separators.
  1776. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1777. for pkg in $enableval; do
  1778. IFS="$lt_save_ifs"
  1779. if test "X$pkg" = "X$p"; then
  1780. enable_static=yes
  1781. fi
  1782. done
  1783. IFS="$lt_save_ifs"
  1784. ;;
  1785. esac],
  1786. [enable_static=]AC_ENABLE_STATIC_DEFAULT)
  1787. ])# AC_ENABLE_STATIC
  1788. # AC_DISABLE_STATIC
  1789. # -----------------
  1790. # set the default static flag to --disable-static
  1791. AC_DEFUN([AC_DISABLE_STATIC],
  1792. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1793. AC_ENABLE_STATIC(no)
  1794. ])# AC_DISABLE_STATIC
  1795. # AC_ENABLE_FAST_INSTALL([DEFAULT])
  1796. # ---------------------------------
  1797. # implement the --enable-fast-install flag
  1798. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
  1799. AC_DEFUN([AC_ENABLE_FAST_INSTALL],
  1800. [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
  1801. AC_ARG_ENABLE([fast-install],
  1802. [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
  1803. [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
  1804. [p=${PACKAGE-default}
  1805. case $enableval in
  1806. yes) enable_fast_install=yes ;;
  1807. no) enable_fast_install=no ;;
  1808. *)
  1809. enable_fast_install=no
  1810. # Look at the argument we got. We use all the common list separators.
  1811. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  1812. for pkg in $enableval; do
  1813. IFS="$lt_save_ifs"
  1814. if test "X$pkg" = "X$p"; then
  1815. enable_fast_install=yes
  1816. fi
  1817. done
  1818. IFS="$lt_save_ifs"
  1819. ;;
  1820. esac],
  1821. [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
  1822. ])# AC_ENABLE_FAST_INSTALL
  1823. # AC_DISABLE_FAST_INSTALL
  1824. # -----------------------
  1825. # set the default to --disable-fast-install
  1826. AC_DEFUN([AC_DISABLE_FAST_INSTALL],
  1827. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1828. AC_ENABLE_FAST_INSTALL(no)
  1829. ])# AC_DISABLE_FAST_INSTALL
  1830. # AC_LIBTOOL_PICMODE([MODE])
  1831. # --------------------------
  1832. # implement the --with-pic flag
  1833. # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
  1834. AC_DEFUN([AC_LIBTOOL_PICMODE],
  1835. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  1836. pic_mode=ifelse($#,1,$1,default)
  1837. ])# AC_LIBTOOL_PICMODE
  1838. # AC_PROG_EGREP
  1839. # -------------
  1840. # This is predefined starting with Autoconf 2.54, so this conditional
  1841. # definition can be removed once we require Autoconf 2.54 or later.
  1842. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
  1843. [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
  1844. [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
  1845. then ac_cv_prog_egrep='grep -E'
  1846. else ac_cv_prog_egrep='egrep'
  1847. fi])
  1848. EGREP=$ac_cv_prog_egrep
  1849. AC_SUBST([EGREP])
  1850. ])])
  1851. # AC_PATH_TOOL_PREFIX
  1852. # -------------------
  1853. # find a file program which can recognise shared library
  1854. AC_DEFUN([AC_PATH_TOOL_PREFIX],
  1855. [AC_REQUIRE([AC_PROG_EGREP])dnl
  1856. AC_MSG_CHECKING([for $1])
  1857. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  1858. [case $MAGIC_CMD in
  1859. [[\\/*] | ?:[\\/]*])
  1860. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  1861. ;;
  1862. *)
  1863. lt_save_MAGIC_CMD="$MAGIC_CMD"
  1864. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  1865. dnl $ac_dummy forces splitting on constant user-supplied paths.
  1866. dnl POSIX.2 word