OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [acsupport/] [ltconfig] - Blame information for rev 193

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.