PageRenderTime 64ms CodeModel.GetById 27ms RepoModel.GetById 0ms app.codeStats 1ms

/tags/dev-20000131/FreeSpeech/vflow/ltconfig

#
Shell | 2033 lines | 1574 code | 185 blank | 274 comment | 193 complexity | fb4af83714ea4dc74629df4f4242da10 MD5 | raw file
Possible License(s): LGPL-2.0, GPL-2.0, LGPL-2.1

Large files files are truncated, but you can click here to view the full file

  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 "${CDPATH+set}" = set; 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.3
  156. TIMESTAMP=" (1.385.2.181 1999/07/02 15:49:11)"
  157. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
  158. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $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 "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  324. if test "${LANG+set}" = set; 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. # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
  392. case "$host_os" in
  393. linux-gnu*) ;;
  394. linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
  395. esac
  396. host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
  397. host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
  398. host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
  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 "${COLLECT_NAMES+set}" != set; 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*)
  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*)
  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 $LD --help 2>&1 | egrep ': supported targets:.* 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*)
  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. whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  1113. ;;
  1114. esac
  1115. fi
  1116. else
  1117. # PORTME fill in a description of your system's linker (not GNU ld)
  1118. case "$host_os" in
  1119. aix3*)
  1120. allow_undefined_flag=unsupported
  1121. always_export_symbols=yes
  1122. archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
  1123. # Note: this linker hardcodes the directories in LIBPATH if there
  1124. # are no directories specified by -L.
  1125. hardcode_minus_L=yes
  1126. if test "$with_gcc" = yes && test -z "$link_static_flag"; then
  1127. # Neither direct hardcoding nor static linking is supported with a
  1128. # broken collect2.
  1129. hardcode_direct=unsupported
  1130. fi
  1131. ;;
  1132. aix4*)
  1133. hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
  1134. hardcode_libdir_separator=':'
  1135. if test "$with_gcc" = yes; then
  1136. collect2name=`${CC} -print-prog-name=collect2`
  1137. if test -f "$collect2name" && \
  1138. strings "$collect2name" | grep resolve_lib_name >/dev/null
  1139. then
  1140. # We have reworked collect2
  1141. hardcode_direct=yes
  1142. else
  1143. # We have old collect2
  1144. hardcode_direct=unsupported
  1145. # It fails to find uninstalled libraries when the uninstalled
  1146. # path is not listed in the libpath. Setting hardcode_minus_L
  1147. # to unsupported forces relinking
  1148. hardcode_minus_L=yes
  1149. hardcode_libdir_flag_spec='-L$libdir'
  1150. hardcode_libdir_separator=
  1151. fi
  1152. shared_flag='-shared'
  1153. else
  1154. shared_flag='${wl}-bM:SRE'
  1155. hardcode_direct=yes
  1156. fi
  1157. allow_undefined_flag=' ${wl}-berok'
  1158. archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
  1159. archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
  1160. case "$host_os" in aix4.[01]|aix4.[01].*)
  1161. # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
  1162. always_export_symbols=yes ;;
  1163. esac
  1164. ;;
  1165. amigaos*)
  1166. 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)'
  1167. hardcode_libdir_flag_spec='-L$libdir'
  1168. hardcode_minus_L=yes
  1169. # see comment about different semantics on the GNU ld section
  1170. ld_shlibs=no
  1171. ;;
  1172. cygwin* | mingw*)
  1173. # When not using gcc, we currently assume that we are using
  1174. # Microsoft Visual C++.
  1175. # hardcode_libdir_flag_spec is actually meaningless, as there is
  1176. # no search path for DLLs.
  1177. hardcode_libdir_flag_spec=' '
  1178. allow_undefined_flag=unsupported
  1179. # Tell ltmain to make .lib files, not .a files.
  1180. libext=lib
  1181. # FIXME: Setting linknames here is a bad hack.
  1182. archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
  1183. # The linker will automatically build a .lib file if we build a DLL.
  1184. old_archive_from_new_cmds='true'
  1185. # FIXME: Should let the user specify the lib program.
  1186. old_archive_cmds='lib /OUT:$oldlib$oldobjs'
  1187. fix_srcfile_path='`cygpath -w $srcfile`'
  1188. ;;
  1189. freebsd1*)
  1190. ld_shlibs=no
  1191. ;;
  1192. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  1193. # support. Future versions do this automatically, but an explicit c++rt0.o
  1194. # does not break anything, and helps significantly (at the cost of a little
  1195. # extra space).
  1196. freebsd2.2*)
  1197. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o'
  1198. hardcode_libdir_flag_spec='-R$libdir'
  1199. hardcode_direct=yes
  1200. hardcode_shlibpath_var=no
  1201. ;;
  1202. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  1203. freebsd2*)
  1204. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
  1205. hardcode_direct=yes
  1206. hardcode_minus_L=yes
  1207. hardcode_shlibpath_var=no
  1208. ;;
  1209. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  1210. freebsd*)
  1211. archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts'
  1212. hardcode_libdir_flag_spec='-R$libdir'
  1213. hardcode_direct=yes
  1214. hardcode_shlibpath_var=no
  1215. ;;
  1216. hpux9* | hpux10* | hpux11*)
  1217. case "$host_os" in
  1218. 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' ;;
  1219. *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;;
  1220. esac
  1221. hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
  1222. hardcode_libdir_separator=:
  1223. hardcode_direct=yes
  1224. hardcode_minus_L=yes # Not in the search PATH, but as the default
  1225. # location of the library.
  1226. export_dynamic_flag_spec='${wl}-E'
  1227. ;;
  1228. irix5* | irix6*)
  1229. if test "$with_gcc" = yes; then
  1230. 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'
  1231. else
  1232. archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
  1233. fi
  1234. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  1235. hardcode_libdir_separator=:
  1236. ;;
  1237. netbsd*)
  1238. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  1239. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out
  1240. else
  1241. archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF
  1242. fi
  1243. hardcode_libdir_flag_spec='${wl}-R$libdir'
  1244. hardcode_direct=yes
  1245. hardcode_shlibpath_var=no
  1246. ;;
  1247. openbsd*)
  1248. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
  1249. hardcode_libdir_flag_spec='-R$libdir'
  1250. hardcode_direct=yes
  1251. hardcode_shlibpath_var=no
  1252. ;;
  1253. os2*)
  1254. hardcode_libdir_flag_spec='-L$libdir'
  1255. hardcode_minus_L=yes
  1256. allow_undefined_flag=unsupported
  1257. 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'
  1258. old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
  1259. ;;
  1260. osf3* | osf4*)
  1261. if test "$with_gcc" = yes; then
  1262. allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
  1263. 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'
  1264. else
  1265. allow_undefined_flag=' -expect_unresolved \*'
  1266. 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'
  1267. fi
  1268. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  1269. hardcode_libdir_separator=:
  1270. ;;
  1271. sco3.2v5*)
  1272. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1273. hardcode_shlibpath_var=no
  1274. runpath_var=LD_RUN_PATH
  1275. hardcode_runpath_var=yes
  1276. ;;
  1277. solaris*)
  1278. no_undefined_flag=' -z text'
  1279. # $CC -shared without GNU ld will not create a library from C++
  1280. # object files and a static libstdc++, better avoid it by now
  1281. archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts'
  1282. archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  1283. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp'
  1284. hardcode_libdir_flag_spec='-R$libdir'
  1285. hardcode_shlibpath_var=no
  1286. case "$host_os" in
  1287. solaris2.[0-5] | solaris2.[0-5].*) ;;
  1288. *) # Supported since Solaris 2.6 (maybe 2.5.1?)
  1289. whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
  1290. esac
  1291. ;;
  1292. sunos4*)
  1293. archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts'
  1294. hardcode_libdir_flag_spec='-L$libdir'
  1295. hardcode_direct=yes
  1296. hardcode_minus_L=yes
  1297. hardcode_shlibpath_var=no
  1298. ;;
  1299. sysv4)
  1300. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1301. runpath_var='LD_RUN_PATH'
  1302. hardcode_shlibpath_var=no
  1303. hardcode_direct=no #Motorola manual says yes, but my tests say they lie
  1304. ;;
  1305. sysv4.3*)
  1306. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1307. hardcode_shlibpath_var=no
  1308. export_dynamic_flag_spec='-Bexport'
  1309. ;;
  1310. uts4*)
  1311. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1312. hardcode_libdir_flag_spec='-L$libdir'
  1313. hardcode_shlibpath_var=no
  1314. ;;
  1315. dgux*)
  1316. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
  1317. hardcode_libdir_flag_spec='-L$libdir'
  1318. hardcode_shlibpath_var=no
  1319. ;;
  1320. sysv4*MP*)
  1321. if test -d /usr/nec ;then
  1322. # archive_cmds='$LD -G -z text -h $soname -o $lib$libobjs$deplibs'
  1323. archive_cmds='$LD -G -h $soname -o $lib$libobjs$deplibs'
  1324. hardcode_shlibpath_var=no
  1325. runpath_var=LD_RUN_PATH
  1326. hardcode_runpath_var=yes
  1327. ld_shlibs=yes
  1328. fi
  1329. ;;
  1330. *)
  1331. ld_shlibs=no
  1332. ;;
  1333. esac
  1334. fi
  1335. echo "$ac_t$ld_shlibs" 1>&6
  1336. test "$ld_shlibs" = no && can_build_shared=no
  1337. if test -z "$NM"; then
  1338. echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
  1339. case "$NM" in
  1340. [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path.
  1341. *)
  1342. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
  1343. for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do
  1344. test -z "$ac_dir" && ac_dir=.
  1345. if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then
  1346. # Check to see if the nm accepts a BSD-compat flag.
  1347. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  1348. # nm: unknown option "B" ignored
  1349. if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
  1350. NM="$ac_dir/nm -B"
  1351. break
  1352. elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
  1353. NM="$ac_dir/nm -p"
  1354. break
  1355. else
  1356. NM=${NM="$ac_dir/nm"} # keep the first match, but
  1357. continue # so that we can try to find one that supports BSD flags
  1358. fi
  1359. fi
  1360. done
  1361. IFS="$ac_save_ifs"
  1362. test -z "$NM" && NM=nm
  1363. ;;
  1364. esac
  1365. echo "$ac_t$NM" 1>&6
  1366. fi
  1367. # Check for command to grab the raw symbol name followed by C symbol from nm.
  1368. echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
  1369. # These are sane defaults that work on at least a few old systems.
  1370. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  1371. # Character class describing NM global symbol codes.
  1372. symcode='[BCDEGRST]'
  1373. # Regexp to match symbols that can be accessed directly from C.
  1374. sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
  1375. # Transform the above into a raw symbol and a C symbol.
  1376. symxfrm='\1 \2\3 \3'
  1377. # Transform an extracted symbol line into a proper C declaration
  1378. global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
  1379. # Define system-specific variables.
  1380. case "$host_os" in
  1381. aix*)
  1382. symcode=…

Large files files are truncated, but you can click here to view the full file