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.

3078 lines
94 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
  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.4
  156. TIMESTAMP=" (1.385.2.196 1999/12/07 21:47:57)"
  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. 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~
  1042. test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
  1043. $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~
  1044. sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols'
  1045. archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
  1046. _lt_hint=1;
  1047. for symbol in `cat $export_symbols`; do
  1048. echo " \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def;
  1049. _lt_hint=`expr 1 + \$_lt_hint`;
  1050. done~
  1051. 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~
  1052. test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~
  1053. $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~
  1054. $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~
  1055. $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~
  1056. $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~
  1057. $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts'
  1058. old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a'
  1059. ;;
  1060. netbsd*)
  1061. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  1062. archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
  1063. archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  1064. else
  1065. archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
  1066. # can we support soname and/or expsyms with a.out? -oliva
  1067. fi
  1068. ;;
  1069. solaris* | sysv5*)
  1070. if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
  1071. ld_shlibs=no
  1072. cat <<EOF 1>&2
  1073. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  1074. *** create shared libraries on Solaris systems. Therefore, libtool
  1075. *** is disabling shared libraries support. We urge you to upgrade GNU
  1076. *** binutils to release 2.9.1 or newer. Another option is to modify
  1077. *** your PATH or compiler configuration so that the native linker is
  1078. *** used, and then restart.
  1079. EOF
  1080. elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  1081. archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
  1082. archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  1083. else
  1084. ld_shlibs=no
  1085. fi
  1086. ;;
  1087. sunos4*)
  1088. archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts'
  1089. wlarc=
  1090. hardcode_direct=yes
  1091. hardcode_shlibpath_var=no
  1092. ;;
  1093. *)
  1094. if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  1095. archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
  1096. archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  1097. else
  1098. ld_shlibs=no
  1099. fi
  1100. ;;
  1101. esac
  1102. if test "$ld_shlibs" = yes; then
  1103. runpath_var=LD_RUN_PATH
  1104. hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
  1105. export_dynamic_flag_spec='${wl}--export-dynamic'
  1106. case $host_os in
  1107. cygwin* | mingw*)
  1108. # dlltool doesn't understand --whole-archive et. al.
  1109. whole_archive_flag_spec=
  1110. ;;
  1111. *)
  1112. # ancient GNU ld didn't support --whole-archive et. al.
  1113. if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
  1114. whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  1115. else
  1116. whole_archive_flag_spec=
  1117. fi
  1118. ;;
  1119. esac
  1120. fi
  1121. else
  1122. # PORTME fill in a description of your system's linker (not GNU ld)
  1123. case "$host_os" in
  1124. aix3*)
  1125. allow_undefined_flag=unsupported
  1126. always_export_symbols=yes
  1127. archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
  1128. # Note: this linker hardcodes the directories in LIBPATH if there
  1129. # are no directories specified by -L.
  1130. hardcode_minus_L=yes
  1131. if test "$with_gcc" = yes && test -z "$link_static_flag"; then
  1132. # Neither direct hardcoding nor static linking is supported with a
  1133. # broken collect2.
  1134. hardcode_direct=unsupported
  1135. fi
  1136. ;;
  1137. aix4*)
  1138. hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
  1139. hardcode_libdir_separator=':'
  1140. if test "$with_gcc" = yes; then
  1141. collect2name=`${CC} -print-prog-name=collect2`
  1142. if test -f "$collect2name" && \
  1143. strings "$collect2name" | grep resolve_lib_name >/dev/null
  1144. then
  1145. # We have reworked collect2
  1146. hardcode_direct=yes
  1147. else
  1148. # We have old collect2
  1149. hardcode_direct=unsupported
  1150. # It fails to find uninstalled libraries when the uninstalled
  1151. # path is not listed in the libpath. Setting hardcode_minus_L
  1152. # to unsupported forces relinking
  1153. hardcode_minus_L=yes
  1154. hardcode_libdir_flag_spec='-L$libdir'
  1155. hardcode_libdir_separator=
  1156. fi
  1157. shared_flag='-shared'
  1158. else
  1159. shared_flag='${wl}-bM:SRE'
  1160. hardcode_direct=yes
  1161. fi
  1162. allow_undefined_flag=' ${wl}-berok'
  1163. archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
  1164. archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
  1165. case "$host_os" in aix4.[01]|aix4.[01].*)
  1166. # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
  1167. always_export_symbols=yes ;;
  1168. esac
  1169. ;;
  1170. amigaos*)
  1171. 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)'
  1172. hardcode_libdir_flag_spec='-L$libdir'
  1173. hardcode_minus_L=yes
  1174. # see comment about different semantics on the GNU ld section
  1175. ld_shlibs=no
  1176. ;;
  1177. cygwin* | mingw*)
  1178. # When not using gcc, we currently assume that we are using
  1179. # Microsoft Visual C++.
  1180. # hardcode_libdir_flag_spec is actually meaningless, as there is
  1181. # no search path for DLLs.
  1182. hardcode_libdir_flag_spec=' '
  1183. allow_undefined_flag=unsupported
  1184. # Tell ltmain to make .lib files, not .a files.
  1185. libext=lib
  1186. # FIXME: Setting linknames here is a bad hack.
  1187. archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
  1188. # The linker will automatically build a .lib file if we build a DLL.
  1189. old_archive_from_new_cmds='true'
  1190. # FIXME: Should let the user specify the lib program.
  1191. old_archive_cmds='lib /OUT:$oldlib$oldobjs'
  1192. fix_srcfile_path='`cygpath -w $srcfile`'
  1193. ;;
  1194. freebsd1*)
  1195. ld_shlibs=no
  1196. ;;
  1197. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  1198. # support. Future versions do this automatically, but an explicit c++rt0.o
  1199. # does not break anything, and helps significantly (at the cost of a little
  1200. # extra space).
  1201. freebsd2.2*)
  1202. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o'
  1203. hardcode_libdir_flag_spec='-R$libdir'
  1204. hardcode_direct=yes
  1205. hardcode_shlibpath_var=no
  1206. ;;
  1207. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  1208. freebsd2*)
  1209. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
  1210. hardcode_direct=yes
  1211. hardcode_minus_L=yes
  1212. hardcode_shlibpath_var=no
  1213. ;;
  1214. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  1215. freebsd*)
  1216. archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts'
  1217. hardcode_libdir_flag_spec='-R$libdir'
  1218. hardcode_direct=yes
  1219. hardcode_shlibpath_var=no
  1220. ;;
  1221. hpux9* | hpux10* | hpux11*)
  1222. case "$host_os" in
  1223. 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' ;;
  1224. *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;;
  1225. esac
  1226. hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
  1227. hardcode_libdir_separator=:
  1228. hardcode_direct=yes
  1229. hardcode_minus_L=yes # Not in the search PATH, but as the default
  1230. # location of the library.
  1231. export_dynamic_flag_spec='${wl}-E'
  1232. ;;
  1233. irix5* | irix6*)
  1234. if test "$with_gcc" = yes; then
  1235. 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'
  1236. else
  1237. archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  1238. fi
  1239. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  1240. hardcode_libdir_separator=:
  1241. ;;
  1242. netbsd*)
  1243. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  1244. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out
  1245. else
  1246. archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF
  1247. fi
  1248. hardcode_libdir_flag_spec='${wl}-R$libdir'
  1249. hardcode_direct=yes
  1250. hardcode_shlibpath_var=no
  1251. ;;
  1252. openbsd*)
  1253. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
  1254. hardcode_libdir_flag_spec='-R$libdir'
  1255. hardcode_direct=yes
  1256. hardcode_shlibpath_var=no
  1257. ;;
  1258. os2*)
  1259. hardcode_libdir_flag_spec='-L$libdir'
  1260. hardcode_minus_L=yes
  1261. allow_undefined_flag=unsupported
  1262. 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'
  1263. old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
  1264. ;;
  1265. osf3*)
  1266. if test "$with_gcc" = yes; then
  1267. allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
  1268. 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'
  1269. else
  1270. allow_undefined_flag=' -expect_unresolved \*'
  1271. 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'
  1272. fi
  1273. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  1274. hardcode_libdir_separator=:
  1275. ;;
  1276. osf4* | osf5*) # As osf3* with the addition of the -msym flag
  1277. if test "$with_gcc" = yes; then
  1278. allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
  1279. 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'
  1280. else
  1281. allow_undefined_flag=' -expect_unresolved \*'
  1282. 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'
  1283. fi
  1284. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  1285. hardcode_libdir_separator=:
  1286. ;;
  1287. sco3.2v5*)
  1288. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1289. hardcode_shlibpath_var=no
  1290. runpath_var=LD_RUN_PATH
  1291. hardcode_runpath_var=yes
  1292. ;;
  1293. solaris*)
  1294. no_undefined_flag=' -z text'
  1295. # $CC -shared without GNU ld will not create a library from C++
  1296. # object files and a static libstdc++, better avoid it by now
  1297. archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
  1298. archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  1299. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
  1300. hardcode_libdir_flag_spec='-R$libdir'
  1301. hardcode_shlibpath_var=no
  1302. case "$host_os" in
  1303. solaris2.[0-5] | solaris2.[0-5].*) ;;
  1304. *) # Supported since Solaris 2.6 (maybe 2.5.1?)
  1305. whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
  1306. esac
  1307. ;;
  1308. sunos4*)
  1309. archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
  1310. hardcode_libdir_flag_spec='-L$libdir'
  1311. hardcode_direct=yes
  1312. hardcode_minus_L=yes
  1313. hardcode_shlibpath_var=no
  1314. ;;
  1315. sysv4)
  1316. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1317. runpath_var='LD_RUN_PATH'
  1318. hardcode_shlibpath_var=no
  1319. hardcode_direct=no #Motorola manual says yes, but my tests say they lie
  1320. ;;
  1321. sysv4.3*)
  1322. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1323. hardcode_shlibpath_var=no
  1324. export_dynamic_flag_spec='-Bexport'
  1325. ;;
  1326. sysv5*)
  1327. no_undefined_flag=' -z text'
  1328. # $CC -shared without GNU ld will not create a library from C++
  1329. # object files and a static libstdc++, better avoid it by now
  1330. archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
  1331. archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  1332. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
  1333. hardcode_libdir_flag_spec=
  1334. hardcode_shlibpath_var=no
  1335. runpath_var='LD_RUN_PATH'
  1336. ;;
  1337. uts4*)
  1338. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1339. hardcode_libdir_flag_spec='-L$libdir'
  1340. hardcode_shlibpath_var=no
  1341. ;;
  1342. dgux*)
  1343. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1344. hardcode_libdir_flag_spec='-L$libdir'
  1345. hardcode_shlibpath_var=no
  1346. ;;
  1347. sysv4*MP*)
  1348. if test -d /usr/nec; then
  1349. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1350. hardcode_shlibpath_var=no
  1351. runpath_var=LD_RUN_PATH
  1352. hardcode_runpath_var=yes
  1353. ld_shlibs=yes
  1354. fi
  1355. ;;
  1356. sysv4.2uw2*)
  1357. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linkopts'
  1358. hardcode_direct=yes
  1359. hardcode_minus_L=no
  1360. hardcode_shlibpath_var=no
  1361. hardcode_runpath_var=yes
  1362. runpath_var=LD_RUN_PATH
  1363. ;;
  1364. unixware7*)
  1365. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1366. runpath_var='LD_RUN_PATH'
  1367. hardcode_shlibpath_var=no
  1368. ;;
  1369. *)
  1370. ld_shlibs=no
  1371. ;;
  1372. esac
  1373. fi
  1374. echo "$ac_t$ld_shlibs" 1>&6
  1375. test "$ld_shlibs" = no && can_build_shared=no
  1376. if test -z "$NM"; then
  1377. echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
  1378. case "$NM" in
  1379. [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path.
  1380. *)
  1381. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  1382. for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do
  1383. test -z "$ac_dir" && ac_dir=.
  1384. if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then
  1385. # Check to see if the nm accepts a BSD-compat flag.
  1386. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  1387. # nm: unknown option "B" ignored
  1388. if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
  1389. NM="$ac_dir/nm -B"
  1390. break
  1391. elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
  1392. NM="$ac_dir/nm -p"
  1393. break
  1394. else
  1395. NM=${NM="$ac_dir/nm"} # keep the first match, but
  1396. continue # so that we can try to find one that supports BSD flags
  1397. fi
  1398. fi
  1399. done
  1400. IFS="$ac_save_ifs"
  1401. test -z "$NM" && NM=nm
  1402. ;;
  1403. esac
  1404. echo "$ac_t$NM" 1>&6
  1405. fi
  1406. # Check for command to grab the raw symbol name followed by C symbol from nm.
  1407. echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
  1408. # These are sane defaults that work on at least a few old systems.
  1409. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  1410. # Character class describing NM global symbol codes.
  1411. symcode='[BCDEGRST]'
  1412. # Regexp to match symbols that can be accessed directly from C.
  1413. sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
  1414. # Transform the above into a raw symbol and a C symbol.
  1415. symxfrm='\1 \2\3 \3'
  1416. # Transform an extracted symbol line into a proper C declaration
  1417. global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
  1418. # Define system-specific variables.
  1419. case "$host_os" in
  1420. aix*)
  1421. symcode='[BCDT]'
  1422. ;;
  1423. cygwin* | mingw*)
  1424. symcode='[ABCDGISTW]'
  1425. ;;
  1426. hpux*) # Its linker distinguishes data from code symbols
  1427. global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
  1428. ;;
  1429. irix*)
  1430. symcode='[BCDEGRST]'
  1431. ;;
  1432. solaris*)
  1433. symcode='[BDT]'
  1434. ;;
  1435. sysv4)
  1436. symcode='[DFNSTU]'
  1437. ;;
  1438. esac
  1439. # If we're using GNU nm, then use its standard symbol codes.
  1440. if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
  1441. symcode='[ABCDGISTW]'
  1442. fi
  1443. # Try without a prefix undercore, then with it.
  1444. for ac_symprfx in "" "_"; do
  1445. # Write the raw and C identifiers.
  1446. global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'"
  1447. # Check to see that the pipe works correctly.
  1448. pipe_works=no
  1449. $rm conftest*
  1450. cat > conftest.c <<EOF
  1451. #ifdef __cplusplus
  1452. extern "C" {
  1453. #endif
  1454. char nm_test_var;
  1455. void nm_test_func(){}
  1456. #ifdef __cplusplus
  1457. }
  1458. #endif
  1459. main(){nm_test_var='a';nm_test_func();return(0);}
  1460. EOF
  1461. echo "$progname:1635: checking if global_symbol_pipe works" >&5
  1462. if { (eval echo $progname:1636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
  1463. # Now try to grab the symbols.
  1464. nlist=conftest.nm
  1465. if { echo "$progname:1639: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
  1466. # Try sorting and uniquifying the output.
  1467. if sort "$nlist" | uniq > "$nlist"T; then
  1468. mv -f "$nlist"T "$nlist"
  1469. else
  1470. rm -f "$nlist"T
  1471. fi
  1472. # Make sure that we snagged all the symbols we need.
  1473. if egrep ' nm_test_var$' "$nlist" >/dev/null; then
  1474. if egrep ' nm_test_func$' "$nlist" >/dev/null; then
  1475. cat <<EOF > conftest.c
  1476. #ifdef __cplusplus
  1477. extern "C" {
  1478. #endif
  1479. EOF
  1480. # Now generate the symbol file.
  1481. eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c'
  1482. cat <<EOF >> conftest.c
  1483. #if defined (__STDC__) && __STDC__
  1484. # define lt_ptr_t void *
  1485. #else
  1486. # define lt_ptr_t char *
  1487. # define const
  1488. #endif
  1489. /* The mapping between symbol names and symbols. */
  1490. const struct {
  1491. const char *name;
  1492. lt_ptr_t address;
  1493. }
  1494. lt_preloaded_symbols[] =
  1495. {
  1496. EOF
  1497. sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c
  1498. cat <<\EOF >> conftest.c
  1499. {0, (lt_ptr_t) 0}
  1500. };
  1501. #ifdef __cplusplus
  1502. }
  1503. #endif
  1504. EOF
  1505. # Now try linking the two files.
  1506. mv conftest.$objext conftstm.$objext
  1507. save_LIBS="$LIBS"
  1508. save_CFLAGS="$CFLAGS"
  1509. LIBS="conftstm.$objext"
  1510. CFLAGS="$CFLAGS$no_builtin_flag"
  1511. if { (eval echo $progname:1691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  1512. pipe_works=yes
  1513. else
  1514. echo "$progname: failed program was:" >&5
  1515. cat conftest.c >&5
  1516. fi
  1517. LIBS="$save_LIBS"
  1518. else
  1519. echo "cannot find nm_test_func in $nlist" >&5
  1520. fi
  1521. else
  1522. echo "cannot find nm_test_var in $nlist" >&5
  1523. fi
  1524. else
  1525. echo "cannot run $global_symbol_pipe" >&5
  1526. fi
  1527. else
  1528. echo "$progname: failed program was:" >&5
  1529. cat conftest.c >&5
  1530. fi
  1531. $rm conftest* conftst*
  1532. # Do not use the global_symbol_pipe unless it works.
  1533. if test "$pipe_works" = yes; then
  1534. break
  1535. else
  1536. global_symbol_pipe=
  1537. fi
  1538. done
  1539. if test "$pipe_works" = yes; then
  1540. echo "${ac_t}ok" 1>&6
  1541. else
  1542. echo "${ac_t}failed" 1>&6
  1543. fi
  1544. if test -z "$global_symbol_pipe"; then
  1545. global_symbol_to_cdecl=
  1546. fi
  1547. # Check hardcoding attributes.
  1548. echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
  1549. hardcode_action=
  1550. if test -n "$hardcode_libdir_flag_spec" || \
  1551. test -n "$runpath_var"; then
  1552. # We can hardcode non-existant directories.
  1553. if test "$hardcode_direct" != no &&
  1554. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  1555. # have to relink, otherwise we might link with an installed library
  1556. # when we should be linking with a yet-to-be-installed one
  1557. ## test "$hardcode_shlibpath_var" != no &&
  1558. test "$hardcode_minus_L" != no; then
  1559. # Linking always hardcodes the temporary library directory.
  1560. hardcode_action=relink
  1561. else
  1562. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  1563. hardcode_action=immediate
  1564. fi
  1565. else
  1566. # We cannot hardcode anything, or else we can only hardcode existing
  1567. # directories.
  1568. hardcode_action=unsupported
  1569. fi
  1570. echo "$ac_t$hardcode_action" 1>&6
  1571. reload_flag=
  1572. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  1573. echo $ac_n "checking for $LD option to produce relocatable object files... $ac_c" 1>&6
  1574. # PORTME Some linkers may need a different reload flag.
  1575. reload_flag='-r'
  1576. echo "$ac_t$reload_flag" 1>&6
  1577. test -n "$reload_flag" && reload_flag=" $reload_flag"
  1578. # PORTME Fill in your ld.so characteristics
  1579. library_names_spec=
  1580. libname_spec='lib$name'
  1581. soname_spec=
  1582. postinstall_cmds=
  1583. postuninstall_cmds=
  1584. finish_cmds=
  1585. finish_eval=
  1586. shlibpath_var=
  1587. shlibpath_overrides_runpath=unknown
  1588. version_type=none
  1589. dynamic_linker="$host_os ld.so"
  1590. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  1591. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  1592. file_magic_cmd=
  1593. file_magic_test_file=
  1594. deplibs_check_method='unknown'
  1595. # Need to set the preceding variable on all platforms that support
  1596. # interlibrary dependencies.
  1597. # 'none' -- dependencies not supported.
  1598. # `unknown' -- same as none, but documents that we really don't know.
  1599. # 'pass_all' -- all dependencies passed with no checks.
  1600. # 'test_compile' -- check by making test program.
  1601. # 'file_magic [regex]' -- check by looking for files in library path
  1602. # which responds to the $file_magic_cmd with a given egrep regex.
  1603. # If you have `file' or equivalent on your system and you're not sure
  1604. # whether `pass_all' will *always* work, you probably want this one.
  1605. echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
  1606. case "$host_os" in
  1607. aix3*)
  1608. version_type=linux
  1609. library_names_spec='${libname}${release}.so$versuffix $libname.a'
  1610. shlibpath_var=LIBPATH
  1611. # AIX has no versioning support, so we append a major version to the name.
  1612. soname_spec='${libname}${release}.so$major'
  1613. ;;
  1614. aix4*)
  1615. version_type=linux
  1616. # AIX has no versioning support, so currently we can not hardcode correct
  1617. # soname into executable. Probably we can add versioning support to
  1618. # collect2, so additional links can be useful in future.
  1619. # We preserve .a as extension for shared libraries though AIX4.2
  1620. # and later linker supports .so
  1621. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a'
  1622. shlibpath_var=LIBPATH
  1623. deplibs_check_method=pass_all
  1624. ;;
  1625. amigaos*)
  1626. library_names_spec='$libname.ixlibrary $libname.a'
  1627. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  1628. 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'
  1629. ;;
  1630. beos*)
  1631. library_names_spec='${libname}.so'
  1632. dynamic_linker="$host_os ld.so"
  1633. shlibpath_var=LIBRARY_PATH
  1634. deplibs_check_method=pass_all
  1635. lt_cv_dlopen="load_add_on"
  1636. lt_cv_dlopen_libs=
  1637. lt_cv_dlopen_self=yes
  1638. ;;
  1639. bsdi4*)
  1640. version_type=linux
  1641. need_version=no
  1642. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1643. soname_spec='${libname}${release}.so$major'
  1644. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  1645. shlibpath_var=LD_LIBRARY_PATH
  1646. deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
  1647. file_magic_cmd=/usr/bin/file
  1648. file_magic_test_file=/shlib/libc.so
  1649. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  1650. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  1651. export_dynamic_flag_spec=-rdynamic
  1652. # the default ld.so.conf also contains /usr/contrib/lib and
  1653. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  1654. # libtool to hard-code these into programs
  1655. ;;
  1656. cygwin* | mingw*)
  1657. version_type=windows
  1658. need_version=no
  1659. need_lib_prefix=no
  1660. if test "$with_gcc" = yes; then
  1661. library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a'
  1662. else
  1663. library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
  1664. fi
  1665. dynamic_linker='Win32 ld.exe'
  1666. deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
  1667. file_magic_cmd='${OBJDUMP} -f'
  1668. # FIXME: first we should search . and the directory the executable is in
  1669. shlibpath_var=PATH
  1670. lt_cv_dlopen="LoadLibrary"
  1671. lt_cv_dlopen_libs=
  1672. ;;
  1673. freebsd1*)
  1674. dynamic_linker=no
  1675. ;;
  1676. freebsd*)
  1677. objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
  1678. version_type=freebsd-$objformat
  1679. case "$version_type" in
  1680. freebsd-elf*)
  1681. deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
  1682. file_magic_cmd=/usr/bin/file
  1683. file_magic_test_file=`echo /usr/lib/libc.so*`
  1684. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
  1685. need_version=no
  1686. need_lib_prefix=no
  1687. ;;
  1688. freebsd-*)
  1689. deplibs_check_method=unknown
  1690. library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
  1691. need_version=yes
  1692. ;;
  1693. esac
  1694. shlibpath_var=LD_LIBRARY_PATH
  1695. case "$host_os" in
  1696. freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*)
  1697. shlibpath_overrides_runpath=yes
  1698. ;;
  1699. *) # from 3.2 on
  1700. shlibpath_overrides_runpath=no
  1701. ;;
  1702. esac
  1703. ;;
  1704. gnu*)
  1705. version_type=linux
  1706. need_lib_prefix=no
  1707. need_version=no
  1708. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
  1709. soname_spec='${libname}${release}.so$major'
  1710. shlibpath_var=LD_LIBRARY_PATH
  1711. ;;
  1712. hpux9* | hpux10* | hpux11*)
  1713. # Give a soname corresponding to the major version so that dld.sl refuses to
  1714. # link against other versions.
  1715. dynamic_linker="$host_os dld.sl"
  1716. version_type=sunos
  1717. need_lib_prefix=no
  1718. need_version=no
  1719. shlibpath_var=SHLIB_PATH
  1720. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  1721. library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
  1722. soname_spec='${libname}${release}.sl$major'
  1723. # HP-UX runs *really* slowly unless shared libraries are mode 555.
  1724. postinstall_cmds='chmod 555 $lib'
  1725. ;;
  1726. irix5* | irix6*)
  1727. version_type=irix
  1728. need_lib_prefix=no
  1729. need_version=no
  1730. soname_spec='${libname}${release}.so.$major'
  1731. library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so'
  1732. case "$host_os" in
  1733. irix5*)
  1734. libsuff= shlibsuff=
  1735. # this will be overridden with pass_all, but let us keep it just in case
  1736. deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
  1737. ;;
  1738. *)
  1739. case "$LD" in # libtool.m4 will add one of these switches to LD
  1740. *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
  1741. *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
  1742. *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
  1743. *) libsuff= shlibsuff= libmagic=never-match;;
  1744. esac
  1745. ;;
  1746. esac
  1747. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  1748. shlibpath_overrides_runpath=no
  1749. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  1750. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  1751. file_magic_cmd=/usr/bin/file
  1752. file_magic_test_file=`echo /lib${libsuff}/libc.so*`
  1753. deplibs_check_method='pass_all'
  1754. ;;
  1755. # No shared lib support for Linux oldld, aout, or coff.
  1756. linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
  1757. dynamic_linker=no
  1758. ;;
  1759. # This must be Linux ELF.
  1760. linux-gnu*)
  1761. version_type=linux
  1762. need_lib_prefix=no
  1763. need_version=no
  1764. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1765. soname_spec='${libname}${release}.so$major'
  1766. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  1767. shlibpath_var=LD_LIBRARY_PATH
  1768. shlibpath_overrides_runpath=no
  1769. deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
  1770. file_magic_cmd=/usr/bin/file
  1771. file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  1772. if test -f /lib/ld.so.1; then
  1773. dynamic_linker='GNU ld.so'
  1774. else
  1775. # Only the GNU ld.so supports shared libraries on MkLinux.
  1776. case "$host_cpu" in
  1777. powerpc*) dynamic_linker=no ;;
  1778. *) dynamic_linker='Linux ld.so' ;;
  1779. esac
  1780. fi
  1781. ;;
  1782. netbsd*)
  1783. version_type=sunos
  1784. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  1785. library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
  1786. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  1787. dynamic_linker='NetBSD (a.out) ld.so'
  1788. else
  1789. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
  1790. soname_spec='${libname}${release}.so$major'
  1791. dynamic_linker='NetBSD ld.elf_so'
  1792. fi
  1793. shlibpath_var=LD_LIBRARY_PATH
  1794. ;;
  1795. openbsd*)
  1796. version_type=sunos
  1797. if test "$with_gnu_ld" = yes; then
  1798. need_lib_prefix=no
  1799. need_version=no
  1800. fi
  1801. library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
  1802. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  1803. shlibpath_var=LD_LIBRARY_PATH
  1804. ;;
  1805. os2*)
  1806. libname_spec='$name'
  1807. need_lib_prefix=no
  1808. library_names_spec='$libname.dll $libname.a'
  1809. dynamic_linker='OS/2 ld.exe'
  1810. shlibpath_var=LIBPATH
  1811. ;;
  1812. osf3* | osf4* | osf5*)
  1813. version_type=osf
  1814. need_version=no
  1815. soname_spec='${libname}${release}.so'
  1816. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
  1817. shlibpath_var=LD_LIBRARY_PATH
  1818. # this will be overridden with pass_all, but let us keep it just in case
  1819. deplibs_check_method='file_magic COFF format alpha shared library'
  1820. file_magic_cmd=/usr/bin/file
  1821. file_magic_test_file=/shlib/libc.so
  1822. deplibs_check_method='pass_all'
  1823. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  1824. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  1825. ;;
  1826. sco3.2v5*)
  1827. version_type=osf
  1828. soname_spec='${libname}${release}.so$major'
  1829. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1830. shlibpath_var=LD_LIBRARY_PATH
  1831. ;;
  1832. solaris*)
  1833. version_type=linux
  1834. need_lib_prefix=no
  1835. need_version=no
  1836. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1837. soname_spec='${libname}${release}.so$major'
  1838. shlibpath_var=LD_LIBRARY_PATH
  1839. shlibpath_overrides_runpath=yes
  1840. # ldd complains unless libraries are executable
  1841. postinstall_cmds='chmod +x $lib'
  1842. deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib"
  1843. file_magic_cmd=/usr/bin/file
  1844. file_magic_test_file=/lib/libc.so
  1845. ;;
  1846. sunos4*)
  1847. version_type=sunos
  1848. library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
  1849. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  1850. shlibpath_var=LD_LIBRARY_PATH
  1851. shlibpath_overrides_runpath=yes
  1852. if test "$with_gnu_ld" = yes; then
  1853. need_lib_prefix=no
  1854. fi
  1855. need_version=yes
  1856. ;;
  1857. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  1858. version_type=linux
  1859. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1860. soname_spec='${libname}${release}.so$major'
  1861. shlibpath_var=LD_LIBRARY_PATH
  1862. case "$host_vendor" in
  1863. ncr)
  1864. deplibs_check_method='pass_all'
  1865. ;;
  1866. motorola)
  1867. need_lib_prefix=no
  1868. need_version=no
  1869. shlibpath_overrides_runpath=no
  1870. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  1871. 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]'
  1872. file_magic_cmd=/usr/bin/file
  1873. file_magic_test_file=`echo /usr/lib/libc.so*`
  1874. ;;
  1875. esac
  1876. ;;
  1877. uts4*)
  1878. version_type=linux
  1879. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1880. soname_spec='${libname}${release}.so$major'
  1881. shlibpath_var=LD_LIBRARY_PATH
  1882. ;;
  1883. dgux*)
  1884. version_type=linux
  1885. need_lib_prefix=no
  1886. need_version=no
  1887. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  1888. soname_spec='${libname}${release}.so$major'
  1889. shlibpath_var=LD_LIBRARY_PATH
  1890. ;;
  1891. sysv4*MP*)
  1892. if test -d /usr/nec ;then
  1893. version_type=linux
  1894. library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
  1895. soname_spec='$libname.so.$major'
  1896. shlibpath_var=LD_LIBRARY_PATH
  1897. fi
  1898. ;;
  1899. *)
  1900. dynamic_linker=no
  1901. ;;
  1902. esac
  1903. echo "$ac_t$dynamic_linker" 1>&6
  1904. test "$dynamic_linker" = no && can_build_shared=no
  1905. # Report the final consequences.
  1906. echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
  1907. # Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
  1908. # configure.in, otherwise build static only libraries.
  1909. case "$host_os" in
  1910. cygwin* | mingw* | os2*)
  1911. if test x$can_build_shared = xyes; then
  1912. test x$enable_win32_dll = xno && can_build_shared=no
  1913. echo "checking if package supports dlls... $can_build_shared" 1>&6
  1914. fi
  1915. ;;
  1916. esac
  1917. if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then
  1918. case "$deplibs_check_method" in
  1919. "file_magic "*)
  1920. file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
  1921. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  1922. egrep "$file_magic_regex" > /dev/null; then
  1923. :
  1924. else
  1925. cat <<EOF 1>&2
  1926. *** Warning: the command libtool uses to detect shared libraries,
  1927. *** $file_magic_cmd, produces output that libtool cannot recognize.
  1928. *** The result is that libtool may fail to recognize shared libraries
  1929. *** as such. This will affect the creation of libtool libraries that
  1930. *** depend on shared libraries, but programs linked with such libtool
  1931. *** libraries will work regardless of this problem. Nevertheless, you
  1932. *** may want to report the problem to your system manager and/or to
  1933. *** bug-libtool@gnu.org
  1934. EOF
  1935. fi ;;
  1936. esac
  1937. fi
  1938. echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
  1939. test "$can_build_shared" = "no" && enable_shared=no
  1940. # On AIX, shared libraries and static libraries use the same namespace, and
  1941. # are all built from PIC.
  1942. case "$host_os" in
  1943. aix3*)
  1944. test "$enable_shared" = yes && enable_static=no
  1945. if test -n "$RANLIB"; then
  1946. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  1947. postinstall_cmds='$RANLIB $lib'
  1948. fi
  1949. ;;
  1950. aix4*)
  1951. test "$enable_shared" = yes && enable_static=no
  1952. ;;
  1953. esac
  1954. echo "$ac_t$enable_shared" 1>&6
  1955. # Make sure either enable_shared or enable_static is yes.
  1956. test "$enable_shared" = yes || enable_static=yes
  1957. echo "checking whether to build static libraries... $enable_static" 1>&6
  1958. if test "$hardcode_action" = relink; then
  1959. # Fast installation is not supported
  1960. enable_fast_install=no
  1961. elif test "$shlibpath_overrides_runpath" = yes ||
  1962. test "$enable_shared" = no; then
  1963. # Fast installation is not necessary
  1964. enable_fast_install=needless
  1965. fi
  1966. echo $ac_n "checking for objdir... $ac_c" 1>&6
  1967. rm -f .libs 2>/dev/null
  1968. mkdir .libs 2>/dev/null
  1969. if test -d .libs; then
  1970. objdir=.libs
  1971. else
  1972. # MS-DOS does not allow filenames that begin with a dot.
  1973. objdir=_libs
  1974. fi
  1975. rmdir .libs 2>/dev/null
  1976. echo "$ac_t$objdir" 1>&6
  1977. if test "x$enable_dlopen" != xyes; then
  1978. enable_dlopen=unknown
  1979. enable_dlopen_self=unknown
  1980. enable_dlopen_self_static=unknown
  1981. else
  1982. if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
  1983. lt_cv_dlopen=no lt_cv_dlopen_libs=
  1984. echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
  1985. echo "$progname:2212: checking for dlopen in -ldl" >&5
  1986. ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  1987. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1988. echo $ac_n "(cached) $ac_c" 1>&6
  1989. else
  1990. ac_save_LIBS="$LIBS"
  1991. LIBS="-ldl $LIBS"
  1992. cat > conftest.$ac_ext <<EOF
  1993. #line 2220 "ltconfig"
  1994. /* Override any gcc2 internal prototype to avoid an error. */
  1995. /* We use char because int might match the return type of a gcc2
  1996. builtin and then its argument prototype would still apply. */
  1997. #ifdef __cplusplus
  1998. extern "C"
  1999. #endif
  2000. char dlopen();
  2001. int main() {
  2002. dlopen()
  2003. ; return 0; }
  2004. EOF
  2005. if { (eval echo $progname:2233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2006. rm -rf conftest*
  2007. eval "ac_cv_lib_$ac_lib_var=yes"
  2008. else
  2009. echo "$progname: failed program was:" >&5
  2010. cat conftest.$ac_ext >&5
  2011. rm -rf conftest*
  2012. eval "ac_cv_lib_$ac_lib_var=no"
  2013. fi
  2014. rm -f conftest*
  2015. LIBS="$ac_save_LIBS"
  2016. fi
  2017. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2018. echo "$ac_t""yes" 1>&6
  2019. lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
  2020. else
  2021. echo "$ac_t""no" 1>&6
  2022. echo $ac_n "checking for dlopen""... $ac_c" 1>&6
  2023. echo "$progname:2252: checking for dlopen" >&5
  2024. if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
  2025. echo $ac_n "(cached) $ac_c" 1>&6
  2026. else
  2027. cat > conftest.$ac_ext <<EOF
  2028. #line 2257 "ltconfig"
  2029. /* System header to define __stub macros and hopefully few prototypes,
  2030. which can conflict with char dlopen(); below. */
  2031. #include <assert.h>
  2032. /* Override any gcc2 internal prototype to avoid an error. */
  2033. /* We use char because int might match the return type of a gcc2
  2034. builtin and then its argument prototype would still apply. */
  2035. #ifdef __cplusplus
  2036. extern "C"
  2037. #endif
  2038. char dlopen();
  2039. int main() {
  2040. /* The GNU C library defines this for functions which it implements
  2041. to always fail with ENOSYS. Some functions are actually named
  2042. something starting with __ and the normal name is an alias. */
  2043. #if defined (__stub_dlopen) || defined (__stub___dlopen)
  2044. choke me
  2045. #else
  2046. dlopen();
  2047. #endif
  2048. ; return 0; }
  2049. EOF
  2050. if { (eval echo $progname:2282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2051. rm -rf conftest*
  2052. eval "ac_cv_func_dlopen=yes"
  2053. else
  2054. echo "$progname: failed program was:" >&5
  2055. cat conftest.$ac_ext >&5
  2056. rm -rf conftest*
  2057. eval "ac_cv_func_dlopen=no"
  2058. fi
  2059. rm -f conftest*
  2060. fi
  2061. if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
  2062. echo "$ac_t""yes" 1>&6
  2063. lt_cv_dlopen="dlopen"
  2064. else
  2065. echo "$ac_t""no" 1>&6
  2066. echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
  2067. echo "$progname:2299: checking for dld_link in -ldld" >&5
  2068. ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
  2069. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2070. echo $ac_n "(cached) $ac_c" 1>&6
  2071. else
  2072. ac_save_LIBS="$LIBS"
  2073. LIBS="-ldld $LIBS"
  2074. cat > conftest.$ac_ext <<EOF
  2075. #line 2307 "ltconfig"
  2076. /* Override any gcc2 internal prototype to avoid an error. */
  2077. /* We use char because int might match the return type of a gcc2
  2078. builtin and then its argument prototype would still apply. */
  2079. #ifdef __cplusplus
  2080. extern "C"
  2081. #endif
  2082. char dld_link();
  2083. int main() {
  2084. dld_link()
  2085. ; return 0; }
  2086. EOF
  2087. if { (eval echo $progname:2320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2088. rm -rf conftest*
  2089. eval "ac_cv_lib_$ac_lib_var=yes"
  2090. else
  2091. echo "$progname: failed program was:" >&5
  2092. cat conftest.$ac_ext >&5
  2093. rm -rf conftest*
  2094. eval "ac_cv_lib_$ac_lib_var=no"
  2095. fi
  2096. rm -f conftest*
  2097. LIBS="$ac_save_LIBS"
  2098. fi
  2099. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2100. echo "$ac_t""yes" 1>&6
  2101. lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
  2102. else
  2103. echo "$ac_t""no" 1>&6
  2104. echo $ac_n "checking for shl_load""... $ac_c" 1>&6
  2105. echo "$progname:2339: checking for shl_load" >&5
  2106. if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
  2107. echo $ac_n "(cached) $ac_c" 1>&6
  2108. else
  2109. cat > conftest.$ac_ext <<EOF
  2110. #line 2344 "ltconfig"
  2111. /* System header to define __stub macros and hopefully few prototypes,
  2112. which can conflict with char shl_load(); below. */
  2113. #include <assert.h>
  2114. /* Override any gcc2 internal prototype to avoid an error. */
  2115. /* We use char because int might match the return type of a gcc2
  2116. builtin and then its argument prototype would still apply. */
  2117. #ifdef __cplusplus
  2118. extern "C"
  2119. #endif
  2120. char shl_load();
  2121. int main() {
  2122. /* The GNU C library defines this for functions which it implements
  2123. to always fail with ENOSYS. Some functions are actually named
  2124. something starting with __ and the normal name is an alias. */
  2125. #if defined (__stub_shl_load) || defined (__stub___shl_load)
  2126. choke me
  2127. #else
  2128. shl_load();
  2129. #endif
  2130. ; return 0; }
  2131. EOF
  2132. if { (eval echo $progname:2369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2133. rm -rf conftest*
  2134. eval "ac_cv_func_shl_load=yes"
  2135. else
  2136. echo "$progname: failed program was:" >&5
  2137. cat conftest.$ac_ext >&5
  2138. rm -rf conftest*
  2139. eval "ac_cv_func_shl_load=no"
  2140. fi
  2141. rm -f conftest*
  2142. fi
  2143. if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
  2144. echo "$ac_t""yes" 1>&6
  2145. lt_cv_dlopen="shl_load"
  2146. else
  2147. echo "$ac_t""no" 1>&6
  2148. echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
  2149. echo "$progname:2387: checking for shl_load in -ldld" >&5
  2150. ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  2151. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2152. echo $ac_n "(cached) $ac_c" 1>&6
  2153. else
  2154. ac_save_LIBS="$LIBS"
  2155. LIBS="-ldld $LIBS"
  2156. cat > conftest.$ac_ext <<EOF
  2157. #line 2395 "ltconfig"
  2158. #include "confdefs.h"
  2159. /* Override any gcc2 internal prototype to avoid an error. */
  2160. /* We use char because int might match the return type of a gcc2
  2161. builtin and then its argument prototype would still apply. */
  2162. #ifdef __cplusplus
  2163. extern "C"
  2164. #endif
  2165. char shl_load();
  2166. int main() {
  2167. shl_load()
  2168. ; return 0; }
  2169. EOF
  2170. if { (eval echo $progname:2409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2171. rm -rf conftest*
  2172. eval "ac_cv_lib_$ac_lib_var=yes"
  2173. else
  2174. echo "$progname: failed program was:" >&5
  2175. cat conftest.$ac_ext >&5
  2176. rm -rf conftest*
  2177. eval "ac_cv_lib_$ac_lib_var=no"
  2178. fi
  2179. rm -f conftest*
  2180. LIBS="$ac_save_LIBS"
  2181. fi
  2182. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2183. echo "$ac_t""yes" 1>&6
  2184. lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
  2185. else
  2186. echo "$ac_t""no" 1>&6
  2187. fi
  2188. fi
  2189. fi
  2190. fi
  2191. fi
  2192. fi
  2193. if test "x$lt_cv_dlopen" != xno; then
  2194. enable_dlopen=yes
  2195. fi
  2196. case "$lt_cv_dlopen" in
  2197. dlopen)
  2198. for ac_hdr in dlfcn.h; do
  2199. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2200. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2201. echo "$progname:2452: checking for $ac_hdr" >&5
  2202. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2203. echo $ac_n "(cached) $ac_c" 1>&6
  2204. else
  2205. cat > conftest.$ac_ext <<EOF
  2206. #line 2457 "ltconfig"
  2207. #include <$ac_hdr>
  2208. int fnord = 0;
  2209. EOF
  2210. ac_try="$ac_compile >/dev/null 2>conftest.out"
  2211. { (eval echo $progname:2462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2212. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2213. if test -z "$ac_err"; then
  2214. rm -rf conftest*
  2215. eval "ac_cv_header_$ac_safe=yes"
  2216. else
  2217. echo "$ac_err" >&5
  2218. echo "$progname: failed program was:" >&5
  2219. cat conftest.$ac_ext >&5
  2220. rm -rf conftest*
  2221. eval "ac_cv_header_$ac_safe=no"
  2222. fi
  2223. rm -f conftest*
  2224. fi
  2225. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2226. echo "$ac_t""yes" 1>&6
  2227. else
  2228. echo "$ac_t""no" 1>&6
  2229. fi
  2230. done
  2231. if test "x$ac_cv_header_dlfcn_h" = xyes; then
  2232. CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  2233. fi
  2234. eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  2235. LIBS="$lt_cv_dlopen_libs $LIBS"
  2236. echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
  2237. echo "$progname:2490: checking whether a program can dlopen itself" >&5
  2238. if test "${lt_cv_dlopen_self+set}" = set; then
  2239. echo $ac_n "(cached) $ac_c" 1>&6
  2240. else
  2241. if test "$cross_compiling" = yes; then
  2242. lt_cv_dlopen_self=cross
  2243. else
  2244. cat > conftest.c <<EOF
  2245. #line 2498 "ltconfig"
  2246. #if HAVE_DLFCN_H
  2247. #include <dlfcn.h>
  2248. #endif
  2249. #include <stdio.h>
  2250. #ifdef RTLD_GLOBAL
  2251. # define LTDL_GLOBAL RTLD_GLOBAL
  2252. #else
  2253. # ifdef DL_GLOBAL
  2254. # define LTDL_GLOBAL DL_GLOBAL
  2255. # else
  2256. # define LTDL_GLOBAL 0
  2257. # endif
  2258. #endif
  2259. /* We may have to define LTDL_LAZY_OR_NOW in the command line if we
  2260. find out it does not work in some platform. */
  2261. #ifndef LTDL_LAZY_OR_NOW
  2262. # ifdef RTLD_LAZY
  2263. # define LTDL_LAZY_OR_NOW RTLD_LAZY
  2264. # else
  2265. # ifdef DL_LAZY
  2266. # define LTDL_LAZY_OR_NOW DL_LAZY
  2267. # else
  2268. # ifdef RTLD_NOW
  2269. # define LTDL_LAZY_OR_NOW RTLD_NOW
  2270. # else
  2271. # ifdef DL_NOW
  2272. # define LTDL_LAZY_OR_NOW DL_NOW
  2273. # else
  2274. # define LTDL_LAZY_OR_NOW 0
  2275. # endif
  2276. # endif
  2277. # endif
  2278. # endif
  2279. #endif
  2280. fnord() { int i=42;}
  2281. main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
  2282. if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
  2283. if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
  2284. EOF
  2285. if { (eval echo $progname:2544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2286. then
  2287. lt_cv_dlopen_self=yes
  2288. else
  2289. echo "$progname: failed program was:" >&5
  2290. cat conftest.$ac_ext >&5
  2291. rm -fr conftest*
  2292. lt_cv_dlopen_self=no
  2293. fi
  2294. rm -fr conftest*
  2295. fi
  2296. fi
  2297. echo "$ac_t""$lt_cv_dlopen_self" 1>&6
  2298. if test "$lt_cv_dlopen_self" = yes; then
  2299. LDFLAGS="$LDFLAGS $link_static_flag"
  2300. echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
  2301. echo "$progname:2563: checking whether a statically linked program can dlopen itself" >&5
  2302. if test "${lt_cv_dlopen_self_static+set}" = set; then
  2303. echo $ac_n "(cached) $ac_c" 1>&6
  2304. else
  2305. if test "$cross_compiling" = yes; then
  2306. lt_cv_dlopen_self_static=cross
  2307. else
  2308. cat > conftest.c <<EOF
  2309. #line 2571 "ltconfig"
  2310. #if HAVE_DLFCN_H
  2311. #include <dlfcn.h>
  2312. #endif
  2313. #include <stdio.h>
  2314. #ifdef RTLD_GLOBAL
  2315. # define LTDL_GLOBAL RTLD_GLOBAL
  2316. #else
  2317. # ifdef DL_GLOBAL
  2318. # define LTDL_GLOBAL DL_GLOBAL
  2319. # else
  2320. # define LTDL_GLOBAL 0
  2321. # endif
  2322. #endif
  2323. /* We may have to define LTDL_LAZY_OR_NOW in the command line if we
  2324. find out it does not work in some platform. */
  2325. #ifndef LTDL_LAZY_OR_NOW
  2326. # ifdef RTLD_LAZY
  2327. # define LTDL_LAZY_OR_NOW RTLD_LAZY
  2328. # else
  2329. # ifdef DL_LAZY
  2330. # define LTDL_LAZY_OR_NOW DL_LAZY
  2331. # else
  2332. # ifdef RTLD_NOW
  2333. # define LTDL_LAZY_OR_NOW RTLD_NOW
  2334. # else
  2335. # ifdef DL_NOW
  2336. # define LTDL_LAZY_OR_NOW DL_NOW
  2337. # else
  2338. # define LTDL_LAZY_OR_NOW 0
  2339. # endif
  2340. # endif
  2341. # endif
  2342. # endif
  2343. #endif
  2344. fnord() { int i=42;}
  2345. main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
  2346. if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
  2347. if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
  2348. EOF
  2349. if { (eval echo $progname:2617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  2350. then
  2351. lt_cv_dlopen_self_static=yes
  2352. else
  2353. echo "$progname: failed program was:" >&5
  2354. cat conftest.$ac_ext >&5
  2355. rm -fr conftest*
  2356. lt_cv_dlopen_self_static=no
  2357. fi
  2358. rm -fr conftest*
  2359. fi
  2360. fi
  2361. echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
  2362. fi
  2363. ;;
  2364. esac
  2365. case "$lt_cv_dlopen_self" in
  2366. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  2367. *) enable_dlopen_self=unknown ;;
  2368. esac
  2369. case "$lt_cv_dlopen_self_static" in
  2370. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  2371. *) enable_dlopen_self_static=unknown ;;
  2372. esac
  2373. fi
  2374. # Copy echo and quote the copy, instead of the original, because it is
  2375. # used later.
  2376. ltecho="$echo"
  2377. if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
  2378. ltecho="$CONFIG_SHELL \$0 --fallback-echo"
  2379. fi
  2380. LTSHELL="$SHELL"
  2381. LTCONFIG_VERSION="$VERSION"
  2382. # Only quote variables if we're using ltmain.sh.
  2383. case "$ltmain" in
  2384. *.sh)
  2385. # Now quote all the things that may contain metacharacters.
  2386. for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \
  2387. old_LD old_LDFLAGS old_LIBS \
  2388. old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \
  2389. AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \
  2390. reload_flag reload_cmds wl \
  2391. pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
  2392. thread_safe_flag_spec whole_archive_flag_spec libname_spec \
  2393. library_names_spec soname_spec \
  2394. RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
  2395. old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \
  2396. file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \
  2397. finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
  2398. hardcode_libdir_flag_spec hardcode_libdir_separator \
  2399. sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
  2400. compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
  2401. case "$var" in
  2402. reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
  2403. old_postinstall_cmds | old_postuninstall_cmds | \
  2404. export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
  2405. postinstall_cmds | postuninstall_cmds | \
  2406. finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
  2407. # Double-quote double-evaled strings.
  2408. eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
  2409. ;;
  2410. *)
  2411. eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
  2412. ;;
  2413. esac
  2414. done
  2415. case "$ltecho" in
  2416. *'\$0 --fallback-echo"')
  2417. ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
  2418. ;;
  2419. esac
  2420. trap "$rm \"$ofile\"; exit 1" 1 2 15
  2421. echo "creating $ofile"
  2422. $rm "$ofile"
  2423. cat <<EOF > "$ofile"
  2424. #! $SHELL
  2425. # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  2426. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
  2427. # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
  2428. #
  2429. # Copyright (C) 1996-1999 Free Software Foundation, Inc.
  2430. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  2431. #
  2432. # This program is free software; you can redistribute it and/or modify
  2433. # it under the terms of the GNU General Public License as published by
  2434. # the Free Software Foundation; either version 2 of the License, or
  2435. # (at your option) any later version.
  2436. #
  2437. # This program is distributed in the hope that it will be useful, but
  2438. # WITHOUT ANY WARRANTY; without even the implied warranty of
  2439. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2440. # General Public License for more details.
  2441. #
  2442. # You should have received a copy of the GNU General Public License
  2443. # along with this program; if not, write to the Free Software
  2444. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  2445. #
  2446. # As a special exception to the GNU General Public License, if you
  2447. # distribute this file as part of a program that contains a
  2448. # configuration script generated by Autoconf, you may include it under
  2449. # the same distribution terms that you use for the rest of that program.
  2450. # Sed that helps us avoid accidentally triggering echo(1) options like -n.
  2451. Xsed="sed -e s/^X//"
  2452. # The HP-UX ksh and POSIX shell print the target directory to stdout
  2453. # if CDPATH is set.
  2454. if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  2455. ### BEGIN LIBTOOL CONFIG
  2456. EOF
  2457. cfgfile="$ofile"
  2458. ;;
  2459. *)
  2460. # Double-quote the variables that need it (for aesthetics).
  2461. for var in old_CC old_CFLAGS old_CPPFLAGS \
  2462. old_LD old_LDFLAGS old_LIBS \
  2463. old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do
  2464. eval "$var=\\\"\$var\\\""
  2465. done
  2466. # Just create a config file.
  2467. cfgfile="$ofile.cfg"
  2468. trap "$rm \"$cfgfile\"; exit 1" 1 2 15
  2469. echo "creating $cfgfile"
  2470. $rm "$cfgfile"
  2471. cat <<EOF > "$cfgfile"
  2472. # `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
  2473. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
  2474. EOF
  2475. ;;
  2476. esac
  2477. cat <<EOF >> "$cfgfile"
  2478. # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2479. #
  2480. # CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
  2481. # LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
  2482. # NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
  2483. # DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\
  2484. # $0$ltconfig_args
  2485. #
  2486. # Compiler and other test output produced by $progname, useful for
  2487. # debugging $progname, is in ./config.log if it exists.
  2488. # The version of $progname that generated this script.
  2489. LTCONFIG_VERSION=$LTCONFIG_VERSION
  2490. # Shell to use when invoking shell scripts.
  2491. SHELL=$LTSHELL
  2492. # Whether or not to build shared libraries.
  2493. build_libtool_libs=$enable_shared
  2494. # Whether or not to build static libraries.
  2495. build_old_libs=$enable_static
  2496. # Whether or not to optimize for fast installation.
  2497. fast_install=$enable_fast_install
  2498. # The host system.
  2499. host_alias=$host_alias
  2500. host=$host
  2501. # An echo program that does not interpret backslashes.
  2502. echo=$ltecho
  2503. # The archiver.
  2504. AR=$AR
  2505. # The default C compiler.
  2506. CC=$CC
  2507. # The linker used to build libraries.
  2508. LD=$LD
  2509. # Whether we need hard or soft links.
  2510. LN_S=$LN_S
  2511. # A BSD-compatible nm program.
  2512. NM=$NM
  2513. # Used on cygwin: DLL creation program.
  2514. DLLTOOL="$DLLTOOL"
  2515. # Used on cygwin: object dumper.
  2516. OBJDUMP="$OBJDUMP"
  2517. # Used on cygwin: assembler.
  2518. AS="$AS"
  2519. # The name of the directory that contains temporary libtool files.
  2520. objdir=$objdir
  2521. # How to create relocatable object files.
  2522. reload_flag=$reload_flag
  2523. reload_cmds=$reload_cmds
  2524. # How to pass a linker flag through the compiler.
  2525. wl=$wl
  2526. # Object file suffix (normally "o").
  2527. objext="$objext"
  2528. # Old archive suffix (normally "a").
  2529. libext="$libext"
  2530. # Executable file suffix (normally "").
  2531. exeext="$exeext"
  2532. # Additional compiler flags for building library objects.
  2533. pic_flag=$pic_flag
  2534. # Does compiler simultaneously support -c and -o options?
  2535. compiler_c_o=$compiler_c_o
  2536. # Can we write directly to a .lo ?
  2537. compiler_o_lo=$compiler_o_lo
  2538. # Must we lock files when doing compilation ?
  2539. need_locks=$need_locks
  2540. # Do we need the lib prefix for modules?
  2541. need_lib_prefix=$need_lib_prefix
  2542. # Do we need a version for libraries?
  2543. need_version=$need_version
  2544. # Whether dlopen is supported.
  2545. dlopen=$enable_dlopen
  2546. # Whether dlopen of programs is supported.
  2547. dlopen_self=$enable_dlopen_self
  2548. # Whether dlopen of statically linked programs is supported.
  2549. dlopen_self_static=$enable_dlopen_self_static
  2550. # Compiler flag to prevent dynamic linking.
  2551. link_static_flag=$link_static_flag
  2552. # Compiler flag to turn off builtin functions.
  2553. no_builtin_flag=$no_builtin_flag
  2554. # Compiler flag to allow reflexive dlopens.
  2555. export_dynamic_flag_spec=$export_dynamic_flag_spec
  2556. # Compiler flag to generate shared objects directly from archives.
  2557. whole_archive_flag_spec=$whole_archive_flag_spec
  2558. # Compiler flag to generate thread-safe objects.
  2559. thread_safe_flag_spec=$thread_safe_flag_spec
  2560. # Library versioning type.
  2561. version_type=$version_type
  2562. # Format of library name prefix.
  2563. libname_spec=$libname_spec
  2564. # List of archive names. First name is the real one, the rest are links.
  2565. # The last name is the one that the linker finds with -lNAME.
  2566. library_names_spec=$library_names_spec
  2567. # The coded name of the library, if different from the real name.
  2568. soname_spec=$soname_spec
  2569. # Commands used to build and install an old-style archive.
  2570. RANLIB=$RANLIB
  2571. old_archive_cmds=$old_archive_cmds
  2572. old_postinstall_cmds=$old_postinstall_cmds
  2573. old_postuninstall_cmds=$old_postuninstall_cmds
  2574. # Create an old-style archive from a shared archive.
  2575. old_archive_from_new_cmds=$old_archive_from_new_cmds
  2576. # Commands used to build and install a shared archive.
  2577. archive_cmds=$archive_cmds
  2578. archive_expsym_cmds=$archive_expsym_cmds
  2579. postinstall_cmds=$postinstall_cmds
  2580. postuninstall_cmds=$postuninstall_cmds
  2581. # Method to check whether dependent libraries are shared objects.
  2582. deplibs_check_method=$deplibs_check_method
  2583. # Command to use when deplibs_check_method == file_magic.
  2584. file_magic_cmd=$file_magic_cmd
  2585. # Flag that allows shared libraries with undefined symbols to be built.
  2586. allow_undefined_flag=$allow_undefined_flag
  2587. # Flag that forces no undefined symbols.
  2588. no_undefined_flag=$no_undefined_flag
  2589. # Commands used to finish a libtool library installation in a directory.
  2590. finish_cmds=$finish_cmds
  2591. # Same as above, but a single script fragment to be evaled but not shown.
  2592. finish_eval=$finish_eval
  2593. # Take the output of nm and produce a listing of raw symbols and C names.
  2594. global_symbol_pipe=$global_symbol_pipe
  2595. # Transform the output of nm in a proper C declaration
  2596. global_symbol_to_cdecl=$global_symbol_to_cdecl
  2597. # This is the shared library runtime path variable.
  2598. runpath_var=$runpath_var
  2599. # This is the shared library path variable.
  2600. shlibpath_var=$shlibpath_var
  2601. # Is shlibpath searched before the hard-coded library search path?
  2602. shlibpath_overrides_runpath=$shlibpath_overrides_runpath
  2603. # How to hardcode a shared library path into an executable.
  2604. hardcode_action=$hardcode_action
  2605. # Flag to hardcode \$libdir into a binary during linking.
  2606. # This must work even if \$libdir does not exist.
  2607. hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
  2608. # Whether we need a single -rpath flag with a separated argument.
  2609. hardcode_libdir_separator=$hardcode_libdir_separator
  2610. # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
  2611. # resulting binary.
  2612. hardcode_direct=$hardcode_direct
  2613. # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
  2614. # resulting binary.
  2615. hardcode_minus_L=$hardcode_minus_L
  2616. # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  2617. # the resulting binary.
  2618. hardcode_shlibpath_var=$hardcode_shlibpath_var
  2619. # Compile-time system search path for libraries
  2620. sys_lib_search_path_spec=$sys_lib_search_path_spec
  2621. # Run-time system search path for libraries
  2622. sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
  2623. # Fix the shell variable \$srcfile for the compiler.
  2624. fix_srcfile_path="$fix_srcfile_path"
  2625. # Set to yes if exported symbols are required.
  2626. always_export_symbols=$always_export_symbols
  2627. # The commands to list exported symbols.
  2628. export_symbols_cmds=$export_symbols_cmds
  2629. # Symbols that should not be listed in the preloaded symbols.
  2630. exclude_expsyms=$exclude_expsyms
  2631. # Symbols that must always be exported.
  2632. include_expsyms=$include_expsyms
  2633. EOF
  2634. case "$ltmain" in
  2635. *.sh)
  2636. echo '### END LIBTOOL CONFIG' >> "$ofile"
  2637. echo >> "$ofile"
  2638. case "$host_os" in
  2639. aix3*)
  2640. cat <<\EOF >> "$ofile"
  2641. # AIX sometimes has problems with the GCC collect2 program. For some
  2642. # reason, if we set the COLLECT_NAMES environment variable, the problems
  2643. # vanish in a puff of smoke.
  2644. if test "X${COLLECT_NAMES+set}" != Xset; then
  2645. COLLECT_NAMES=
  2646. export COLLECT_NAMES
  2647. fi
  2648. EOF
  2649. ;;
  2650. esac
  2651. # Append the ltmain.sh script.
  2652. sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
  2653. # We use sed instead of cat because bash on DJGPP gets confused if
  2654. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  2655. # text mode, it properly converts lines to CR/LF. This bash problem
  2656. # is reportedly fixed, but why not run on old versions too?
  2657. chmod +x "$ofile"
  2658. ;;
  2659. *)
  2660. # Compile the libtool program.
  2661. echo "FIXME: would compile $ltmain"
  2662. ;;
  2663. esac
  2664. test -n "$cache_file" || exit 0
  2665. # AC_CACHE_SAVE
  2666. trap '' 1 2 15
  2667. cat > confcache <<\EOF
  2668. # This file is a shell script that caches the results of configure
  2669. # tests run on this system so they can be shared between configure
  2670. # scripts and configure runs. It is not useful on other systems.
  2671. # If it contains results you don't want to keep, you may remove or edit it.
  2672. #
  2673. # By default, configure uses ./config.cache as the cache file,
  2674. # creating it if it does not exist already. You can give configure
  2675. # the --cache-file=FILE option to use a different cache file; that is
  2676. # what configure does when it calls configure scripts in
  2677. # subdirectories, so they share the cache.
  2678. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  2679. # config.status only pays attention to the cache file if you give it the
  2680. # --recheck option to rerun configure.
  2681. #
  2682. EOF
  2683. # The following way of writing the cache mishandles newlines in values,
  2684. # but we know of no workaround that is simple, portable, and efficient.
  2685. # So, don't put newlines in cache variables' values.
  2686. # Ultrix sh set writes to stderr and can't be redirected directly,
  2687. # and sets the high bit in the cache file unless we assign to the vars.
  2688. (set) 2>&1 |
  2689. case `(ac_space=' '; set | grep ac_space) 2>&1` in
  2690. *ac_space=\ *)
  2691. # `set' does not quote correctly, so add quotes (double-quote substitution
  2692. # turns \\\\ into \\, and sed turns \\ into \).
  2693. sed -n \
  2694. -e "s/'/'\\\\''/g" \
  2695. -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  2696. ;;
  2697. *)
  2698. # `set' quotes correctly as required by POSIX, so do not add quotes.
  2699. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  2700. ;;
  2701. esac >> confcache
  2702. if cmp -s $cache_file confcache; then
  2703. :
  2704. else
  2705. if test -w $cache_file; then
  2706. echo "updating cache $cache_file"
  2707. cat confcache > $cache_file
  2708. else
  2709. echo "not updating unwritable cache $cache_file"
  2710. fi
  2711. fi
  2712. rm -f confcache
  2713. exit 0
  2714. # Local Variables:
  2715. # mode:shell-script
  2716. # sh-indentation:2
  2717. # End: