root/tags/forwarder-0_51/email/ltconfig

Revision 652, 96.2 kB (checked in by dwalker, 9 years ago)

use libtool/automake

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1#! /bin/sh
2
3# ltconfig - Create a system-specific libtool.
4# Copyright (C) 1996-1999 Free Software Foundation, Inc.
5# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6#
7# This file is free software; you can redistribute it and/or modify it
8# under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2 of the License, or
10# (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful, but
13# WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15# General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20#
21# As a special exception to the GNU General Public License, if you
22# distribute this file as part of a program that contains a
23# configuration script generated by Autoconf, you may include it under
24# the same distribution terms that you use for the rest of that program.
25
26# A lot of this script is taken from autoconf-2.10.
27
28# Check that we are running under the correct shell.
29SHELL=${CONFIG_SHELL-/bin/sh}
30echo=echo
31if test "X$1" = X--no-reexec; then
32  # Discard the --no-reexec flag, and continue.
33  shift
34elif test "X$1" = X--fallback-echo; then
35  # Avoid inline document here, it may be left over
36  :
37elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
38  # Yippee, $echo works!
39  :
40else
41  # Restart under the correct shell.
42  exec "$SHELL" "$0" --no-reexec ${1+"$@"}
43fi
44
45if test "X$1" = X--fallback-echo; then
46  # used as fallback echo
47  shift
48  cat <<EOF
49$*
50EOF
51  exit 0
52fi
53
54# Find the correct PATH separator.  Usually this is `:', but
55# DJGPP uses `;' like DOS.
56if test "X${PATH_SEPARATOR+set}" != Xset; then
57  UNAME=${UNAME-`uname 2>/dev/null`}
58  case X$UNAME in
59    *-DOS) PATH_SEPARATOR=';' ;;
60    *)     PATH_SEPARATOR=':' ;;
61  esac
62fi
63
64# The HP-UX ksh and POSIX shell print the target directory to stdout
65# if CDPATH is set.
66if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
67
68if test "X${echo_test_string+set}" != Xset; then
69  # find a string as large as possible, as long as the shell can cope with it
70  for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
71    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
72    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
73       echo_test_string="`eval $cmd`" &&
74       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then
75      break
76    fi
77  done
78fi
79
80if test "X`($echo '\t') 2>/dev/null`" != 'X\t' ||
81   test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then
82  # The Solaris, AIX, and Digital Unix default echo programs unquote
83  # backslashes.  This makes it impossible to quote backslashes using
84  #   echo "$something" | sed 's/\\/\\\\/g'
85  #
86  # So, first we look for a working echo in the user's PATH.
87
88  IFS="${IFS=   }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
89  for dir in $PATH /usr/ucb; do
90    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
91       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
92       test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
93      echo="$dir/echo"
94      break
95    fi
96  done
97  IFS="$save_ifs"
98
99  if test "X$echo" = Xecho; then
100    # We didn't find a better echo, so look for alternatives.
101    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
102       test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
103      # This shell has a builtin print -r that does the trick.
104      echo='print -r'
105    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
106     test "X$CONFIG_SHELL" != X/bin/ksh; then
107      # If we have ksh, try running ltconfig again with it.
108      ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
109      export ORIGINAL_CONFIG_SHELL
110      CONFIG_SHELL=/bin/ksh
111      export CONFIG_SHELL
112      exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
113    else
114      # Try using printf.
115      echo='printf "%s\n"'
116      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
117     test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
118    # Cool, printf works
119    :
120      elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
121       test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
122    CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL"
123    export CONFIG_SHELL
124    SHELL="$CONFIG_SHELL"
125    export SHELL
126    echo="$CONFIG_SHELL $0 --fallback-echo"
127      elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' &&
128       test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then
129    echo="$CONFIG_SHELL $0 --fallback-echo"
130      else
131    # maybe with a smaller string...
132    prev=:
133
134    for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
135      if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then
136        break
137      fi
138      prev="$cmd"
139    done
140
141    if test "$prev" != 'sed 50q "$0"'; then
142      echo_test_string=`eval $prev`
143      export echo_test_string
144      exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"}
145    else
146      # Oops.  We lost completely, so just stick with echo.
147      echo=echo
148    fi
149      fi
150    fi
151  fi
152fi
153
154# Sed substitution that helps us do robust quoting.  It backslashifies
155# metacharacters that are still active within double-quoted strings.
156Xsed='sed -e s/^X//'
157sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
158
159# Same as above, but do not quote variable references.
160double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
161
162# Sed substitution to delay expansion of an escaped shell variable in a
163# double_quote_subst'ed string.
164delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
165
166# The name of this program.
167progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
168
169# Constants:
170PROGRAM=ltconfig
171PACKAGE=libtool
172VERSION=1.3c
173TIMESTAMP=" (1.618 1999/10/04 14:44:15)"
174ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
175ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
176rm="rm -f"
177
178help="Try \`$progname --help' for more information."
179
180# Global variables:
181default_ofile=libtool
182can_build_shared=yes
183enable_shared=yes
184# All known linkers require a `.a' archive for static linking (except M$VC,
185# which needs '.lib').
186enable_static=yes
187enable_fast_install=yes
188enable_dlopen=unknown
189enable_win32_dll=no
190pic_mode=default
191ltmain=
192silent=
193srcdir=
194ac_config_guess=
195ac_config_sub=
196host=
197build=NONE
198nonopt=NONE
199ofile="$default_ofile"
200verify_host=yes
201with_gcc=no
202with_gnu_ld=no
203need_locks=yes
204ac_ext=c
205objext=o
206libext=a
207exeext=
208cache_file=
209
210old_AR="$AR"
211old_CC="$CC"
212old_CFLAGS="$CFLAGS"
213old_CPPFLAGS="$CPPFLAGS"
214old_LDFLAGS="$LDFLAGS"
215old_LD="$LD"
216old_LN_S="$LN_S"
217old_LIBS="$LIBS"
218old_NM="$NM"
219old_RANLIB="$RANLIB"
220old_DLLTOOL="$DLLTOOL"
221old_OBJDUMP="$OBJDUMP"
222old_AS="$AS"
223
224# Parse the command line options.
225args=
226prev=
227for option
228do
229  case "$option" in
230  -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
231  *) optarg= ;;
232  esac
233
234  # If the previous option needs an argument, assign it.
235  if test -n "$prev"; then
236    eval "$prev=\$option"
237    prev=
238    continue
239  fi
240
241  case "$option" in
242  --help) cat <<EOM
243Usage: $progname [OPTION]... [HOST [LTMAIN]]
244
245Generate a system-specific libtool script.
246
247    --build                configure for building on BUILD [BUILD=HOST]
248    --debug                enable verbose shell tracing
249    --disable-shared       do not build shared libraries
250    --disable-static       do not build static libraries
251    --disable-fast-install do not optimize for fast installation
252    --enable-dlopen        enable dlopen support
253    --enable-win32-dll     enable building dlls on win32 hosts
254    --help                 display this help and exit
255    --no-verify            do not verify that HOST is a valid host type
256-o, --output=FILE          specify the output file [default=$default_ofile]
257    --quiet                same as \`--silent'
258    --silent               do not print informational messages
259    --srcdir=DIR           find \`config.guess' in DIR
260    --version              output version information and exit
261    --with-gcc             assume that the GNU C compiler will be used
262    --with-gnu-ld          assume that the C compiler uses the GNU linker
263    --prefer-pic           try to use only PIC objects
264    --prefer-non-pic       try to use only non-PIC objects
265    --disable-lock         disable file locking
266    --cache-file=FILE      configure cache file
267
268LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
269that provides basic libtool functionality.
270
271HOST is the canonical host system name [default=guessed].
272EOM
273  exit 0
274  ;;
275
276  --build) prev=build ;;
277  --build=*) build="$optarg" ;;
278
279  --debug)
280    echo "$progname: enabling shell trace mode"
281    set -x
282    ;;
283
284  --disable-shared) enable_shared=no ;;
285
286  --disable-static) enable_static=no ;;
287
288  --disable-fast-install) enable_fast_install=no ;;
289
290  --enable-dlopen) enable_dlopen=yes ;;
291
292  --enable-win32-dll) enable_win32_dll=yes ;;
293
294  --quiet | --silent) silent=yes ;;
295
296  --srcdir) prev=srcdir ;;
297  --srcdir=*) srcdir="$optarg" ;;
298
299  --no-verify) verify_host=no ;;
300
301  --output | -o) prev=ofile ;;
302  --output=*) ofile="$optarg" ;;
303
304  --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
305
306  --with-gcc) with_gcc=yes ;;
307  --with-gnu-ld) with_gnu_ld=yes ;;
308
309  --prefer-pic) pic_mode=yes ;;
310  --prefer-non-pic) pic_mode=no ;;
311
312  --disable-lock) need_locks=no ;;
313
314  --cache-file=*) cache_file="$optarg" ;;
315
316  -*)
317    echo "$progname: unrecognized option \`$option'" 1>&2
318    echo "$help" 1>&2
319    exit 1
320    ;;
321
322  *)
323    if test -z "$ltmain"; then
324      ltmain="$option"
325    elif test -z "$host"; then
326# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
327#      if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
328#        echo "$progname: warning \`$option' is not a valid host type" 1>&2
329#      fi
330      host="$option"
331    else
332      echo "$progname: too many arguments" 1>&2
333      echo "$help" 1>&2
334      exit 1
335    fi ;;
336  esac
337done
338
339if test -z "$ltmain"; then
340  echo "$progname: you must specify a LTMAIN file" 1>&2
341  echo "$help" 1>&2
342  exit 1
343fi
344
345if test ! -f "$ltmain"; then
346  echo "$progname: \`$ltmain' does not exist" 1>&2
347  echo "$help" 1>&2
348  exit 1
349fi
350
351# Quote any args containing shell metacharacters.
352ltconfig_args=
353for arg
354do
355  case "$arg" in
356  *" "*|*"  "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
357  ltconfig_args="$ltconfig_args '$arg'" ;;
358  *) ltconfig_args="$ltconfig_args $arg" ;;
359  esac
360done
361
362# A relevant subset of AC_INIT.
363
364# File descriptor usage:
365# 0 standard input
366# 1 file creation
367# 2 errors and warnings
368# 3 some systems may open it to /dev/tty
369# 4 used on the Kubota Titan
370# 5 compiler messages saved in config.log
371# 6 checking for... messages and results
372if test "$silent" = yes; then
373  exec 6>/dev/null
374else
375  exec 6>&1
376fi
377exec 5>>./config.log
378
379# NLS nuisances.
380# Only set LANG and LC_ALL to C if already set.
381# These must not be set unconditionally because not all systems understand
382# e.g. LANG=C (notably SCO).
383if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
384if test "X${LANG+set}"   = Xset; then LANG=C;   export LANG;   fi
385
386if test -n "$cache_file" && test -r "$cache_file"; then
387  echo "loading cache $cache_file within ltconfig"
388  . $cache_file
389fi
390
391if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
392  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
393  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
394    ac_n= ac_c='
395' ac_t='    '
396  else
397    ac_n=-n ac_c= ac_t=
398  fi
399else
400  ac_n= ac_c='\c' ac_t=
401fi
402
403if test -z "$srcdir"; then
404  # Assume the source directory is the same one as the path to LTMAIN.
405  srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
406  test "$srcdir" = "$ltmain" && srcdir=.
407fi
408
409trap "$rm conftest*; exit 1" 1 2 15
410if test "$verify_host" = yes; then
411  # Check for config.guess and config.sub.
412  ac_aux_dir=
413  for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
414    if test -f $ac_dir/config.guess; then
415      ac_aux_dir=$ac_dir
416      break
417    fi
418  done
419  if test -z "$ac_aux_dir"; then
420    echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
421    echo "$help" 1>&2
422    exit 1
423  fi
424  ac_config_guess=$ac_aux_dir/config.guess
425  ac_config_sub=$ac_aux_dir/config.sub
426
427  # Make sure we can run config.sub.
428  if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
429  else
430    echo "$progname: cannot run $ac_config_sub" 1>&2
431    echo "$help" 1>&2
432    exit 1
433  fi
434
435  echo $ac_n "checking host system type""... $ac_c" 1>&6
436
437  host_alias=$host
438  case "$host_alias" in
439  "")
440    if host_alias=`$SHELL $ac_config_guess`; then :
441    else
442      echo "$progname: cannot guess host type; you must specify one" 1>&2
443      echo "$help" 1>&2
444      exit 1
445    fi ;;
446  esac
447  host=`$SHELL $ac_config_sub $host_alias`
448  echo "$ac_t$host" 1>&6
449
450  # Make sure the host verified.
451  test -z "$host" && exit 1
452
453  # Check for the build system type
454  echo $ac_n "checking build system type... $ac_c" 1>&6
455
456  build_alias=$build
457  case "$build_alias" in
458  NONE)
459    case $nonopt in
460    NONE) build_alias=$host_alias ;;
461    *) build_alias=$nonopt ;;
462    esac ;;
463  esac
464
465  build=`$SHELL $ac_config_sub $build_alias`
466  build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
467  build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
468  build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
469  echo "$ac_t""$build" 1>&6
470
471elif test -z "$host"; then
472  echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
473  echo "$help" 1>&2
474  exit 1
475else
476  host_alias=$host
477  build_alias=$host_alias
478  build=$host
479fi
480
481if test x"$host" != x"$build"; then
482  ac_tool_prefix=${host_alias}-
483else
484  ac_tool_prefix=
485fi
486
487# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
488case "$host_os" in
489linux-gnu*) ;;
490linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
491esac
492
493host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
494host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
495host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
496
497case "$host_os" in
498aix3*)
499  # AIX sometimes has problems with the GCC collect2 program.  For some
500  # reason, if we set the COLLECT_NAMES environment variable, the problems
501  # vanish in a puff of smoke.
502  if test "X${COLLECT_NAMES+set}" != Xset; then
503    COLLECT_NAMES=
504    export COLLECT_NAMES
505  fi
506  ;;
507esac
508
509# Determine commands to create old-style static archives.
510old_archive_cmds='$AR cru $oldlib$oldobjs'
511old_postinstall_cmds='chmod 644 $oldlib'
512old_postuninstall_cmds=
513
514# Set sane defaults for various commands
515#   -- these are usually overridden from the command line by make
516test -z "$AR" && AR=ar
517test -z "$AS" && AS=
518test -z "$DLLTOOL" && DLLTOOL=
519test -z "$LN_S" && LN_S=ln -s
520test -z "$NM" && NM=/usr/bin/nm -B
521test -z "$OBJDUMP" && OBJDUMP=
522test -z "$RANLIB" && RANLIB=ranlib
523
524# Commands probed in libtool.m4
525#   -- let the user override the result from configure
526test -z "$CC" && CC=gcc
527test -z "$FILE" && FILE=@FILE@
528test -z "$LD" && LD=/usr/i486-linux/bin/ld
529test -z "$STRIP" && STRIP=strip
530
531# Other config vars probed in libtool.m4
532test -z "$with_gcc" && with_gcc=yes
533test -z "$with_gnu_ld" && with_gnu_ld=yes
534objext=o
535exeext=
536
537echo $ac_n "checking for objdir... $ac_c" 1>&6
538rm -f .libs 2>/dev/null
539mkdir .libs 2>/dev/null
540if test -d .libs; then
541  objdir=.libs
542else
543  # MS-DOS does not allow filenames that begin with a dot.
544  objdir=_libs
545fi
546rmdir .libs 2>/dev/null
547echo "$ac_t$objdir" 1>&6
548
549# Allow CC to be a program name with arguments.
550set dummy $CC
551compiler="$2"
552
553# We assume here that the value for ac_cv_prog_cc_pic will not be cached
554# in isolation, and that seeing it set (from the cache) indicates that
555# the associated values are set (in the cache) correctly too.
556echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
557echo "$progname:557:checking for $compiler option to produce PIC" 1>&5
558if test "X${ac_cv_prog_cc_pic+set}" = Xset; then
559  echo $ac_n "(cached) $ac_c" 1>&6
560else
561  ac_cv_prog_cc_pic=
562  ac_cv_prog_cc_shlib=
563  ac_cv_prog_cc_wl=
564  ac_cv_prog_cc_static=
565  ac_cv_prog_cc_no_builtin=
566  ac_cv_prog_cc_can_build_shared=$can_build_shared
567
568  if test "$with_gcc" = yes; then
569    ac_cv_prog_cc_wl='-Wl,'
570    ac_cv_prog_cc_static='-static'
571
572    case "$host_os" in
573    beos* | irix5* | irix6* | osf3* | osf4*)
574      # PIC is the default for these OSes.
575      ;;
576    aix*)
577      # Below there is a dirty hack to force normal static linking with -ldl
578      # The problem is because libdl dynamically linked with both libc and
579      # libC (AIX C++ library), which obviously doesn't included in libraries
580      # list by gcc. This cause undefined symbols with -static flags.
581      # This hack allows C programs to be linked with "-static -ldl", but
582      # we not sure about C++ programs.
583      ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
584      ;;
585    cygwin* | mingw* | os2*)
586      # This hack is so that the source file can tell whether it is being
587      # built for inclusion in a dll (and should export symbols for example).
588      ac_cv_prog_cc_pic='-DDLL_EXPORT'
589      ;;
590    amigaos*)
591      # FIXME: we need at least 68020 code to build shared libraries, but
592      # adding the `-m68020' flag to GCC prevents building anything better,
593      # like `-m68040'.
594      ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
595      ;;
596    sysv4*MP*)
597      if test -d /usr/nec; then
598     ac_cv_prog_cc_pic=-Kconform_pic
599      fi
600      ;;
601    *)
602      ac_cv_prog_cc_pic='-fPIC'
603      ;;
604    esac
605  else
606    # PORTME Check for PIC flags for the system compiler.
607    case "$host_os" in
608    aix3* | aix4*)
609     # All AIX code is PIC.
610      ac_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
611      ;;
612
613    hpux9* | hpux10* | hpux11*)
614      # Is there a better ac_cv_prog_cc_static that works with the bundled CC?
615      ac_cv_prog_cc_wl='-Wl,'
616      ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
617      ac_cv_prog_cc_pic='+Z'
618      ;;
619
620    irix5* | irix6*)
621      ac_cv_prog_cc_wl='-Wl,'
622      ac_cv_prog_cc_static='-non_shared'
623      # PIC (with -KPIC) is the default.
624      ;;
625
626    cygwin* | mingw* | os2*)
627      # This hack is so that the source file can tell whether it is being
628      # built for inclusion in a dll (and should export symbols for example).
629      ac_cv_prog_cc_pic='-DDLL_EXPORT'
630      ;;
631
632    osf3* | osf4*)
633      # All OSF/1 code is PIC.
634      ac_cv_prog_cc_wl='-Wl,'
635      ac_cv_prog_cc_static='-non_shared'
636      ;;
637
638    sco3.2v5*)
639      ac_cv_prog_cc_pic='-Kpic'
640      ac_cv_prog_cc_static='-dn'
641      ac_cv_prog_cc_shlib='-belf'
642      ;;
643
644    solaris*)
645      ac_cv_prog_cc_pic='-KPIC'
646      ac_cv_prog_cc_static='-Bstatic'
647      ac_cv_prog_cc_wl='-Wl,'
648      ;;
649
650    sunos4*)
651      ac_cv_prog_cc_pic='-PIC'
652      ac_cv_prog_cc_static='-Bstatic'
653      ac_cv_prog_cc_wl='-Qoption ld '
654      ;;
655
656    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
657      ac_cv_prog_cc_pic='-KPIC'
658      ac_cv_prog_cc_static='-Bstatic'
659      ac_cv_prog_cc_wl='-Wl,'
660      ;;
661
662    uts4*)
663      ac_cv_prog_cc_pic='-pic'
664      ac_cv_prog_cc_static='-Bstatic'
665      ;;
666
667    sysv4*MP*)
668      if test -d /usr/nec ;then
669    ac_cv_prog_cc_pic='-Kconform_pic'
670    ac_cv_prog_cc_static='-Bstatic'
671      fi
672      ;;
673
674    *)
675      ac_cv_prog_cc_can_build_shared=no
676      ;;
677    esac
678  fi
679fi
680if test -z "$ac_cv_prog_cc_pic"; then
681  echo "$ac_t"none 1>&6
682else 
683  echo "$ac_t""$ac_cv_prog_cc_pic" 1>&6
684
685  # Check to make sure the pic_flag actually works.
686  echo $ac_n "checking if $compiler PIC flag $ac_cv_prog_cc_pic works... $ac_c" 1>&6
687  echo "$progname:687:checking that $compiler PIC flag $ac_cv_prog_cc_pic works." 1>&5
688  if test "X${ac_cv_prog_cc_pic_works+set}" = Xset; then
689    echo $ac_n "(cached) $ac_c" 1>&6
690  else
691    ac_cv_prog_cc_pic_works=yes
692    $rm conftest*
693    echo "int some_variable = 0;" > conftest.c
694    save_CFLAGS="$CFLAGS"
695    CFLAGS="$CFLAGS $ac_cv_prog_cc_pic -DPIC"
696    if { (eval echo $progname:696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
697      # Append any warnings to the config.log.
698      cat conftest.err 1>&5
699   
700      case "$host_os" in
701      hpux9* | hpux10* | hpux11*)
702    # On HP-UX, both CC and GCC only warn that PIC is supported... then
703    # they create non-PIC objects.  So, if there were any warnings, we
704    # assume that PIC is not supported.
705    if test -s conftest.err; then
706      ac_cv_prog_cc_pic_works=no
707      ac_cv_prog_cc_can_build_shared=no
708      ac_cv_prog_cc_pic=
709    else
710      ac_cv_prog_cc_pic_works=yes
711      ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic"
712    fi
713    ;;
714      *)
715    ac_cv_prog_cc_pic_works=yes
716    ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic"
717    ;;
718      esac
719    else
720      # Append any errors to the config.log.
721      cat conftest.err 1>&5
722      ac_cv_prog_cc_pic_works=no
723      ac_cv_prog_cc_can_build_shared=no
724      ac_cv_prog_cc_pic=
725    fi
726    CFLAGS="$save_CFLAGS"
727    $rm conftest*
728  fi
729  # Belt *and* braces to stop my trousers falling down:
730  if test "X$ac_cv_prog_cc_pic_works" = Xno; then
731    ac_cv_prog_cc_pic=
732    ac_cv_prog_cc_can_build_shared=no
733  fi
734  echo "$ac_t""$ac_cv_prog_cc_pic_works" 1>&6
735fi
736
737# Check for any special shared library compilation flags.
738if test -n "$ac_cv_prog_cc_shlib"; then
739  echo "$progname: warning: \`$CC' requires \`$ac_cv_prog_cc_shlib' to build shared libraries" 1>&2
740  if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$ac_cv_prog_cc_shlib[  ]" >/dev/null; then :
741  else
742    echo "$progname: add \`$ac_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
743    ac_cv_prog_cc_can_build_shared=no
744  fi
745fi
746
747echo $ac_n "checking if $compiler static flag $ac_cv_prog_cc_static works... $ac_c" 1>&6
748echo "$progname:748: checking if $compiler static flag $ac_cv_prog_cc_static works" >&5
749if test "X${ac_cv_prog_cc_static_works+set}" = Xset; then
750  echo $ac_n "(cached) $ac_c" 1>&6
751else
752  $rm conftest*
753  echo 'main(){return(0);}' > conftest.c
754  save_LDFLAGS="$LDFLAGS"
755  LDFLAGS="$LDFLAGS $ac_cv_prog_cc_static"
756  if { (eval echo $progname:756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
757    ac_cv_prog_cc_static_works=yes
758  else
759    ac_cv_prog_cc_static_works=no
760    ac_cv_prog_cc_static=
761  fi
762  LDFLAGS="$save_LDFLAGS"
763  $rm conftest*
764fi
765# Belt *and* braces to stop my trousers falling down:
766if test "X$ac_cv_prog_cc_static_works" = Xno; then
767  ac_cv_prog_cc_static=
768fi
769echo "$ac_t""$ac_cv_prog_cc_static_works" 1>&6
770pic_flag="$ac_cv_prog_cc_pic"
771special_shlib_compile_flags="$ac_cv_prog_cc_shlib"
772wl="$ac_cv_prog_cc_wl"
773link_static_flag="$ac_cv_prog_cc_static"
774no_builtin_flag="$ac_cv_prog_cc_no_builtin"
775can_build_shared="$ac_cv_prog_cc_can_build_shared"
776
777# Check to see if options -o and -c are simultaneously supported by compiler
778echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6
779$rm -r conftest 2>/dev/null
780mkdir conftest
781cd conftest
782$rm conftest*
783echo "int some_variable = 0;" > conftest.c
784mkdir out
785# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
786# that will create temporary files in the current directory regardless of
787# the output directory.  Thus, making CWD read-only will cause this test
788# to fail, enabling locking or at least warning the user not to do parallel
789# builds.
790chmod -w .
791save_CFLAGS="$CFLAGS"
792CFLAGS="$CFLAGS -o out/conftest2.o"
793echo "$progname:793: checking if $compiler supports -c -o file.o" >&5
794if { (eval echo $progname:794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
795
796  # The compiler can only warn and ignore the option if not recognized
797  # So say no if there are warnings
798    if test -s out/conftest.err; then
799      echo "$ac_t"no 1>&6
800      compiler_c_o=no
801    else
802      echo "$ac_t"yes 1>&6
803      compiler_c_o=yes
804    fi
805else
806  # Append any errors to the config.log.
807  cat out/conftest.err 1>&5
808  compiler_c_o=no
809  echo "$ac_t"no 1>&6
810fi
811CFLAGS="$save_CFLAGS"
812chmod u+w .
813$rm conftest* out/*
814rmdir out
815cd ..
816rmdir conftest
817$rm -r conftest 2>/dev/null
818
819if test x"$compiler_c_o" = x"yes"; then
820  # Check to see if we can write to a .lo
821  echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6
822  $rm conftest*
823  echo "int some_variable = 0;" > conftest.c
824  save_CFLAGS="$CFLAGS"
825  CFLAGS="$CFLAGS -c -o conftest.lo"
826  echo "$progname:826: checking if $compiler supports -c -o file.lo" >&5
827if { (eval echo $progname:827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
828
829    # The compiler can only warn and ignore the option if not recognized
830    # So say no if there are warnings
831      if test -s conftest.err; then
832    echo "$ac_t"no 1>&6
833    compiler_o_lo=no
834      else
835    echo "$ac_t"yes 1>&6
836    compiler_o_lo=yes
837      fi
838  else
839    # Append any errors to the config.log.
840    cat conftest.err 1>&5
841    compiler_o_lo=no
842    echo "$ac_t"no 1>&6
843  fi
844  CFLAGS="$save_CFLAGS"
845  $rm conftest*
846else
847  compiler_o_lo=no
848fi
849
850# Check to see if we can do hard links to lock some files if needed
851hard_links="nottested"
852if test "$compiler_c_o" = no && test "$need_locks" != no; then
853  # do not overwrite the value of need_locks provided by the user
854  echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
855  hard_links=yes
856  $rm conftest*
857  ln conftest.a conftest.b 2>/dev/null && hard_links=no
858  touch conftest.a
859  ln conftest.a conftest.b 2>&5 || hard_links=no
860  ln conftest.a conftest.b 2>/dev/null && hard_links=no
861  echo "$ac_t$hard_links" 1>&6
862  $rm conftest*
863  if test "$hard_links" = no; then
864    echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
865    need_locks=warn
866  fi
867else
868  need_locks=no
869fi
870
871if test "$with_gcc" = yes; then
872  # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
873  echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
874  $rm conftest*
875  echo "int some_variable = 0;" > conftest.c
876  save_CFLAGS="$CFLAGS"
877  CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
878  echo "$progname:878: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
879  if { (eval echo $progname:879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
880
881    # The compiler can only warn and ignore the option if not recognized
882    # So say no if there are warnings
883      if test -s conftest.err; then
884    echo "$ac_t"no 1>&6
885    compiler_rtti_exceptions=no
886      else
887    echo "$ac_t"yes 1>&6
888    compiler_rtti_exceptions=yes
889      fi
890  else
891    # Append any errors to the config.log.
892    cat conftest.err 1>&5
893    compiler_rtti_exceptions=no
894    echo "$ac_t"no 1>&6
895  fi
896  CFLAGS="$save_CFLAGS"
897  $rm conftest*
898
899  if test "$compiler_rtti_exceptions" = "yes"; then
900    no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
901  else
902    no_builtin_flag=' -fno-builtin'
903  fi
904 
905fi
906
907# See if the linker supports building shared libraries.
908echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
909
910allow_undefined_flag=
911no_undefined_flag=
912need_lib_prefix=unknown
913need_version=unknown
914# when you set need_version to no, make sure it does not cause -set_version
915# flags to be left without arguments
916archive_cmds=
917archive_expsym_cmds=
918old_archive_from_new_cmds=
919old_archive_from_expsyms_cmds=
920striplib=
921old_striplib=
922export_dynamic_flag_spec=
923whole_archive_flag_spec=
924thread_safe_flag_spec=
925hardcode_into_libs=no
926hardcode_libdir_flag_spec=
927hardcode_libdir_separator=
928hardcode_direct=no
929hardcode_minus_L=no
930hardcode_shlibpath_var=unsupported
931runpath_var=
932link_all_deplibs=unknown
933always_export_symbols=no
934export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
935# include_expsyms should be a list of space-separated symbols to be *always*
936# included in the symbol list
937include_expsyms=
938# exclude_expsyms can be an egrep regular expression of symbols to exclude
939# it will be wrapped by ` (' and `)$', so one must not match beginning or
940# end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
941# as well as any symbol that contains `d'.
942exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
943# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
944# platforms (ab)use it in PIC code, but their linkers get confused if
945# the symbol is explicitly referenced.  Since portable code cannot
946# rely on this symbol name, it's probably fine to never include it in
947# preloaded symbol tables.
948extract_expsyms_cmds=
949
950case "$host_os" in
951cygwin* | mingw*)
952  # FIXME: the MSVC++ port hasn't been tested in a loooong time
953  # When not using gcc, we currently assume that we are using
954  # Microsoft Visual C++.
955  if test "$with_gcc" != yes; then
956    with_gnu_ld=no
957  fi
958  ;;
959
960esac
961
962ld_shlibs=yes
963if test "$with_gnu_ld" = yes; then
964  # If archive_cmds runs LD, not CC, wlarc should be empty
965  wlarc='${wl}'
966
967  # See if GNU ld supports shared libraries.
968  case "$host_os" in
969  aix3* | aix4*)
970    # On AIX, the GNU linker is very broken
971    ld_shlibs=no
972    cat <<EOF 1>&2
973
974*** Warning: the GNU linker, at least up to release 2.9.1, is reported
975*** to be unable to reliably create shared libraries on AIX.
976*** Therefore, libtool is disabling shared libraries support.  If you
977*** really care for shared libraries, you may want to modify your PATH
978*** so that a non-GNU linker is found, and then restart.
979
980EOF
981    ;;
982
983  amigaos*)
984    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)'
985    hardcode_libdir_flag_spec='-L$libdir'
986    hardcode_minus_L=yes
987
988    # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
989    # that the semantics of dynamic libraries on AmigaOS, at least up
990    # to version 4, is to share data among multiple programs linked
991    # with the same dynamic library.  Since this doesn't match the
992    # behavior of shared libraries on other platforms, we can use
993    # them.
994    ld_shlibs=no
995    ;;
996
997  beos*)
998    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
999      allow_undefined_flag=unsupported
1000      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1001      # support --undefined.  This deserves some investigation.  FIXME
1002      archive_cmds='$CC -nostart $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname -o $lib'
1003    else
1004      ld_shlibs=no
1005    fi
1006    ;;
1007
1008  cygwin* | mingw*)
1009    # hardcode_libdir_flag_spec is actually meaningless, as there is
1010    # no search path for DLLs.
1011    hardcode_libdir_flag_spec='-L$libdir'
1012    allow_undefined_flag=unsupported
1013    always_export_symbols=yes
1014
1015    extract_expsyms_cmds='test -f $objdir/impgen.c || \
1016      sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/impgen.c~
1017      test -f $objdir/impgen.exe || (cd $objdir && \
1018      if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1019      else $CC -o impgen impgen.c ; fi)~
1020      $objdir/impgen $dir/$soname > $objdir/$soname-def'
1021
1022    old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$newlib'
1023
1024    # cygwin and mingw dlls have different entry points and sets of symbols
1025    # to exclude.
1026    # FIXME: what about values for MSVC?
1027    dll_entry=__cygwin_dll_entry@12
1028    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1029    case "$host_os" in
1030    mingw*)
1031      # mingw values
1032      dll_entry=_DllMainCRTStartup@12
1033      dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1034      ;;
1035    esac
1036
1037    # mingw and cygwin differ, and it's simplest to just exclude the union
1038    # of the two symbol sets.
1039    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1040
1041    # recent cygwin and mingw systems supply a stub DllMain which the user
1042    # can override, but on older systems we have to supply one (in ltdll.c)
1043    if test "x$lt_cv_need_dllmain" = "xyes"; then
1044      ltdll_obj="objdir/$soname-ltdll.$objext "
1045      ltdll_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~
1046        test -f $objdir/$soname-ltdll.$objext || (cd $objdir && $CC -c $soname-ltdll.c)~'
1047    else
1048      ltdll_obj=
1049      ltdll_cmds=
1050    fi
1051
1052    # Extract the symbol export list from an `--export-all' def file,
1053    # then regenerate the def file from the symbol export list, so that
1054    # the compiled dll only exports the symbol export list.
1055    export_symbols_cmds="$ltdll_cmds"'
1056      $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $objdir/$soname-def '$ltdll_obj'$libobjs $convenience~      sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ;.*//" < $objdir/$soname-def > $export_symbols'
1057 
1058    archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~
1059      _lt_hint=1;
1060      cat $export_symbols | while read symbol; do
1061    echo "  \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def;
1062    _lt_hint=`expr 1 + \$_lt_hint`;
1063      done~
1064      '"$ltdll_cmds"'
1065      $CC -Wl,--base-file,$objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
1066      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
1067      $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
1068      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~
1069      $CC $objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags'
1070    ;;
1071
1072  netbsd*)
1073    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1074      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1075      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1076    else
1077      archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1078    fi
1079    ;;
1080
1081  solaris* | sysv5*)
1082    if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1083      ld_shlibs=no
1084      cat <<EOF 1>&2
1085
1086*** Warning: The releases 2.8.* of the GNU linker cannot reliably
1087*** create shared libraries on Solaris systems.  Therefore, libtool
1088*** is disabling shared libraries support.  We urge you to upgrade GNU
1089*** binutils to release 2.9.1 or newer.  Another option is to modify
1090*** your PATH or compiler configuration so that the native linker is
1091*** used, and then restart.
1092
1093EOF
1094    elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1095      archive_cmds='$CC -shared $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname -o $lib'
1096      archive_expsym_cmds='$CC -shared $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1097    else
1098      ld_shlibs=no
1099    fi
1100    ;;     
1101
1102  sunos4*)
1103    archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1104    wlarc=
1105    hardcode_direct=yes
1106    hardcode_shlibpath_var=no
1107    ;;
1108
1109  *)
1110    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1111      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1112      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1113    else
1114      ld_shlibs=no
1115    fi
1116    ;;
1117  esac
1118
1119  if test "$ld_shlibs" = yes; then
1120    runpath_var=LD_RUN_PATH
1121    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1122    export_dynamic_flag_spec='${wl}--export-dynamic'
1123    case $host_os in
1124    cygwin* | mingw*)
1125      # dlltool doesn't understand --whole-archive et. al.
1126      whole_archive_flag_spec=
1127      ;;
1128    *)
1129      # ancient GNU ld didn't support --whole-archive et. al.
1130      if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
1131        whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
1132      else
1133        whole_archive_flag_spec=
1134      fi
1135      ;;
1136    esac
1137  fi
1138else
1139  # PORTME fill in a description of your system's linker (not GNU ld)
1140  case "$host_os" in
1141  aix3*)
1142    allow_undefined_flag=unsupported
1143    always_export_symbols=yes
1144    archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
1145    # Note: this linker hardcodes the directories in LIBPATH if there
1146    # are no directories specified by -L.
1147    hardcode_minus_L=yes
1148    if test "$with_gcc" = yes && test -z "$link_static_flag"; then
1149      # Neither direct hardcoding nor static linking is supported with a
1150      # broken collect2.
1151      hardcode_direct=unsupported
1152    fi
1153    ;;
1154
1155  aix4*)
1156    hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
1157    hardcode_libdir_separator=':'
1158    if test "$with_gcc" = yes; then
1159      collect2name=`${CC} -print-prog-name=collect2`
1160      if test -f "$collect2name" && \
1161     strings "$collect2name" | grep resolve_lib_name >/dev/null
1162      then
1163    # We have reworked collect2
1164    hardcode_direct=yes
1165      else
1166    # We have old collect2
1167    hardcode_direct=unsupported
1168    # It fails to find uninstalled libraries when the uninstalled
1169    # path is not listed in the libpath.  Setting hardcode_minus_L
1170    # to unsupported forces relinking
1171    hardcode_minus_L=yes
1172    hardcode_libdir_flag_spec='-L$libdir'
1173    hardcode_libdir_separator=
1174      fi
1175      shared_flag='-shared'
1176    else
1177      shared_flag='${wl}-bM:SRE'
1178      hardcode_direct=yes
1179    fi
1180    allow_undefined_flag=' ${wl}-berok'
1181    archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
1182    archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
1183    case "$host_os" in aix4.[01]|aix4.[01].*)
1184      # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
1185      always_export_symbols=yes ;;
1186    esac
1187   ;;
1188
1189  amigaos*)
1190    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)'
1191    hardcode_libdir_flag_spec='-L$libdir'
1192    hardcode_minus_L=yes
1193    # see comment about different semantics on the GNU ld section
1194    ld_shlibs=no
1195    ;;
1196
1197  cygwin* | mingw*)
1198    # When not using gcc, we currently assume that we are using
1199    # Microsoft Visual C++.
1200    # hardcode_libdir_flag_spec is actually meaningless, as there is
1201    # no search path for DLLs.
1202    hardcode_libdir_flag_spec=' '
1203    allow_undefined_flag=unsupported
1204    # Tell ltmain to make .lib files, not .a files.
1205    libext=lib
1206    # FIXME: Setting linknames here is a bad hack.
1207    archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1208    # The linker will automatically build a .lib file if we build a DLL.
1209    old_arc