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.

3114 lines
95 KiB

25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
  1. #! /bin/sh
  2. # ltconfig - Create a system-specific libtool.
  3. # Copyright (C) 1996-1999 Free Software Foundation, Inc.
  4. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  5. #
  6. # This file is free software; you can redistribute it and/or modify it
  7. # under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. # General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  19. #
  20. # As a special exception to the GNU General Public License, if you
  21. # distribute this file as part of a program that contains a
  22. # configuration script generated by Autoconf, you may include it under
  23. # the same distribution terms that you use for the rest of that program.
  24. # A lot of this script is taken from autoconf-2.10.
  25. # Check that we are running under the correct shell.
  26. SHELL=${CONFIG_SHELL-/bin/sh}
  27. echo=echo
  28. if test "X$1" = X--no-reexec; then
  29. # Discard the --no-reexec flag, and continue.
  30. shift
  31. elif test "X$1" = X--fallback-echo; then
  32. # Avoid inline document here, it may be left over
  33. :
  34. elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
  35. # Yippee, $echo works!
  36. :
  37. else
  38. # Restart under the correct shell.
  39. exec "$SHELL" "$0" --no-reexec ${1+"$@"}
  40. fi
  41. if test "X$1" = X--fallback-echo; then
  42. # used as fallback echo
  43. shift
  44. cat <<EOF
  45. $*
  46. EOF
  47. exit 0
  48. fi
  49. # Find the correct PATH separator. Usually this is `:', but
  50. # DJGPP uses `;' like DOS.
  51. if test "X${PATH_SEPARATOR+set}" != Xset; then
  52. UNAME=${UNAME-`uname 2>/dev/null`}
  53. case X$UNAME in
  54. *-DOS) PATH_SEPARATOR=';' ;;
  55. *) PATH_SEPARATOR=':' ;;
  56. esac
  57. fi
  58. # The HP-UX ksh and POSIX shell print the target directory to stdout
  59. # if CDPATH is set.
  60. if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  61. if test "X${echo_test_string+set}" != Xset; then
  62. # find a string as large as possible, as long as the shell can cope with it
  63. for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
  64. # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
  65. if (echo_test_string="`eval $cmd`") 2>/dev/null &&
  66. echo_test_string="`eval $cmd`" &&
  67. (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then
  68. break
  69. fi
  70. done
  71. fi
  72. if test "X`($echo '\t') 2>/dev/null`" != 'X\t' ||
  73. test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then
  74. # The Solaris, AIX, and Digital Unix default echo programs unquote
  75. # backslashes. This makes it impossible to quote backslashes using
  76. # echo "$something" | sed 's/\\/\\\\/g'
  77. #
  78. # So, first we look for a working echo in the user's PATH.
  79. IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  80. for dir in $PATH /usr/ucb; do
  81. if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  82. test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
  83. test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
  84. echo="$dir/echo"
  85. break
  86. fi
  87. done
  88. IFS="$save_ifs"
  89. if test "X$echo" = Xecho; then
  90. # We didn't find a better echo, so look for alternatives.
  91. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
  92. test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
  93. # This shell has a builtin print -r that does the trick.
  94. echo='print -r'
  95. elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
  96. test "X$CONFIG_SHELL" != X/bin/ksh; then
  97. # If we have ksh, try running ltconfig again with it.
  98. ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
  99. export ORIGINAL_CONFIG_SHELL
  100. CONFIG_SHELL=/bin/ksh
  101. export CONFIG_SHELL
  102. exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
  103. else
  104. # Try using printf.
  105. echo='printf "%s\n"'
  106. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  107. test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
  108. # Cool, printf works
  109. :
  110. elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
  111. test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
  112. CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL"
  113. export CONFIG_SHELL
  114. SHELL="$CONFIG_SHELL"
  115. export SHELL
  116. echo="$CONFIG_SHELL $0 --fallback-echo"
  117. elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
  118. test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
  119. echo="$CONFIG_SHELL $0 --fallback-echo"
  120. else
  121. # maybe with a smaller string...
  122. prev=:
  123. for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
  124. if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then
  125. break
  126. fi
  127. prev="$cmd"
  128. done
  129. if test "$prev" != 'sed 50q "$0"'; then
  130. echo_test_string=`eval $prev`
  131. export echo_test_string
  132. exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"}
  133. else
  134. # Oops. We lost completely, so just stick with echo.
  135. echo=echo
  136. fi
  137. fi
  138. fi
  139. fi
  140. fi
  141. # Sed substitution that helps us do robust quoting. It backslashifies
  142. # metacharacters that are still active within double-quoted strings.
  143. Xsed='sed -e s/^X//'
  144. sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
  145. # Same as above, but do not quote variable references.
  146. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
  147. # Sed substitution to delay expansion of an escaped shell variable in a
  148. # double_quote_subst'ed string.
  149. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  150. # The name of this program.
  151. progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
  152. # Constants:
  153. PROGRAM=ltconfig
  154. PACKAGE=libtool
  155. VERSION=1.3.5
  156. TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)"
  157. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  158. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  159. rm="rm -f"
  160. help="Try \`$progname --help' for more information."
  161. # Global variables:
  162. default_ofile=libtool
  163. can_build_shared=yes
  164. enable_shared=yes
  165. # All known linkers require a `.a' archive for static linking (except M$VC,
  166. # which needs '.lib').
  167. enable_static=yes
  168. enable_fast_install=yes
  169. enable_dlopen=unknown
  170. enable_win32_dll=no
  171. ltmain=
  172. silent=
  173. srcdir=
  174. ac_config_guess=
  175. ac_config_sub=
  176. host=
  177. nonopt=
  178. ofile="$default_ofile"
  179. verify_host=yes
  180. with_gcc=no
  181. with_gnu_ld=no
  182. need_locks=yes
  183. ac_ext=c
  184. objext=o
  185. libext=a
  186. exeext=
  187. cache_file=
  188. old_AR="$AR"
  189. old_CC="$CC"
  190. old_CFLAGS="$CFLAGS"
  191. old_CPPFLAGS="$CPPFLAGS"
  192. old_LDFLAGS="$LDFLAGS"
  193. old_LD="$LD"
  194. old_LN_S="$LN_S"
  195. old_LIBS="$LIBS"
  196. old_NM="$NM"
  197. old_RANLIB="$RANLIB"
  198. old_DLLTOOL="$DLLTOOL"
  199. old_OBJDUMP="$OBJDUMP"
  200. old_AS="$AS"
  201. # Parse the command line options.
  202. args=
  203. prev=
  204. for option
  205. do
  206. case "$option" in
  207. -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  208. *) optarg= ;;
  209. esac
  210. # If the previous option needs an argument, assign it.
  211. if test -n "$prev"; then
  212. eval "$prev=\$option"
  213. prev=
  214. continue
  215. fi
  216. case "$option" in
  217. --help) cat <<EOM
  218. Usage: $progname [OPTION]... [HOST [LTMAIN]]
  219. Generate a system-specific libtool script.
  220. --debug enable verbose shell tracing
  221. --disable-shared do not build shared libraries
  222. --disable-static do not build static libraries
  223. --disable-fast-install do not optimize for fast installation
  224. --enable-dlopen enable dlopen support
  225. --enable-win32-dll enable building dlls on win32 hosts
  226. --help display this help and exit
  227. --no-verify do not verify that HOST is a valid host type
  228. -o, --output=FILE specify the output file [default=$default_ofile]
  229. --quiet same as \`--silent'
  230. --silent do not print informational messages
  231. --srcdir=DIR find \`config.guess' in DIR
  232. --version output version information and exit
  233. --with-gcc assume that the GNU C compiler will be used
  234. --with-gnu-ld assume that the C compiler uses the GNU linker
  235. --disable-lock disable file locking
  236. --cache-file=FILE configure cache file
  237. LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
  238. that provides basic libtool functionality.
  239. HOST is the canonical host system name [default=guessed].
  240. EOM
  241. exit 0
  242. ;;
  243. --debug)
  244. echo "$progname: enabling shell trace mode"
  245. set -x
  246. ;;
  247. --disable-shared) enable_shared=no ;;
  248. --disable-static) enable_static=no ;;
  249. --disable-fast-install) enable_fast_install=no ;;
  250. --enable-dlopen) enable_dlopen=yes ;;
  251. --enable-win32-dll) enable_win32_dll=yes ;;
  252. --quiet | --silent) silent=yes ;;
  253. --srcdir) prev=srcdir ;;
  254. --srcdir=*) srcdir="$optarg" ;;
  255. --no-verify) verify_host=no ;;
  256. --output | -o) prev=ofile ;;
  257. --output=*) ofile="$optarg" ;;
  258. --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
  259. --with-gcc) with_gcc=yes ;;
  260. --with-gnu-ld) with_gnu_ld=yes ;;
  261. --disable-lock) need_locks=no ;;
  262. --cache-file=*) cache_file="$optarg" ;;
  263. -*)
  264. echo "$progname: unrecognized option \`$option'" 1>&2
  265. echo "$help" 1>&2
  266. exit 1
  267. ;;
  268. *)
  269. if test -z "$ltmain"; then
  270. ltmain="$option"
  271. elif test -z "$host"; then
  272. # This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
  273. # if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
  274. # echo "$progname: warning \`$option' is not a valid host type" 1>&2
  275. # fi
  276. host="$option"
  277. else
  278. echo "$progname: too many arguments" 1>&2
  279. echo "$help" 1>&2
  280. exit 1
  281. fi ;;
  282. esac
  283. done
  284. if test -z "$ltmain"; then
  285. echo "$progname: you must specify a LTMAIN file" 1>&2
  286. echo "$help" 1>&2
  287. exit 1
  288. fi
  289. if test ! -f "$ltmain"; then
  290. echo "$progname: \`$ltmain' does not exist" 1>&2
  291. echo "$help" 1>&2
  292. exit 1
  293. fi
  294. # Quote any args containing shell metacharacters.
  295. ltconfig_args=
  296. for arg
  297. do
  298. case "$arg" in
  299. *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  300. ltconfig_args="$ltconfig_args '$arg'" ;;
  301. *) ltconfig_args="$ltconfig_args $arg" ;;
  302. esac
  303. done
  304. # A relevant subset of AC_INIT.
  305. # File descriptor usage:
  306. # 0 standard input
  307. # 1 file creation
  308. # 2 errors and warnings
  309. # 3 some systems may open it to /dev/tty
  310. # 4 used on the Kubota Titan
  311. # 5 compiler messages saved in config.log
  312. # 6 checking for... messages and results
  313. if test "$silent" = yes; then
  314. exec 6>/dev/null
  315. else
  316. exec 6>&1
  317. fi
  318. exec 5>>./config.log
  319. # NLS nuisances.
  320. # Only set LANG and LC_ALL to C if already set.
  321. # These must not be set unconditionally because not all systems understand
  322. # e.g. LANG=C (notably SCO).
  323. if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
  324. if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi
  325. if test -n "$cache_file" && test -r "$cache_file"; then
  326. echo "loading cache $cache_file within ltconfig"
  327. . $cache_file
  328. fi
  329. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  330. # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  331. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  332. ac_n= ac_c='
  333. ' ac_t=' '
  334. else
  335. ac_n=-n ac_c= ac_t=
  336. fi
  337. else
  338. ac_n= ac_c='\c' ac_t=
  339. fi
  340. if test -z "$srcdir"; then
  341. # Assume the source directory is the same one as the path to LTMAIN.
  342. srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
  343. test "$srcdir" = "$ltmain" && srcdir=.
  344. fi
  345. trap "$rm conftest*; exit 1" 1 2 15
  346. if test "$verify_host" = yes; then
  347. # Check for config.guess and config.sub.
  348. ac_aux_dir=
  349. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  350. if test -f $ac_dir/config.guess; then
  351. ac_aux_dir=$ac_dir
  352. break
  353. fi
  354. done
  355. if test -z "$ac_aux_dir"; then
  356. echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
  357. echo "$help" 1>&2
  358. exit 1
  359. fi
  360. ac_config_guess=$ac_aux_dir/config.guess
  361. ac_config_sub=$ac_aux_dir/config.sub
  362. # Make sure we can run config.sub.
  363. if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
  364. else
  365. echo "$progname: cannot run $ac_config_sub" 1>&2
  366. echo "$help" 1>&2
  367. exit 1
  368. fi
  369. echo $ac_n "checking host system type""... $ac_c" 1>&6
  370. host_alias=$host
  371. case "$host_alias" in
  372. "")
  373. if host_alias=`$SHELL $ac_config_guess`; then :
  374. else
  375. echo "$progname: cannot guess host type; you must specify one" 1>&2
  376. echo "$help" 1>&2
  377. exit 1
  378. fi ;;
  379. esac
  380. host=`$SHELL $ac_config_sub $host_alias`
  381. echo "$ac_t$host" 1>&6
  382. # Make sure the host verified.
  383. test -z "$host" && exit 1
  384. elif test -z "$host"; then
  385. echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
  386. echo "$help" 1>&2
  387. exit 1
  388. else
  389. host_alias=$host
  390. fi
  391. host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  392. host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  393. host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  394. # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
  395. case "$host_os" in
  396. linux-gnu*) ;;
  397. linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
  398. esac
  399. case "$host_os" in
  400. aix3*)
  401. # AIX sometimes has problems with the GCC collect2 program. For some
  402. # reason, if we set the COLLECT_NAMES environment variable, the problems
  403. # vanish in a puff of smoke.
  404. if test "X${COLLECT_NAMES+set}" != Xset; then
  405. COLLECT_NAMES=
  406. export COLLECT_NAMES
  407. fi
  408. ;;
  409. esac
  410. # Determine commands to create old-style static archives.
  411. old_archive_cmds='$AR cru $oldlib$oldobjs'
  412. old_postinstall_cmds='chmod 644 $oldlib'
  413. old_postuninstall_cmds=
  414. # Set a sane default for `AR'.
  415. test -z "$AR" && AR=ar
  416. # Set a sane default for `OBJDUMP'.
  417. test -z "$OBJDUMP" && OBJDUMP=objdump
  418. # If RANLIB is not set, then run the test.
  419. if test "${RANLIB+set}" != "set"; then
  420. result=no
  421. echo $ac_n "checking for ranlib... $ac_c" 1>&6
  422. IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  423. for dir in $PATH; do
  424. test -z "$dir" && dir=.
  425. if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then
  426. RANLIB="ranlib"
  427. result="ranlib"
  428. break
  429. fi
  430. done
  431. IFS="$save_ifs"
  432. echo "$ac_t$result" 1>&6
  433. fi
  434. if test -n "$RANLIB"; then
  435. old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
  436. old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
  437. fi
  438. # Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin.
  439. test -z "$DLLTOOL" && DLLTOOL=dlltool
  440. test -z "$OBJDUMP" && OBJDUMP=objdump
  441. test -z "$AS" && AS=as
  442. # Check to see if we are using GCC.
  443. if test "$with_gcc" != yes || test -z "$CC"; then
  444. # If CC is not set, then try to find GCC or a usable CC.
  445. if test -z "$CC"; then
  446. echo $ac_n "checking for gcc... $ac_c" 1>&6
  447. IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  448. for dir in $PATH; do
  449. test -z "$dir" && dir=.
  450. if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then
  451. CC="gcc"
  452. break
  453. fi
  454. done
  455. IFS="$save_ifs"
  456. if test -n "$CC"; then
  457. echo "$ac_t$CC" 1>&6
  458. else
  459. echo "$ac_t"no 1>&6
  460. fi
  461. fi
  462. # Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
  463. if test -z "$CC"; then
  464. echo $ac_n "checking for cc... $ac_c" 1>&6
  465. IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  466. cc_rejected=no
  467. for dir in $PATH; do
  468. test -z "$dir" && dir=.
  469. if test -f $dir/cc || test -f $dir/cc$ac_exeext; then
  470. if test "$dir/cc" = "/usr/ucb/cc"; then
  471. cc_rejected=yes
  472. continue
  473. fi
  474. CC="cc"
  475. break
  476. fi
  477. done
  478. IFS="$save_ifs"
  479. if test $cc_rejected = yes; then
  480. # We found a bogon in the path, so make sure we never use it.
  481. set dummy $CC
  482. shift
  483. if test $# -gt 0; then
  484. # We chose a different compiler from the bogus one.
  485. # However, it has the same name, so the bogon will be chosen
  486. # first if we set CC to just the name; use the full file name.
  487. shift
  488. set dummy "$dir/cc" "$@"
  489. shift
  490. CC="$@"
  491. fi
  492. fi
  493. if test -n "$CC"; then
  494. echo "$ac_t$CC" 1>&6
  495. else
  496. echo "$ac_t"no 1>&6
  497. fi
  498. if test -z "$CC"; then
  499. echo "$progname: error: no acceptable cc found in \$PATH" 1>&2
  500. exit 1
  501. fi
  502. fi
  503. # Now see if the compiler is really GCC.
  504. with_gcc=no
  505. echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
  506. echo "$progname:581: checking whether we are using GNU C" >&5
  507. $rm conftest.c
  508. cat > conftest.c <<EOF
  509. #ifdef __GNUC__
  510. yes;
  511. #endif
  512. EOF
  513. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  514. with_gcc=yes
  515. fi
  516. $rm conftest.c
  517. echo "$ac_t$with_gcc" 1>&6
  518. fi
  519. # Allow CC to be a program name with arguments.
  520. set dummy $CC
  521. compiler="$2"
  522. echo $ac_n "checking for object suffix... $ac_c" 1>&6
  523. $rm conftest*
  524. echo 'int i = 1;' > conftest.c
  525. echo "$progname:603: checking for object suffix" >& 5
  526. if { (eval echo $progname:604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
  527. # Append any warnings to the config.log.
  528. cat conftest.err 1>&5
  529. for ac_file in conftest.*; do
  530. case $ac_file in
  531. *.c) ;;
  532. *) objext=`echo $ac_file | sed -e s/conftest.//` ;;
  533. esac
  534. done
  535. else
  536. cat conftest.err 1>&5
  537. echo "$progname: failed program was:" >&5
  538. cat conftest.c >&5
  539. fi
  540. $rm conftest*
  541. echo "$ac_t$objext" 1>&6
  542. echo $ac_n "checking for executable suffix... $ac_c" 1>&6
  543. if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
  544. echo $ac_n "(cached) $ac_c" 1>&6
  545. else
  546. ac_cv_exeext="no"
  547. $rm conftest*
  548. echo 'main () { return 0; }' > conftest.c
  549. echo "$progname:629: checking for executable suffix" >& 5
  550. if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then
  551. # Append any warnings to the config.log.
  552. cat conftest.err 1>&5
  553. for ac_file in conftest.*; do
  554. case $ac_file in
  555. *.c | *.err | *.$objext ) ;;
  556. *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;;
  557. esac
  558. done
  559. else
  560. cat conftest.err 1>&5
  561. echo "$progname: failed program was:" >&5
  562. cat conftest.c >&5
  563. fi
  564. $rm conftest*
  565. fi
  566. if test "X$ac_cv_exeext" = Xno; then
  567. exeext=""
  568. else
  569. exeext="$ac_cv_exeext"
  570. fi
  571. echo "$ac_t$ac_cv_exeext" 1>&6
  572. echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
  573. pic_flag=
  574. special_shlib_compile_flags=
  575. wl=
  576. link_static_flag=
  577. no_builtin_flag=
  578. if test "$with_gcc" = yes; then
  579. wl='-Wl,'
  580. link_static_flag='-static'
  581. case "$host_os" in
  582. beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
  583. # PIC is the default for these OSes.
  584. ;;
  585. aix*)
  586. # Below there is a dirty hack to force normal static linking with -ldl
  587. # The problem is because libdl dynamically linked with both libc and
  588. # libC (AIX C++ library), which obviously doesn't included in libraries
  589. # list by gcc. This cause undefined symbols with -static flags.
  590. # This hack allows C programs to be linked with "-static -ldl", but
  591. # we not sure about C++ programs.
  592. link_static_flag="$link_static_flag ${wl}-lC"
  593. ;;
  594. cygwin* | mingw* | os2*)
  595. # We can build DLLs from non-PIC.
  596. ;;
  597. amigaos*)
  598. # FIXME: we need at least 68020 code to build shared libraries, but
  599. # adding the `-m68020' flag to GCC prevents building anything better,
  600. # like `-m68040'.
  601. pic_flag='-m68020 -resident32 -malways-restore-a4'
  602. ;;
  603. sysv4*MP*)
  604. if test -d /usr/nec; then
  605. pic_flag=-Kconform_pic
  606. fi
  607. ;;
  608. *)
  609. pic_flag='-fPIC'
  610. ;;
  611. esac
  612. else
  613. # PORTME Check for PIC flags for the system compiler.
  614. case "$host_os" in
  615. aix3* | aix4*)
  616. # All AIX code is PIC.
  617. link_static_flag='-bnso -bI:/lib/syscalls.exp'
  618. ;;
  619. hpux9* | hpux10* | hpux11*)
  620. # Is there a better link_static_flag that works with the bundled CC?
  621. wl='-Wl,'
  622. link_static_flag="${wl}-a ${wl}archive"
  623. pic_flag='+Z'
  624. ;;
  625. irix5* | irix6*)
  626. wl='-Wl,'
  627. link_static_flag='-non_shared'
  628. # PIC (with -KPIC) is the default.
  629. ;;
  630. cygwin* | mingw* | os2*)
  631. # We can build DLLs from non-PIC.
  632. ;;
  633. osf3* | osf4* | osf5*)
  634. # All OSF/1 code is PIC.
  635. wl='-Wl,'
  636. link_static_flag='-non_shared'
  637. ;;
  638. sco3.2v5*)
  639. pic_flag='-Kpic'
  640. link_static_flag='-dn'
  641. special_shlib_compile_flags='-belf'
  642. ;;
  643. solaris*)
  644. pic_flag='-KPIC'
  645. link_static_flag='-Bstatic'
  646. wl='-Wl,'
  647. ;;
  648. sunos4*)
  649. pic_flag='-PIC'
  650. link_static_flag='-Bstatic'
  651. wl='-Qoption ld '
  652. ;;
  653. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  654. pic_flag='-KPIC'
  655. link_static_flag='-Bstatic'
  656. wl='-Wl,'
  657. ;;
  658. uts4*)
  659. pic_flag='-pic'
  660. link_static_flag='-Bstatic'
  661. ;;
  662. sysv4*MP*)
  663. if test -d /usr/nec ;then
  664. pic_flag='-Kconform_pic'
  665. link_static_flag='-Bstatic'
  666. fi
  667. ;;
  668. *)
  669. can_build_shared=no
  670. ;;
  671. esac
  672. fi
  673. if test -n "$pic_flag"; then
  674. echo "$ac_t$pic_flag" 1>&6
  675. # Check to make sure the pic_flag actually works.
  676. echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
  677. $rm conftest*
  678. echo "int some_variable = 0;" > conftest.c
  679. save_CFLAGS="$CFLAGS"
  680. CFLAGS="$CFLAGS $pic_flag -DPIC"
  681. echo "$progname:776: checking if $compiler PIC flag $pic_flag works" >&5
  682. if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
  683. # Append any warnings to the config.log.
  684. cat conftest.err 1>&5
  685. case "$host_os" in
  686. hpux9* | hpux10* | hpux11*)
  687. # On HP-UX, both CC and GCC only warn that PIC is supported... then they
  688. # create non-PIC objects. So, if there were any warnings, we assume that
  689. # PIC is not supported.
  690. if test -s conftest.err; then
  691. echo "$ac_t"no 1>&6
  692. can_build_shared=no
  693. pic_flag=
  694. else
  695. echo "$ac_t"yes 1>&6
  696. pic_flag=" $pic_flag"
  697. fi
  698. ;;
  699. *)
  700. echo "$ac_t"yes 1>&6
  701. pic_flag=" $pic_flag"
  702. ;;
  703. esac
  704. else
  705. # Append any errors to the config.log.
  706. cat conftest.err 1>&5
  707. can_build_shared=no
  708. pic_flag=
  709. echo "$ac_t"no 1>&6
  710. fi
  711. CFLAGS="$save_CFLAGS"
  712. $rm conftest*
  713. else
  714. echo "$ac_t"none 1>&6
  715. fi
  716. # Check to see if options -o and -c are simultaneously supported by compiler
  717. echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
  718. $rm -r conftest 2>/dev/null
  719. mkdir conftest
  720. cd conftest
  721. $rm conftest*
  722. echo "int some_variable = 0;" > conftest.c
  723. mkdir out
  724. # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
  725. # that will create temporary files in the current directory regardless of
  726. # the output directory. Thus, making CWD read-only will cause this test
  727. # to fail, enabling locking or at least warning the user not to do parallel
  728. # builds.
  729. chmod -w .
  730. save_CFLAGS="$CFLAGS"
  731. CFLAGS="$CFLAGS -o out/conftest2.o"
  732. echo "$progname:829: checking if $compiler supports -c -o file.o" >&5
  733. if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
  734. # The compiler can only warn and ignore the option if not recognized
  735. # So say no if there are warnings
  736. if test -s out/conftest.err; then
  737. echo "$ac_t"no 1>&6
  738. compiler_c_o=no
  739. else
  740. echo "$ac_t"yes 1>&6
  741. compiler_c_o=yes
  742. fi
  743. else
  744. # Append any errors to the config.log.
  745. cat out/conftest.err 1>&5
  746. compiler_c_o=no
  747. echo "$ac_t"no 1>&6
  748. fi
  749. CFLAGS="$save_CFLAGS"
  750. chmod u+w .
  751. $rm conftest* out/*
  752. rmdir out
  753. cd ..
  754. rmdir conftest
  755. $rm -r conftest 2>/dev/null
  756. if test x"$compiler_c_o" = x"yes"; then
  757. # Check to see if we can write to a .lo
  758. echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6
  759. $rm conftest*
  760. echo "int some_variable = 0;" > conftest.c
  761. save_CFLAGS="$CFLAGS"
  762. CFLAGS="$CFLAGS -c -o conftest.lo"
  763. echo "$progname:862: checking if $compiler supports -c -o file.lo" >&5
  764. if { (eval echo $progname:863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
  765. # The compiler can only warn and ignore the option if not recognized
  766. # So say no if there are warnings
  767. if test -s conftest.err; then
  768. echo "$ac_t"no 1>&6
  769. compiler_o_lo=no
  770. else
  771. echo "$ac_t"yes 1>&6
  772. compiler_o_lo=yes
  773. fi
  774. else
  775. # Append any errors to the config.log.
  776. cat conftest.err 1>&5
  777. compiler_o_lo=no
  778. echo "$ac_t"no 1>&6
  779. fi
  780. CFLAGS="$save_CFLAGS"
  781. $rm conftest*
  782. else
  783. compiler_o_lo=no
  784. fi
  785. # Check to see if we can do hard links to lock some files if needed
  786. hard_links="nottested"
  787. if test "$compiler_c_o" = no && test "$need_locks" != no; then
  788. # do not overwrite the value of need_locks provided by the user
  789. echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
  790. hard_links=yes
  791. $rm conftest*
  792. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  793. touch conftest.a
  794. ln conftest.a conftest.b 2>&5 || hard_links=no
  795. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  796. echo "$ac_t$hard_links" 1>&6
  797. $rm conftest*
  798. if test "$hard_links" = no; then
  799. echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
  800. need_locks=warn
  801. fi
  802. else
  803. need_locks=no
  804. fi
  805. if test "$with_gcc" = yes; then
  806. # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
  807. echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
  808. $rm conftest*
  809. echo "int some_variable = 0;" > conftest.c
  810. save_CFLAGS="$CFLAGS"
  811. CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
  812. echo "$progname:914: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
  813. if { (eval echo $progname:915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
  814. # The compiler can only warn and ignore the option if not recognized
  815. # So say no if there are warnings
  816. if test -s conftest.err; then
  817. echo "$ac_t"no 1>&6
  818. compiler_rtti_exceptions=no
  819. else
  820. echo "$ac_t"yes 1>&6
  821. compiler_rtti_exceptions=yes
  822. fi
  823. else
  824. # Append any errors to the config.log.
  825. cat conftest.err 1>&5
  826. compiler_rtti_exceptions=no
  827. echo "$ac_t"no 1>&6
  828. fi
  829. CFLAGS="$save_CFLAGS"
  830. $rm conftest*
  831. if test "$compiler_rtti_exceptions" = "yes"; then
  832. no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
  833. else
  834. no_builtin_flag=' -fno-builtin'
  835. fi
  836. fi
  837. # Check for any special shared library compilation flags.
  838. if test -n "$special_shlib_compile_flags"; then
  839. echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2
  840. if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then :
  841. else
  842. echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2
  843. can_build_shared=no
  844. fi
  845. fi
  846. echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6
  847. $rm conftest*
  848. echo 'main(){return(0);}' > conftest.c
  849. save_LDFLAGS="$LDFLAGS"
  850. LDFLAGS="$LDFLAGS $link_static_flag"
  851. echo "$progname:958: checking if $compiler static flag $link_static_flag works" >&5
  852. if { (eval echo $progname:959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  853. echo "$ac_t$link_static_flag" 1>&6
  854. else
  855. echo "$ac_t"none 1>&6
  856. link_static_flag=
  857. fi
  858. LDFLAGS="$save_LDFLAGS"
  859. $rm conftest*
  860. if test -z "$LN_S"; then
  861. # Check to see if we can use ln -s, or we need hard links.
  862. echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
  863. $rm conftest.dat
  864. if ln -s X conftest.dat 2>/dev/null; then
  865. $rm conftest.dat
  866. LN_S="ln -s"
  867. else
  868. LN_S=ln
  869. fi
  870. if test "$LN_S" = "ln -s"; then
  871. echo "$ac_t"yes 1>&6
  872. else
  873. echo "$ac_t"no 1>&6
  874. fi
  875. fi
  876. # Make sure LD is an absolute path.
  877. if test -z "$LD"; then
  878. ac_prog=ld
  879. if test "$with_gcc" = yes; then
  880. # Check if gcc -print-prog-name=ld gives a path.
  881. echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
  882. echo "$progname:991: checking for ld used by GCC" >&5
  883. ac_prog=`($CC -print-prog-name=ld) 2>&5`
  884. case "$ac_prog" in
  885. # Accept absolute paths.
  886. [\\/]* | [A-Za-z]:[\\/]*)
  887. re_direlt='/[^/][^/]*/\.\./'
  888. # Canonicalize the path of ld
  889. ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
  890. while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
  891. ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
  892. done
  893. test -z "$LD" && LD="$ac_prog"
  894. ;;
  895. "")
  896. # If it fails, then pretend we are not using GCC.
  897. ac_prog=ld
  898. ;;
  899. *)
  900. # If it is relative, then search for the first ld in PATH.
  901. with_gnu_ld=unknown
  902. ;;
  903. esac
  904. elif test "$with_gnu_ld" = yes; then
  905. echo $ac_n "checking for GNU ld... $ac_c" 1>&6
  906. echo "$progname:1015: checking for GNU ld" >&5
  907. else
  908. echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
  909. echo "$progname:1018: checking for non-GNU ld" >&5
  910. fi
  911. if test -z "$LD"; then
  912. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  913. for ac_dir in $PATH; do
  914. test -z "$ac_dir" && ac_dir=.
  915. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  916. LD="$ac_dir/$ac_prog"
  917. # Check to see if the program is GNU ld. I'd rather use --version,
  918. # but apparently some GNU ld's only accept -v.
  919. # Break only if it was the GNU/non-GNU ld that we prefer.
  920. if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
  921. test "$with_gnu_ld" != no && break
  922. else
  923. test "$with_gnu_ld" != yes && break
  924. fi
  925. fi
  926. done
  927. IFS="$ac_save_ifs"
  928. fi
  929. if test -n "$LD"; then
  930. echo "$ac_t$LD" 1>&6
  931. else
  932. echo "$ac_t"no 1>&6
  933. fi
  934. if test -z "$LD"; then
  935. echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
  936. exit 1
  937. fi
  938. fi
  939. # Check to see if it really is or is not GNU ld.
  940. echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
  941. # I'd rather use --version here, but apparently some GNU ld's only accept -v.
  942. if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
  943. with_gnu_ld=yes
  944. else
  945. with_gnu_ld=no
  946. fi
  947. echo "$ac_t$with_gnu_ld" 1>&6
  948. # See if the linker supports building shared libraries.
  949. echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
  950. allow_undefined_flag=
  951. no_undefined_flag=
  952. need_lib_prefix=unknown
  953. need_version=unknown
  954. # when you set need_version to no, make sure it does not cause -set_version
  955. # flags to be left without arguments
  956. archive_cmds=
  957. archive_expsym_cmds=
  958. old_archive_from_new_cmds=
  959. export_dynamic_flag_spec=
  960. whole_archive_flag_spec=
  961. thread_safe_flag_spec=
  962. hardcode_libdir_flag_spec=
  963. hardcode_libdir_separator=
  964. hardcode_direct=no
  965. hardcode_minus_L=no
  966. hardcode_shlibpath_var=unsupported
  967. runpath_var=
  968. always_export_symbols=no
  969. export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
  970. # include_expsyms should be a list of space-separated symbols to be *always*
  971. # included in the symbol list
  972. include_expsyms=
  973. # exclude_expsyms can be an egrep regular expression of symbols to exclude
  974. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  975. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  976. # as well as any symbol that contains `d'.
  977. exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
  978. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  979. # platforms (ab)use it in PIC code, but their linkers get confused if
  980. # the symbol is explicitly referenced. Since portable code cannot
  981. # rely on this symbol name, it's probably fine to never include it in
  982. # preloaded symbol tables.
  983. case "$host_os" in
  984. cygwin* | mingw*)
  985. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  986. # When not using gcc, we currently assume that we are using
  987. # Microsoft Visual C++.
  988. if test "$with_gcc" != yes; then
  989. with_gnu_ld=no
  990. fi
  991. ;;
  992. esac
  993. ld_shlibs=yes
  994. if test "$with_gnu_ld" = yes; then
  995. # If archive_cmds runs LD, not CC, wlarc should be empty
  996. wlarc='${wl}'
  997. # See if GNU ld supports shared libraries.
  998. case "$host_os" in
  999. aix3* | aix4*)
  1000. # On AIX, the GNU linker is very broken
  1001. ld_shlibs=no
  1002. cat <<EOF 1>&2
  1003. *** Warning: the GNU linker, at least up to release 2.9.1, is reported
  1004. *** to be unable to reliably create shared libraries on AIX.
  1005. *** Therefore, libtool is disabling shared libraries support. If you
  1006. *** really care for shared libraries, you may want to modify your PATH
  1007. *** so that a non-GNU linker is found, and then restart.
  1008. EOF
  1009. ;;
  1010. amigaos*)
  1011. archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
  1012. hardcode_libdir_flag_spec='-L$libdir'
  1013. hardcode_minus_L=yes
  1014. # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
  1015. # that the semantics of dynamic libraries on AmigaOS, at least up
  1016. # to version 4, is to share data among multiple programs linked
  1017. # with the same dynamic library. Since this doesn't match the
  1018. # behavior of shared libraries on other platforms, we can use
  1019. # them.
  1020. ld_shlibs=no
  1021. ;;
  1022. beos*)
  1023. if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  1024. allow_undefined_flag=unsupported
  1025. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  1026. # support --undefined. This deserves some investigation. FIXME
  1027. archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
  1028. else
  1029. ld_shlibs=no
  1030. fi
  1031. ;;
  1032. cygwin* | mingw*)
  1033. # hardcode_libdir_flag_spec is actually meaningless, as there is
  1034. # no search path for DLLs.
  1035. hardcode_libdir_flag_spec='-L$libdir'
  1036. allow_undefined_flag=unsupported
  1037. always_export_symbols=yes
  1038. # Extract the symbol export list from an `--export-all' def file,
  1039. # then regenerate the def file from the symbol export list, so that
  1040. # the compiled dll only exports the symbol export list.
  1041. # Be careful not to strip the DATA tag left by newer dlltools.
  1042. export_symbols_cmds='test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
  1043. test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
  1044. $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs $convenience~
  1045. sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $objdir/$soname-def > $export_symbols'
  1046. # If DATA tags from a recent dlltool are present, honour them!
  1047. archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
  1048. _lt_hint=1;
  1049. cat $export_symbols | while read symbol; do
  1050. set dummy \$symbol;
  1051. case \$# in
  1052. 2) echo " \$2 @ \$_lt_hint ; " >> $objdir/$soname-def;;
  1053. *) echo " \$2 @ \$_lt_hint \$3 ; " >> $objdir/$soname-def;;
  1054. esac;
  1055. _lt_hint=`expr 1 + \$_lt_hint`;
  1056. done~
  1057. test -f $objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~
  1058. test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
  1059. $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
  1060. $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
  1061. $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~
  1062. $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
  1063. $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
  1064. old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
  1065. ;;
  1066. netbsd*)
  1067. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  1068. archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
  1069. archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  1070. else
  1071. archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
  1072. # can we support soname and/or expsyms with a.out? -oliva
  1073. fi
  1074. ;;
  1075. solaris* | sysv5*)
  1076. if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
  1077. ld_shlibs=no
  1078. cat <<EOF 1>&2
  1079. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  1080. *** create shared libraries on Solaris systems. Therefore, libtool
  1081. *** is disabling shared libraries support. We urge you to upgrade GNU
  1082. *** binutils to release 2.9.1 or newer. Another option is to modify
  1083. *** your PATH or compiler configuration so that the native linker is
  1084. *** used, and then restart.
  1085. EOF
  1086. elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  1087. archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
  1088. archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  1089. else
  1090. ld_shlibs=no
  1091. fi
  1092. ;;
  1093. sunos4*)
  1094. archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts'
  1095. wlarc=
  1096. hardcode_direct=yes
  1097. hardcode_shlibpath_var=no
  1098. ;;
  1099. *)
  1100. if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  1101. archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
  1102. archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  1103. else
  1104. ld_shlibs=no
  1105. fi
  1106. ;;
  1107. esac
  1108. if test "$ld_shlibs" = yes; then
  1109. runpath_var=LD_RUN_PATH
  1110. hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
  1111. export_dynamic_flag_spec='${wl}--export-dynamic'
  1112. case $host_os in
  1113. cygwin* | mingw*)
  1114. # dlltool doesn't understand --whole-archive et. al.
  1115. whole_archive_flag_spec=
  1116. ;;
  1117. *)
  1118. # ancient GNU ld didn't support --whole-archive et. al.
  1119. if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
  1120. whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  1121. else
  1122. whole_archive_flag_spec=
  1123. fi
  1124. ;;
  1125. esac
  1126. fi
  1127. else
  1128. # PORTME fill in a description of your system's linker (not GNU ld)
  1129. case "$host_os" in
  1130. aix3*)
  1131. allow_undefined_flag=unsupported
  1132. always_export_symbols=yes
  1133. archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
  1134. # Note: this linker hardcodes the directories in LIBPATH if there
  1135. # are no directories specified by -L.
  1136. hardcode_minus_L=yes
  1137. if test "$with_gcc" = yes && test -z "$link_static_flag"; then
  1138. # Neither direct hardcoding nor static linking is supported with a
  1139. # broken collect2.
  1140. hardcode_direct=unsupported
  1141. fi
  1142. ;;
  1143. aix4*)
  1144. hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
  1145. hardcode_libdir_separator=':'
  1146. if test "$with_gcc" = yes; then
  1147. collect2name=`${CC} -print-prog-name=collect2`
  1148. if test -f "$collect2name" && \
  1149. strings "$collect2name" | grep resolve_lib_name >/dev/null
  1150. then
  1151. # We have reworked collect2
  1152. hardcode_direct=yes
  1153. else
  1154. # We have old collect2
  1155. hardcode_direct=unsupported
  1156. # It fails to find uninstalled libraries when the uninstalled
  1157. # path is not listed in the libpath. Setting hardcode_minus_L
  1158. # to unsupported forces relinking
  1159. hardcode_minus_L=yes
  1160. hardcode_libdir_flag_spec='-L$libdir'
  1161. hardcode_libdir_separator=
  1162. fi
  1163. shared_flag='-shared'
  1164. else
  1165. shared_flag='${wl}-bM:SRE'
  1166. hardcode_direct=yes
  1167. fi
  1168. allow_undefined_flag=' ${wl}-berok'
  1169. archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
  1170. archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
  1171. case "$host_os" in aix4.[01]|aix4.[01].*)
  1172. # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
  1173. always_export_symbols=yes ;;
  1174. esac
  1175. ;;
  1176. amigaos*)
  1177. archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)'
  1178. hardcode_libdir_flag_spec='-L$libdir'
  1179. hardcode_minus_L=yes
  1180. # see comment about different semantics on the GNU ld section
  1181. ld_shlibs=no
  1182. ;;
  1183. cygwin* | mingw*)
  1184. # When not using gcc, we currently assume that we are using
  1185. # Microsoft Visual C++.
  1186. # hardcode_libdir_flag_spec is actually meaningless, as there is
  1187. # no search path for DLLs.
  1188. hardcode_libdir_flag_spec=' '
  1189. allow_undefined_flag=unsupported
  1190. # Tell ltmain to make .lib files, not .a files.
  1191. libext=lib
  1192. # FIXME: Setting linknames here is a bad hack.
  1193. archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
  1194. # The linker will automatically build a .lib file if we build a DLL.
  1195. old_archive_from_new_cmds='true'
  1196. # FIXME: Should let the user specify the lib program.
  1197. old_archive_cmds='lib /OUT:$oldlib$oldobjs'
  1198. fix_srcfile_path='`cygpath -w $srcfile`'
  1199. ;;
  1200. freebsd1*)
  1201. ld_shlibs=no
  1202. ;;
  1203. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  1204. # support. Future versions do this automatically, but an explicit c++rt0.o
  1205. # does not break anything, and helps significantly (at the cost of a little
  1206. # extra space).
  1207. freebsd2.2*)
  1208. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o'
  1209. hardcode_libdir_flag_spec='-R$libdir'
  1210. hardcode_direct=yes
  1211. hardcode_shlibpath_var=no
  1212. ;;
  1213. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  1214. freebsd2*)
  1215. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
  1216. hardcode_direct=yes
  1217. hardcode_minus_L=yes
  1218. hardcode_shlibpath_var=no
  1219. ;;
  1220. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  1221. freebsd*)
  1222. archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts'
  1223. hardcode_libdir_flag_spec='-R$libdir'
  1224. hardcode_direct=yes
  1225. hardcode_shlibpath_var=no
  1226. ;;
  1227. hpux9* | hpux10* | hpux11*)
  1228. case "$host_os" in
  1229. hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;;
  1230. *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;;
  1231. esac
  1232. hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
  1233. hardcode_libdir_separator=:
  1234. hardcode_direct=yes
  1235. hardcode_minus_L=yes # Not in the search PATH, but as the default
  1236. # location of the library.
  1237. export_dynamic_flag_spec='${wl}-E'
  1238. ;;
  1239. irix5* | irix6*)
  1240. if test "$with_gcc" = yes; then
  1241. archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  1242. else
  1243. archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  1244. fi
  1245. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  1246. hardcode_libdir_separator=:
  1247. ;;
  1248. netbsd*)
  1249. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  1250. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out
  1251. else
  1252. archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF
  1253. fi
  1254. hardcode_libdir_flag_spec='${wl}-R$libdir'
  1255. hardcode_direct=yes
  1256. hardcode_shlibpath_var=no
  1257. ;;
  1258. openbsd*)
  1259. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
  1260. hardcode_libdir_flag_spec='-R$libdir'
  1261. hardcode_direct=yes
  1262. hardcode_shlibpath_var=no
  1263. ;;
  1264. os2*)
  1265. hardcode_libdir_flag_spec='-L$libdir'
  1266. hardcode_minus_L=yes
  1267. allow_undefined_flag=unsupported
  1268. archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def'
  1269. old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
  1270. ;;
  1271. osf3*)
  1272. if test "$with_gcc" = yes; then
  1273. allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
  1274. archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  1275. else
  1276. allow_undefined_flag=' -expect_unresolved \*'
  1277. archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  1278. fi
  1279. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  1280. hardcode_libdir_separator=:
  1281. ;;
  1282. osf4* | osf5*) # As osf3* with the addition of the -msym flag
  1283. if test "$with_gcc" = yes; then
  1284. allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
  1285. archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
  1286. else
  1287. allow_undefined_flag=' -expect_unresolved \*'
  1288. archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  1289. fi
  1290. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  1291. hardcode_libdir_separator=:
  1292. ;;
  1293. rhapsody*)
  1294. archive_cmds='$CC -bundle -undefined suppress -o $lib $libobjs $deplibs $linkopts'
  1295. hardcode_libdir_flags_spec='-L$libdir'
  1296. hardcode_direct=yes
  1297. hardcode_shlibpath_var=no
  1298. ;;
  1299. sco3.2v5*)
  1300. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1301. hardcode_shlibpath_var=no
  1302. runpath_var=LD_RUN_PATH
  1303. hardcode_runpath_var=yes
  1304. ;;
  1305. solaris*)
  1306. no_undefined_flag=' -z text'
  1307. # $CC -shared without GNU ld will not create a library from C++
  1308. # object files and a static libstdc++, better avoid it by now
  1309. archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
  1310. archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  1311. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
  1312. hardcode_libdir_flag_spec='-R$libdir'
  1313. hardcode_shlibpath_var=no
  1314. case "$host_os" in
  1315. solaris2.[0-5] | solaris2.[0-5].*) ;;
  1316. *) # Supported since Solaris 2.6 (maybe 2.5.1?)
  1317. whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
  1318. esac
  1319. ;;
  1320. sunos4*)
  1321. archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
  1322. hardcode_libdir_flag_spec='-L$libdir'
  1323. hardcode_direct=yes
  1324. hardcode_minus_L=yes
  1325. hardcode_shlibpath_var=no
  1326. ;;
  1327. sysv4)
  1328. if test "x$host_vendor" = xsequent; then
  1329. # Use $CC to link under sequent, because it throws in some extra .o
  1330. # files that make .init and .fini sections work.
  1331. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $linkopts'
  1332. else
  1333. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1334. fi
  1335. runpath_var='LD_RUN_PATH'
  1336. hardcode_shlibpath_var=no
  1337. hardcode_direct=no #Motorola manual says yes, but my tests say they lie
  1338. ;;
  1339. sysv4.3*)
  1340. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1341. hardcode_shlibpath_var=no
  1342. export_dynamic_flag_spec='-Bexport'
  1343. ;;
  1344. sysv5*)
  1345. no_undefined_flag=' -z text'
  1346. # $CC -shared without GNU ld will not create a library from C++
  1347. # object files and a static libstdc++, better avoid it by now
  1348. archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
  1349. archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  1350. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
  1351. hardcode_libdir_flag_spec=
  1352. hardcode_shlibpath_var=no
  1353. runpath_var='LD_RUN_PATH'
  1354. ;;
  1355. uts4*)
  1356. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1357. hardcode_libdir_flag_spec='-L$libdir'
  1358. hardcode_shlibpath_var=no
  1359. ;;
  1360. dgux*)
  1361. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1362. hardcode_libdir_flag_spec='-L$libdir'
  1363. hardcode_shlibpath_var=no
  1364. ;;
  1365. sysv4*MP*)
  1366. if test -d /usr/nec; then
  1367. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1368. hardcode_shlibpath_var=no
  1369. runpath_var=LD_RUN_PATH
  1370. hardcode_runpath_var=yes
  1371. ld_shlibs=yes
  1372. fi
  1373. ;;
  1374. sysv4.2uw2*)
  1375. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts'
  1376. hardcode_direct=yes
  1377. hardcode_minus_L=no
  1378. hardcode_shlibpath_var=no
  1379. hardcode_runpath_var=yes
  1380. runpath_var=LD_RUN_PATH
  1381. ;;
  1382. unixware7*)
  1383. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1384. runpath_var='LD_RUN_PATH'
  1385. hardcode_shlibpath_var=no
  1386. ;;
  1387. *)
  1388. ld_shlibs=no
  1389. ;;
  1390. esac
  1391. fi
  1392. echo "$ac_t$ld_shlibs" 1>&6
  1393. test "$ld_shlibs" = no && can_build_shared=no
  1394. if test -z "$NM"; then
  1395. echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
  1396. case "$NM" in
  1397. [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path.
  1398. *)
  1399. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  1400. for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do
  1401. test -z "$ac_dir" && ac_dir=.
  1402. if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then
  1403. # Check to see if the nm accepts a BSD-compat flag.
  1404. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  1405. # nm: unknown option "B" ignored
  1406. if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
  1407. NM="$ac_dir/nm -B"
  1408. break
  1409. elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
  1410. NM="$ac_dir/nm -p"
  1411. break
  1412. else
  1413. NM=${NM="$ac_dir/nm"} # keep the first match, but
  1414. continue # so that we can try to find one that supports BSD flags
  1415. fi
  1416. fi
  1417. done
  1418. IFS="$ac_save_ifs"
  1419. test -z "$NM" && NM=nm
  1420. ;;
  1421. esac
  1422. echo "$ac_t$NM" 1>&6
  1423. fi
  1424. # Check for command to grab the raw symbol name followed by C symbol from nm.
  1425. echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
  1426. # These are sane defaults that work on at least a few old systems.
  1427. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  1428. # Character class describing NM global symbol codes.
  1429. symcode='[BCDEGRST]'
  1430. # Regexp to match symbols that can be accessed directly from C.
  1431. sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
  1432. # Transform the above into a raw symbol and a C symbol.
  1433. symxfrm='\1 \2\3 \3'
  1434. # Transform an extracted symbol line into a proper C declaration
  1435. global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
  1436. # Define system-specific variables.
  1437. case "$host_os" in
  1438. aix*)
  1439. symcode='[BCDT]'
  1440. ;;
  1441. cygwin* | mingw*)
  1442. symcode='[ABCDGISTW]'
  1443. ;;
  1444. hpux*) # Its linker distinguishes data from code symbols
  1445. global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
  1446. ;;
  1447. irix*)
  1448. symcode='[BCDEGRST]'
  1449. ;;
  1450. solaris*)
  1451. symcode='[BDT]'
  1452. ;;
  1453. sysv4)
  1454. symcode='[DFNSTU]'
  1455. ;;
  1456. esac
  1457. # If we're using GNU nm, then use its standard symbol codes.
  1458. if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
  1459. symcode='[ABCDGISTW]'
  1460. fi
  1461. # Try without a prefix undercore, then with it.
  1462. for ac_symprfx in "" "_"; do
  1463. # Write the raw and C identifiers.
  1464. global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'"
  1465. # Check to see that the pipe works correctly.
  1466. pipe_works=no
  1467. $rm conftest*
  1468. cat > conftest.c <<EOF
  1469. #ifdef __cplusplus
  1470. extern "C" {
  1471. #endif
  1472. char nm_test_var;
  1473. void nm_test_func(){}
  1474. #ifdef __cplusplus
  1475. }
  1476. #endif
  1477. main(){nm_test_var='a';nm_test_func();return(0);}
  1478. EOF
  1479. echo "$progname:1653: checking if global_symbol_pipe works" >&5
  1480. if { (eval echo $progname:1654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
  1481. # Now try to grab the symbols.
  1482. nlist=conftest.nm
  1483. if { echo "$progname:1657: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
  1484. # Try sorting and uniquifying the output.
  1485. if sort "$nlist" | uniq > "$nlist"T; then
  1486. mv -f "$nlist"T "$nlist"
  1487. else
  1488. rm -f "$nlist"T
  1489. fi
  1490. # Make sure that we snagged all the symbols we need.
  1491. if egrep ' nm_test_var$' "$nlist" >/dev/null; then
  1492. if egrep ' nm_test_func$' "$nlist" >/dev/null; then
  1493. cat <<EOF > conftest.c
  1494. #ifdef __cplusplus
  1495. extern "C" {
  1496. #endif
  1497. EOF
  1498. # Now generate the symbol file.
  1499. eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c'
  1500. cat <<EOF >> conftest.c
  1501. #if defined (__STDC__) && __STDC__
  1502. # define lt_ptr_t void *
  1503. #else
  1504. # define lt_ptr_t char *
  1505. # define const
  1506. #endif
  1507. /* The mapping between symbol names and symbols. */
  1508. const struct {
  1509. const char *name;
  1510. lt_ptr_t address;
  1511. }
  1512. lt_preloaded_symbols[] =
  1513. {
  1514. EOF
  1515. sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c
  1516. cat <<\EOF >> conftest.c
  1517. {0, (lt_ptr_t) 0}
  1518. };
  1519. #ifdef __cplusplus
  1520. }
  1521. #endif
  1522. EOF
  1523. # Now try linking the two files.
  1524. mv conftest.$objext conftstm.$objext
  1525. save_LIBS="$LIBS"
  1526. save_CFLAGS="$CFLAGS"
  1527. LIBS="conftstm.$objext"
  1528. CFLAGS="$CFLAGS$no_builtin_flag"
  1529. if { (eval echo $progname:1709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1530. pipe_works=yes
  1531. else
  1532. echo "$progname: failed program was:" >&5
  1533. cat conftest.c >&5
  1534. fi
  1535. LIBS="$save_LIBS"
  1536. else
  1537. echo "cannot find nm_test_func in $nlist" >&5
  1538. fi
  1539. else
  1540. echo "cannot find nm_test_var in $nlist" >&5
  1541. fi
  1542. else
  1543. echo "cannot run $global_symbol_pipe" >&5
  1544. fi
  1545. else
  1546. echo "$progname: failed program was:" >&5
  1547. cat conftest.c >&5
  1548. fi
  1549. $rm conftest* conftst*
  1550. # Do not use the global_symbol_pipe unless it works.
  1551. if test "$pipe_works" = yes; then
  1552. break
  1553. else
  1554. global_symbol_pipe=
  1555. fi
  1556. done
  1557. if test "$pipe_works" = yes; then
  1558. echo "${ac_t}ok" 1>&6
  1559. else
  1560. echo "${ac_t}failed" 1>&6
  1561. fi
  1562. if test -z "$global_symbol_pipe"; then
  1563. global_symbol_to_cdecl=
  1564. fi
  1565. # Check hardcoding attributes.
  1566. echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
  1567. hardcode_action=
  1568. if test -n "$hardcode_libdir_flag_spec" || \
  1569. test -n "$runpath_var"; then
  1570. # We can hardcode non-existant directories.
  1571. if test "$hardcode_direct" != no &&
  1572. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  1573. # have to relink, otherwise we might link with an installed library
  1574. # when we should be linking with a yet-to-be-installed one
  1575. ## test "$hardcode_shlibpath_var" != no &&
  1576. test "$hardcode_minus_L" != no; then
  1577. # Linking always hardcodes the temporary library directory.
  1578. hardcode_action=relink
  1579. else
  1580. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  1581. hardcode_action=immediate
  1582. fi
  1583. else
  1584. # We cannot hardcode anything, or else we can only hardcode existing
  1585. # directories.
  1586. hardcode_action=unsupported
  1587. fi
  1588. echo "$ac_t$hardcode_action" 1>&6
  1589. reload_flag=
  1590. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  1591. echo $ac_n "checking for $LD option to produce relocatable object files... $ac_c" 1>&6
  1592. # PORTME Some linkers may need a different reload flag.
  1593. reload_flag='-r'
  1594. echo "$ac_t$reload_flag" 1>&6
  1595. test -n "$reload_flag" && reload_flag=" $reload_flag"
  1596. # PORTME Fill in your ld.so characteristics
  1597. library_names_spec=
  1598. libname_spec='lib$name'
  1599. soname_spec=
  1600. postinstall_cmds=
  1601. postuninstall_cmds=
  1602. finish_cmds=
  1603. finish_eval=
  1604. shlibpath_var=
  1605. shlibpath_overrides_runpath=unknown
  1606. version_type=none
  1607. dynamic_linker="$host_os ld.so"
  1608. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  1609. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  1610. file_magic_cmd=
  1611. file_magic_test_file=
  1612. deplibs_check_method='unknown'
  1613. # Need to set the preceding variable on all platforms that support
  1614. # interlibrary dependencies.
  1615. # 'none' -- dependencies not supported.
  1616. # `unknown' -- same as none, but documents that we really don't know.
  1617. # 'pass_all' -- all dependencies passed with no checks.
  1618. # 'test_compile' -- check by making test program.
  1619. # 'file_magic [regex]' -- check by looking for files in library path
  1620. # which responds to the $file_magic_cmd with a given egrep regex.
  1621. # If you have `file' or equivalent on your system and you're not sure
  1622. # whether `pass_all' will *always* work, you probably want this one.
  1623. echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
  1624. case "$host_os" in
  1625. aix3*)
  1626. version_type=linux
  1627. library_names_spec='${libname}${release}.so$versuffix $libname.a'
  1628. shlibpath_var=LIBPATH
  1629. # AIX has no versioning support, so we append a major version to the name.
  1630. soname_spec='${libname}${release}.so$major'
  1631. ;;
  1632. aix4*)
  1633. version_type=linux
  1634. # AIX has no versioning support, so currently we can not hardcode correct
  1635. # soname into executable. Probably we can add versioning support to
  1636. # collect2, so additional links can be useful in future.
  1637. # We preserve .a as extension for shared libraries though AIX4.2
  1638. # and later linker supports .so
  1639. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a'
  1640. shlibpath_var=LIBPATH
  1641. deplibs_check_method=pass_all
  1642. ;;
  1643. amigaos*)
  1644. library_names_spec='$libname.ixlibrary $libname.a'
  1645. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  1646. 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'
  1647. ;;
  1648. beos*)
  1649. library_names_spec='${libname}.so'
  1650. dynamic_linker="$host_os ld.so"
  1651. shlibpath_var=LIBRARY_PATH
  1652. deplibs_check_method=pass_all
  1653. lt_cv_dlopen="load_add_on"
  1654. lt_cv_dlopen_libs=
  1655. lt_cv_dlopen_self=yes
  1656. ;;
  1657. bsdi4*)
  1658. version_type=linux
  1659. need_version=no
  1660. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1661. soname_spec='${libname}${release}.so$major'
  1662. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  1663. shlibpath_var=LD_LIBRARY_PATH
  1664. deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
  1665. file_magic_cmd=/usr/bin/file
  1666. file_magic_test_file=/shlib/libc.so
  1667. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  1668. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  1669. export_dynamic_flag_spec=-rdynamic
  1670. # the default ld.so.conf also contains /usr/contrib/lib and
  1671. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  1672. # libtool to hard-code these into programs
  1673. ;;
  1674. cygwin* | mingw*)
  1675. version_type=windows
  1676. need_version=no
  1677. need_lib_prefix=no
  1678. if test "$with_gcc" = yes; then
  1679. library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
  1680. else
  1681. library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
  1682. fi
  1683. dynamic_linker='Win32 ld.exe'
  1684. deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
  1685. file_magic_cmd='${OBJDUMP} -f'
  1686. # FIXME: first we should search . and the directory the executable is in
  1687. shlibpath_var=PATH
  1688. lt_cv_dlopen="LoadLibrary"
  1689. lt_cv_dlopen_libs=
  1690. ;;
  1691. freebsd1*)
  1692. dynamic_linker=no
  1693. ;;
  1694. freebsd*)
  1695. objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
  1696. version_type=freebsd-$objformat
  1697. case "$version_type" in
  1698. freebsd-elf*)
  1699. deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
  1700. file_magic_cmd=/usr/bin/file
  1701. file_magic_test_file=`echo /usr/lib/libc.so*`
  1702. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
  1703. need_version=no
  1704. need_lib_prefix=no
  1705. ;;
  1706. freebsd-*)
  1707. deplibs_check_method=unknown
  1708. library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
  1709. need_version=yes
  1710. ;;
  1711. esac
  1712. shlibpath_var=LD_LIBRARY_PATH
  1713. case "$host_os" in
  1714. freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*)
  1715. shlibpath_overrides_runpath=yes
  1716. ;;
  1717. *) # from 3.2 on
  1718. shlibpath_overrides_runpath=no
  1719. ;;
  1720. esac
  1721. ;;
  1722. gnu*)
  1723. version_type=linux
  1724. need_lib_prefix=no
  1725. need_version=no
  1726. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
  1727. soname_spec='${libname}${release}.so$major'
  1728. shlibpath_var=LD_LIBRARY_PATH
  1729. ;;
  1730. hpux9* | hpux10* | hpux11*)
  1731. # Give a soname corresponding to the major version so that dld.sl refuses to
  1732. # link against other versions.
  1733. dynamic_linker="$host_os dld.sl"
  1734. version_type=sunos
  1735. need_lib_prefix=no
  1736. need_version=no
  1737. shlibpath_var=SHLIB_PATH
  1738. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  1739. library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
  1740. soname_spec='${libname}${release}.sl$major'
  1741. # HP-UX runs *really* slowly unless shared libraries are mode 555.
  1742. postinstall_cmds='chmod 555 $lib'
  1743. case "$host_os" in
  1744. hpux10.20*)
  1745. # TODO: Does this work for hpux-11 too?
  1746. deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
  1747. file_magic_cmd=/usr/bin/file
  1748. file_magic_test_file=/usr/lib/libc.sl
  1749. ;;
  1750. esac
  1751. ;;
  1752. irix5* | irix6*)
  1753. version_type=irix
  1754. need_lib_prefix=no
  1755. need_version=no
  1756. soname_spec='${libname}${release}.so.$major'
  1757. library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so'
  1758. case "$host_os" in
  1759. irix5*)
  1760. libsuff= shlibsuff=
  1761. # this will be overridden with pass_all, but let us keep it just in case
  1762. deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
  1763. ;;
  1764. *)
  1765. case "$LD" in # libtool.m4 will add one of these switches to LD
  1766. *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
  1767. *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
  1768. *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
  1769. *) libsuff= shlibsuff= libmagic=never-match;;
  1770. esac
  1771. ;;
  1772. esac
  1773. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  1774. shlibpath_overrides_runpath=no
  1775. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  1776. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  1777. file_magic_cmd=/usr/bin/file
  1778. file_magic_test_file=`echo /lib${libsuff}/libc.so*`
  1779. deplibs_check_method='pass_all'
  1780. ;;
  1781. # No shared lib support for Linux oldld, aout, or coff.
  1782. linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
  1783. dynamic_linker=no
  1784. ;;
  1785. # This must be Linux ELF.
  1786. linux-gnu*)
  1787. version_type=linux
  1788. need_lib_prefix=no
  1789. need_version=no
  1790. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1791. soname_spec='${libname}${release}.so$major'
  1792. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  1793. shlibpath_var=LD_LIBRARY_PATH
  1794. shlibpath_overrides_runpath=no
  1795. deplibs_check_method=pass_all
  1796. if test -f /lib/ld.so.1; then
  1797. dynamic_linker='GNU ld.so'
  1798. else
  1799. # Only the GNU ld.so supports shared libraries on MkLinux.
  1800. case "$host_cpu" in
  1801. powerpc*) dynamic_linker=no ;;
  1802. *) dynamic_linker='Linux ld.so' ;;
  1803. esac
  1804. fi
  1805. ;;
  1806. netbsd*)
  1807. version_type=sunos
  1808. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  1809. library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
  1810. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  1811. dynamic_linker='NetBSD (a.out) ld.so'
  1812. else
  1813. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
  1814. soname_spec='${libname}${release}.so$major'
  1815. dynamic_linker='NetBSD ld.elf_so'
  1816. fi
  1817. shlibpath_var=LD_LIBRARY_PATH
  1818. ;;
  1819. openbsd*)
  1820. version_type=sunos
  1821. if test "$with_gnu_ld" = yes; then
  1822. need_lib_prefix=no
  1823. need_version=no
  1824. fi
  1825. library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
  1826. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  1827. shlibpath_var=LD_LIBRARY_PATH
  1828. ;;
  1829. os2*)
  1830. libname_spec='$name'
  1831. need_lib_prefix=no
  1832. library_names_spec='$libname.dll $libname.a'
  1833. dynamic_linker='OS/2 ld.exe'
  1834. shlibpath_var=LIBPATH
  1835. ;;
  1836. osf3* | osf4* | osf5*)
  1837. version_type=osf
  1838. need_version=no
  1839. soname_spec='${libname}${release}.so'
  1840. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
  1841. shlibpath_var=LD_LIBRARY_PATH
  1842. # this will be overridden with pass_all, but let us keep it just in case
  1843. deplibs_check_method='file_magic COFF format alpha shared library'
  1844. file_magic_cmd=/usr/bin/file
  1845. file_magic_test_file=/shlib/libc.so
  1846. deplibs_check_method='pass_all'
  1847. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  1848. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  1849. ;;
  1850. rhapsody*)
  1851. version_type=sunos
  1852. library_names_spec='${libname}.so'
  1853. soname_spec='${libname}.so'
  1854. shlibpath_var=DYLD_LIBRARY_PATH
  1855. deplibs_check_method=pass_all
  1856. ;;
  1857. sco3.2v5*)
  1858. version_type=osf
  1859. soname_spec='${libname}${release}.so$major'
  1860. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1861. shlibpath_var=LD_LIBRARY_PATH
  1862. ;;
  1863. solaris*)
  1864. version_type=linux
  1865. need_lib_prefix=no
  1866. need_version=no
  1867. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1868. soname_spec='${libname}${release}.so$major'
  1869. shlibpath_var=LD_LIBRARY_PATH
  1870. shlibpath_overrides_runpath=yes
  1871. # ldd complains unless libraries are executable
  1872. postinstall_cmds='chmod +x $lib'
  1873. deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib"
  1874. file_magic_cmd=/usr/bin/file
  1875. file_magic_test_file=/lib/libc.so
  1876. ;;
  1877. sunos4*)
  1878. version_type=sunos
  1879. library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
  1880. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  1881. shlibpath_var=LD_LIBRARY_PATH
  1882. shlibpath_overrides_runpath=yes
  1883. if test "$with_gnu_ld" = yes; then
  1884. need_lib_prefix=no
  1885. fi
  1886. need_version=yes
  1887. ;;
  1888. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  1889. version_type=linux
  1890. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1891. soname_spec='${libname}${release}.so$major'
  1892. shlibpath_var=LD_LIBRARY_PATH
  1893. case "$host_vendor" in
  1894. sequent)
  1895. file_magic_cmd='/bin/file'
  1896. deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
  1897. ;;
  1898. ncr)
  1899. deplibs_check_method='pass_all'
  1900. ;;
  1901. motorola)
  1902. need_lib_prefix=no
  1903. need_version=no
  1904. shlibpath_overrides_runpath=no
  1905. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  1906. 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]'
  1907. file_magic_cmd=/usr/bin/file
  1908. file_magic_test_file=`echo /usr/lib/libc.so*`
  1909. ;;
  1910. esac
  1911. ;;
  1912. uts4*)
  1913. version_type=linux
  1914. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1915. soname_spec='${libname}${release}.so$major'
  1916. shlibpath_var=LD_LIBRARY_PATH
  1917. ;;
  1918. dgux*)
  1919. version_type=linux
  1920. need_lib_prefix=no
  1921. need_version=no
  1922. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1923. soname_spec='${libname}${release}.so$major'
  1924. shlibpath_var=LD_LIBRARY_PATH
  1925. ;;
  1926. sysv4*MP*)
  1927. if test -d /usr/nec ;then
  1928. version_type=linux
  1929. library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
  1930. soname_spec='$libname.so.$major'
  1931. shlibpath_var=LD_LIBRARY_PATH
  1932. fi
  1933. ;;
  1934. *)
  1935. dynamic_linker=no
  1936. ;;
  1937. esac
  1938. echo "$ac_t$dynamic_linker" 1>&6
  1939. test "$dynamic_linker" = no && can_build_shared=no
  1940. # Report the final consequences.
  1941. echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
  1942. # Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
  1943. # configure.in, otherwise build static only libraries.
  1944. case "$host_os" in
  1945. cygwin* | mingw* | os2*)
  1946. if test x$can_build_shared = xyes; then
  1947. test x$enable_win32_dll = xno && can_build_shared=no
  1948. echo "checking if package supports dlls... $can_build_shared" 1>&6
  1949. fi
  1950. ;;
  1951. esac
  1952. if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then
  1953. case "$deplibs_check_method" in
  1954. "file_magic "*)
  1955. file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
  1956. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  1957. egrep "$file_magic_regex" > /dev/null; then
  1958. :
  1959. else
  1960. cat <<EOF 1>&2
  1961. *** Warning: the command libtool uses to detect shared libraries,
  1962. *** $file_magic_cmd, produces output that libtool cannot recognize.
  1963. *** The result is that libtool may fail to recognize shared libraries
  1964. *** as such. This will affect the creation of libtool libraries that
  1965. *** depend on shared libraries, but programs linked with such libtool
  1966. *** libraries will work regardless of this problem. Nevertheless, you
  1967. *** may want to report the problem to your system manager and/or to
  1968. *** bug-libtool@gnu.org
  1969. EOF
  1970. fi ;;
  1971. esac
  1972. fi
  1973. echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
  1974. test "$can_build_shared" = "no" && enable_shared=no
  1975. # On AIX, shared libraries and static libraries use the same namespace, and
  1976. # are all built from PIC.
  1977. case "$host_os" in
  1978. aix3*)
  1979. test "$enable_shared" = yes && enable_static=no
  1980. if test -n "$RANLIB"; then
  1981. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  1982. postinstall_cmds='$RANLIB $lib'
  1983. fi
  1984. ;;
  1985. aix4*)
  1986. test "$enable_shared" = yes && enable_static=no
  1987. ;;
  1988. esac
  1989. echo "$ac_t$enable_shared" 1>&6
  1990. # Make sure either enable_shared or enable_static is yes.
  1991. test "$enable_shared" = yes || enable_static=yes
  1992. echo "checking whether to build static libraries... $enable_static" 1>&6
  1993. if test "$hardcode_action" = relink; then
  1994. # Fast installation is not supported
  1995. enable_fast_install=no
  1996. elif test "$shlibpath_overrides_runpath" = yes ||
  1997. test "$enable_shared" = no; then
  1998. # Fast installation is not necessary
  1999. enable_fast_install=needless
  2000. fi
  2001. echo $ac_n "checking for objdir... $ac_c" 1>&6
  2002. rm -f .libs 2>/dev/null
  2003. mkdir .libs 2>/dev/null
  2004. if test -d .libs; then
  2005. objdir=.libs
  2006. else
  2007. # MS-DOS does not allow filenames that begin with a dot.
  2008. objdir=_libs
  2009. fi
  2010. rmdir .libs 2>/dev/null
  2011. echo "$ac_t$objdir" 1>&6
  2012. if test "x$enable_dlopen" != xyes; then
  2013. enable_dlopen=unknown
  2014. enable_dlopen_self=unknown
  2015. enable_dlopen_self_static=unknown
  2016. else
  2017. if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
  2018. lt_cv_dlopen=no lt_cv_dlopen_libs=
  2019. echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
  2020. echo "$progname:2248: checking for dlopen in -ldl" >&5
  2021. ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  2022. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2023. echo $ac_n "(cached) $ac_c" 1>&6
  2024. else
  2025. ac_save_LIBS="$LIBS"
  2026. LIBS="-ldl $LIBS"
  2027. cat > conftest.$ac_ext <<EOF
  2028. #line 2256 "ltconfig"
  2029. /* Override any gcc2 internal prototype to avoid an error. */
  2030. /* We use char because int might match the return type of a gcc2
  2031. builtin and then its argument prototype would still apply. */
  2032. #ifdef __cplusplus
  2033. extern "C"
  2034. #endif
  2035. char dlopen();
  2036. int main() {
  2037. dlopen()
  2038. ; return 0; }
  2039. EOF
  2040. if { (eval echo $progname:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2041. rm -rf conftest*
  2042. eval "ac_cv_lib_$ac_lib_var=yes"
  2043. else
  2044. echo "$progname: failed program was:" >&5
  2045. cat conftest.$ac_ext >&5
  2046. rm -rf conftest*
  2047. eval "ac_cv_lib_$ac_lib_var=no"
  2048. fi
  2049. rm -f conftest*
  2050. LIBS="$ac_save_LIBS"
  2051. fi
  2052. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2053. echo "$ac_t""yes" 1>&6
  2054. lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
  2055. else
  2056. echo "$ac_t""no" 1>&6
  2057. echo $ac_n "checking for dlopen""... $ac_c" 1>&6
  2058. echo "$progname:2288: checking for dlopen" >&5
  2059. if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
  2060. echo $ac_n "(cached) $ac_c" 1>&6
  2061. else
  2062. cat > conftest.$ac_ext <<EOF
  2063. #line 2293 "ltconfig"
  2064. /* System header to define __stub macros and hopefully few prototypes,
  2065. which can conflict with char dlopen(); below. */
  2066. #include <assert.h>
  2067. /* Override any gcc2 internal prototype to avoid an error. */
  2068. /* We use char because int might match the return type of a gcc2
  2069. builtin and then its argument prototype would still apply. */
  2070. #ifdef __cplusplus
  2071. extern "C"
  2072. #endif
  2073. char dlopen();
  2074. int main() {
  2075. /* The GNU C library defines this for functions which it implements
  2076. to always fail with ENOSYS. Some functions are actually named
  2077. something starting with __ and the normal name is an alias. */
  2078. #if defined (__stub_dlopen) || defined (__stub___dlopen)
  2079. choke me
  2080. #else
  2081. dlopen();
  2082. #endif
  2083. ; return 0; }
  2084. EOF
  2085. if { (eval echo $progname:2318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2086. rm -rf conftest*
  2087. eval "ac_cv_func_dlopen=yes"
  2088. else
  2089. echo "$progname: failed program was:" >&5
  2090. cat conftest.$ac_ext >&5
  2091. rm -rf conftest*
  2092. eval "ac_cv_func_dlopen=no"
  2093. fi
  2094. rm -f conftest*
  2095. fi
  2096. if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
  2097. echo "$ac_t""yes" 1>&6
  2098. lt_cv_dlopen="dlopen"
  2099. else
  2100. echo "$ac_t""no" 1>&6
  2101. echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
  2102. echo "$progname:2335: checking for dld_link in -ldld" >&5
  2103. ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
  2104. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2105. echo $ac_n "(cached) $ac_c" 1>&6
  2106. else
  2107. ac_save_LIBS="$LIBS"
  2108. LIBS="-ldld $LIBS"
  2109. cat > conftest.$ac_ext <<EOF
  2110. #line 2343 "ltconfig"
  2111. /* Override any gcc2 internal prototype to avoid an error. */
  2112. /* We use char because int might match the return type of a gcc2
  2113. builtin and then its argument prototype would still apply. */
  2114. #ifdef __cplusplus
  2115. extern "C"
  2116. #endif
  2117. char dld_link();
  2118. int main() {
  2119. dld_link()
  2120. ; return 0; }
  2121. EOF
  2122. if { (eval echo $progname:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2123. rm -rf conftest*
  2124. eval "ac_cv_lib_$ac_lib_var=yes"
  2125. else
  2126. echo "$progname: failed program was:" >&5
  2127. cat conftest.$ac_ext >&5
  2128. rm -rf conftest*
  2129. eval "ac_cv_lib_$ac_lib_var=no"
  2130. fi
  2131. rm -f conftest*
  2132. LIBS="$ac_save_LIBS"
  2133. fi
  2134. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2135. echo "$ac_t""yes" 1>&6
  2136. lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
  2137. else
  2138. echo "$ac_t""no" 1>&6
  2139. echo $ac_n "checking for shl_load""... $ac_c" 1>&6
  2140. echo "$progname:2375: checking for shl_load" >&5
  2141. if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
  2142. echo $ac_n "(cached) $ac_c" 1>&6
  2143. else
  2144. cat > conftest.$ac_ext <<EOF
  2145. #line 2380 "ltconfig"
  2146. /* System header to define __stub macros and hopefully few prototypes,
  2147. which can conflict with char shl_load(); below. */
  2148. #include <assert.h>
  2149. /* Override any gcc2 internal prototype to avoid an error. */
  2150. /* We use char because int might match the return type of a gcc2
  2151. builtin and then its argument prototype would still apply. */
  2152. #ifdef __cplusplus
  2153. extern "C"
  2154. #endif
  2155. char shl_load();
  2156. int main() {
  2157. /* The GNU C library defines this for functions which it implements
  2158. to always fail with ENOSYS. Some functions are actually named
  2159. something starting with __ and the normal name is an alias. */
  2160. #if defined (__stub_shl_load) || defined (__stub___shl_load)
  2161. choke me
  2162. #else
  2163. shl_load();
  2164. #endif
  2165. ; return 0; }
  2166. EOF
  2167. if { (eval echo $progname:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2168. rm -rf conftest*
  2169. eval "ac_cv_func_shl_load=yes"
  2170. else
  2171. echo "$progname: failed program was:" >&5
  2172. cat conftest.$ac_ext >&5
  2173. rm -rf conftest*
  2174. eval "ac_cv_func_shl_load=no"
  2175. fi
  2176. rm -f conftest*
  2177. fi
  2178. if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
  2179. echo "$ac_t""yes" 1>&6
  2180. lt_cv_dlopen="shl_load"
  2181. else
  2182. echo "$ac_t""no" 1>&6
  2183. echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
  2184. echo "$progname:2423: checking for shl_load in -ldld" >&5
  2185. ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  2186. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2187. echo $ac_n "(cached) $ac_c" 1>&6
  2188. else
  2189. ac_save_LIBS="$LIBS"
  2190. LIBS="-ldld $LIBS"
  2191. cat > conftest.$ac_ext <<EOF
  2192. #line 2431 "ltconfig"
  2193. #include "confdefs.h"
  2194. /* Override any gcc2 internal prototype to avoid an error. */
  2195. /* We use char because int might match the return type of a gcc2
  2196. builtin and then its argument prototype would still apply. */
  2197. #ifdef __cplusplus
  2198. extern "C"
  2199. #endif
  2200. char shl_load();
  2201. int main() {
  2202. shl_load()
  2203. ; return 0; }
  2204. EOF
  2205. if { (eval echo $progname:2445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2206. rm -rf conftest*
  2207. eval "ac_cv_lib_$ac_lib_var=yes"
  2208. else
  2209. echo "$progname: failed program was:" >&5
  2210. cat conftest.$ac_ext >&5
  2211. rm -rf conftest*
  2212. eval "ac_cv_lib_$ac_lib_var=no"
  2213. fi
  2214. rm -f conftest*
  2215. LIBS="$ac_save_LIBS"
  2216. fi
  2217. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2218. echo "$ac_t""yes" 1>&6
  2219. lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
  2220. else
  2221. echo "$ac_t""no" 1>&6
  2222. fi
  2223. fi
  2224. fi
  2225. fi
  2226. fi
  2227. fi
  2228. if test "x$lt_cv_dlopen" != xno; then
  2229. enable_dlopen=yes
  2230. fi
  2231. case "$lt_cv_dlopen" in
  2232. dlopen)
  2233. for ac_hdr in dlfcn.h; do
  2234. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2235. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2236. echo "$progname:2488: checking for $ac_hdr" >&5
  2237. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2238. echo $ac_n "(cached) $ac_c" 1>&6
  2239. else
  2240. cat > conftest.$ac_ext <<EOF
  2241. #line 2493 "ltconfig"
  2242. #include <$ac_hdr>
  2243. int fnord = 0;
  2244. EOF
  2245. ac_try="$ac_compile >/dev/null 2>conftest.out"
  2246. { (eval echo $progname:2498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2247. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2248. if test -z "$ac_err"; then
  2249. rm -rf conftest*
  2250. eval "ac_cv_header_$ac_safe=yes"
  2251. else
  2252. echo "$ac_err" >&5
  2253. echo "$progname: failed program was:" >&5
  2254. cat conftest.$ac_ext >&5
  2255. rm -rf conftest*
  2256. eval "ac_cv_header_$ac_safe=no"
  2257. fi
  2258. rm -f conftest*
  2259. fi
  2260. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2261. echo "$ac_t""yes" 1>&6
  2262. else
  2263. echo "$ac_t""no" 1>&6
  2264. fi
  2265. done
  2266. if test "x$ac_cv_header_dlfcn_h" = xyes; then
  2267. CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  2268. fi
  2269. eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  2270. LIBS="$lt_cv_dlopen_libs $LIBS"
  2271. echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
  2272. echo "$progname:2526: checking whether a program can dlopen itself" >&5
  2273. if test "${lt_cv_dlopen_self+set}" = set; then
  2274. echo $ac_n "(cached) $ac_c" 1>&6
  2275. else
  2276. if test "$cross_compiling" = yes; then
  2277. lt_cv_dlopen_self=cross
  2278. else
  2279. cat > conftest.c <<EOF
  2280. #line 2534 "ltconfig"
  2281. #if HAVE_DLFCN_H
  2282. #include <dlfcn.h>
  2283. #endif
  2284. #include <stdio.h>
  2285. #ifdef RTLD_GLOBAL
  2286. # define LTDL_GLOBAL RTLD_GLOBAL
  2287. #else
  2288. # ifdef DL_GLOBAL
  2289. # define LTDL_GLOBAL DL_GLOBAL
  2290. # else
  2291. # define LTDL_GLOBAL 0
  2292. # endif
  2293. #endif
  2294. /* We may have to define LTDL_LAZY_OR_NOW in the command line if we
  2295. find out it does not work in some platform. */
  2296. #ifndef LTDL_LAZY_OR_NOW
  2297. # ifdef RTLD_LAZY
  2298. # define LTDL_LAZY_OR_NOW RTLD_LAZY
  2299. # else
  2300. # ifdef DL_LAZY
  2301. # define LTDL_LAZY_OR_NOW DL_LAZY
  2302. # else
  2303. # ifdef RTLD_NOW
  2304. # define LTDL_LAZY_OR_NOW RTLD_NOW
  2305. # else
  2306. # ifdef DL_NOW
  2307. # define LTDL_LAZY_OR_NOW DL_NOW
  2308. # else
  2309. # define LTDL_LAZY_OR_NOW 0
  2310. # endif
  2311. # endif
  2312. # endif
  2313. # endif
  2314. #endif
  2315. fnord() { int i=42;}
  2316. main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
  2317. if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
  2318. if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
  2319. EOF
  2320. if { (eval echo $progname:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2321. then
  2322. lt_cv_dlopen_self=yes
  2323. else
  2324. echo "$progname: failed program was:" >&5
  2325. cat conftest.$ac_ext >&5
  2326. rm -fr conftest*
  2327. lt_cv_dlopen_self=no
  2328. fi
  2329. rm -fr conftest*
  2330. fi
  2331. fi
  2332. echo "$ac_t""$lt_cv_dlopen_self" 1>&6
  2333. if test "$lt_cv_dlopen_self" = yes; then
  2334. LDFLAGS="$LDFLAGS $link_static_flag"
  2335. echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
  2336. echo "$progname:2599: checking whether a statically linked program can dlopen itself" >&5
  2337. if test "${lt_cv_dlopen_self_static+set}" = set; then
  2338. echo $ac_n "(cached) $ac_c" 1>&6
  2339. else
  2340. if test "$cross_compiling" = yes; then
  2341. lt_cv_dlopen_self_static=cross
  2342. else
  2343. cat > conftest.c <<EOF
  2344. #line 2607 "ltconfig"
  2345. #if HAVE_DLFCN_H
  2346. #include <dlfcn.h>
  2347. #endif
  2348. #include <stdio.h>
  2349. #ifdef RTLD_GLOBAL
  2350. # define LTDL_GLOBAL RTLD_GLOBAL
  2351. #else
  2352. # ifdef DL_GLOBAL
  2353. # define LTDL_GLOBAL DL_GLOBAL
  2354. # else
  2355. # define LTDL_GLOBAL 0
  2356. # endif
  2357. #endif
  2358. /* We may have to define LTDL_LAZY_OR_NOW in the command line if we
  2359. find out it does not work in some platform. */
  2360. #ifndef LTDL_LAZY_OR_NOW
  2361. # ifdef RTLD_LAZY
  2362. # define LTDL_LAZY_OR_NOW RTLD_LAZY
  2363. # else
  2364. # ifdef DL_LAZY
  2365. # define LTDL_LAZY_OR_NOW DL_LAZY
  2366. # else
  2367. # ifdef RTLD_NOW
  2368. # define LTDL_LAZY_OR_NOW RTLD_NOW
  2369. # else
  2370. # ifdef DL_NOW
  2371. # define LTDL_LAZY_OR_NOW DL_NOW
  2372. # else
  2373. # define LTDL_LAZY_OR_NOW 0
  2374. # endif
  2375. # endif
  2376. # endif
  2377. # endif
  2378. #endif
  2379. fnord() { int i=42;}
  2380. main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
  2381. if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
  2382. if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
  2383. EOF
  2384. if { (eval echo $progname:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2385. then
  2386. lt_cv_dlopen_self_static=yes
  2387. else
  2388. echo "$progname: failed program was:" >&5
  2389. cat conftest.$ac_ext >&5
  2390. rm -fr conftest*
  2391. lt_cv_dlopen_self_static=no
  2392. fi
  2393. rm -fr conftest*
  2394. fi
  2395. fi
  2396. echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
  2397. fi
  2398. ;;
  2399. esac
  2400. case "$lt_cv_dlopen_self" in
  2401. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  2402. *) enable_dlopen_self=unknown ;;
  2403. esac
  2404. case "$lt_cv_dlopen_self_static" in
  2405. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  2406. *) enable_dlopen_self_static=unknown ;;
  2407. esac
  2408. fi
  2409. # Copy echo and quote the copy, instead of the original, because it is
  2410. # used later.
  2411. ltecho="$echo"
  2412. if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
  2413. ltecho="$CONFIG_SHELL \$0 --fallback-echo"
  2414. fi
  2415. LTSHELL="$SHELL"
  2416. LTCONFIG_VERSION="$VERSION"
  2417. # Only quote variables if we're using ltmain.sh.
  2418. case "$ltmain" in
  2419. *.sh)
  2420. # Now quote all the things that may contain metacharacters.
  2421. for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \
  2422. old_LD old_LDFLAGS old_LIBS \
  2423. old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \
  2424. AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
  2425. reload_flag reload_cmds wl \
  2426. pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
  2427. thread_safe_flag_spec whole_archive_flag_spec libname_spec \
  2428. library_names_spec soname_spec \
  2429. RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
  2430. old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \
  2431. file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \
  2432. finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
  2433. hardcode_libdir_flag_spec hardcode_libdir_separator \
  2434. sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
  2435. compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
  2436. case "$var" in
  2437. reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
  2438. old_postinstall_cmds | old_postuninstall_cmds | \
  2439. export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
  2440. postinstall_cmds | postuninstall_cmds | \
  2441. finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
  2442. # Double-quote double-evaled strings.
  2443. eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
  2444. ;;
  2445. *)
  2446. eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
  2447. ;;
  2448. esac
  2449. done
  2450. case "$ltecho" in
  2451. *'\$0 --fallback-echo"')
  2452. ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
  2453. ;;
  2454. esac
  2455. trap "$rm \"$ofile\"; exit 1" 1 2 15
  2456. echo "creating $ofile"
  2457. $rm "$ofile"
  2458. cat <<EOF > "$ofile"
  2459. #! $SHELL
  2460. # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  2461. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
  2462. # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
  2463. #
  2464. # Copyright (C) 1996-1999 Free Software Foundation, Inc.
  2465. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  2466. #
  2467. # This program is free software; you can redistribute it and/or modify
  2468. # it under the terms of the GNU General Public License as published by
  2469. # the Free Software Foundation; either version 2 of the License, or
  2470. # (at your option) any later version.
  2471. #
  2472. # This program is distributed in the hope that it will be useful, but
  2473. # WITHOUT ANY WARRANTY; without even the implied warranty of
  2474. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2475. # General Public License for more details.
  2476. #
  2477. # You should have received a copy of the GNU General Public License
  2478. # along with this program; if not, write to the Free Software
  2479. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  2480. #
  2481. # As a special exception to the GNU General Public License, if you
  2482. # distribute this file as part of a program that contains a
  2483. # configuration script generated by Autoconf, you may include it under
  2484. # the same distribution terms that you use for the rest of that program.
  2485. # Sed that helps us avoid accidentally triggering echo(1) options like -n.
  2486. Xsed="sed -e s/^X//"
  2487. # The HP-UX ksh and POSIX shell print the target directory to stdout
  2488. # if CDPATH is set.
  2489. if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  2490. ### BEGIN LIBTOOL CONFIG
  2491. EOF
  2492. cfgfile="$ofile"
  2493. ;;
  2494. *)
  2495. # Double-quote the variables that need it (for aesthetics).
  2496. for var in old_CC old_CFLAGS old_CPPFLAGS \
  2497. old_LD old_LDFLAGS old_LIBS \
  2498. old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do
  2499. eval "$var=\\\"\$var\\\""
  2500. done
  2501. # Just create a config file.
  2502. cfgfile="$ofile.cfg"
  2503. trap "$rm \"$cfgfile\"; exit 1" 1 2 15
  2504. echo "creating $cfgfile"
  2505. $rm "$cfgfile"
  2506. cat <<EOF > "$cfgfile"
  2507. # `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
  2508. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
  2509. EOF
  2510. ;;
  2511. esac
  2512. cat <<EOF >> "$cfgfile"
  2513. # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2514. #
  2515. # CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
  2516. # LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
  2517. # NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
  2518. # DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\
  2519. # $0$ltconfig_args
  2520. #
  2521. # Compiler and other test output produced by $progname, useful for
  2522. # debugging $progname, is in ./config.log if it exists.
  2523. # The version of $progname that generated this script.
  2524. LTCONFIG_VERSION=$LTCONFIG_VERSION
  2525. # Shell to use when invoking shell scripts.
  2526. SHELL=$LTSHELL
  2527. # Whether or not to build shared libraries.
  2528. build_libtool_libs=$enable_shared
  2529. # Whether or not to build static libraries.
  2530. build_old_libs=$enable_static
  2531. # Whether or not to optimize for fast installation.
  2532. fast_install=$enable_fast_install
  2533. # The host system.
  2534. host_alias=$host_alias
  2535. host=$host
  2536. # An echo program that does not interpret backslashes.
  2537. echo=$ltecho
  2538. # The archiver.
  2539. AR=$AR
  2540. # The default C compiler.
  2541. CC=$CC
  2542. # The linker used to build libraries.
  2543. LD=$LD
  2544. # Whether we need hard or soft links.
  2545. LN_S=$LN_S
  2546. # A BSD-compatible nm program.
  2547. NM=$NM
  2548. # Used on cygwin: DLL creation program.
  2549. DLLTOOL="$DLLTOOL"
  2550. # Used on cygwin: object dumper.
  2551. OBJDUMP="$OBJDUMP"
  2552. # Used on cygwin: assembler.
  2553. AS="$AS"
  2554. # The name of the directory that contains temporary libtool files.
  2555. objdir=$objdir
  2556. # How to create relocatable object files.
  2557. reload_flag=$reload_flag
  2558. reload_cmds=$reload_cmds
  2559. # How to pass a linker flag through the compiler.
  2560. wl=$wl
  2561. # Object file suffix (normally "o").
  2562. objext="$objext"
  2563. # Old archive suffix (normally "a").
  2564. libext="$libext"
  2565. # Executable file suffix (normally "").
  2566. exeext="$exeext"
  2567. # Additional compiler flags for building library objects.
  2568. pic_flag=$pic_flag
  2569. # Does compiler simultaneously support -c and -o options?
  2570. compiler_c_o=$compiler_c_o
  2571. # Can we write directly to a .lo ?
  2572. compiler_o_lo=$compiler_o_lo
  2573. # Must we lock files when doing compilation ?
  2574. need_locks=$need_locks
  2575. # Do we need the lib prefix for modules?
  2576. need_lib_prefix=$need_lib_prefix
  2577. # Do we need a version for libraries?
  2578. need_version=$need_version
  2579. # Whether dlopen is supported.
  2580. dlopen=$enable_dlopen
  2581. # Whether dlopen of programs is supported.
  2582. dlopen_self=$enable_dlopen_self
  2583. # Whether dlopen of statically linked programs is supported.
  2584. dlopen_self_static=$enable_dlopen_self_static
  2585. # Compiler flag to prevent dynamic linking.
  2586. link_static_flag=$link_static_flag
  2587. # Compiler flag to turn off builtin functions.
  2588. no_builtin_flag=$no_builtin_flag
  2589. # Compiler flag to allow reflexive dlopens.
  2590. export_dynamic_flag_spec=$export_dynamic_flag_spec
  2591. # Compiler flag to generate shared objects directly from archives.
  2592. whole_archive_flag_spec=$whole_archive_flag_spec
  2593. # Compiler flag to generate thread-safe objects.
  2594. thread_safe_flag_spec=$thread_safe_flag_spec
  2595. # Library versioning type.
  2596. version_type=$version_type
  2597. # Format of library name prefix.
  2598. libname_spec=$libname_spec
  2599. # List of archive names. First name is the real one, the rest are links.
  2600. # The last name is the one that the linker finds with -lNAME.
  2601. library_names_spec=$library_names_spec
  2602. # The coded name of the library, if different from the real name.
  2603. soname_spec=$soname_spec
  2604. # Commands used to build and install an old-style archive.
  2605. RANLIB=$RANLIB
  2606. old_archive_cmds=$old_archive_cmds
  2607. old_postinstall_cmds=$old_postinstall_cmds
  2608. old_postuninstall_cmds=$old_postuninstall_cmds
  2609. # Create an old-style archive from a shared archive.
  2610. old_archive_from_new_cmds=$old_archive_from_new_cmds
  2611. # Commands used to build and install a shared archive.
  2612. archive_cmds=$archive_cmds
  2613. archive_expsym_cmds=$archive_expsym_cmds
  2614. postinstall_cmds=$postinstall_cmds
  2615. postuninstall_cmds=$postuninstall_cmds
  2616. # Method to check whether dependent libraries are shared objects.
  2617. deplibs_check_method=$deplibs_check_method
  2618. # Command to use when deplibs_check_method == file_magic.
  2619. file_magic_cmd=$file_magic_cmd
  2620. # Flag that allows shared libraries with undefined symbols to be built.
  2621. allow_undefined_flag=$allow_undefined_flag
  2622. # Flag that forces no undefined symbols.
  2623. no_undefined_flag=$no_undefined_flag
  2624. # Commands used to finish a libtool library installation in a directory.
  2625. finish_cmds=$finish_cmds
  2626. # Same as above, but a single script fragment to be evaled but not shown.
  2627. finish_eval=$finish_eval
  2628. # Take the output of nm and produce a listing of raw symbols and C names.
  2629. global_symbol_pipe=$global_symbol_pipe
  2630. # Transform the output of nm in a proper C declaration
  2631. global_symbol_to_cdecl=$global_symbol_to_cdecl
  2632. # This is the shared library runtime path variable.
  2633. runpath_var=$runpath_var
  2634. # This is the shared library path variable.
  2635. shlibpath_var=$shlibpath_var
  2636. # Is shlibpath searched before the hard-coded library search path?
  2637. shlibpath_overrides_runpath=$shlibpath_overrides_runpath
  2638. # How to hardcode a shared library path into an executable.
  2639. hardcode_action=$hardcode_action
  2640. # Flag to hardcode \$libdir into a binary during linking.
  2641. # This must work even if \$libdir does not exist.
  2642. hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
  2643. # Whether we need a single -rpath flag with a separated argument.
  2644. hardcode_libdir_separator=$hardcode_libdir_separator
  2645. # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
  2646. # resulting binary.
  2647. hardcode_direct=$hardcode_direct
  2648. # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
  2649. # resulting binary.
  2650. hardcode_minus_L=$hardcode_minus_L
  2651. # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  2652. # the resulting binary.
  2653. hardcode_shlibpath_var=$hardcode_shlibpath_var
  2654. # Compile-time system search path for libraries
  2655. sys_lib_search_path_spec=$sys_lib_search_path_spec
  2656. # Run-time system search path for libraries
  2657. sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
  2658. # Fix the shell variable \$srcfile for the compiler.
  2659. fix_srcfile_path="$fix_srcfile_path"
  2660. # Set to yes if exported symbols are required.
  2661. always_export_symbols=$always_export_symbols
  2662. # The commands to list exported symbols.
  2663. export_symbols_cmds=$export_symbols_cmds
  2664. # Symbols that should not be listed in the preloaded symbols.
  2665. exclude_expsyms=$exclude_expsyms
  2666. # Symbols that must always be exported.
  2667. include_expsyms=$include_expsyms
  2668. EOF
  2669. case "$ltmain" in
  2670. *.sh)
  2671. echo '### END LIBTOOL CONFIG' >> "$ofile"
  2672. echo >> "$ofile"
  2673. case "$host_os" in
  2674. aix3*)
  2675. cat <<\EOF >> "$ofile"
  2676. # AIX sometimes has problems with the GCC collect2 program. For some
  2677. # reason, if we set the COLLECT_NAMES environment variable, the problems
  2678. # vanish in a puff of smoke.
  2679. if test "X${COLLECT_NAMES+set}" != Xset; then
  2680. COLLECT_NAMES=
  2681. export COLLECT_NAMES
  2682. fi
  2683. EOF
  2684. ;;
  2685. esac
  2686. # Append the ltmain.sh script.
  2687. sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
  2688. # We use sed instead of cat because bash on DJGPP gets confused if
  2689. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  2690. # text mode, it properly converts lines to CR/LF. This bash problem
  2691. # is reportedly fixed, but why not run on old versions too?
  2692. chmod +x "$ofile"
  2693. ;;
  2694. *)
  2695. # Compile the libtool program.
  2696. echo "FIXME: would compile $ltmain"
  2697. ;;
  2698. esac
  2699. test -n "$cache_file" || exit 0
  2700. # AC_CACHE_SAVE
  2701. trap '' 1 2 15
  2702. cat > confcache <<\EOF
  2703. # This file is a shell script that caches the results of configure
  2704. # tests run on this system so they can be shared between configure
  2705. # scripts and configure runs. It is not useful on other systems.
  2706. # If it contains results you don't want to keep, you may remove or edit it.
  2707. #
  2708. # By default, configure uses ./config.cache as the cache file,
  2709. # creating it if it does not exist already. You can give configure
  2710. # the --cache-file=FILE option to use a different cache file; that is
  2711. # what configure does when it calls configure scripts in
  2712. # subdirectories, so they share the cache.
  2713. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  2714. # config.status only pays attention to the cache file if you give it the
  2715. # --recheck option to rerun configure.
  2716. #
  2717. EOF
  2718. # The following way of writing the cache mishandles newlines in values,
  2719. # but we know of no workaround that is simple, portable, and efficient.
  2720. # So, don't put newlines in cache variables' values.
  2721. # Ultrix sh set writes to stderr and can't be redirected directly,
  2722. # and sets the high bit in the cache file unless we assign to the vars.
  2723. (set) 2>&1 |
  2724. case `(ac_space=' '; set | grep ac_space) 2>&1` in
  2725. *ac_space=\ *)
  2726. # `set' does not quote correctly, so add quotes (double-quote substitution
  2727. # turns \\\\ into \\, and sed turns \\ into \).
  2728. sed -n \
  2729. -e "s/'/'\\\\''/g" \
  2730. -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  2731. ;;
  2732. *)
  2733. # `set' quotes correctly as required by POSIX, so do not add quotes.
  2734. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  2735. ;;
  2736. esac >> confcache
  2737. if cmp -s $cache_file confcache; then
  2738. :
  2739. else
  2740. if test -w $cache_file; then
  2741. echo "updating cache $cache_file"
  2742. cat confcache > $cache_file
  2743. else
  2744. echo "not updating unwritable cache $cache_file"
  2745. fi
  2746. fi
  2747. rm -f confcache
  2748. exit 0
  2749. # Local Variables:
  2750. # mode:shell-script
  2751. # sh-indentation:2
  2752. # End: