Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3894 lines
125 KiB

  1. dnl aclocal.m4 generated automatically by aclocal 1.4-p6
  2. dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
  3. dnl This file is free software; the Free Software Foundation
  4. dnl gives unlimited permission to copy and/or distribute it,
  5. dnl with or without modifications, as long as this notice is preserved.
  6. dnl This program is distributed in the hope that it will be useful,
  7. dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  8. dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  9. dnl PARTICULAR PURPOSE.
  10. AC_DEFUN(AC_FIND_FILE,
  11. [
  12. $3=NONE
  13. for i in $2;
  14. do
  15. for j in $1;
  16. do
  17. if test -r "$i/$j"; then
  18. $3=$i
  19. break 2
  20. fi
  21. done
  22. done
  23. ])
  24. AC_DEFUN(AC_PATH_LIBOGG,
  25. [
  26. OGG_LIBS="-logg"
  27. AC_MSG_CHECKING([for libogg])
  28. ac_ogg_includes=NONE ac_ogg_libraries=NONE ac_ogg_bindir=NONE
  29. ogg_libraries=""
  30. ogg_includes=""
  31. AC_ARG_WITH(ogg-dir,
  32. [ --with-ogg-dir=DIR where the root of OGG is installed ],
  33. [ ac_ogg_includes="$withval"/include
  34. ac_ogg_libraries="$withval"/lib
  35. ])
  36. AC_ARG_WITH(ogg-includes,
  37. [ --with-ogg-includes=DIR where the OGG includes are. ],
  38. [
  39. ac_ogg_includes="$withval"
  40. ])
  41. ogg_libs_given=no
  42. AC_ARG_WITH(ogg-libraries,
  43. [ --with-ogg-libraries=DIR where the OGG library is installed.],
  44. [ ac_ogg_libraries="$withval"
  45. ogg_libs_given=yes
  46. ])
  47. ogg_incdirs="/usr/include /usr/lib/ogg/include /opt/include /usr/local/ogg/include /usr/include/ogg /usr/include /usr/local/include"
  48. if test ! "$ac_ogg_includes" = "NONE"; then
  49. ogg_incdirs="$ac_ogg_includes $ac_ogg_includes/.. $ogg_incdirs"
  50. fi
  51. AC_FIND_FILE(ogg/ogg.h, $ogg_incdirs, ogg_incdir)
  52. echo "Ogg includes in $ogg_incdir"
  53. ogg_libdirs="$ac_ogg_libraries /usr/lib/ogg/lib /usr/lib /opt/lib /usr/local/ogg/lib /usr/local/lib /usr/lib/ogg /usr/local/lib"
  54. test -n "$OGGDIR" && ogg_libdirs="$OGGDIR/lib $OGGDIR $ogg_libdirs"
  55. if test ! "$ac_ogg_libraries" = "NONE"; then
  56. ogg_libdirs="$ac_ogg_libraries $ogg_libdirs"
  57. fi
  58. test=NONE
  59. ogg_libdir=NONE
  60. for dir in $ogg_libdirs; do
  61. try="ls -1 $dir/libogg*"
  62. if test=`eval $try 2> /dev/null`; then ogg_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
  63. done
  64. echo "Ogg libraries in $ogg_libdir"
  65. if test "$ogg_libdir" = "NONE" || test "$ogg_incdir" = "NONE"; then
  66. have_libogg=no
  67. else
  68. have_libogg=yes
  69. AC_DEFINE(HAVE_LIBOGG)
  70. fi
  71. OGG_INCLUDES="-I$ogg_incdir"
  72. OGG_LDFLAGS="-L$ogg_libdir"
  73. AC_SUBST(OGG_LIBS)
  74. AC_SUBST(OGG_INCLUDES)
  75. AC_SUBST(OGG_LDFLAGS)
  76. ])
  77. # Do all the work for Automake. This macro actually does too much --
  78. # some checks are only needed if your package does certain things.
  79. # But this isn't really a big deal.
  80. # serial 1
  81. dnl Usage:
  82. dnl AM_INIT_AUTOMAKE(package,version, [no-define])
  83. AC_DEFUN([AM_INIT_AUTOMAKE],
  84. [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  85. AC_REQUIRE([AC_PROG_INSTALL])
  86. PACKAGE=[$1]
  87. AC_SUBST(PACKAGE)
  88. VERSION=[$2]
  89. AC_SUBST(VERSION)
  90. dnl test to see if srcdir already configured
  91. if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
  92. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  93. fi
  94. ifelse([$3],,
  95. AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  96. AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
  97. AC_REQUIRE([AM_SANITY_CHECK])
  98. AC_REQUIRE([AC_ARG_PROGRAM])
  99. dnl FIXME This is truly gross.
  100. missing_dir=`cd $ac_aux_dir && pwd`
  101. AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
  102. AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
  103. AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
  104. AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
  105. AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
  106. AC_REQUIRE([AC_PROG_MAKE_SET])])
  107. # Copyright 2002 Free Software Foundation, Inc.
  108. # This program is free software; you can redistribute it and/or modify
  109. # it under the terms of the GNU General Public License as published by
  110. # the Free Software Foundation; either version 2, or (at your option)
  111. # any later version.
  112. # This program is distributed in the hope that it will be useful,
  113. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  114. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  115. # GNU General Public License for more details.
  116. # You should have received a copy of the GNU General Public License
  117. # along with this program; if not, write to the Free Software
  118. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  119. # AM_AUTOMAKE_VERSION(VERSION)
  120. # ----------------------------
  121. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  122. # generated from the m4 files accompanying Automake X.Y.
  123. AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
  124. # AM_SET_CURRENT_AUTOMAKE_VERSION
  125. # -------------------------------
  126. # Call AM_AUTOMAKE_VERSION so it can be traced.
  127. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
  128. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  129. [AM_AUTOMAKE_VERSION([1.4-p6])])
  130. #
  131. # Check to make sure that the build environment is sane.
  132. #
  133. AC_DEFUN([AM_SANITY_CHECK],
  134. [AC_MSG_CHECKING([whether build environment is sane])
  135. # Just in case
  136. sleep 1
  137. echo timestamp > conftestfile
  138. # Do `set' in a subshell so we don't clobber the current shell's
  139. # arguments. Must try -L first in case configure is actually a
  140. # symlink; some systems play weird games with the mod time of symlinks
  141. # (eg FreeBSD returns the mod time of the symlink's containing
  142. # directory).
  143. if (
  144. set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
  145. if test "[$]*" = "X"; then
  146. # -L didn't work.
  147. set X `ls -t $srcdir/configure conftestfile`
  148. fi
  149. if test "[$]*" != "X $srcdir/configure conftestfile" \
  150. && test "[$]*" != "X conftestfile $srcdir/configure"; then
  151. # If neither matched, then we have a broken ls. This can happen
  152. # if, for instance, CONFIG_SHELL is bash and it inherits a
  153. # broken ls alias from the environment. This has actually
  154. # happened. Such a system could not be considered "sane".
  155. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  156. alias in your environment])
  157. fi
  158. test "[$]2" = conftestfile
  159. )
  160. then
  161. # Ok.
  162. :
  163. else
  164. AC_MSG_ERROR([newly created file is older than distributed files!
  165. Check your system clock])
  166. fi
  167. rm -f conftest*
  168. AC_MSG_RESULT(yes)])
  169. dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
  170. dnl The program must properly implement --version.
  171. AC_DEFUN([AM_MISSING_PROG],
  172. [AC_MSG_CHECKING(for working $2)
  173. # Run test in a subshell; some versions of sh will print an error if
  174. # an executable is not found, even if stderr is redirected.
  175. # Redirect stdin to placate older versions of autoconf. Sigh.
  176. if ($2 --version) < /dev/null > /dev/null 2>&1; then
  177. $1=$2
  178. AC_MSG_RESULT(found)
  179. else
  180. $1="$3/missing $2"
  181. AC_MSG_RESULT(missing)
  182. fi
  183. AC_SUBST($1)])
  184. # Add --enable-maintainer-mode option to configure.
  185. # From Jim Meyering
  186. # serial 1
  187. AC_DEFUN([AM_MAINTAINER_MODE],
  188. [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
  189. dnl maintainer-mode is disabled by default
  190. AC_ARG_ENABLE(maintainer-mode,
  191. [ --enable-maintainer-mode enable make rules and dependencies not useful
  192. (and sometimes confusing) to the casual installer],
  193. USE_MAINTAINER_MODE=$enableval,
  194. USE_MAINTAINER_MODE=no)
  195. AC_MSG_RESULT($USE_MAINTAINER_MODE)
  196. AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
  197. MAINT=$MAINTAINER_MODE_TRUE
  198. AC_SUBST(MAINT)dnl
  199. ]
  200. )
  201. # Define a conditional.
  202. AC_DEFUN([AM_CONDITIONAL],
  203. [AC_SUBST($1_TRUE)
  204. AC_SUBST($1_FALSE)
  205. if $2; then
  206. $1_TRUE=
  207. $1_FALSE='#'
  208. else
  209. $1_TRUE='#'
  210. $1_FALSE=
  211. fi])
  212. # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
  213. # serial 46 AC_PROG_LIBTOOL
  214. AC_DEFUN([AC_PROG_LIBTOOL],
  215. [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
  216. # This can be used to rebuild libtool when needed
  217. LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
  218. # Always use our own libtool.
  219. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  220. AC_SUBST(LIBTOOL)dnl
  221. # Prevent multiple expansion
  222. define([AC_PROG_LIBTOOL], [])
  223. ])
  224. AC_DEFUN([AC_LIBTOOL_SETUP],
  225. [AC_PREREQ(2.13)dnl
  226. AC_REQUIRE([AC_ENABLE_SHARED])dnl
  227. AC_REQUIRE([AC_ENABLE_STATIC])dnl
  228. AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
  229. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  230. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  231. AC_REQUIRE([AC_PROG_CC])dnl
  232. AC_REQUIRE([AC_PROG_LD])dnl
  233. AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
  234. AC_REQUIRE([AC_PROG_NM])dnl
  235. AC_REQUIRE([LT_AC_PROG_SED])dnl
  236. AC_REQUIRE([AC_PROG_LN_S])dnl
  237. AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
  238. AC_REQUIRE([AC_OBJEXT])dnl
  239. AC_REQUIRE([AC_EXEEXT])dnl
  240. dnl
  241. _LT_AC_PROG_ECHO_BACKSLASH
  242. # Only perform the check for file, if the check method requires it
  243. case $deplibs_check_method in
  244. file_magic*)
  245. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  246. AC_PATH_MAGIC
  247. fi
  248. ;;
  249. esac
  250. AC_CHECK_TOOL(RANLIB, ranlib, :)
  251. AC_CHECK_TOOL(STRIP, strip, :)
  252. ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
  253. ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
  254. enable_win32_dll=yes, enable_win32_dll=no)
  255. AC_ARG_ENABLE(libtool-lock,
  256. [ --disable-libtool-lock avoid locking (might break parallel builds)])
  257. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  258. # Some flags need to be propagated to the compiler or linker for good
  259. # libtool support.
  260. case $host in
  261. *-*-irix6*)
  262. # Find out which ABI we are using.
  263. echo '[#]line __oline__ "configure"' > conftest.$ac_ext
  264. if AC_TRY_EVAL(ac_compile); then
  265. case `/usr/bin/file conftest.$ac_objext` in
  266. *32-bit*)
  267. LD="${LD-ld} -32"
  268. ;;
  269. *N32*)
  270. LD="${LD-ld} -n32"
  271. ;;
  272. *64-bit*)
  273. LD="${LD-ld} -64"
  274. ;;
  275. esac
  276. fi
  277. rm -rf conftest*
  278. ;;
  279. *-*-linux*)
  280. # Test if the compiler is 64bit
  281. echo 'int i;' > conftest.$ac_ext
  282. lt_cv_cc_64bit_output=no
  283. if AC_TRY_EVAL(ac_compile); then
  284. case `/usr/bin/file conftest.$ac_objext` in
  285. *"ELF 64"*)
  286. lt_cv_cc_64bit_output=yes
  287. ;;
  288. esac
  289. fi
  290. rm -rf conftest*
  291. ;;
  292. *-*-sco3.2v5*)
  293. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  294. SAVE_CFLAGS="$CFLAGS"
  295. CFLAGS="$CFLAGS -belf"
  296. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  297. [AC_LANG_SAVE
  298. AC_LANG_C
  299. AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  300. AC_LANG_RESTORE])
  301. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  302. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  303. CFLAGS="$SAVE_CFLAGS"
  304. fi
  305. ;;
  306. ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
  307. [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
  308. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  309. AC_CHECK_TOOL(AS, as, false)
  310. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  311. # recent cygwin and mingw systems supply a stub DllMain which the user
  312. # can override, but on older systems we have to supply one
  313. AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
  314. [AC_TRY_LINK([],
  315. [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
  316. DllMain (0, 0, 0);],
  317. [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
  318. case $host/$CC in
  319. *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
  320. # old mingw systems require "-dll" to link a DLL, while more recent ones
  321. # require "-mdll"
  322. SAVE_CFLAGS="$CFLAGS"
  323. CFLAGS="$CFLAGS -mdll"
  324. AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
  325. [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
  326. CFLAGS="$SAVE_CFLAGS" ;;
  327. *-*-cygwin* | *-*-pw32*)
  328. # cygwin systems need to pass --dll to the linker, and not link
  329. # crt.o which will require a WinMain@16 definition.
  330. lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
  331. esac
  332. ;;
  333. ])
  334. esac
  335. _LT_AC_LTCONFIG_HACK
  336. ])
  337. # AC_LIBTOOL_HEADER_ASSERT
  338. # ------------------------
  339. AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
  340. [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
  341. [lt_cv_func_assert_works],
  342. [case $host in
  343. *-*-solaris*)
  344. if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
  345. case `$CC --version 2>/dev/null` in
  346. [[12]].*) lt_cv_func_assert_works=no ;;
  347. *) lt_cv_func_assert_works=yes ;;
  348. esac
  349. fi
  350. ;;
  351. esac])
  352. if test "x$lt_cv_func_assert_works" = xyes; then
  353. AC_CHECK_HEADERS(assert.h)
  354. fi
  355. ])# AC_LIBTOOL_HEADER_ASSERT
  356. # _LT_AC_CHECK_DLFCN
  357. # --------------------
  358. AC_DEFUN([_LT_AC_CHECK_DLFCN],
  359. [AC_CHECK_HEADERS(dlfcn.h)
  360. ])# _LT_AC_CHECK_DLFCN
  361. # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  362. # ---------------------------------
  363. AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
  364. [AC_REQUIRE([AC_CANONICAL_HOST])
  365. AC_REQUIRE([AC_PROG_NM])
  366. AC_REQUIRE([AC_OBJEXT])
  367. # Check for command to grab the raw symbol name followed by C symbol from nm.
  368. AC_MSG_CHECKING([command to parse $NM output])
  369. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
  370. # These are sane defaults that work on at least a few old systems.
  371. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  372. # Character class describing NM global symbol codes.
  373. symcode='[[BCDEGRST]]'
  374. # Regexp to match symbols that can be accessed directly from C.
  375. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  376. # Transform the above into a raw symbol and a C symbol.
  377. symxfrm='\1 \2\3 \3'
  378. # Transform an extracted symbol line into a proper C declaration
  379. lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
  380. # Transform an extracted symbol line into symbol name and symbol address
  381. lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
  382. # Define system-specific variables.
  383. case $host_os in
  384. aix*)
  385. symcode='[[BCDT]]'
  386. ;;
  387. cygwin* | mingw* | pw32*)
  388. symcode='[[ABCDGISTW]]'
  389. ;;
  390. hpux*) # Its linker distinguishes data from code symbols
  391. lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  392. lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
  393. ;;
  394. irix* | nonstopux*)
  395. symcode='[[BCDEGRST]]'
  396. ;;
  397. osf*)
  398. symcode='[[BCDEGQRST]]'
  399. ;;
  400. solaris* | sysv5*)
  401. symcode='[[BDT]]'
  402. ;;
  403. sysv4)
  404. symcode='[[DFNSTU]]'
  405. ;;
  406. esac
  407. # Handle CRLF in mingw tool chain
  408. opt_cr=
  409. case $host_os in
  410. mingw*)
  411. opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  412. ;;
  413. esac
  414. # If we're using GNU nm, then use its standard symbol codes.
  415. if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
  416. symcode='[[ABCDGISTW]]'
  417. fi
  418. # Try without a prefix undercore, then with it.
  419. for ac_symprfx in "" "_"; do
  420. # Write the raw and C identifiers.
  421. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
  422. # Check to see that the pipe works correctly.
  423. pipe_works=no
  424. rm -f conftest*
  425. cat > conftest.$ac_ext <<EOF
  426. #ifdef __cplusplus
  427. extern "C" {
  428. #endif
  429. char nm_test_var;
  430. void nm_test_func(){}
  431. #ifdef __cplusplus
  432. }
  433. #endif
  434. int main(){nm_test_var='a';nm_test_func();return(0);}
  435. EOF
  436. if AC_TRY_EVAL(ac_compile); then
  437. # Now try to grab the symbols.
  438. nlist=conftest.nm
  439. if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
  440. # Try sorting and uniquifying the output.
  441. if sort "$nlist" | uniq > "$nlist"T; then
  442. mv -f "$nlist"T "$nlist"
  443. else
  444. rm -f "$nlist"T
  445. fi
  446. # Make sure that we snagged all the symbols we need.
  447. if egrep ' nm_test_var$' "$nlist" >/dev/null; then
  448. if egrep ' nm_test_func$' "$nlist" >/dev/null; then
  449. cat <<EOF > conftest.$ac_ext
  450. #ifdef __cplusplus
  451. extern "C" {
  452. #endif
  453. EOF
  454. # Now generate the symbol file.
  455. eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
  456. cat <<EOF >> conftest.$ac_ext
  457. #if defined (__STDC__) && __STDC__
  458. # define lt_ptr void *
  459. #else
  460. # define lt_ptr char *
  461. # define const
  462. #endif
  463. /* The mapping between symbol names and symbols. */
  464. const struct {
  465. const char *name;
  466. lt_ptr address;
  467. }
  468. lt_preloaded_symbols[[]] =
  469. {
  470. EOF
  471. sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
  472. cat <<\EOF >> conftest.$ac_ext
  473. {0, (lt_ptr) 0}
  474. };
  475. #ifdef __cplusplus
  476. }
  477. #endif
  478. EOF
  479. # Now try linking the two files.
  480. mv conftest.$ac_objext conftstm.$ac_objext
  481. save_LIBS="$LIBS"
  482. save_CFLAGS="$CFLAGS"
  483. LIBS="conftstm.$ac_objext"
  484. CFLAGS="$CFLAGS$no_builtin_flag"
  485. if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
  486. pipe_works=yes
  487. fi
  488. LIBS="$save_LIBS"
  489. CFLAGS="$save_CFLAGS"
  490. else
  491. echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
  492. fi
  493. else
  494. echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
  495. fi
  496. else
  497. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
  498. fi
  499. else
  500. echo "$progname: failed program was:" >&AC_FD_CC
  501. cat conftest.$ac_ext >&5
  502. fi
  503. rm -f conftest* conftst*
  504. # Do not use the global_symbol_pipe unless it works.
  505. if test "$pipe_works" = yes; then
  506. break
  507. else
  508. lt_cv_sys_global_symbol_pipe=
  509. fi
  510. done
  511. ])
  512. global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
  513. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  514. global_symbol_to_cdecl=
  515. global_symbol_to_c_name_address=
  516. else
  517. global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
  518. global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
  519. fi
  520. if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
  521. then
  522. AC_MSG_RESULT(failed)
  523. else
  524. AC_MSG_RESULT(ok)
  525. fi
  526. ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  527. # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
  528. # ---------------------------------
  529. AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
  530. [# Find the correct PATH separator. Usually this is `:', but
  531. # DJGPP uses `;' like DOS.
  532. if test "X${PATH_SEPARATOR+set}" != Xset; then
  533. UNAME=${UNAME-`uname 2>/dev/null`}
  534. case X$UNAME in
  535. *-DOS) lt_cv_sys_path_separator=';' ;;
  536. *) lt_cv_sys_path_separator=':' ;;
  537. esac
  538. PATH_SEPARATOR=$lt_cv_sys_path_separator
  539. fi
  540. ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
  541. # _LT_AC_PROG_ECHO_BACKSLASH
  542. # --------------------------
  543. # Add some code to the start of the generated configure script which
  544. # will find an echo command which doesn't interpret backslashes.
  545. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
  546. [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
  547. [AC_DIVERT_PUSH(NOTICE)])
  548. _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
  549. # Check that we are running under the correct shell.
  550. SHELL=${CONFIG_SHELL-/bin/sh}
  551. case X$ECHO in
  552. X*--fallback-echo)
  553. # Remove one level of quotation (which was required for Make).
  554. ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
  555. ;;
  556. esac
  557. echo=${ECHO-echo}
  558. if test "X[$]1" = X--no-reexec; then
  559. # Discard the --no-reexec flag, and continue.
  560. shift
  561. elif test "X[$]1" = X--fallback-echo; then
  562. # Avoid inline document here, it may be left over
  563. :
  564. elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
  565. # Yippee, $echo works!
  566. :
  567. else
  568. # Restart under the correct shell.
  569. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
  570. fi
  571. if test "X[$]1" = X--fallback-echo; then
  572. # used as fallback echo
  573. shift
  574. cat <<EOF
  575. $*
  576. EOF
  577. exit 0
  578. fi
  579. # The HP-UX ksh and POSIX shell print the target directory to stdout
  580. # if CDPATH is set.
  581. if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  582. if test -z "$ECHO"; then
  583. if test "X${echo_test_string+set}" != Xset; then
  584. # find a string as large as possible, as long as the shell can cope with it
  585. for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
  586. # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
  587. if (echo_test_string="`eval $cmd`") 2>/dev/null &&
  588. echo_test_string="`eval $cmd`" &&
  589. (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
  590. then
  591. break
  592. fi
  593. done
  594. fi
  595. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  596. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  597. test "X$echo_testing_string" = "X$echo_test_string"; then
  598. :
  599. else
  600. # The Solaris, AIX, and Digital Unix default echo programs unquote
  601. # backslashes. This makes it impossible to quote backslashes using
  602. # echo "$something" | sed 's/\\/\\\\/g'
  603. #
  604. # So, first we look for a working echo in the user's PATH.
  605. IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  606. for dir in $PATH /usr/ucb; do
  607. if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  608. test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
  609. echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
  610. test "X$echo_testing_string" = "X$echo_test_string"; then
  611. echo="$dir/echo"
  612. break
  613. fi
  614. done
  615. IFS="$save_ifs"
  616. if test "X$echo" = Xecho; then
  617. # We didn't find a better echo, so look for alternatives.
  618. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
  619. echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
  620. test "X$echo_testing_string" = "X$echo_test_string"; then
  621. # This shell has a builtin print -r that does the trick.
  622. echo='print -r'
  623. elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
  624. test "X$CONFIG_SHELL" != X/bin/ksh; then
  625. # If we have ksh, try running configure again with it.
  626. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  627. export ORIGINAL_CONFIG_SHELL
  628. CONFIG_SHELL=/bin/ksh
  629. export CONFIG_SHELL
  630. exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
  631. else
  632. # Try using printf.
  633. echo='printf %s\n'
  634. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  635. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  636. test "X$echo_testing_string" = "X$echo_test_string"; then
  637. # Cool, printf works
  638. :
  639. elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  640. test "X$echo_testing_string" = 'X\t' &&
  641. echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  642. test "X$echo_testing_string" = "X$echo_test_string"; then
  643. CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
  644. export CONFIG_SHELL
  645. SHELL="$CONFIG_SHELL"
  646. export SHELL
  647. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  648. elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  649. test "X$echo_testing_string" = 'X\t' &&
  650. echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  651. test "X$echo_testing_string" = "X$echo_test_string"; then
  652. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  653. else
  654. # maybe with a smaller string...
  655. prev=:
  656. for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
  657. if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
  658. then
  659. break
  660. fi
  661. prev="$cmd"
  662. done
  663. if test "$prev" != 'sed 50q "[$]0"'; then
  664. echo_test_string=`eval $prev`
  665. export echo_test_string
  666. exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
  667. else
  668. # Oops. We lost completely, so just stick with echo.
  669. echo=echo
  670. fi
  671. fi
  672. fi
  673. fi
  674. fi
  675. fi
  676. # Copy echo and quote the copy suitably for passing to libtool from
  677. # the Makefile, instead of quoting the original, which is used later.
  678. ECHO=$echo
  679. if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
  680. ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
  681. fi
  682. AC_SUBST(ECHO)
  683. AC_DIVERT_POP
  684. ])# _LT_AC_PROG_ECHO_BACKSLASH
  685. # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  686. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  687. # ------------------------------------------------------------------
  688. AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
  689. [if test "$cross_compiling" = yes; then :
  690. [$4]
  691. else
  692. AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  693. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  694. lt_status=$lt_dlunknown
  695. cat > conftest.$ac_ext <<EOF
  696. [#line __oline__ "configure"
  697. #include "confdefs.h"
  698. #if HAVE_DLFCN_H
  699. #include <dlfcn.h>
  700. #endif
  701. #include <stdio.h>
  702. #ifdef RTLD_GLOBAL
  703. # define LT_DLGLOBAL RTLD_GLOBAL
  704. #else
  705. # ifdef DL_GLOBAL
  706. # define LT_DLGLOBAL DL_GLOBAL
  707. # else
  708. # define LT_DLGLOBAL 0
  709. # endif
  710. #endif
  711. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  712. find out it does not work in some platform. */
  713. #ifndef LT_DLLAZY_OR_NOW
  714. # ifdef RTLD_LAZY
  715. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  716. # else
  717. # ifdef DL_LAZY
  718. # define LT_DLLAZY_OR_NOW DL_LAZY
  719. # else
  720. # ifdef RTLD_NOW
  721. # define LT_DLLAZY_OR_NOW RTLD_NOW
  722. # else
  723. # ifdef DL_NOW
  724. # define LT_DLLAZY_OR_NOW DL_NOW
  725. # else
  726. # define LT_DLLAZY_OR_NOW 0
  727. # endif
  728. # endif
  729. # endif
  730. # endif
  731. #endif
  732. #ifdef __cplusplus
  733. extern "C" void exit (int);
  734. #endif
  735. void fnord() { int i=42;}
  736. int main ()
  737. {
  738. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  739. int status = $lt_dlunknown;
  740. if (self)
  741. {
  742. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  743. else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  744. /* dlclose (self); */
  745. }
  746. exit (status);
  747. }]
  748. EOF
  749. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  750. (./conftest; exit; ) 2>/dev/null
  751. lt_status=$?
  752. case x$lt_status in
  753. x$lt_dlno_uscore) $1 ;;
  754. x$lt_dlneed_uscore) $2 ;;
  755. x$lt_unknown|x*) $3 ;;
  756. esac
  757. else :
  758. # compilation failed
  759. $3
  760. fi
  761. fi
  762. rm -fr conftest*
  763. ])# _LT_AC_TRY_DLOPEN_SELF
  764. # AC_LIBTOOL_DLOPEN_SELF
  765. # -------------------
  766. AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
  767. [if test "x$enable_dlopen" != xyes; then
  768. enable_dlopen=unknown
  769. enable_dlopen_self=unknown
  770. enable_dlopen_self_static=unknown
  771. else
  772. lt_cv_dlopen=no
  773. lt_cv_dlopen_libs=
  774. case $host_os in
  775. beos*)
  776. lt_cv_dlopen="load_add_on"
  777. lt_cv_dlopen_libs=
  778. lt_cv_dlopen_self=yes
  779. ;;
  780. cygwin* | mingw* | pw32*)
  781. lt_cv_dlopen="LoadLibrary"
  782. lt_cv_dlopen_libs=
  783. ;;
  784. *)
  785. AC_CHECK_FUNC([shl_load],
  786. [lt_cv_dlopen="shl_load"],
  787. [AC_CHECK_LIB([dld], [shl_load],
  788. [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
  789. [AC_CHECK_FUNC([dlopen],
  790. [lt_cv_dlopen="dlopen"],
  791. [AC_CHECK_LIB([dl], [dlopen],
  792. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  793. [AC_CHECK_LIB([svld], [dlopen],
  794. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  795. [AC_CHECK_LIB([dld], [dld_link],
  796. [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
  797. ])
  798. ])
  799. ])
  800. ])
  801. ])
  802. ;;
  803. esac
  804. if test "x$lt_cv_dlopen" != xno; then
  805. enable_dlopen=yes
  806. else
  807. enable_dlopen=no
  808. fi
  809. case $lt_cv_dlopen in
  810. dlopen)
  811. save_CPPFLAGS="$CPPFLAGS"
  812. AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  813. test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  814. save_LDFLAGS="$LDFLAGS"
  815. eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  816. save_LIBS="$LIBS"
  817. LIBS="$lt_cv_dlopen_libs $LIBS"
  818. AC_CACHE_CHECK([whether a program can dlopen itself],
  819. lt_cv_dlopen_self, [dnl
  820. _LT_AC_TRY_DLOPEN_SELF(
  821. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  822. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  823. ])
  824. if test "x$lt_cv_dlopen_self" = xyes; then
  825. LDFLAGS="$LDFLAGS $link_static_flag"
  826. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  827. lt_cv_dlopen_self_static, [dnl
  828. _LT_AC_TRY_DLOPEN_SELF(
  829. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  830. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  831. ])
  832. fi
  833. CPPFLAGS="$save_CPPFLAGS"
  834. LDFLAGS="$save_LDFLAGS"
  835. LIBS="$save_LIBS"
  836. ;;
  837. esac
  838. case $lt_cv_dlopen_self in
  839. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  840. *) enable_dlopen_self=unknown ;;
  841. esac
  842. case $lt_cv_dlopen_self_static in
  843. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  844. *) enable_dlopen_self_static=unknown ;;
  845. esac
  846. fi
  847. ])# AC_LIBTOOL_DLOPEN_SELF
  848. AC_DEFUN([_LT_AC_LTCONFIG_HACK],
  849. [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
  850. # Sed substitution that helps us do robust quoting. It backslashifies
  851. # metacharacters that are still active within double-quoted strings.
  852. Xsed='sed -e s/^X//'
  853. sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
  854. # Same as above, but do not quote variable references.
  855. double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
  856. # Sed substitution to delay expansion of an escaped shell variable in a
  857. # double_quote_subst'ed string.
  858. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  859. # Constants:
  860. rm="rm -f"
  861. # Global variables:
  862. default_ofile=libtool
  863. can_build_shared=yes
  864. # All known linkers require a `.a' archive for static linking (except M$VC,
  865. # which needs '.lib').
  866. libext=a
  867. ltmain="$ac_aux_dir/ltmain.sh"
  868. ofile="$default_ofile"
  869. with_gnu_ld="$lt_cv_prog_gnu_ld"
  870. need_locks="$enable_libtool_lock"
  871. old_CC="$CC"
  872. old_CFLAGS="$CFLAGS"
  873. # Set sane defaults for various variables
  874. test -z "$AR" && AR=ar
  875. test -z "$AR_FLAGS" && AR_FLAGS=cru
  876. test -z "$AS" && AS=as
  877. test -z "$CC" && CC=cc
  878. test -z "$DLLTOOL" && DLLTOOL=dlltool
  879. test -z "$LD" && LD=ld
  880. test -z "$LN_S" && LN_S="ln -s"
  881. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  882. test -z "$NM" && NM=nm
  883. test -z "$OBJDUMP" && OBJDUMP=objdump
  884. test -z "$RANLIB" && RANLIB=:
  885. test -z "$STRIP" && STRIP=:
  886. test -z "$ac_objext" && ac_objext=o
  887. if test x"$host" != x"$build"; then
  888. ac_tool_prefix=${host_alias}-
  889. else
  890. ac_tool_prefix=
  891. fi
  892. # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
  893. case $host_os in
  894. linux-gnu*) ;;
  895. linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
  896. esac
  897. case $host_os in
  898. aix3*)
  899. # AIX sometimes has problems with the GCC collect2 program. For some
  900. # reason, if we set the COLLECT_NAMES environment variable, the problems
  901. # vanish in a puff of smoke.
  902. if test "X${COLLECT_NAMES+set}" != Xset; then
  903. COLLECT_NAMES=
  904. export COLLECT_NAMES
  905. fi
  906. ;;
  907. esac
  908. # Determine commands to create old-style static archives.
  909. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
  910. old_postinstall_cmds='chmod 644 $oldlib'
  911. old_postuninstall_cmds=
  912. if test -n "$RANLIB"; then
  913. case $host_os in
  914. openbsd*)
  915. old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
  916. ;;
  917. *)
  918. old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
  919. ;;
  920. esac
  921. old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
  922. fi
  923. # Allow CC to be a program name with arguments.
  924. set dummy $CC
  925. compiler="[$]2"
  926. AC_MSG_CHECKING([for objdir])
  927. rm -f .libs 2>/dev/null
  928. mkdir .libs 2>/dev/null
  929. if test -d .libs; then
  930. objdir=.libs
  931. else
  932. # MS-DOS does not allow filenames that begin with a dot.
  933. objdir=_libs
  934. fi
  935. rmdir .libs 2>/dev/null
  936. AC_MSG_RESULT($objdir)
  937. AC_ARG_WITH(pic,
  938. [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
  939. pic_mode="$withval", pic_mode=default)
  940. test -z "$pic_mode" && pic_mode=default
  941. # We assume here that the value for lt_cv_prog_cc_pic will not be cached
  942. # in isolation, and that seeing it set (from the cache) indicates that
  943. # the associated values are set (in the cache) correctly too.
  944. AC_MSG_CHECKING([for $compiler option to produce PIC])
  945. AC_CACHE_VAL(lt_cv_prog_cc_pic,
  946. [ lt_cv_prog_cc_pic=
  947. lt_cv_prog_cc_shlib=
  948. lt_cv_prog_cc_wl=
  949. lt_cv_prog_cc_static=
  950. lt_cv_prog_cc_no_builtin=
  951. lt_cv_prog_cc_can_build_shared=$can_build_shared
  952. if test "$GCC" = yes; then
  953. lt_cv_prog_cc_wl='-Wl,'
  954. lt_cv_prog_cc_static='-static'
  955. case $host_os in
  956. aix*)
  957. # Below there is a dirty hack to force normal static linking with -ldl
  958. # The problem is because libdl dynamically linked with both libc and
  959. # libC (AIX C++ library), which obviously doesn't included in libraries
  960. # list by gcc. This cause undefined symbols with -static flags.
  961. # This hack allows C programs to be linked with "-static -ldl", but
  962. # not sure about C++ programs.
  963. lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
  964. ;;
  965. amigaos*)
  966. # FIXME: we need at least 68020 code to build shared libraries, but
  967. # adding the `-m68020' flag to GCC prevents building anything better,
  968. # like `-m68040'.
  969. lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
  970. ;;
  971. beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  972. # PIC is the default for these OSes.
  973. ;;
  974. darwin* | rhapsody*)
  975. # PIC is the default on this platform
  976. # Common symbols not allowed in MH_DYLIB files
  977. lt_cv_prog_cc_pic='-fno-common'
  978. ;;
  979. cygwin* | mingw* | pw32* | os2*)
  980. # This hack is so that the source file can tell whether it is being
  981. # built for inclusion in a dll (and should export symbols for example).
  982. lt_cv_prog_cc_pic='-DDLL_EXPORT'
  983. ;;
  984. sysv4*MP*)
  985. if test -d /usr/nec; then
  986. lt_cv_prog_cc_pic=-Kconform_pic
  987. fi
  988. ;;
  989. *)
  990. lt_cv_prog_cc_pic='-fPIC'
  991. ;;
  992. esac
  993. else
  994. # PORTME Check for PIC flags for the system compiler.
  995. case $host_os in
  996. aix3* | aix4* | aix5*)
  997. lt_cv_prog_cc_wl='-Wl,'
  998. # All AIX code is PIC.
  999. if test "$host_cpu" = ia64; then
  1000. # AIX 5 now supports IA64 processor
  1001. lt_cv_prog_cc_static='-Bstatic'
  1002. else
  1003. lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
  1004. fi
  1005. ;;
  1006. hpux9* | hpux10* | hpux11*)
  1007. # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
  1008. lt_cv_prog_cc_wl='-Wl,'
  1009. lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
  1010. lt_cv_prog_cc_pic='+Z'
  1011. ;;
  1012. irix5* | irix6* | nonstopux*)
  1013. lt_cv_prog_cc_wl='-Wl,'
  1014. lt_cv_prog_cc_static='-non_shared'
  1015. # PIC (with -KPIC) is the default.
  1016. ;;
  1017. cygwin* | mingw* | pw32* | os2*)
  1018. # This hack is so that the source file can tell whether it is being
  1019. # built for inclusion in a dll (and should export symbols for example).
  1020. lt_cv_prog_cc_pic='-DDLL_EXPORT'
  1021. ;;
  1022. newsos6)
  1023. lt_cv_prog_cc_pic='-KPIC'
  1024. lt_cv_prog_cc_static='-Bstatic'
  1025. ;;
  1026. osf3* | osf4* | osf5*)
  1027. # All OSF/1 code is PIC.
  1028. lt_cv_prog_cc_wl='-Wl,'
  1029. lt_cv_prog_cc_static='-non_shared'
  1030. ;;
  1031. sco3.2v5*)
  1032. lt_cv_prog_cc_pic='-Kpic'
  1033. lt_cv_prog_cc_static='-dn'
  1034. lt_cv_prog_cc_shlib='-belf'
  1035. ;;
  1036. solaris*)
  1037. lt_cv_prog_cc_pic='-KPIC'
  1038. lt_cv_prog_cc_static='-Bstatic'
  1039. lt_cv_prog_cc_wl='-Wl,'
  1040. ;;
  1041. sunos4*)
  1042. lt_cv_prog_cc_pic='-PIC'
  1043. lt_cv_prog_cc_static='-Bstatic'
  1044. lt_cv_prog_cc_wl='-Qoption ld '
  1045. ;;
  1046. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  1047. lt_cv_prog_cc_pic='-KPIC'
  1048. lt_cv_prog_cc_static='-Bstatic'
  1049. lt_cv_prog_cc_wl='-Wl,'
  1050. ;;
  1051. uts4*)
  1052. lt_cv_prog_cc_pic='-pic'
  1053. lt_cv_prog_cc_static='-Bstatic'
  1054. ;;
  1055. sysv4*MP*)
  1056. if test -d /usr/nec ;then
  1057. lt_cv_prog_cc_pic='-Kconform_pic'
  1058. lt_cv_prog_cc_static='-Bstatic'
  1059. fi
  1060. ;;
  1061. *)
  1062. lt_cv_prog_cc_can_build_shared=no
  1063. ;;
  1064. esac
  1065. fi
  1066. ])
  1067. if test -z "$lt_cv_prog_cc_pic"; then
  1068. AC_MSG_RESULT([none])
  1069. else
  1070. AC_MSG_RESULT([$lt_cv_prog_cc_pic])
  1071. # Check to make sure the pic_flag actually works.
  1072. AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
  1073. AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
  1074. save_CFLAGS="$CFLAGS"
  1075. CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
  1076. AC_TRY_COMPILE([], [], [dnl
  1077. case $host_os in
  1078. hpux9* | hpux10* | hpux11*)
  1079. # On HP-UX, both CC and GCC only warn that PIC is supported... then
  1080. # they create non-PIC objects. So, if there were any warnings, we
  1081. # assume that PIC is not supported.
  1082. if test -s conftest.err; then
  1083. lt_cv_prog_cc_pic_works=no
  1084. else
  1085. lt_cv_prog_cc_pic_works=yes
  1086. fi
  1087. ;;
  1088. *)
  1089. lt_cv_prog_cc_pic_works=yes
  1090. ;;
  1091. esac
  1092. ], [dnl
  1093. lt_cv_prog_cc_pic_works=no
  1094. ])
  1095. CFLAGS="$save_CFLAGS"
  1096. ])
  1097. if test "X$lt_cv_prog_cc_pic_works" = Xno; then
  1098. lt_cv_prog_cc_pic=
  1099. lt_cv_prog_cc_can_build_shared=no
  1100. else
  1101. lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
  1102. fi
  1103. AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
  1104. fi
  1105. # Check for any special shared library compilation flags.
  1106. if test -n "$lt_cv_prog_cc_shlib"; then
  1107. AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
  1108. if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
  1109. else
  1110. AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
  1111. lt_cv_prog_cc_can_build_shared=no
  1112. fi
  1113. fi
  1114. AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
  1115. AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
  1116. lt_cv_prog_cc_static_works=no
  1117. save_LDFLAGS="$LDFLAGS"
  1118. LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
  1119. AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
  1120. LDFLAGS="$save_LDFLAGS"
  1121. ])
  1122. # Belt *and* braces to stop my trousers falling down:
  1123. test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
  1124. AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
  1125. pic_flag="$lt_cv_prog_cc_pic"
  1126. special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
  1127. wl="$lt_cv_prog_cc_wl"
  1128. link_static_flag="$lt_cv_prog_cc_static"
  1129. no_builtin_flag="$lt_cv_prog_cc_no_builtin"
  1130. can_build_shared="$lt_cv_prog_cc_can_build_shared"
  1131. # Check to see if options -o and -c are simultaneously supported by compiler
  1132. AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
  1133. AC_CACHE_VAL([lt_cv_compiler_c_o], [
  1134. $rm -r conftest 2>/dev/null
  1135. mkdir conftest
  1136. cd conftest
  1137. echo "int some_variable = 0;" > conftest.$ac_ext
  1138. mkdir out
  1139. # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
  1140. # that will create temporary files in the current directory regardless of
  1141. # the output directory. Thus, making CWD read-only will cause this test
  1142. # to fail, enabling locking or at least warning the user not to do parallel
  1143. # builds.
  1144. chmod -w .
  1145. save_CFLAGS="$CFLAGS"
  1146. CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
  1147. compiler_c_o=no
  1148. if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
  1149. # The compiler can only warn and ignore the option if not recognized
  1150. # So say no if there are warnings
  1151. if test -s out/conftest.err; then
  1152. lt_cv_compiler_c_o=no
  1153. else
  1154. lt_cv_compiler_c_o=yes
  1155. fi
  1156. else
  1157. # Append any errors to the config.log.
  1158. cat out/conftest.err 1>&AC_FD_CC
  1159. lt_cv_compiler_c_o=no
  1160. fi
  1161. CFLAGS="$save_CFLAGS"
  1162. chmod u+w .
  1163. $rm conftest* out/*
  1164. rmdir out
  1165. cd ..
  1166. rmdir conftest
  1167. $rm -r conftest 2>/dev/null
  1168. ])
  1169. compiler_c_o=$lt_cv_compiler_c_o
  1170. AC_MSG_RESULT([$compiler_c_o])
  1171. if test x"$compiler_c_o" = x"yes"; then
  1172. # Check to see if we can write to a .lo
  1173. AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
  1174. AC_CACHE_VAL([lt_cv_compiler_o_lo], [
  1175. lt_cv_compiler_o_lo=no
  1176. save_CFLAGS="$CFLAGS"
  1177. CFLAGS="$CFLAGS -c -o conftest.lo"
  1178. save_objext="$ac_objext"
  1179. ac_objext=lo
  1180. AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
  1181. # The compiler can only warn and ignore the option if not recognized
  1182. # So say no if there are warnings
  1183. if test -s conftest.err; then
  1184. lt_cv_compiler_o_lo=no
  1185. else
  1186. lt_cv_compiler_o_lo=yes
  1187. fi
  1188. ])
  1189. ac_objext="$save_objext"
  1190. CFLAGS="$save_CFLAGS"
  1191. ])
  1192. compiler_o_lo=$lt_cv_compiler_o_lo
  1193. AC_MSG_RESULT([$compiler_o_lo])
  1194. else
  1195. compiler_o_lo=no
  1196. fi
  1197. # Check to see if we can do hard links to lock some files if needed
  1198. hard_links="nottested"
  1199. if test "$compiler_c_o" = no && test "$need_locks" != no; then
  1200. # do not overwrite the value of need_locks provided by the user
  1201. AC_MSG_CHECKING([if we can lock with hard links])
  1202. hard_links=yes
  1203. $rm conftest*
  1204. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1205. touch conftest.a
  1206. ln conftest.a conftest.b 2>&5 || hard_links=no
  1207. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1208. AC_MSG_RESULT([$hard_links])
  1209. if test "$hard_links" = no; then
  1210. AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
  1211. need_locks=warn
  1212. fi
  1213. else
  1214. need_locks=no
  1215. fi
  1216. if test "$GCC" = yes; then
  1217. # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
  1218. AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
  1219. echo "int some_variable = 0;" > conftest.$ac_ext
  1220. save_CFLAGS="$CFLAGS"
  1221. CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
  1222. compiler_rtti_exceptions=no
  1223. AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
  1224. # The compiler can only warn and ignore the option if not recognized
  1225. # So say no if there are warnings
  1226. if test -s conftest.err; then
  1227. compiler_rtti_exceptions=no
  1228. else
  1229. compiler_rtti_exceptions=yes
  1230. fi
  1231. ])
  1232. CFLAGS="$save_CFLAGS"
  1233. AC_MSG_RESULT([$compiler_rtti_exceptions])
  1234. if test "$compiler_rtti_exceptions" = "yes"; then
  1235. no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
  1236. else
  1237. no_builtin_flag=' -fno-builtin'
  1238. fi
  1239. fi
  1240. # See if the linker supports building shared libraries.
  1241. AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
  1242. allow_undefined_flag=
  1243. no_undefined_flag=
  1244. need_lib_prefix=unknown
  1245. need_version=unknown
  1246. # when you set need_version to no, make sure it does not cause -set_version
  1247. # flags to be left without arguments
  1248. archive_cmds=
  1249. archive_expsym_cmds=
  1250. old_archive_from_new_cmds=
  1251. old_archive_from_expsyms_cmds=
  1252. export_dynamic_flag_spec=
  1253. whole_archive_flag_spec=
  1254. thread_safe_flag_spec=
  1255. hardcode_into_libs=no
  1256. hardcode_libdir_flag_spec=
  1257. hardcode_libdir_separator=
  1258. hardcode_direct=no
  1259. hardcode_minus_L=no
  1260. hardcode_shlibpath_var=unsupported
  1261. runpath_var=
  1262. link_all_deplibs=unknown
  1263. always_export_symbols=no
  1264. export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
  1265. # include_expsyms should be a list of space-separated symbols to be *always*
  1266. # included in the symbol list
  1267. include_expsyms=
  1268. # exclude_expsyms can be an egrep regular expression of symbols to exclude
  1269. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  1270. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  1271. # as well as any symbol that contains `d'.
  1272. exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
  1273. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  1274. # platforms (ab)use it in PIC code, but their linkers get confused if
  1275. # the symbol is explicitly referenced. Since portable code cannot
  1276. # rely on this symbol name, it's probably fine to never include it in
  1277. # preloaded symbol tables.
  1278. extract_expsyms_cmds=
  1279. case $host_os in
  1280. cygwin* | mingw* | pw32*)
  1281. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  1282. # When not using gcc, we currently assume that we are using
  1283. # Microsoft Visual C++.
  1284. if test "$GCC" != yes; then
  1285. with_gnu_ld=no
  1286. fi
  1287. ;;
  1288. openbsd*)
  1289. with_gnu_ld=no
  1290. ;;
  1291. esac
  1292. ld_shlibs=yes
  1293. if test "$with_gnu_ld" = yes; then
  1294. # If archive_cmds runs LD, not CC, wlarc should be empty
  1295. wlarc='${wl}'
  1296. # See if GNU ld supports shared libraries.
  1297. case $host_os in
  1298. aix3* | aix4* | aix5*)
  1299. # On AIX, the GNU linker is very broken
  1300. # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
  1301. ld_shlibs=no
  1302. cat <<EOF 1>&2
  1303. *** Warning: the GNU linker, at least up to release 2.9.1, is reported
  1304. *** to be unable to reliably create shared libraries on AIX.
  1305. *** Therefore, libtool is disabling shared libraries support. If you
  1306. *** really care for shared libraries, you may want to modify your PATH
  1307. *** so that a non-GNU linker is found, and then restart.
  1308. EOF
  1309. ;;
  1310. amigaos*)
  1311. archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  1312. hardcode_libdir_flag_spec='-L$libdir'
  1313. hardcode_minus_L=yes
  1314. # Samuel A. Falvo II <[email protected]> reports
  1315. # that the semantics of dynamic libraries on AmigaOS, at least up
  1316. # to version 4, is to share data among multiple programs linked
  1317. # with the same dynamic library. Since this doesn't match the
  1318. # behavior of shared libraries on other platforms, we can use
  1319. # them.
  1320. ld_shlibs=no
  1321. ;;
  1322. beos*)
  1323. if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  1324. allow_undefined_flag=unsupported
  1325. # Joseph Beckenbach <[email protected]> says some releases of gcc
  1326. # support --undefined. This deserves some investigation. FIXME
  1327. archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  1328. else
  1329. ld_shlibs=no
  1330. fi
  1331. ;;
  1332. cygwin* | mingw* | pw32*)
  1333. # hardcode_libdir_flag_spec is actually meaningless, as there is
  1334. # no search path for DLLs.
  1335. hardcode_libdir_flag_spec='-L$libdir'
  1336. allow_undefined_flag=unsupported
  1337. always_export_symbols=yes
  1338. extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
  1339. sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
  1340. test -f $output_objdir/impgen.exe || (cd $output_objdir && \
  1341. if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
  1342. else $CC -o impgen impgen.c ; fi)~
  1343. $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
  1344. old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
  1345. # cygwin and mingw dlls have different entry points and sets of symbols
  1346. # to exclude.
  1347. # FIXME: what about values for MSVC?
  1348. dll_entry=__cygwin_dll_entry@12
  1349. dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
  1350. case $host_os in
  1351. mingw*)
  1352. # mingw values
  1353. dll_entry=_DllMainCRTStartup@12
  1354. dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
  1355. ;;
  1356. esac
  1357. # mingw and cygwin differ, and it's simplest to just exclude the union
  1358. # of the two symbol sets.
  1359. dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
  1360. # recent cygwin and mingw systems supply a stub DllMain which the user
  1361. # can override, but on older systems we have to supply one (in ltdll.c)
  1362. if test "x$lt_cv_need_dllmain" = "xyes"; then
  1363. ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
  1364. ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
  1365. test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
  1366. else
  1367. ltdll_obj=
  1368. ltdll_cmds=
  1369. fi
  1370. # Extract the symbol export list from an `--export-all' def file,
  1371. # then regenerate the def file from the symbol export list, so that
  1372. # the compiled dll only exports the symbol export list.
  1373. # Be careful not to strip the DATA tag left be newer dlltools.
  1374. export_symbols_cmds="$ltdll_cmds"'
  1375. $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
  1376. sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
  1377. # If the export-symbols file already is a .def file (1st line
  1378. # is EXPORTS), use it as is.
  1379. # If DATA tags from a recent dlltool are present, honour them!
  1380. archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
  1381. cp $export_symbols $output_objdir/$soname-def;
  1382. else
  1383. echo EXPORTS > $output_objdir/$soname-def;
  1384. _lt_hint=1;
  1385. cat $export_symbols | while read symbol; do
  1386. set dummy \$symbol;
  1387. case \[$]# in
  1388. 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
  1389. 4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
  1390. *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
  1391. esac;
  1392. _lt_hint=`expr 1 + \$_lt_hint`;
  1393. done;
  1394. fi~
  1395. '"$ltdll_cmds"'
  1396. $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
  1397. $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
  1398. $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
  1399. $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
  1400. $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
  1401. ;;
  1402. netbsd*)
  1403. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  1404. archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  1405. wlarc=
  1406. else
  1407. archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  1408. archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  1409. fi
  1410. ;;
  1411. solaris* | sysv5*)
  1412. if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
  1413. ld_shlibs=no
  1414. cat <<EOF 1>&2
  1415. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  1416. *** create shared libraries on Solaris systems. Therefore, libtool
  1417. *** is disabling shared libraries support. We urge you to upgrade GNU
  1418. *** binutils to release 2.9.1 or newer. Another option is to modify
  1419. *** your PATH or compiler configuration so that the native linker is
  1420. *** used, and then restart.
  1421. EOF
  1422. elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  1423. archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  1424. archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  1425. else
  1426. ld_shlibs=no
  1427. fi
  1428. ;;
  1429. sunos4*)
  1430. archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  1431. wlarc=
  1432. hardcode_direct=yes
  1433. hardcode_shlibpath_var=no
  1434. ;;
  1435. *)
  1436. if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  1437. archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  1438. archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  1439. else
  1440. ld_shlibs=no
  1441. fi
  1442. ;;
  1443. esac
  1444. if test "$ld_shlibs" = yes; then
  1445. runpath_var=LD_RUN_PATH
  1446. hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
  1447. export_dynamic_flag_spec='${wl}--export-dynamic'
  1448. case $host_os in
  1449. cygwin* | mingw* | pw32*)
  1450. # dlltool doesn't understand --whole-archive et. al.
  1451. whole_archive_flag_spec=
  1452. ;;
  1453. *)
  1454. # ancient GNU ld didn't support --whole-archive et. al.
  1455. if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
  1456. whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  1457. else
  1458. whole_archive_flag_spec=
  1459. fi
  1460. ;;
  1461. esac
  1462. fi
  1463. else
  1464. # PORTME fill in a description of your system's linker (not GNU ld)
  1465. case $host_os in
  1466. aix3*)
  1467. allow_undefined_flag=unsupported
  1468. always_export_symbols=yes
  1469. archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
  1470. # Note: this linker hardcodes the directories in LIBPATH if there
  1471. # are no directories specified by -L.
  1472. hardcode_minus_L=yes
  1473. if test "$GCC" = yes && test -z "$link_static_flag"; then
  1474. # Neither direct hardcoding nor static linking is supported with a
  1475. # broken collect2.
  1476. hardcode_direct=unsupported
  1477. fi
  1478. ;;
  1479. aix4* | aix5*)
  1480. if test "$host_cpu" = ia64; then
  1481. # On IA64, the linker does run time linking by default, so we don't
  1482. # have to do anything special.
  1483. aix_use_runtimelinking=no
  1484. exp_sym_flag='-Bexport'
  1485. no_entry_flag=""
  1486. else
  1487. aix_use_runtimelinking=no
  1488. # Test if we are trying to use run time linking or normal
  1489. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  1490. # need to do runtime linking.
  1491. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
  1492. for ld_flag in $LDFLAGS; do
  1493. case $ld_flag in
  1494. *-brtl*)
  1495. aix_use_runtimelinking=yes
  1496. break
  1497. ;;
  1498. esac
  1499. done
  1500. esac
  1501. exp_sym_flag='-bexport'
  1502. no_entry_flag='-bnoentry'
  1503. fi
  1504. # When large executables or shared objects are built, AIX ld can
  1505. # have problems creating the table of contents. If linking a library
  1506. # or program results in "error TOC overflow" add -mminimal-toc to
  1507. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  1508. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  1509. hardcode_direct=yes
  1510. archive_cmds=''
  1511. hardcode_libdir_separator=':'
  1512. if test "$GCC" = yes; then
  1513. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  1514. collect2name=`${CC} -print-prog-name=collect2`
  1515. if test -f "$collect2name" && \
  1516. strings "$collect2name" | grep resolve_lib_name >/dev/null
  1517. then
  1518. # We have reworked collect2
  1519. hardcode_direct=yes
  1520. else
  1521. # We have old collect2
  1522. hardcode_direct=unsupported
  1523. # It fails to find uninstalled libraries when the uninstalled
  1524. # path is not listed in the libpath. Setting hardcode_minus_L
  1525. # to unsupported forces relinking
  1526. hardcode_minus_L=yes
  1527. hardcode_libdir_flag_spec='-L$libdir'
  1528. hardcode_libdir_separator=
  1529. fi
  1530. esac
  1531. shared_flag='-shared'
  1532. else
  1533. # not using gcc
  1534. if test "$host_cpu" = ia64; then
  1535. shared_flag='${wl}-G'
  1536. else
  1537. if test "$aix_use_runtimelinking" = yes; then
  1538. shared_flag='${wl}-G'
  1539. else
  1540. shared_flag='${wl}-bM:SRE'
  1541. fi
  1542. fi
  1543. fi
  1544. # It seems that -bexpall can do strange things, so it is better to
  1545. # generate a list of symbols to export.
  1546. always_export_symbols=yes
  1547. if test "$aix_use_runtimelinking" = yes; then
  1548. # Warning - without using the other runtime loading flags (-brtl),
  1549. # -berok will link without error, but may produce a broken library.
  1550. allow_undefined_flag='-berok'
  1551. hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
  1552. archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  1553. else
  1554. if test "$host_cpu" = ia64; then
  1555. hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
  1556. allow_undefined_flag="-z nodefs"
  1557. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
  1558. else
  1559. hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
  1560. # Warning - without using the other run time loading flags,
  1561. # -berok will link without error, but may produce a broken library.
  1562. allow_undefined_flag='${wl}-berok'
  1563. # This is a bit strange, but is similar to how AIX traditionally builds
  1564. # it's shared libraries.
  1565. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
  1566. fi
  1567. fi
  1568. ;;
  1569. amigaos*)
  1570. archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  1571. hardcode_libdir_flag_spec='-L$libdir'
  1572. hardcode_minus_L=yes
  1573. # see comment about different semantics on the GNU ld section
  1574. ld_shlibs=no
  1575. ;;
  1576. cygwin* | mingw* | pw32*)
  1577. # When not using gcc, we currently assume that we are using
  1578. # Microsoft Visual C++.
  1579. # hardcode_libdir_flag_spec is actually meaningless, as there is
  1580. # no search path for DLLs.
  1581. hardcode_libdir_flag_spec=' '
  1582. allow_undefined_flag=unsupported
  1583. # Tell ltmain to make .lib files, not .a files.
  1584. libext=lib
  1585. # FIXME: Setting linknames here is a bad hack.
  1586. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
  1587. # The linker will automatically build a .lib file if we build a DLL.
  1588. old_archive_from_new_cmds='true'
  1589. # FIXME: Should let the user specify the lib program.
  1590. old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
  1591. fix_srcfile_path='`cygpath -w "$srcfile"`'
  1592. ;;
  1593. darwin* | rhapsody*)
  1594. case "$host_os" in
  1595. rhapsody* | darwin1.[[012]])
  1596. allow_undefined_flag='-undefined suppress'
  1597. ;;
  1598. *) # Darwin 1.3 on
  1599. allow_undefined_flag='-flat_namespace -undefined suppress'
  1600. ;;
  1601. esac
  1602. # FIXME: Relying on posixy $() will cause problems for
  1603. # cross-compilation, but unfortunately the echo tests do not
  1604. # yet detect zsh echo's removal of \ escapes. Also zsh mangles
  1605. # `"' quotes if we put them in here... so don't!
  1606. archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
  1607. # We need to add '_' to the symbols in $export_symbols first
  1608. #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
  1609. hardcode_direct=yes
  1610. hardcode_shlibpath_var=no
  1611. whole_archive_flag_spec='-all_load $convenience'
  1612. ;;
  1613. freebsd1*)
  1614. ld_shlibs=no
  1615. ;;
  1616. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  1617. # support. Future versions do this automatically, but an explicit c++rt0.o
  1618. # does not break anything, and helps significantly (at the cost of a little
  1619. # extra space).
  1620. freebsd2.2*)
  1621. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  1622. hardcode_libdir_flag_spec='-R$libdir'
  1623. hardcode_direct=yes
  1624. hardcode_shlibpath_var=no
  1625. ;;
  1626. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  1627. freebsd2*)
  1628. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  1629. hardcode_direct=yes
  1630. hardcode_minus_L=yes
  1631. hardcode_shlibpath_var=no
  1632. ;;
  1633. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  1634. freebsd*)
  1635. archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
  1636. hardcode_libdir_flag_spec='-R$libdir'
  1637. hardcode_direct=yes
  1638. hardcode_shlibpath_var=no
  1639. ;;
  1640. hpux9* | hpux10* | hpux11*)
  1641. case $host_os in
  1642. hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
  1643. *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
  1644. esac
  1645. hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
  1646. hardcode_libdir_separator=:
  1647. hardcode_direct=yes
  1648. hardcode_minus_L=yes # Not in the search PATH, but as the default
  1649. # location of the library.
  1650. export_dynamic_flag_spec='${wl}-E'
  1651. ;;
  1652. irix5* | irix6* | nonstopux*)
  1653. if test "$GCC" = yes; then
  1654. archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  1655. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  1656. else
  1657. archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  1658. hardcode_libdir_flag_spec='-rpath $libdir'
  1659. fi
  1660. hardcode_libdir_separator=:
  1661. link_all_deplibs=yes
  1662. ;;
  1663. netbsd*)
  1664. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  1665. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  1666. else
  1667. archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  1668. fi
  1669. hardcode_libdir_flag_spec='-R$libdir'
  1670. hardcode_direct=yes
  1671. hardcode_shlibpath_var=no
  1672. ;;
  1673. newsos6)
  1674. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  1675. hardcode_direct=yes
  1676. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  1677. hardcode_libdir_separator=:
  1678. hardcode_shlibpath_var=no
  1679. ;;
  1680. openbsd*)
  1681. hardcode_direct=yes
  1682. hardcode_shlibpath_var=no
  1683. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  1684. archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  1685. hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
  1686. export_dynamic_flag_spec='${wl}-E'
  1687. else
  1688. case "$host_os" in
  1689. openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  1690. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  1691. hardcode_libdir_flag_spec='-R$libdir'
  1692. ;;
  1693. *)
  1694. archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  1695. hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
  1696. ;;
  1697. esac
  1698. fi
  1699. ;;
  1700. os2*)
  1701. hardcode_libdir_flag_spec='-L$libdir'
  1702. hardcode_minus_L=yes
  1703. allow_undefined_flag=unsupported
  1704. archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
  1705. old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  1706. ;;
  1707. osf3*)
  1708. if test "$GCC" = yes; then
  1709. allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
  1710. archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  1711. else
  1712. allow_undefined_flag=' -expect_unresolved \*'
  1713. archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  1714. fi
  1715. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  1716. hardcode_libdir_separator=:
  1717. ;;
  1718. osf4* | osf5*) # as osf3* with the addition of -msym flag
  1719. if test "$GCC" = yes; then
  1720. allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
  1721. archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  1722. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  1723. else
  1724. allow_undefined_flag=' -expect_unresolved \*'
  1725. archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  1726. archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
  1727. $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
  1728. #Both c and cxx compiler support -rpath directly
  1729. hardcode_libdir_flag_spec='-rpath $libdir'
  1730. fi
  1731. hardcode_libdir_separator=:
  1732. ;;
  1733. sco3.2v5*)
  1734. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  1735. hardcode_shlibpath_var=no
  1736. runpath_var=LD_RUN_PATH
  1737. hardcode_runpath_var=yes
  1738. export_dynamic_flag_spec='${wl}-Bexport'
  1739. ;;
  1740. solaris*)
  1741. # gcc --version < 3.0 without binutils cannot create self contained
  1742. # shared libraries reliably, requiring libgcc.a to resolve some of
  1743. # the object symbols generated in some cases. Libraries that use
  1744. # assert need libgcc.a to resolve __eprintf, for example. Linking
  1745. # a copy of libgcc.a into every shared library to guarantee resolving
  1746. # such symbols causes other problems: According to Tim Van Holder
  1747. # <[email protected]>, C++ libraries end up with a separate
  1748. # (to the application) exception stack for one thing.
  1749. no_undefined_flag=' -z defs'
  1750. if test "$GCC" = yes; then
  1751. case `$CC --version 2>/dev/null` in
  1752. [[12]].*)
  1753. cat <<EOF 1>&2
  1754. *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
  1755. *** create self contained shared libraries on Solaris systems, without
  1756. *** introducing a dependency on libgcc.a. Therefore, libtool is disabling
  1757. *** -no-undefined support, which will at least allow you to build shared
  1758. *** libraries. However, you may find that when you link such libraries
  1759. *** into an application without using GCC, you have to manually add
  1760. *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
  1761. *** upgrade to a newer version of GCC. Another option is to rebuild your
  1762. *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
  1763. EOF
  1764. no_undefined_flag=
  1765. ;;
  1766. esac
  1767. fi
  1768. # $CC -shared without GNU ld will not create a library from C++
  1769. # object files and a static libstdc++, better avoid it by now
  1770. archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  1771. archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  1772. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
  1773. hardcode_libdir_flag_spec='-R$libdir'
  1774. hardcode_shlibpath_var=no
  1775. case $host_os in
  1776. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  1777. *) # Supported since Solaris 2.6 (maybe 2.5.1?)
  1778. whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
  1779. esac
  1780. link_all_deplibs=yes
  1781. ;;
  1782. sunos4*)
  1783. if test "x$host_vendor" = xsequent; then
  1784. # Use $CC to link under sequent, because it throws in some extra .o
  1785. # files that make .init and .fini sections work.
  1786. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  1787. else
  1788. archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  1789. fi
  1790. hardcode_libdir_flag_spec='-L$libdir'
  1791. hardcode_direct=yes
  1792. hardcode_minus_L=yes
  1793. hardcode_shlibpath_var=no
  1794. ;;
  1795. sysv4)
  1796. case $host_vendor in
  1797. sni)
  1798. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  1799. hardcode_direct=yes # is this really true???
  1800. ;;
  1801. siemens)
  1802. ## LD is ld it makes a PLAMLIB
  1803. ## CC just makes a GrossModule.
  1804. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  1805. reload_cmds='$CC -r -o $output$reload_objs'
  1806. hardcode_direct=no
  1807. ;;
  1808. motorola)
  1809. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  1810. hardcode_direct=no #Motorola manual says yes, but my tests say they lie
  1811. ;;
  1812. esac
  1813. runpath_var='LD_RUN_PATH'
  1814. hardcode_shlibpath_var=no
  1815. ;;
  1816. sysv4.3*)
  1817. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  1818. hardcode_shlibpath_var=no
  1819. export_dynamic_flag_spec='-Bexport'
  1820. ;;
  1821. sysv5*)
  1822. no_undefined_flag=' -z text'
  1823. # $CC -shared without GNU ld will not create a library from C++
  1824. # object files and a static libstdc++, better avoid it by now
  1825. archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  1826. archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  1827. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
  1828. hardcode_libdir_flag_spec=
  1829. hardcode_shlibpath_var=no
  1830. runpath_var='LD_RUN_PATH'
  1831. ;;
  1832. uts4*)
  1833. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  1834. hardcode_libdir_flag_spec='-L$libdir'
  1835. hardcode_shlibpath_var=no
  1836. ;;
  1837. dgux*)
  1838. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  1839. hardcode_libdir_flag_spec='-L$libdir'
  1840. hardcode_shlibpath_var=no
  1841. ;;
  1842. sysv4*MP*)
  1843. if test -d /usr/nec; then
  1844. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  1845. hardcode_shlibpath_var=no
  1846. runpath_var=LD_RUN_PATH
  1847. hardcode_runpath_var=yes
  1848. ld_shlibs=yes
  1849. fi
  1850. ;;
  1851. sysv4.2uw2*)
  1852. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  1853. hardcode_direct=yes
  1854. hardcode_minus_L=no
  1855. hardcode_shlibpath_var=no
  1856. hardcode_runpath_var=yes
  1857. runpath_var=LD_RUN_PATH
  1858. ;;
  1859. sysv5uw7* | unixware7*)
  1860. no_undefined_flag='${wl}-z ${wl}text'
  1861. if test "$GCC" = yes; then
  1862. archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  1863. else
  1864. archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  1865. fi
  1866. runpath_var='LD_RUN_PATH'
  1867. hardcode_shlibpath_var=no
  1868. ;;
  1869. *)
  1870. ld_shlibs=no
  1871. ;;
  1872. esac
  1873. fi
  1874. AC_MSG_RESULT([$ld_shlibs])
  1875. test "$ld_shlibs" = no && can_build_shared=no
  1876. # Check hardcoding attributes.
  1877. AC_MSG_CHECKING([how to hardcode library paths into programs])
  1878. hardcode_action=
  1879. if test -n "$hardcode_libdir_flag_spec" || \
  1880. test -n "$runpath_var"; then
  1881. # We can hardcode non-existant directories.
  1882. if test "$hardcode_direct" != no &&
  1883. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  1884. # have to relink, otherwise we might link with an installed library
  1885. # when we should be linking with a yet-to-be-installed one
  1886. ## test "$hardcode_shlibpath_var" != no &&
  1887. test "$hardcode_minus_L" != no; then
  1888. # Linking always hardcodes the temporary library directory.
  1889. hardcode_action=relink
  1890. else
  1891. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  1892. hardcode_action=immediate
  1893. fi
  1894. else
  1895. # We cannot hardcode anything, or else we can only hardcode existing
  1896. # directories.
  1897. hardcode_action=unsupported
  1898. fi
  1899. AC_MSG_RESULT([$hardcode_action])
  1900. striplib=
  1901. old_striplib=
  1902. AC_MSG_CHECKING([whether stripping libraries is possible])
  1903. if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
  1904. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  1905. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  1906. AC_MSG_RESULT([yes])
  1907. else
  1908. AC_MSG_RESULT([no])
  1909. fi
  1910. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  1911. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  1912. # PORTME Fill in your ld.so characteristics
  1913. AC_MSG_CHECKING([dynamic linker characteristics])
  1914. library_names_spec=
  1915. libname_spec='lib$name'
  1916. soname_spec=
  1917. postinstall_cmds=
  1918. postuninstall_cmds=
  1919. finish_cmds=
  1920. finish_eval=
  1921. shlibpath_var=
  1922. shlibpath_overrides_runpath=unknown
  1923. version_type=none
  1924. dynamic_linker="$host_os ld.so"
  1925. sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib"
  1926. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib /usr/X11R6/lib"
  1927. case $host_os in
  1928. aix3*)
  1929. version_type=linux
  1930. library_names_spec='${libname}${release}.so$versuffix $libname.a'
  1931. shlibpath_var=LIBPATH
  1932. # AIX has no versioning support, so we append a major version to the name.
  1933. soname_spec='${libname}${release}.so$major'
  1934. ;;
  1935. aix4* | aix5*)
  1936. version_type=linux
  1937. need_lib_prefix=no
  1938. need_version=no
  1939. hardcode_into_libs=yes
  1940. if test "$host_cpu" = ia64; then
  1941. # AIX 5 supports IA64
  1942. library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
  1943. shlibpath_var=LD_LIBRARY_PATH
  1944. else
  1945. # With GCC up to 2.95.x, collect2 would create an import file
  1946. # for dependence libraries. The import file would start with
  1947. # the line `#! .'. This would cause the generated library to
  1948. # depend on `.', always an invalid library. This was fixed in
  1949. # development snapshots of GCC prior to 3.0.
  1950. case $host_os in
  1951. aix4 | aix4.[[01]] | aix4.[[01]].*)
  1952. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  1953. echo ' yes '
  1954. echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
  1955. :
  1956. else
  1957. can_build_shared=no
  1958. fi
  1959. ;;
  1960. esac
  1961. # AIX (on Power*) has no versioning support, so currently we can
  1962. # not hardcode correct soname into executable. Probably we can
  1963. # add versioning support to collect2, so additional links can
  1964. # be useful in future.
  1965. if test "$aix_use_runtimelinking" = yes; then
  1966. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  1967. # instead of lib<name>.a to let people know that these are not
  1968. # typical AIX shared libraries.
  1969. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1970. else
  1971. # We preserve .a as extension for shared libraries through AIX4.2
  1972. # and later when we are not doing run time linking.
  1973. library_names_spec='${libname}${release}.a $libname.a'
  1974. soname_spec='${libname}${release}.so$major'
  1975. fi
  1976. shlibpath_var=LIBPATH
  1977. fi
  1978. hardcode_into_libs=yes
  1979. ;;
  1980. amigaos*)
  1981. library_names_spec='$libname.ixlibrary $libname.a'
  1982. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  1983. 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'
  1984. ;;
  1985. beos*)
  1986. library_names_spec='${libname}.so'
  1987. dynamic_linker="$host_os ld.so"
  1988. shlibpath_var=LIBRARY_PATH
  1989. ;;
  1990. bsdi4*)
  1991. version_type=linux
  1992. need_version=no
  1993. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1994. soname_spec='${libname}${release}.so$major'
  1995. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  1996. shlibpath_var=LD_LIBRARY_PATH
  1997. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  1998. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  1999. export_dynamic_flag_spec=-rdynamic
  2000. # the default ld.so.conf also contains /usr/contrib/lib and
  2001. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  2002. # libtool to hard-code these into programs
  2003. ;;
  2004. cygwin* | mingw* | pw32*)
  2005. version_type=windows
  2006. need_version=no
  2007. need_lib_prefix=no
  2008. case $GCC,$host_os in
  2009. yes,cygwin*)
  2010. library_names_spec='$libname.dll.a'
  2011. soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
  2012. postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
  2013. dldir=$destdir/`dirname \$dlpath`~
  2014. test -d \$dldir || mkdir -p \$dldir~
  2015. $install_prog .libs/$dlname \$dldir/$dlname'
  2016. postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2017. dlpath=$dir/\$dldll~
  2018. $rm \$dlpath'
  2019. ;;
  2020. yes,mingw*)
  2021. library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
  2022. sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
  2023. ;;
  2024. yes,pw32*)
  2025. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
  2026. ;;
  2027. *)
  2028. library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
  2029. ;;
  2030. esac
  2031. dynamic_linker='Win32 ld.exe'
  2032. # FIXME: first we should search . and the directory the executable is in
  2033. shlibpath_var=PATH
  2034. ;;
  2035. darwin* | rhapsody*)
  2036. dynamic_linker="$host_os dyld"
  2037. version_type=darwin
  2038. need_lib_prefix=no
  2039. need_version=no
  2040. # FIXME: Relying on posixy $() will cause problems for
  2041. # cross-compilation, but unfortunately the echo tests do not
  2042. # yet detect zsh echo's removal of \ escapes.
  2043. library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
  2044. soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
  2045. shlibpath_overrides_runpath=yes
  2046. shlibpath_var=DYLD_LIBRARY_PATH
  2047. ;;
  2048. freebsd1*)
  2049. dynamic_linker=no
  2050. ;;
  2051. freebsd*)
  2052. objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
  2053. version_type=freebsd-$objformat
  2054. case $version_type in
  2055. freebsd-elf*)
  2056. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
  2057. need_version=no
  2058. need_lib_prefix=no
  2059. ;;
  2060. freebsd-*)
  2061. library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
  2062. need_version=yes
  2063. ;;
  2064. esac
  2065. shlibpath_var=LD_LIBRARY_PATH
  2066. case $host_os in
  2067. freebsd2*)
  2068. shlibpath_overrides_runpath=yes
  2069. ;;
  2070. *)
  2071. shlibpath_overrides_runpath=no
  2072. hardcode_into_libs=yes
  2073. ;;
  2074. esac
  2075. ;;
  2076. gnu*)
  2077. version_type=linux
  2078. need_lib_prefix=no
  2079. need_version=no
  2080. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
  2081. soname_spec='${libname}${release}.so$major'
  2082. shlibpath_var=LD_LIBRARY_PATH
  2083. hardcode_into_libs=yes
  2084. ;;
  2085. hpux9* | hpux10* | hpux11*)
  2086. # Give a soname corresponding to the major version so that dld.sl refuses to
  2087. # link against other versions.
  2088. dynamic_linker="$host_os dld.sl"
  2089. version_type=sunos
  2090. need_lib_prefix=no
  2091. need_version=no
  2092. shlibpath_var=SHLIB_PATH
  2093. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  2094. library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
  2095. soname_spec='${libname}${release}.sl$major'
  2096. # HP-UX runs *really* slowly unless shared libraries are mode 555.
  2097. postinstall_cmds='chmod 555 $lib'
  2098. ;;
  2099. irix5* | irix6* | nonstopux*)
  2100. case $host_os in
  2101. nonstopux*) version_type=nonstopux ;;
  2102. *) version_type=irix ;;
  2103. esac
  2104. need_lib_prefix=no
  2105. need_version=no
  2106. soname_spec='${libname}${release}.so$major'
  2107. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
  2108. case $host_os in
  2109. irix5* | nonstopux*)
  2110. libsuff= shlibsuff=
  2111. ;;
  2112. *)
  2113. case $LD in # libtool.m4 will add one of these switches to LD
  2114. *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
  2115. *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
  2116. *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
  2117. *) libsuff= shlibsuff= libmagic=never-match;;
  2118. esac
  2119. ;;
  2120. esac
  2121. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  2122. shlibpath_overrides_runpath=no
  2123. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  2124. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  2125. ;;
  2126. # No shared lib support for Linux oldld, aout, or coff.
  2127. linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
  2128. dynamic_linker=no
  2129. ;;
  2130. # This must be Linux ELF.
  2131. linux-gnu*)
  2132. version_type=linux
  2133. need_lib_prefix=no
  2134. need_version=no
  2135. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2136. soname_spec='${libname}${release}.so$major'
  2137. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  2138. shlibpath_var=LD_LIBRARY_PATH
  2139. shlibpath_overrides_runpath=no
  2140. # This implies no fast_install, which is unacceptable.
  2141. # Some rework will be needed to allow for fast_install
  2142. # before this can be enabled.
  2143. hardcode_into_libs=yes
  2144. case $host_cpu:$lt_cv_cc_64bit_output in
  2145. powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
  2146. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/X11R6/lib64"
  2147. sys_lib_search_path_spec="/lib64 /usr/lib64 /usr/local/lib64 /usr/X11R6/lib64"
  2148. ;;
  2149. esac
  2150. # We used to test for /lib/ld.so.1 and disable shared libraries on
  2151. # powerpc, because MkLinux only supported shared libraries with the
  2152. # GNU dynamic linker. Since this was broken with cross compilers,
  2153. # most powerpc-linux boxes support dynamic linking these days and
  2154. # people can always --disable-shared, the test was removed, and we
  2155. # assume the GNU/Linux dynamic linker is in use.
  2156. dynamic_linker='GNU/Linux ld.so'
  2157. ;;
  2158. netbsd*)
  2159. version_type=sunos
  2160. need_lib_prefix=no
  2161. need_version=no
  2162. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  2163. library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
  2164. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2165. dynamic_linker='NetBSD (a.out) ld.so'
  2166. else
  2167. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
  2168. soname_spec='${libname}${release}.so$major'
  2169. dynamic_linker='NetBSD ld.elf_so'
  2170. fi
  2171. shlibpath_var=LD_LIBRARY_PATH
  2172. shlibpath_overrides_runpath=yes
  2173. hardcode_into_libs=yes
  2174. ;;
  2175. newsos6)
  2176. version_type=linux
  2177. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2178. shlibpath_var=LD_LIBRARY_PATH
  2179. shlibpath_overrides_runpath=yes
  2180. ;;
  2181. openbsd*)
  2182. version_type=sunos
  2183. need_lib_prefix=no
  2184. need_version=no
  2185. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2186. case "$host_os" in
  2187. openbsd2.[[89]] | openbsd2.[[89]].*)
  2188. shlibpath_overrides_runpath=no
  2189. ;;
  2190. *)
  2191. shlibpath_overrides_runpath=yes
  2192. ;;
  2193. esac
  2194. else
  2195. shlibpath_overrides_runpath=yes
  2196. fi
  2197. library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
  2198. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2199. shlibpath_var=LD_LIBRARY_PATH
  2200. ;;
  2201. os2*)
  2202. libname_spec='$name'
  2203. need_lib_prefix=no
  2204. library_names_spec='$libname.dll $libname.a'
  2205. dynamic_linker='OS/2 ld.exe'
  2206. shlibpath_var=LIBPATH
  2207. ;;
  2208. osf3* | osf4* | osf5*)
  2209. version_type=osf
  2210. need_version=no
  2211. soname_spec='${libname}${release}.so$major'
  2212. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2213. shlibpath_var=LD_LIBRARY_PATH
  2214. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  2215. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  2216. hardcode_into_libs=yes
  2217. ;;
  2218. sco3.2v5*)
  2219. version_type=osf
  2220. soname_spec='${libname}${release}.so$major'
  2221. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2222. shlibpath_var=LD_LIBRARY_PATH
  2223. ;;
  2224. solaris*)
  2225. version_type=linux
  2226. need_lib_prefix=no
  2227. need_version=no
  2228. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2229. soname_spec='${libname}${release}.so$major'
  2230. shlibpath_var=LD_LIBRARY_PATH
  2231. shlibpath_overrides_runpath=yes
  2232. hardcode_into_libs=yes
  2233. # ldd complains unless libraries are executable
  2234. postinstall_cmds='chmod +x $lib'
  2235. ;;
  2236. sunos4*)
  2237. version_type=sunos
  2238. library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
  2239. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  2240. shlibpath_var=LD_LIBRARY_PATH
  2241. shlibpath_overrides_runpath=yes
  2242. if test "$with_gnu_ld" = yes; then
  2243. need_lib_prefix=no
  2244. fi
  2245. need_version=yes
  2246. ;;
  2247. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  2248. version_type=linux
  2249. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2250. soname_spec='${libname}${release}.so$major'
  2251. shlibpath_var=LD_LIBRARY_PATH
  2252. case $host_vendor in
  2253. sni)
  2254. shlibpath_overrides_runpath=no
  2255. need_lib_prefix=no
  2256. export_dynamic_flag_spec='${wl}-Blargedynsym'
  2257. runpath_var=LD_RUN_PATH
  2258. ;;
  2259. siemens)
  2260. need_lib_prefix=no
  2261. ;;
  2262. motorola)
  2263. need_lib_prefix=no
  2264. need_version=no
  2265. shlibpath_overrides_runpath=no
  2266. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  2267. ;;
  2268. esac
  2269. ;;
  2270. uts4*)
  2271. version_type=linux
  2272. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2273. soname_spec='${libname}${release}.so$major'
  2274. shlibpath_var=LD_LIBRARY_PATH
  2275. ;;
  2276. dgux*)
  2277. version_type=linux
  2278. need_lib_prefix=no
  2279. need_version=no
  2280. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2281. soname_spec='${libname}${release}.so$major'
  2282. shlibpath_var=LD_LIBRARY_PATH
  2283. ;;
  2284. sysv4*MP*)
  2285. if test -d /usr/nec ;then
  2286. version_type=linux
  2287. library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
  2288. soname_spec='$libname.so.$major'
  2289. shlibpath_var=LD_LIBRARY_PATH
  2290. fi
  2291. ;;
  2292. *)
  2293. dynamic_linker=no
  2294. ;;
  2295. esac
  2296. AC_MSG_RESULT([$dynamic_linker])
  2297. test "$dynamic_linker" = no && can_build_shared=no
  2298. # Report the final consequences.
  2299. AC_MSG_CHECKING([if libtool supports shared libraries])
  2300. AC_MSG_RESULT([$can_build_shared])
  2301. AC_MSG_CHECKING([whether to build shared libraries])
  2302. test "$can_build_shared" = "no" && enable_shared=no
  2303. # On AIX, shared libraries and static libraries use the same namespace, and
  2304. # are all built from PIC.
  2305. case "$host_os" in
  2306. aix3*)
  2307. test "$enable_shared" = yes && enable_static=no
  2308. if test -n "$RANLIB"; then
  2309. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  2310. postinstall_cmds='$RANLIB $lib'
  2311. fi
  2312. ;;
  2313. aix4*)
  2314. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  2315. test "$enable_shared" = yes && enable_static=no
  2316. fi
  2317. ;;
  2318. esac
  2319. AC_MSG_RESULT([$enable_shared])
  2320. AC_MSG_CHECKING([whether to build static libraries])
  2321. # Make sure either enable_shared or enable_static is yes.
  2322. test "$enable_shared" = yes || enable_static=yes
  2323. AC_MSG_RESULT([$enable_static])
  2324. if test "$hardcode_action" = relink; then
  2325. # Fast installation is not supported
  2326. enable_fast_install=no
  2327. elif test "$shlibpath_overrides_runpath" = yes ||
  2328. test "$enable_shared" = no; then
  2329. # Fast installation is not necessary
  2330. enable_fast_install=needless
  2331. fi
  2332. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  2333. if test "$GCC" = yes; then
  2334. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  2335. fi
  2336. AC_LIBTOOL_DLOPEN_SELF
  2337. if test "$enable_shared" = yes && test "$GCC" = yes; then
  2338. case $archive_cmds in
  2339. *'~'*)
  2340. # FIXME: we may have to deal with multi-command sequences.
  2341. ;;
  2342. '$CC '*)
  2343. # Test whether the compiler implicitly links with -lc since on some
  2344. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  2345. # to ld, don't add -lc before -lgcc.
  2346. AC_MSG_CHECKING([whether -lc should be explicitly linked in])
  2347. AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
  2348. [$rm conftest*
  2349. echo 'static int dummy;' > conftest.$ac_ext
  2350. if AC_TRY_EVAL(ac_compile); then
  2351. soname=conftest
  2352. lib=conftest
  2353. libobjs=conftest.$ac_objext
  2354. deplibs=
  2355. wl=$lt_cv_prog_cc_wl
  2356. compiler_flags=-v
  2357. linker_flags=-v
  2358. verstring=
  2359. output_objdir=.
  2360. libname=conftest
  2361. save_allow_undefined_flag=$allow_undefined_flag
  2362. allow_undefined_flag=
  2363. if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
  2364. then
  2365. lt_cv_archive_cmds_need_lc=no
  2366. else
  2367. lt_cv_archive_cmds_need_lc=yes
  2368. fi
  2369. allow_undefined_flag=$save_allow_undefined_flag
  2370. else
  2371. cat conftest.err 1>&5
  2372. fi])
  2373. AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
  2374. ;;
  2375. esac
  2376. fi
  2377. need_lc=${lt_cv_archive_cmds_need_lc-yes}
  2378. # The second clause should only fire when bootstrapping the
  2379. # libtool distribution, otherwise you forgot to ship ltmain.sh
  2380. # with your package, and you will get complaints that there are
  2381. # no rules to generate ltmain.sh.
  2382. if test -f "$ltmain"; then
  2383. :
  2384. else
  2385. # If there is no Makefile yet, we rely on a make rule to execute
  2386. # `config.status --recheck' to rerun these tests and create the
  2387. # libtool script then.
  2388. test -f Makefile && make "$ltmain"
  2389. fi
  2390. if test -f "$ltmain"; then
  2391. trap "$rm \"${ofile}T\"; exit 1" 1 2 15
  2392. $rm -f "${ofile}T"
  2393. echo creating $ofile
  2394. # Now quote all the things that may contain metacharacters while being
  2395. # careful not to overquote the AC_SUBSTed values. We take copies of the
  2396. # variables and quote the copies for generation of the libtool script.
  2397. for var in echo old_CC old_CFLAGS SED \
  2398. AR AR_FLAGS CC LD LN_S NM SHELL \
  2399. reload_flag reload_cmds wl \
  2400. pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
  2401. thread_safe_flag_spec whole_archive_flag_spec libname_spec \
  2402. library_names_spec soname_spec \
  2403. RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
  2404. old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
  2405. postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
  2406. old_striplib striplib file_magic_cmd export_symbols_cmds \
  2407. deplibs_check_method allow_undefined_flag no_undefined_flag \
  2408. finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
  2409. global_symbol_to_c_name_address \
  2410. hardcode_libdir_flag_spec hardcode_libdir_separator \
  2411. sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
  2412. compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
  2413. case $var in
  2414. reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
  2415. old_postinstall_cmds | old_postuninstall_cmds | \
  2416. export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
  2417. extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
  2418. postinstall_cmds | postuninstall_cmds | \
  2419. finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
  2420. # Double-quote double-evaled strings.
  2421. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
  2422. ;;
  2423. *)
  2424. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
  2425. ;;
  2426. esac
  2427. done
  2428. cat <<__EOF__ > "${ofile}T"
  2429. #! $SHELL
  2430. # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  2431. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
  2432. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  2433. #
  2434. # Copyright (C) 1996-2000 Free Software Foundation, Inc.
  2435. # Originally by Gordon Matzigkeit <[email protected]>, 1996
  2436. #
  2437. # This program is free software; you can redistribute it and/or modify
  2438. # it under the terms of the GNU General Public License as published by
  2439. # the Free Software Foundation; either version 2 of the License, or
  2440. # (at your option) any later version.
  2441. #
  2442. # This program is distributed in the hope that it will be useful, but
  2443. # WITHOUT ANY WARRANTY; without even the implied warranty of
  2444. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2445. # General Public License for more details.
  2446. #
  2447. # You should have received a copy of the GNU General Public License
  2448. # along with this program; if not, write to the Free Software
  2449. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  2450. #
  2451. # As a special exception to the GNU General Public License, if you
  2452. # distribute this file as part of a program that contains a
  2453. # configuration script generated by Autoconf, you may include it under
  2454. # the same distribution terms that you use for the rest of that program.
  2455. # A sed that does not truncate output.
  2456. SED=$lt_SED
  2457. # Sed that helps us avoid accidentally triggering echo(1) options like -n.
  2458. Xsed="${SED} -e s/^X//"
  2459. # The HP-UX ksh and POSIX shell print the target directory to stdout
  2460. # if CDPATH is set.
  2461. if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  2462. # ### BEGIN LIBTOOL CONFIG
  2463. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2464. # Shell to use when invoking shell scripts.
  2465. SHELL=$lt_SHELL
  2466. # Whether or not to build shared libraries.
  2467. build_libtool_libs=$enable_shared
  2468. # Whether or not to build static libraries.
  2469. build_old_libs=$enable_static
  2470. # Whether or not to add -lc for building shared libraries.
  2471. build_libtool_need_lc=$need_lc
  2472. # Whether or not to optimize for fast installation.
  2473. fast_install=$enable_fast_install
  2474. # The host system.
  2475. host_alias=$host_alias
  2476. host=$host
  2477. # An echo program that does not interpret backslashes.
  2478. echo=$lt_echo
  2479. # The archiver.
  2480. AR=$lt_AR
  2481. AR_FLAGS=$lt_AR_FLAGS
  2482. # The default C compiler.
  2483. CC=$lt_CC
  2484. # Is the compiler the GNU C compiler?
  2485. with_gcc=$GCC
  2486. # The linker used to build libraries.
  2487. LD=$lt_LD
  2488. # Whether we need hard or soft links.
  2489. LN_S=$lt_LN_S
  2490. # A BSD-compatible nm program.
  2491. NM=$lt_NM
  2492. # A symbol stripping program
  2493. STRIP=$STRIP
  2494. # Used to examine libraries when file_magic_cmd begins "file"
  2495. MAGIC_CMD=$MAGIC_CMD
  2496. # Used on cygwin: DLL creation program.
  2497. DLLTOOL="$DLLTOOL"
  2498. # Used on cygwin: object dumper.
  2499. OBJDUMP="$OBJDUMP"
  2500. # Used on cygwin: assembler.
  2501. AS="$AS"
  2502. # The name of the directory that contains temporary libtool files.
  2503. objdir=$objdir
  2504. # How to create reloadable object files.
  2505. reload_flag=$lt_reload_flag
  2506. reload_cmds=$lt_reload_cmds
  2507. # How to pass a linker flag through the compiler.
  2508. wl=$lt_wl
  2509. # Object file suffix (normally "o").
  2510. objext="$ac_objext"
  2511. # Old archive suffix (normally "a").
  2512. libext="$libext"
  2513. # Executable file suffix (normally "").
  2514. exeext="$exeext"
  2515. # Additional compiler flags for building library objects.
  2516. pic_flag=$lt_pic_flag
  2517. pic_mode=$pic_mode
  2518. # Does compiler simultaneously support -c and -o options?
  2519. compiler_c_o=$lt_compiler_c_o
  2520. # Can we write directly to a .lo ?
  2521. compiler_o_lo=$lt_compiler_o_lo
  2522. # Must we lock files when doing compilation ?
  2523. need_locks=$lt_need_locks
  2524. # Do we need the lib prefix for modules?
  2525. need_lib_prefix=$need_lib_prefix
  2526. # Do we need a version for libraries?
  2527. need_version=$need_version
  2528. # Whether dlopen is supported.
  2529. dlopen_support=$enable_dlopen
  2530. # Whether dlopen of programs is supported.
  2531. dlopen_self=$enable_dlopen_self
  2532. # Whether dlopen of statically linked programs is supported.
  2533. dlopen_self_static=$enable_dlopen_self_static
  2534. # Compiler flag to prevent dynamic linking.
  2535. link_static_flag=$lt_link_static_flag
  2536. # Compiler flag to turn off builtin functions.
  2537. no_builtin_flag=$lt_no_builtin_flag
  2538. # Compiler flag to allow reflexive dlopens.
  2539. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
  2540. # Compiler flag to generate shared objects directly from archives.
  2541. whole_archive_flag_spec=$lt_whole_archive_flag_spec
  2542. # Compiler flag to generate thread-safe objects.
  2543. thread_safe_flag_spec=$lt_thread_safe_flag_spec
  2544. # Library versioning type.
  2545. version_type=$version_type
  2546. # Format of library name prefix.
  2547. libname_spec=$lt_libname_spec
  2548. # List of archive names. First name is the real one, the rest are links.
  2549. # The last name is the one that the linker finds with -lNAME.
  2550. library_names_spec=$lt_library_names_spec
  2551. # The coded name of the library, if different from the real name.
  2552. soname_spec=$lt_soname_spec
  2553. # Commands used to build and install an old-style archive.
  2554. RANLIB=$lt_RANLIB
  2555. old_archive_cmds=$lt_old_archive_cmds
  2556. old_postinstall_cmds=$lt_old_postinstall_cmds
  2557. old_postuninstall_cmds=$lt_old_postuninstall_cmds
  2558. # Create an old-style archive from a shared archive.
  2559. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
  2560. # Create a temporary old-style archive to link instead of a shared archive.
  2561. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
  2562. # Commands used to build and install a shared archive.
  2563. archive_cmds=$lt_archive_cmds
  2564. archive_expsym_cmds=$lt_archive_expsym_cmds
  2565. postinstall_cmds=$lt_postinstall_cmds
  2566. postuninstall_cmds=$lt_postuninstall_cmds
  2567. # Commands to strip libraries.
  2568. old_striplib=$lt_old_striplib
  2569. striplib=$lt_striplib
  2570. # Method to check whether dependent libraries are shared objects.
  2571. deplibs_check_method=$lt_deplibs_check_method
  2572. # Command to use when deplibs_check_method == file_magic.
  2573. file_magic_cmd=$lt_file_magic_cmd
  2574. # Flag that allows shared libraries with undefined symbols to be built.
  2575. allow_undefined_flag=$lt_allow_undefined_flag
  2576. # Flag that forces no undefined symbols.
  2577. no_undefined_flag=$lt_no_undefined_flag
  2578. # Commands used to finish a libtool library installation in a directory.
  2579. finish_cmds=$lt_finish_cmds
  2580. # Same as above, but a single script fragment to be evaled but not shown.
  2581. finish_eval=$lt_finish_eval
  2582. # Take the output of nm and produce a listing of raw symbols and C names.
  2583. global_symbol_pipe=$lt_global_symbol_pipe
  2584. # Transform the output of nm in a proper C declaration
  2585. global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
  2586. # Transform the output of nm in a C name address pair
  2587. global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
  2588. # This is the shared library runtime path variable.
  2589. runpath_var=$runpath_var
  2590. # This is the shared library path variable.
  2591. shlibpath_var=$shlibpath_var
  2592. # Is shlibpath searched before the hard-coded library search path?
  2593. shlibpath_overrides_runpath=$shlibpath_overrides_runpath
  2594. # How to hardcode a shared library path into an executable.
  2595. hardcode_action=$hardcode_action
  2596. # Whether we should hardcode library paths into libraries.
  2597. hardcode_into_libs=$hardcode_into_libs
  2598. # Flag to hardcode \$libdir into a binary during linking.
  2599. # This must work even if \$libdir does not exist.
  2600. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
  2601. # Whether we need a single -rpath flag with a separated argument.
  2602. hardcode_libdir_separator=$lt_hardcode_libdir_separator
  2603. # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
  2604. # resulting binary.
  2605. hardcode_direct=$hardcode_direct
  2606. # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
  2607. # resulting binary.
  2608. hardcode_minus_L=$hardcode_minus_L
  2609. # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  2610. # the resulting binary.
  2611. hardcode_shlibpath_var=$hardcode_shlibpath_var
  2612. # Variables whose values should be saved in libtool wrapper scripts and
  2613. # restored at relink time.
  2614. variables_saved_for_relink="$variables_saved_for_relink"
  2615. # Whether libtool must link a program against all its dependency libraries.
  2616. link_all_deplibs=$link_all_deplibs
  2617. # Compile-time system search path for libraries
  2618. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
  2619. # Run-time system search path for libraries
  2620. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
  2621. # Fix the shell variable \$srcfile for the compiler.
  2622. fix_srcfile_path="$fix_srcfile_path"
  2623. # Set to yes if exported symbols are required.
  2624. always_export_symbols=$always_export_symbols
  2625. # The commands to list exported symbols.
  2626. export_symbols_cmds=$lt_export_symbols_cmds
  2627. # The commands to extract the exported symbol list from a shared archive.
  2628. extract_expsyms_cmds=$lt_extract_expsyms_cmds
  2629. # Symbols that should not be listed in the preloaded symbols.
  2630. exclude_expsyms=$lt_exclude_expsyms
  2631. # Symbols that must always be exported.
  2632. include_expsyms=$lt_include_expsyms
  2633. # ### END LIBTOOL CONFIG
  2634. __EOF__
  2635. case $host_os in
  2636. aix3*)
  2637. cat <<\EOF >> "${ofile}T"
  2638. # AIX sometimes has problems with the GCC collect2 program. For some
  2639. # reason, if we set the COLLECT_NAMES environment variable, the problems
  2640. # vanish in a puff of smoke.
  2641. if test "X${COLLECT_NAMES+set}" != Xset; then
  2642. COLLECT_NAMES=
  2643. export COLLECT_NAMES
  2644. fi
  2645. EOF
  2646. ;;
  2647. esac
  2648. case $host_os in
  2649. cygwin* | mingw* | pw32* | os2*)
  2650. cat <<'EOF' >> "${ofile}T"
  2651. # This is a source program that is used to create dlls on Windows
  2652. # Don't remove nor modify the starting and closing comments
  2653. # /* ltdll.c starts here */
  2654. # #define WIN32_LEAN_AND_MEAN
  2655. # #include <windows.h>
  2656. # #undef WIN32_LEAN_AND_MEAN
  2657. # #include <stdio.h>
  2658. #
  2659. # #ifndef __CYGWIN__
  2660. # # ifdef __CYGWIN32__
  2661. # # define __CYGWIN__ __CYGWIN32__
  2662. # # endif
  2663. # #endif
  2664. #
  2665. # #ifdef __cplusplus
  2666. # extern "C" {
  2667. # #endif
  2668. # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
  2669. # #ifdef __cplusplus
  2670. # }
  2671. # #endif
  2672. #
  2673. # #ifdef __CYGWIN__
  2674. # #include <cygwin/cygwin_dll.h>
  2675. # DECLARE_CYGWIN_DLL( DllMain );
  2676. # #endif
  2677. # HINSTANCE __hDllInstance_base;
  2678. #
  2679. # BOOL APIENTRY
  2680. # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
  2681. # {
  2682. # __hDllInstance_base = hInst;
  2683. # return TRUE;
  2684. # }
  2685. # /* ltdll.c ends here */
  2686. # This is a source program that is used to create import libraries
  2687. # on Windows for dlls which lack them. Don't remove nor modify the
  2688. # starting and closing comments
  2689. # /* impgen.c starts here */
  2690. # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
  2691. #
  2692. # This file is part of GNU libtool.
  2693. #
  2694. # This program is free software; you can redistribute it and/or modify
  2695. # it under the terms of the GNU General Public License as published by
  2696. # the Free Software Foundation; either version 2 of the License, or
  2697. # (at your option) any later version.
  2698. #
  2699. # This program is distributed in the hope that it will be useful,
  2700. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  2701. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  2702. # GNU General Public License for more details.
  2703. #
  2704. # You should have received a copy of the GNU General Public License
  2705. # along with this program; if not, write to the Free Software
  2706. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  2707. # */
  2708. #
  2709. # #include <stdio.h> /* for printf() */
  2710. # #include <unistd.h> /* for open(), lseek(), read() */
  2711. # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
  2712. # #include <string.h> /* for strdup() */
  2713. #
  2714. # /* O_BINARY isn't required (or even defined sometimes) under Unix */
  2715. # #ifndef O_BINARY
  2716. # #define O_BINARY 0
  2717. # #endif
  2718. #
  2719. # static unsigned int
  2720. # pe_get16 (fd, offset)
  2721. # int fd;
  2722. # int offset;
  2723. # {
  2724. # unsigned char b[2];
  2725. # lseek (fd, offset, SEEK_SET);
  2726. # read (fd, b, 2);
  2727. # return b[0] + (b[1]<<8);
  2728. # }
  2729. #
  2730. # static unsigned int
  2731. # pe_get32 (fd, offset)
  2732. # int fd;
  2733. # int offset;
  2734. # {
  2735. # unsigned char b[4];
  2736. # lseek (fd, offset, SEEK_SET);
  2737. # read (fd, b, 4);
  2738. # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
  2739. # }
  2740. #
  2741. # static unsigned int
  2742. # pe_as32 (ptr)
  2743. # void *ptr;
  2744. # {
  2745. # unsigned char *b = ptr;
  2746. # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
  2747. # }
  2748. #
  2749. # int
  2750. # main (argc, argv)
  2751. # int argc;
  2752. # char *argv[];
  2753. # {
  2754. # int dll;
  2755. # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
  2756. # unsigned long export_rva, export_size, nsections, secptr, expptr;
  2757. # unsigned long name_rvas, nexp;
  2758. # unsigned char *expdata, *erva;
  2759. # char *filename, *dll_name;
  2760. #
  2761. # filename = argv[1];
  2762. #
  2763. # dll = open(filename, O_RDONLY|O_BINARY);
  2764. # if (dll < 1)
  2765. # return 1;
  2766. #
  2767. # dll_name = filename;
  2768. #
  2769. # for (i=0; filename[i]; i++)
  2770. # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
  2771. # dll_name = filename + i +1;
  2772. #
  2773. # pe_header_offset = pe_get32 (dll, 0x3c);
  2774. # opthdr_ofs = pe_header_offset + 4 + 20;
  2775. # num_entries = pe_get32 (dll, opthdr_ofs + 92);
  2776. #
  2777. # if (num_entries < 1) /* no exports */
  2778. # return 1;
  2779. #
  2780. # export_rva = pe_get32 (dll, opthdr_ofs + 96);
  2781. # export_size = pe_get32 (dll, opthdr_ofs + 100);
  2782. # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
  2783. # secptr = (pe_header_offset + 4 + 20 +
  2784. # pe_get16 (dll, pe_header_offset + 4 + 16));
  2785. #
  2786. # expptr = 0;
  2787. # for (i = 0; i < nsections; i++)
  2788. # {
  2789. # char sname[8];
  2790. # unsigned long secptr1 = secptr + 40 * i;
  2791. # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
  2792. # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
  2793. # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
  2794. # lseek(dll, secptr1, SEEK_SET);
  2795. # read(dll, sname, 8);
  2796. # if (vaddr <= export_rva && vaddr+vsize > export_rva)
  2797. # {
  2798. # expptr = fptr + (export_rva - vaddr);
  2799. # if (export_rva + export_size > vaddr + vsize)
  2800. # export_size = vsize - (export_rva - vaddr);
  2801. # break;
  2802. # }
  2803. # }
  2804. #
  2805. # expdata = (unsigned char*)malloc(export_size);
  2806. # lseek (dll, expptr, SEEK_SET);
  2807. # read (dll, expdata, export_size);
  2808. # erva = expdata - export_rva;
  2809. #
  2810. # nexp = pe_as32 (expdata+24);
  2811. # name_rvas = pe_as32 (expdata+32);
  2812. #
  2813. # printf ("EXPORTS\n");
  2814. # for (i = 0; i<nexp; i++)
  2815. # {
  2816. # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
  2817. # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
  2818. # }
  2819. #
  2820. # return 0;
  2821. # }
  2822. # /* impgen.c ends here */
  2823. EOF
  2824. ;;
  2825. esac
  2826. # We use sed instead of cat because bash on DJGPP gets confused if
  2827. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  2828. # text mode, it properly converts lines to CR/LF. This bash problem
  2829. # is reportedly fixed, but why not run on old versions too?
  2830. sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
  2831. mv -f "${ofile}T" "$ofile" || \
  2832. (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
  2833. chmod +x "$ofile"
  2834. fi
  2835. ])# _LT_AC_LTCONFIG_HACK
  2836. # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
  2837. AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
  2838. # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
  2839. AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
  2840. # AC_ENABLE_SHARED - implement the --enable-shared flag
  2841. # Usage: AC_ENABLE_SHARED[(DEFAULT)]
  2842. # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
  2843. # `yes'.
  2844. AC_DEFUN([AC_ENABLE_SHARED],
  2845. [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
  2846. AC_ARG_ENABLE(shared,
  2847. changequote(<<, >>)dnl
  2848. << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
  2849. changequote([, ])dnl
  2850. [p=${PACKAGE-default}
  2851. case $enableval in
  2852. yes) enable_shared=yes ;;
  2853. no) enable_shared=no ;;
  2854. *)
  2855. enable_shared=no
  2856. # Look at the argument we got. We use all the common list separators.
  2857. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  2858. for pkg in $enableval; do
  2859. if test "X$pkg" = "X$p"; then
  2860. enable_shared=yes
  2861. fi
  2862. done
  2863. IFS="$ac_save_ifs"
  2864. ;;
  2865. esac],
  2866. enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
  2867. ])
  2868. # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
  2869. AC_DEFUN([AC_DISABLE_SHARED],
  2870. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  2871. AC_ENABLE_SHARED(no)])
  2872. # AC_ENABLE_STATIC - implement the --enable-static flag
  2873. # Usage: AC_ENABLE_STATIC[(DEFAULT)]
  2874. # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
  2875. # `yes'.
  2876. AC_DEFUN([AC_ENABLE_STATIC],
  2877. [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
  2878. AC_ARG_ENABLE(static,
  2879. changequote(<<, >>)dnl
  2880. << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
  2881. changequote([, ])dnl
  2882. [p=${PACKAGE-default}
  2883. case $enableval in
  2884. yes) enable_static=yes ;;
  2885. no) enable_static=no ;;
  2886. *)
  2887. enable_static=no
  2888. # Look at the argument we got. We use all the common list separators.
  2889. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  2890. for pkg in $enableval; do
  2891. if test "X$pkg" = "X$p"; then
  2892. enable_static=yes
  2893. fi
  2894. done
  2895. IFS="$ac_save_ifs"
  2896. ;;
  2897. esac],
  2898. enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
  2899. ])
  2900. # AC_DISABLE_STATIC - set the default static flag to --disable-static
  2901. AC_DEFUN([AC_DISABLE_STATIC],
  2902. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  2903. AC_ENABLE_STATIC(no)])
  2904. # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
  2905. # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
  2906. # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
  2907. # `yes'.
  2908. AC_DEFUN([AC_ENABLE_FAST_INSTALL],
  2909. [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
  2910. AC_ARG_ENABLE(fast-install,
  2911. changequote(<<, >>)dnl
  2912. << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
  2913. changequote([, ])dnl
  2914. [p=${PACKAGE-default}
  2915. case $enableval in
  2916. yes) enable_fast_install=yes ;;
  2917. no) enable_fast_install=no ;;
  2918. *)
  2919. enable_fast_install=no
  2920. # Look at the argument we got. We use all the common list separators.
  2921. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  2922. for pkg in $enableval; do
  2923. if test "X$pkg" = "X$p"; then
  2924. enable_fast_install=yes
  2925. fi
  2926. done
  2927. IFS="$ac_save_ifs"
  2928. ;;
  2929. esac],
  2930. enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
  2931. ])
  2932. # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
  2933. AC_DEFUN([AC_DISABLE_FAST_INSTALL],
  2934. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  2935. AC_ENABLE_FAST_INSTALL(no)])
  2936. # AC_LIBTOOL_PICMODE - implement the --with-pic flag
  2937. # Usage: AC_LIBTOOL_PICMODE[(MODE)]
  2938. # Where MODE is either `yes' or `no'. If omitted, it defaults to
  2939. # `both'.
  2940. AC_DEFUN([AC_LIBTOOL_PICMODE],
  2941. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  2942. pic_mode=ifelse($#,1,$1,default)])
  2943. # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
  2944. AC_DEFUN([AC_PATH_TOOL_PREFIX],
  2945. [AC_MSG_CHECKING([for $1])
  2946. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  2947. [case $MAGIC_CMD in
  2948. /*)
  2949. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  2950. ;;
  2951. ?:/*)
  2952. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
  2953. ;;
  2954. *)
  2955. ac_save_MAGIC_CMD="$MAGIC_CMD"
  2956. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  2957. dnl $ac_dummy forces splitting on constant user-supplied paths.
  2958. dnl POSIX.2 word splitting is done only on the output of word expansions,
  2959. dnl not every word. This closes a longstanding sh security hole.
  2960. ac_dummy="ifelse([$2], , $PATH, [$2])"
  2961. for ac_dir in $ac_dummy; do
  2962. test -z "$ac_dir" && ac_dir=.
  2963. if test -f $ac_dir/$1; then
  2964. lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  2965. if test -n "$file_magic_test_file"; then
  2966. case $deplibs_check_method in
  2967. "file_magic "*)
  2968. file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
  2969. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  2970. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  2971. egrep "$file_magic_regex" > /dev/null; then
  2972. :
  2973. else
  2974. cat <<EOF 1>&2
  2975. *** Warning: the command libtool uses to detect shared libraries,
  2976. *** $file_magic_cmd, produces output that libtool cannot recognize.
  2977. *** The result is that libtool may fail to recognize shared libraries
  2978. *** as such. This will affect the creation of libtool libraries that
  2979. *** depend on shared libraries, but programs linked with such libtool
  2980. *** libraries will work regardless of this problem. Nevertheless, you
  2981. *** may want to report the problem to your system manager and/or to
  2982. *** [email protected]
  2983. EOF
  2984. fi ;;
  2985. esac
  2986. fi
  2987. break
  2988. fi
  2989. done
  2990. IFS="$ac_save_ifs"
  2991. MAGIC_CMD="$ac_save_MAGIC_CMD"
  2992. ;;
  2993. esac])
  2994. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  2995. if test -n "$MAGIC_CMD"; then
  2996. AC_MSG_RESULT($MAGIC_CMD)
  2997. else
  2998. AC_MSG_RESULT(no)
  2999. fi
  3000. ])
  3001. # AC_PATH_MAGIC - find a file program which can recognise a shared library
  3002. AC_DEFUN([AC_PATH_MAGIC],
  3003. [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
  3004. AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
  3005. if test -z "$lt_cv_path_MAGIC_CMD"; then
  3006. if test -n "$ac_tool_prefix"; then
  3007. AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
  3008. else
  3009. MAGIC_CMD=:
  3010. fi
  3011. fi
  3012. ])
  3013. # AC_PROG_LD - find the path to the GNU or non-GNU linker
  3014. AC_DEFUN([AC_PROG_LD],
  3015. [AC_ARG_WITH(gnu-ld,
  3016. [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
  3017. test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
  3018. AC_REQUIRE([AC_PROG_CC])dnl
  3019. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3020. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  3021. AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
  3022. ac_prog=ld
  3023. if test "$GCC" = yes; then
  3024. # Check if gcc -print-prog-name=ld gives a path.
  3025. AC_MSG_CHECKING([for ld used by GCC])
  3026. case $host in
  3027. *-*-mingw*)
  3028. # gcc leaves a trailing carriage return which upsets mingw
  3029. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  3030. *)
  3031. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  3032. esac
  3033. case $ac_prog in
  3034. # Accept absolute paths.
  3035. [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
  3036. re_direlt='/[[^/]][[^/]]*/\.\./'
  3037. # Canonicalize the path of ld
  3038. ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
  3039. while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
  3040. ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
  3041. done
  3042. test -z "$LD" && LD="$ac_prog"
  3043. ;;
  3044. "")
  3045. # If it fails, then pretend we aren't using GCC.
  3046. ac_prog=ld
  3047. ;;
  3048. *)
  3049. # If it is relative, then search for the first ld in PATH.
  3050. with_gnu_ld=unknown
  3051. ;;
  3052. esac
  3053. elif test "$with_gnu_ld" = yes; then
  3054. AC_MSG_CHECKING([for GNU ld])
  3055. else
  3056. AC_MSG_CHECKING([for non-GNU ld])
  3057. fi
  3058. AC_CACHE_VAL(lt_cv_path_LD,
  3059. [if test -z "$LD"; then
  3060. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3061. for ac_dir in $PATH; do
  3062. test -z "$ac_dir" && ac_dir=.
  3063. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  3064. lt_cv_path_LD="$ac_dir/$ac_prog"
  3065. # Check to see if the program is GNU ld. I'd rather use --version,
  3066. # but apparently some GNU ld's only accept -v.
  3067. # Break only if it was the GNU/non-GNU ld that we prefer.
  3068. if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
  3069. test "$with_gnu_ld" != no && break
  3070. else
  3071. test "$with_gnu_ld" != yes && break
  3072. fi
  3073. fi
  3074. done
  3075. IFS="$ac_save_ifs"
  3076. else
  3077. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  3078. fi])
  3079. LD="$lt_cv_path_LD"
  3080. if test -n "$LD"; then
  3081. AC_MSG_RESULT($LD)
  3082. else
  3083. AC_MSG_RESULT(no)
  3084. fi
  3085. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  3086. AC_PROG_LD_GNU
  3087. ])
  3088. # AC_PROG_LD_GNU -
  3089. AC_DEFUN([AC_PROG_LD_GNU],
  3090. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  3091. [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
  3092. if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
  3093. lt_cv_prog_gnu_ld=yes
  3094. else
  3095. lt_cv_prog_gnu_ld=no
  3096. fi])
  3097. with_gnu_ld=$lt_cv_prog_gnu_ld
  3098. ])
  3099. # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
  3100. # -- PORTME Some linkers may need a different reload flag.
  3101. AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
  3102. [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
  3103. [lt_cv_ld_reload_flag='-r'])
  3104. reload_flag=$lt_cv_ld_reload_flag
  3105. test -n "$reload_flag" && reload_flag=" $reload_flag"
  3106. ])
  3107. # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
  3108. # -- PORTME fill in with the dynamic library characteristics
  3109. AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
  3110. [AC_CACHE_CHECK([how to recognise dependent libraries],
  3111. lt_cv_deplibs_check_method,
  3112. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  3113. lt_cv_file_magic_test_file=
  3114. lt_cv_deplibs_check_method='unknown'
  3115. # Need to set the preceding variable on all platforms that support
  3116. # interlibrary dependencies.
  3117. # 'none' -- dependencies not supported.
  3118. # `unknown' -- same as none, but documents that we really don't know.
  3119. # 'pass_all' -- all dependencies passed with no checks.
  3120. # 'test_compile' -- check by making test program.
  3121. # 'file_magic [[regex]]' -- check by looking for files in library path
  3122. # which responds to the $file_magic_cmd with a given egrep regex.
  3123. # If you have `file' or equivalent on your system and you're not sure
  3124. # whether `pass_all' will *always* work, you probably want this one.
  3125. case $host_os in
  3126. aix4* | aix5*)
  3127. lt_cv_deplibs_check_method=pass_all
  3128. ;;
  3129. beos*)
  3130. lt_cv_deplibs_check_method=pass_all
  3131. ;;
  3132. bsdi4*)
  3133. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  3134. lt_cv_file_magic_cmd='/usr/bin/file -L'
  3135. lt_cv_file_magic_test_file=/shlib/libc.so
  3136. ;;
  3137. cygwin* | mingw* | pw32*)
  3138. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
  3139. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3140. ;;
  3141. darwin* | rhapsody*)
  3142. lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
  3143. lt_cv_file_magic_cmd='/usr/bin/file -L'
  3144. case "$host_os" in
  3145. rhapsody* | darwin1.[[012]])
  3146. lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
  3147. ;;
  3148. *) # Darwin 1.3 on
  3149. lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
  3150. ;;
  3151. esac
  3152. ;;
  3153. freebsd*)
  3154. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  3155. case $host_cpu in
  3156. i*86 )
  3157. # Not sure whether the presence of OpenBSD here was a mistake.
  3158. # Let's accept both of them until this is cleared up.
  3159. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
  3160. lt_cv_file_magic_cmd=/usr/bin/file
  3161. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  3162. ;;
  3163. esac
  3164. else
  3165. lt_cv_deplibs_check_method=pass_all
  3166. fi
  3167. ;;
  3168. gnu*)
  3169. lt_cv_deplibs_check_method=pass_all
  3170. ;;
  3171. hpux10.20*|hpux11*)
  3172. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
  3173. lt_cv_file_magic_cmd=/usr/bin/file
  3174. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  3175. ;;
  3176. irix5* | irix6* | nonstopux*)
  3177. case $host_os in
  3178. irix5* | nonstopux*)
  3179. # this will be overridden with pass_all, but let us keep it just in case
  3180. lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
  3181. ;;
  3182. *)
  3183. case $LD in
  3184. *-32|*"-32 ") libmagic=32-bit;;
  3185. *-n32|*"-n32 ") libmagic=N32;;
  3186. *-64|*"-64 ") libmagic=64-bit;;
  3187. *) libmagic=never-match;;
  3188. esac
  3189. # this will be overridden with pass_all, but let us keep it just in case
  3190. lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
  3191. ;;
  3192. esac
  3193. lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
  3194. lt_cv_deplibs_check_method=pass_all
  3195. ;;
  3196. # This must be Linux ELF.
  3197. linux-gnu*)
  3198. case $host_cpu in
  3199. alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* | x86_64*)
  3200. lt_cv_deplibs_check_method=pass_all ;;
  3201. *)
  3202. # glibc up to 2.1.1 does not perform some relocations on ARM
  3203. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
  3204. esac
  3205. lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  3206. ;;
  3207. netbsd*)
  3208. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  3209. lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
  3210. else
  3211. lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
  3212. fi
  3213. ;;
  3214. newos6*)
  3215. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  3216. lt_cv_file_magic_cmd=/usr/bin/file
  3217. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  3218. ;;
  3219. openbsd*)
  3220. lt_cv_file_magic_cmd=/usr/bin/file
  3221. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  3222. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  3223. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
  3224. else
  3225. lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
  3226. fi
  3227. ;;
  3228. osf3* | osf4* | osf5*)
  3229. # this will be overridden with pass_all, but let us keep it just in case
  3230. lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
  3231. lt_cv_file_magic_test_file=/shlib/libc.so
  3232. lt_cv_deplibs_check_method=pass_all
  3233. ;;
  3234. sco3.2v5*)
  3235. lt_cv_deplibs_check_method=pass_all
  3236. ;;
  3237. solaris*)
  3238. lt_cv_deplibs_check_method=pass_all
  3239. lt_cv_file_magic_test_file=/lib/libc.so
  3240. ;;
  3241. sysv5uw[[78]]* | sysv4*uw2*)
  3242. lt_cv_deplibs_check_method=pass_all
  3243. ;;
  3244. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  3245. case $host_vendor in
  3246. motorola)
  3247. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
  3248. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  3249. ;;
  3250. ncr)
  3251. lt_cv_deplibs_check_method=pass_all
  3252. ;;
  3253. sequent)
  3254. lt_cv_file_magic_cmd='/bin/file'
  3255. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  3256. ;;
  3257. sni)
  3258. lt_cv_file_magic_cmd='/bin/file'
  3259. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  3260. lt_cv_file_magic_test_file=/lib/libc.so
  3261. ;;
  3262. siemens)
  3263. lt_cv_deplibs_check_method=pass_all
  3264. ;;
  3265. esac
  3266. ;;
  3267. esac
  3268. ])
  3269. file_magic_cmd=$lt_cv_file_magic_cmd
  3270. deplibs_check_method=$lt_cv_deplibs_check_method
  3271. ])
  3272. # AC_PROG_NM - find the path to a BSD-compatible name lister
  3273. AC_DEFUN([AC_PROG_NM],
  3274. [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
  3275. AC_MSG_CHECKING([for BSD-compatible nm])
  3276. AC_CACHE_VAL(lt_cv_path_NM,
  3277. [if test -n "$NM"; then
  3278. # Let the user override the test.
  3279. lt_cv_path_NM="$NM"
  3280. else
  3281. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3282. for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
  3283. test -z "$ac_dir" && ac_dir=.
  3284. tmp_nm=$ac_dir/${ac_tool_prefix}nm
  3285. if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
  3286. # Check to see if the nm accepts a BSD-compat flag.
  3287. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  3288. # nm: unknown option "B" ignored
  3289. # Tru64's nm complains that /dev/null is an invalid object file
  3290. if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
  3291. lt_cv_path_NM="$tmp_nm -B"
  3292. break
  3293. elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
  3294. lt_cv_path_NM="$tmp_nm -p"
  3295. break
  3296. else
  3297. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  3298. continue # so that we can try to find one that supports BSD flags
  3299. fi
  3300. fi
  3301. done
  3302. IFS="$ac_save_ifs"
  3303. test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
  3304. fi])
  3305. NM="$lt_cv_path_NM"
  3306. AC_MSG_RESULT([$NM])
  3307. ])
  3308. # AC_CHECK_LIBM - check for math library
  3309. AC_DEFUN([AC_CHECK_LIBM],
  3310. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3311. LIBM=
  3312. case $host in
  3313. *-*-beos* | *-*-cygwin* | *-*-pw32*)
  3314. # These system don't have libm
  3315. ;;
  3316. *-ncr-sysv4.3*)
  3317. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  3318. AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
  3319. ;;
  3320. *)
  3321. AC_CHECK_LIB(m, main, LIBM="-lm")
  3322. ;;
  3323. esac
  3324. ])
  3325. # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
  3326. # the libltdl convenience library and LTDLINCL to the include flags for
  3327. # the libltdl header and adds --enable-ltdl-convenience to the
  3328. # configure arguments. Note that LIBLTDL and LTDLINCL are not
  3329. # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
  3330. # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
  3331. # with '${top_builddir}/' and LTDLINCL will be prefixed with
  3332. # '${top_srcdir}/' (note the single quotes!). If your package is not
  3333. # flat and you're not using automake, define top_builddir and
  3334. # top_srcdir appropriately in the Makefiles.
  3335. AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
  3336. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  3337. case $enable_ltdl_convenience in
  3338. no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
  3339. "") enable_ltdl_convenience=yes
  3340. ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
  3341. esac
  3342. LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
  3343. LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
  3344. # For backwards non-gettext consistent compatibility...
  3345. INCLTDL="$LTDLINCL"
  3346. ])
  3347. # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
  3348. # the libltdl installable library and LTDLINCL to the include flags for
  3349. # the libltdl header and adds --enable-ltdl-install to the configure
  3350. # arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
  3351. # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
  3352. # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
  3353. # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
  3354. # with '${top_srcdir}/' (note the single quotes!). If your package is
  3355. # not flat and you're not using automake, define top_builddir and
  3356. # top_srcdir appropriately in the Makefiles.
  3357. # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
  3358. AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
  3359. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  3360. AC_CHECK_LIB(ltdl, main,
  3361. [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
  3362. [if test x"$enable_ltdl_install" = xno; then
  3363. AC_MSG_WARN([libltdl not installed, but installation disabled])
  3364. else
  3365. enable_ltdl_install=yes
  3366. fi
  3367. ])
  3368. if test x"$enable_ltdl_install" = x"yes"; then
  3369. ac_configure_args="$ac_configure_args --enable-ltdl-install"
  3370. LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
  3371. LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
  3372. else
  3373. ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
  3374. LIBLTDL="-lltdl"
  3375. LTDLINCL=
  3376. fi
  3377. # For backwards non-gettext consistent compatibility...
  3378. INCLTDL="$LTDLINCL"
  3379. ])
  3380. # old names
  3381. AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
  3382. AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
  3383. AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
  3384. AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
  3385. AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
  3386. AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
  3387. AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
  3388. # This is just to silence aclocal about the macro not being used
  3389. ifelse([AC_DISABLE_FAST_INSTALL])
  3390. # NOTE: This macro has been submitted for inclusion into #
  3391. # GNU Autoconf as AC_PROG_SED. When it is available in #
  3392. # a released version of Autoconf we should remove this #
  3393. # macro and use it instead. #
  3394. # LT_AC_PROG_SED
  3395. # --------------
  3396. # Check for a fully-functional sed program, that truncates
  3397. # as few characters as possible. Prefer GNU sed if found.
  3398. AC_DEFUN([LT_AC_PROG_SED],
  3399. [AC_MSG_CHECKING([for a sed that does not truncate output])
  3400. AC_CACHE_VAL(lt_cv_path_SED,
  3401. [# Loop through the user's path and test for sed and gsed.
  3402. # Then use that list of sed's as ones to test for truncation.
  3403. as_executable_p="test -f"
  3404. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  3405. for as_dir in $PATH
  3406. do
  3407. IFS=$as_save_IFS
  3408. test -z "$as_dir" && as_dir=.
  3409. for ac_prog in sed gsed; do
  3410. for ac_exec_ext in '' $ac_executable_extensions; do
  3411. if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
  3412. _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
  3413. fi
  3414. done
  3415. done
  3416. done
  3417. # Create a temporary directory, and hook for its removal unless debugging.
  3418. $debug ||
  3419. {
  3420. trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
  3421. trap '{ (exit 1); exit 1; }' 1 2 13 15
  3422. }
  3423. # Create a (secure) tmp directory for tmp files.
  3424. : ${TMPDIR=/tmp}
  3425. {
  3426. tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
  3427. test -n "$tmp" && test -d "$tmp"
  3428. } ||
  3429. {
  3430. tmp=$TMPDIR/sed$$-$RANDOM
  3431. (umask 077 && mkdir $tmp)
  3432. } ||
  3433. {
  3434. echo "$me: cannot create a temporary directory in $TMPDIR" >&2
  3435. { (exit 1); exit 1; }
  3436. }
  3437. _max=0
  3438. _count=0
  3439. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  3440. # along with /bin/sed that truncates output.
  3441. for _sed in $_sed_list /usr/xpg4/bin/sed; do
  3442. test ! -f ${_sed} && break
  3443. cat /dev/null > "$tmp/sed.in"
  3444. _count=0
  3445. echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
  3446. # Check for GNU sed and select it if it is found.
  3447. if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
  3448. lt_cv_path_SED=${_sed}
  3449. break
  3450. fi
  3451. while true; do
  3452. cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
  3453. mv "$tmp/sed.tmp" "$tmp/sed.in"
  3454. cp "$tmp/sed.in" "$tmp/sed.nl"
  3455. echo >>"$tmp/sed.nl"
  3456. ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
  3457. cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
  3458. # 40000 chars as input seems more than enough
  3459. test $_count -gt 10 && break
  3460. _count=`expr $_count + 1`
  3461. if test $_count -gt $_max; then
  3462. _max=$_count
  3463. lt_cv_path_SED=$_sed
  3464. fi
  3465. done
  3466. done
  3467. rm -rf "$tmp"
  3468. ])
  3469. if test "X$SED" != "X"; then
  3470. lt_cv_path_SED=$SED
  3471. else
  3472. SED=$lt_cv_path_SED
  3473. fi
  3474. AC_MSG_RESULT([$SED])
  3475. ])