~ubuntu-branches/ubuntu/natty/xfce4-weather-plugin/natty-proposed

« back to all changes in this revision

Viewing changes to ltcf-c.sh

  • Committer: Bazaar Package Importer
  • Author(s): Yves-Alexis Perez
  • Date: 2006-09-29 12:14:42 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060929121442-3ljmszbbmmv1x0f5
Tags: 0.5.99.1-2
debian/control: bumped xfce4-panel build-dep to 4.4rc1 to fix FTBFS. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#### This script is meant to be sourced by ltconfig.
2
 
 
3
 
# ltcf-c.sh - Create a C compiler specific configuration
4
 
#
5
 
# Copyright (C) 1996-2000, 2001 Free Software Foundation, Inc.
6
 
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7
 
#
8
 
# This file is free software; you can redistribute it and/or modify it
9
 
# under the terms of the GNU General Public License as published by
10
 
# the Free Software Foundation; either version 2 of the License, or
11
 
# (at your option) any later version.
12
 
#
13
 
# This program is distributed in the hope that it will be useful, but
14
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
15
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
 
# General Public License for more details.
17
 
#
18
 
# You should have received a copy of the GNU General Public License
19
 
# along with this program; if not, write to the Free Software
20
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
 
#
22
 
# As a special exception to the GNU General Public License, if you
23
 
# distribute this file as part of a program that contains a
24
 
# configuration script generated by Autoconf, you may include it under
25
 
# the same distribution terms that you use for the rest of that program.
26
 
 
27
 
 
28
 
# Source file extension for C test sources.
29
 
ac_ext=c
30
 
 
31
 
# Object file extension for compiled C test sources.
32
 
objext=o
33
 
 
34
 
# Code to be used in simple compile tests
35
 
lt_simple_compile_test_code="int some_variable = 0;"
36
 
 
37
 
# Code to be used in simple link tests
38
 
lt_simple_link_test_code='main(){return(0);}'
39
 
 
40
 
## Linker Characteristics
41
 
case $host_os in
42
 
cygwin* | mingw*)
43
 
  # FIXME: the MSVC++ port hasn't been tested in a loooong time
44
 
  # When not using gcc, we currently assume that we are using
45
 
  # Microsoft Visual C++.
46
 
  if test "$with_gcc" != yes; then
47
 
    with_gnu_ld=no
48
 
  fi
49
 
  ;;
50
 
 
51
 
esac
52
 
 
53
 
ld_shlibs=yes
54
 
if test "$with_gnu_ld" = yes; then
55
 
  # If archive_cmds runs LD, not CC, wlarc should be empty
56
 
  wlarc='${wl}'
57
 
 
58
 
  # See if GNU ld supports shared libraries.
59
 
  case $host_os in
60
 
  aix3* | aix4* | aix5*)
61
 
    # On AIX, the GNU linker is very broken
62
 
    ld_shlibs=no
63
 
    cat <<EOF 1>&2
64
 
 
65
 
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
66
 
*** to be unable to reliably create shared libraries on AIX.
67
 
*** Therefore, libtool is disabling shared libraries support.  If you
68
 
*** really care for shared libraries, you may want to modify your PATH
69
 
*** so that a non-GNU linker is found, and then restart.
70
 
 
71
 
EOF
72
 
    ;;
73
 
 
74
 
  amigaos*)
75
 
    archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
76
 
    hardcode_libdir_flag_spec='-L$libdir'
77
 
    hardcode_minus_L=yes
78
 
 
79
 
    # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
80
 
    # that the semantics of dynamic libraries on AmigaOS, at least up
81
 
    # to version 4, is to share data among multiple programs linked
82
 
    # with the same dynamic library.  Since this doesn't match the
83
 
    # behavior of shared libraries on other platforms, we can use
84
 
    # them.
85
 
    ld_shlibs=no
86
 
    ;;
87
 
 
88
 
  beos*)
89
 
    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
90
 
      allow_undefined_flag=unsupported
91
 
      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
92
 
      # support --undefined.  This deserves some investigation.  FIXME
93
 
      archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
94
 
    else
95
 
      ld_shlibs=no
96
 
    fi
97
 
    ;;
98
 
 
99
 
  cygwin* | mingw*)
100
 
    # hardcode_libdir_flag_spec is actually meaningless, as there is
101
 
    # no search path for DLLs.
102
 
    hardcode_libdir_flag_spec='-L$libdir'
103
 
    allow_undefined_flag=unsupported
104
 
    always_export_symbols=yes
105
 
 
106
 
    extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
107
 
      sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~
108
 
      test -f $output_objdir/impgen.exe || (cd $output_objdir && \
109
 
      if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
110
 
      else $CC -o impgen impgen.c ; fi)~
111
 
      $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
112
 
 
113
 
    old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
114
 
 
115
 
    # cygwin and mingw dlls have different entry points and sets of symbols
116
 
    # to exclude.
117
 
    # FIXME: what about values for MSVC?
118
 
    dll_entry=__cygwin_dll_entry@12
119
 
    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
120
 
    case $host_os in
121
 
    mingw*)
122
 
      # mingw values
123
 
      dll_entry=_DllMainCRTStartup@12
124
 
      dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
125
 
      ;;
126
 
    esac
127
 
 
128
 
    # mingw and cygwin differ, and it's simplest to just exclude the union
129
 
    # of the two symbol sets.
130
 
    dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
131
 
 
132
 
    # recent cygwin and mingw systems supply a stub DllMain which the user
133
 
    # can override, but on older systems we have to supply one (in ltdll.c)
134
 
    if test "x$lt_cv_need_dllmain" = "xyes"; then
135
 
      ltdll_obj='$output_objdir/$soname-ltdll.'"$objext "
136
 
      ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/$soname-ltdll.c~
137
 
        test -f $output_objdir/$soname-ltdll.$objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
138
 
    else
139
 
      ltdll_obj=
140
 
      ltdll_cmds=
141
 
    fi
142
 
 
143
 
    # Extract the symbol export list from an `--export-all' def file,
144
 
    # then regenerate the def file from the symbol export list, so that
145
 
    # the compiled dll only exports the symbol export list.
146
 
    # Be careful not to strip the DATA tag left be newer dlltools.
147
 
    export_symbols_cmds="$ltdll_cmds"'
148
 
      $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
149
 
      sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
150
 
 
151
 
    # If the export-symbols file already is a .def file (1st line
152
 
    # is EXPORTS), use it as is.
153
 
    # If DATA tags from a recent dlltool are present, honour them!
154
 
    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
155
 
        cp $export_symbols $output_objdir/$soname-def;
156
 
      else
157
 
        echo EXPORTS > $output_objdir/$soname-def;
158
 
        _lt_hint=1;
159
 
        cat $export_symbols | while read symbol; do
160
 
         set dummy \$symbol;
161
 
         case \[$]# in
162
 
           2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
163
 
           *) echo "     \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
164
 
         esac;
165
 
         _lt_hint=`expr 1 + \$_lt_hint`;
166
 
        done;
167
 
      fi~
168
 
      '"$ltdll_cmds"'
169
 
      $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
170
 
      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
171
 
      $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
172
 
      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
173
 
      $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
174
 
    ;;
175
 
 
176
 
  netbsd*)
177
 
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
178
 
      archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
179
 
      wlarc=
180
 
    else
181
 
      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
182
 
      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
183
 
    fi
184
 
    ;;
185
 
 
186
 
  solaris* | sysv5*)
187
 
    if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
188
 
      ld_shlibs=no
189
 
      cat <<EOF 1>&2
190
 
 
191
 
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
192
 
*** create shared libraries on Solaris systems.  Therefore, libtool
193
 
*** is disabling shared libraries support.  We urge you to upgrade GNU
194
 
*** binutils to release 2.9.1 or newer.  Another option is to modify
195
 
*** your PATH or compiler configuration so that the native linker is
196
 
*** used, and then restart.
197
 
 
198
 
EOF
199
 
    elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
200
 
      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
201
 
      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
202
 
    else
203
 
      ld_shlibs=no
204
 
    fi
205
 
    ;;
206
 
 
207
 
  sunos4*)
208
 
    archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
209
 
    wlarc=
210
 
    hardcode_direct=yes
211
 
    hardcode_shlibpath_var=no
212
 
    ;;
213
 
 
214
 
  *)
215
 
    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
216
 
      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
217
 
      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
218
 
    else
219
 
      ld_shlibs=no
220
 
    fi
221
 
    ;;
222
 
  esac
223
 
 
224
 
  if test "$ld_shlibs" = yes; then
225
 
    runpath_var=LD_RUN_PATH
226
 
    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
227
 
    export_dynamic_flag_spec='${wl}--export-dynamic'
228
 
    case $host_os in
229
 
    cygwin* | mingw*)
230
 
      # dlltool doesn't understand --whole-archive et. al.
231
 
      whole_archive_flag_spec=
232
 
      ;;
233
 
    *)
234
 
      # ancient GNU ld didn't support --whole-archive et. al.
235
 
      if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
236
 
        whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
237
 
      else
238
 
        whole_archive_flag_spec=
239
 
      fi
240
 
      ;;
241
 
    esac
242
 
  fi
243
 
else
244
 
  # PORTME fill in a description of your system's linker (not GNU ld)
245
 
  case $host_os in
246
 
  aix3*)
247
 
    allow_undefined_flag=unsupported
248
 
    always_export_symbols=yes
249
 
    archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
250
 
    # Note: this linker hardcodes the directories in LIBPATH if there
251
 
    # are no directories specified by -L.
252
 
    hardcode_minus_L=yes
253
 
    if test "$with_gcc" = yes && test -z "$link_static_flag"; then
254
 
      # Neither direct hardcoding nor static linking is supported with a
255
 
      # broken collect2.
256
 
      hardcode_direct=unsupported
257
 
    fi
258
 
    ;;
259
 
 
260
 
  aix4* | aix5*)
261
 
    hardcode_direct=yes
262
 
    hardcode_libdir_separator=':'
263
 
    link_all_deplibs=yes
264
 
    # When large executables or shared objects are built, AIX ld can
265
 
    # have problems creating the table of contents.  If linking a library
266
 
    # or program results in "error TOC overflow" add -mminimal-toc to
267
 
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
268
 
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
269
 
    if test "$with_gcc" = yes; then
270
 
      case $host_os in aix4.[012]|aix4.[012].*)
271
 
      # We only want to do this on AIX 4.2 and lower, the check
272
 
      # below for broken collect2 doesn't work under 4.3+
273
 
        collect2name=`${CC} -print-prog-name=collect2`
274
 
        if test -f "$collect2name" && \
275
 
           strings "$collect2name" | grep resolve_lib_name >/dev/null
276
 
        then
277
 
          # We have reworked collect2
278
 
          hardcode_direct=yes
279
 
        else
280
 
          # We have old collect2
281
 
          hardcode_direct=unsupported
282
 
          # It fails to find uninstalled libraries when the uninstalled
283
 
          # path is not listed in the libpath.  Setting hardcode_minus_L
284
 
          # to unsupported forces relinking
285
 
          hardcode_minus_L=yes
286
 
          hardcode_libdir_flag_spec='-L$libdir'
287
 
          hardcode_libdir_separator=
288
 
        fi
289
 
      esac
290
 
      shared_flag='-shared'
291
 
    else
292
 
      # not using gcc
293
 
      if test "$host_cpu" = ia64; then
294
 
        shared_flag='${wl}-G'
295
 
      else
296
 
        shared_flag='${wl}-bM:SRE'
297
 
      fi
298
 
    fi
299
 
 
300
 
    if test "$host_cpu" = ia64; then
301
 
      # On IA64, the linker does run time linking by default, so we don't
302
 
      # have to do anything special.
303
 
      aix_use_runtimelinking=no
304
 
      exp_sym_flag='-Bexport'
305
 
      no_entry_flag=""
306
 
    else
307
 
      # Test if we are trying to use run time linking, or normal AIX style linking.
308
 
      # If -brtl is somewhere in LDFLAGS, we need to do run time linking.
309
 
      aix_use_runtimelinking=no
310
 
      for ld_flag in $LDFLAGS; do
311
 
        if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
312
 
          aix_use_runtimelinking=yes
313
 
          break
314
 
        fi
315
 
      done
316
 
      exp_sym_flag='-bexport'
317
 
      no_entry_flag='-bnoentry'
318
 
    fi
319
 
    # -bexpall does not export symbols beginning with underscore (_)
320
 
    always_export_symbols=yes
321
 
    if test "$aix_use_runtimelinking" = yes; then
322
 
      # Warning - without using the other run time loading flags (-brtl), -berok will
323
 
      #           link without error, but may produce a broken library.
324
 
      allow_undefined_flag=' ${wl}-berok'
325
 
      hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
326
 
      archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
327
 
    else
328
 
      if test "$host_cpu" = ia64; then
329
 
        hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
330
 
        allow_undefined_flag="-z nodefs"
331
 
        archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
332
 
      else
333
 
        allow_undefined_flag=' ${wl}-berok'
334
 
        # -bexpall does not export symbols beginning with underscore (_)
335
 
        always_export_symbols=yes
336
 
        # Exported symbols can be pulled into shared objects from archives
337
 
        whole_archive_flag_spec=' '
338
 
        build_libtool_need_lc=yes
339
 
        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
340
 
        # This is similar to how AIX traditionally builds it's shared libraries.
341
 
        archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
342
 
      fi
343
 
    fi
344
 
    ;;
345
 
 
346
 
  amigaos*)
347
 
    archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
348
 
    hardcode_libdir_flag_spec='-L$libdir'
349
 
    hardcode_minus_L=yes
350
 
    # see comment about different semantics on the GNU ld section
351
 
    ld_shlibs=no
352
 
    ;;
353
 
 
354
 
  cygwin* | mingw*)
355
 
    # When not using gcc, we currently assume that we are using
356
 
    # Microsoft Visual C++.
357
 
    # hardcode_libdir_flag_spec is actually meaningless, as there is
358
 
    # no search path for DLLs.
359
 
    hardcode_libdir_flag_spec=' '
360
 
    allow_undefined_flag=unsupported
361
 
    # Tell ltmain to make .lib files, not .a files.
362
 
    libext=lib
363
 
    # FIXME: Setting linknames here is a bad hack.
364
 
    archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
365
 
    # The linker will automatically build a .lib file if we build a DLL.
366
 
    old_archive_from_new_cmds='true'
367
 
    # FIXME: Should let the user specify the lib program.
368
 
    old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
369
 
    fix_srcfile_path='`cygpath -w "$srcfile"`'
370
 
    ;;
371
 
 
372
 
  darwin* | rhapsody*)
373
 
    case "$host_os" in
374
 
    rhapsody* | darwin1.[012])
375
 
      allow_undefined_flag='-undefined suppress'
376
 
      ;;
377
 
    *) # Darwin 1.3 on
378
 
      allow_undefined_flag='-flat_namespace -undefined suppress'
379
 
      ;;
380
 
    esac
381
 
    archive_cmds='$CC $(if test .$module = .yes; then echo -bundle; else echo -dynamiclib; fi) $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts -install_name $rpath/$soname $verstring'
382
 
    # We need to add '_' to the symbols in $export_symbols first
383
 
    #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols $lib'
384
 
    hardcode_direct=yes
385
 
    hardcode_shlibpath_var=no
386
 
    whole_archive_flag_spec='-all_load $convenience'
387
 
    ;;
388
 
 
389
 
  freebsd1*)
390
 
    ld_shlibs=no
391
 
    ;;
392
 
 
393
 
  # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
394
 
  # support.  Future versions do this automatically, but an explicit c++rt0.o
395
 
  # does not break anything, and helps significantly (at the cost of a little
396
 
  # extra space).
397
 
  freebsd2.2*)
398
 
    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
399
 
    hardcode_libdir_flag_spec='-R$libdir'
400
 
    hardcode_direct=yes
401
 
    hardcode_shlibpath_var=no
402
 
    ;;
403
 
 
404
 
  # Unfortunately, older versions of FreeBSD 2 do not have this feature.
405
 
  freebsd2*)
406
 
    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
407
 
    hardcode_direct=yes
408
 
    hardcode_minus_L=yes
409
 
    hardcode_shlibpath_var=no
410
 
    ;;
411
 
 
412
 
  # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
413
 
  freebsd*)
414
 
    archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
415
 
    hardcode_libdir_flag_spec='-R$libdir'
416
 
    hardcode_direct=yes
417
 
    hardcode_shlibpath_var=no
418
 
    ;;
419
 
 
420
 
  hpux9* | hpux10* | hpux11*)
421
 
    case $host_os in
422
 
    hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
423
 
    *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
424
 
    esac
425
 
    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
426
 
    hardcode_libdir_separator=:
427
 
    hardcode_direct=yes
428
 
    hardcode_minus_L=yes # Not in the search PATH, but as the default
429
 
                         # location of the library.
430
 
    export_dynamic_flag_spec='${wl}-E'
431
 
    ;;
432
 
 
433
 
  irix5* | irix6*)
434
 
    if test "$with_gcc" = yes; then
435
 
      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
436
 
    else
437
 
      archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
438
 
    fi
439
 
    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
440
 
    hardcode_libdir_separator=:
441
 
    link_all_deplibs=yes
442
 
    ;;
443
 
 
444
 
  netbsd*)
445
 
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
446
 
      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
447
 
    else
448
 
      archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
449
 
    fi
450
 
    hardcode_libdir_flag_spec='-R$libdir'
451
 
    hardcode_direct=yes
452
 
    hardcode_shlibpath_var=no
453
 
    ;;
454
 
 
455
 
  newsos6)
456
 
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
457
 
    hardcode_direct=yes
458
 
    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
459
 
    hardcode_libdir_separator=:
460
 
    hardcode_shlibpath_var=no
461
 
    ;;
462
 
 
463
 
  openbsd*)
464
 
    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
465
 
    hardcode_libdir_flag_spec='-R$libdir'
466
 
    hardcode_direct=yes
467
 
    hardcode_shlibpath_var=no
468
 
    ;;
469
 
 
470
 
  os2*)
471
 
    hardcode_libdir_flag_spec='-L$libdir'
472
 
    hardcode_minus_L=yes
473
 
    allow_undefined_flag=unsupported
474
 
    archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
475
 
    old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
476
 
    ;;
477
 
 
478
 
  osf3*)
479
 
    if test "$with_gcc" = yes; then
480
 
      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
481
 
      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
482
 
    else
483
 
      allow_undefined_flag=' -expect_unresolved \*'
484
 
      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
485
 
    fi
486
 
    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
487
 
    hardcode_libdir_separator=:
488
 
    ;;
489
 
 
490
 
  osf4* | osf5*)        # as osf3* with the addition of -msym flag
491
 
    if test "$with_gcc" = yes; then
492
 
      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
493
 
      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
494
 
      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
495
 
    else
496
 
      allow_undefined_flag=' -expect_unresolved \*'
497
 
      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
498
 
      archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
499
 
      $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
500
 
 
501
 
      # cc supports -rpath directly
502
 
      hardcode_libdir_flag_spec='-rpath $libdir'
503
 
    fi
504
 
    hardcode_libdir_separator=:
505
 
    ;;
506
 
 
507
 
  sco3.2v5*)
508
 
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
509
 
    hardcode_shlibpath_var=no
510
 
    runpath_var=LD_RUN_PATH
511
 
    hardcode_runpath_var=yes
512
 
    ;;
513
 
 
514
 
  solaris*)
515
 
    no_undefined_flag=' -z defs'
516
 
    # $CC -shared without GNU ld will not create a library from C++
517
 
    # object files and a static libstdc++, better avoid it by now
518
 
    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
519
 
    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
520
 
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
521
 
    hardcode_libdir_flag_spec='-R$libdir'
522
 
    hardcode_shlibpath_var=no
523
 
    case $host_os in
524
 
    solaris2.[0-5] | solaris2.[0-5].*) ;;
525
 
    *) # Supported since Solaris 2.6 (maybe 2.5.1?)
526
 
      whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
527
 
    esac
528
 
    link_all_deplibs=yes
529
 
    ;;
530
 
 
531
 
  sunos4*)
532
 
    archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
533
 
    hardcode_libdir_flag_spec='-L$libdir'
534
 
    hardcode_direct=yes
535
 
    hardcode_minus_L=yes
536
 
    hardcode_shlibpath_var=no
537
 
    ;;
538
 
 
539
 
  sysv4)
540
 
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
541
 
    runpath_var='LD_RUN_PATH'
542
 
    hardcode_shlibpath_var=no
543
 
    hardcode_direct=no #Motorola manual says yes, but my tests say they lie
544
 
    ;;
545
 
 
546
 
  sysv4.3*)
547
 
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
548
 
    hardcode_shlibpath_var=no
549
 
    export_dynamic_flag_spec='-Bexport'
550
 
    ;;
551
 
 
552
 
  sysv5*)
553
 
    no_undefined_flag=' -z text'
554
 
    # $CC -shared without GNU ld will not create a library from C++
555
 
    # object files and a static libstdc++, better avoid it by now
556
 
    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
557
 
    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
558
 
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
559
 
    hardcode_libdir_flag_spec=
560
 
    hardcode_shlibpath_var=no
561
 
    runpath_var='LD_RUN_PATH'
562
 
    ;;
563
 
 
564
 
  uts4*)
565
 
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
566
 
    hardcode_libdir_flag_spec='-L$libdir'
567
 
    hardcode_shlibpath_var=no
568
 
    ;;
569
 
 
570
 
  dgux*)
571
 
    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
572
 
    hardcode_libdir_flag_spec='-L$libdir'
573
 
    hardcode_shlibpath_var=no
574
 
    ;;
575
 
 
576
 
  sysv4*MP*)
577
 
    if test -d /usr/nec; then
578
 
      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
579
 
      hardcode_shlibpath_var=no
580
 
      runpath_var=LD_RUN_PATH
581
 
      hardcode_runpath_var=yes
582
 
      ld_shlibs=yes
583
 
    fi
584
 
    ;;
585
 
 
586
 
  sysv4.2uw2*)
587
 
    archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
588
 
    hardcode_direct=yes
589
 
    hardcode_minus_L=no
590
 
    hardcode_shlibpath_var=no
591
 
    hardcode_runpath_var=yes
592
 
    runpath_var=LD_RUN_PATH
593
 
    ;;
594
 
 
595
 
  sysv5uw7* | unixware7*)
596
 
    no_undefined_flag='${wl}-z ${wl}text'
597
 
    if test "$GCC" = yes; then
598
 
      archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
599
 
    else
600
 
      archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
601
 
    fi
602
 
    runpath_var='LD_RUN_PATH'
603
 
    hardcode_shlibpath_var=no
604
 
    ;;
605
 
 
606
 
  *)
607
 
    ld_shlibs=no
608
 
    ;;
609
 
  esac
610
 
fi
611
 
 
612
 
## Compiler Characteristics: PIC flags, static flags, etc
613
 
if test "X${ac_cv_prog_cc_pic+set}" = Xset; then
614
 
  :
615
 
else
616
 
  ac_cv_prog_cc_pic=
617
 
  ac_cv_prog_cc_shlib=
618
 
  ac_cv_prog_cc_wl=
619
 
  ac_cv_prog_cc_static=
620
 
  ac_cv_prog_cc_no_builtin=
621
 
  ac_cv_prog_cc_can_build_shared=$can_build_shared
622
 
 
623
 
  if test "$with_gcc" = yes; then
624
 
    ac_cv_prog_cc_wl='-Wl,'
625
 
    ac_cv_prog_cc_static='-static'
626
 
 
627
 
    case $host_os in
628
 
    aix*)
629
 
      # All AIX code is PIC.
630
 
      if test "$host_cpu" = ia64; then
631
 
        # AIX 5 now supports IA64 processor
632
 
        lt_cv_prog_cc_static='-Bstatic'
633
 
      else
634
 
        lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
635
 
      fi
636
 
      ;;
637
 
    amigaos*)
638
 
      # FIXME: we need at least 68020 code to build shared libraries, but
639
 
      # adding the `-m68020' flag to GCC prevents building anything better,
640
 
      # like `-m68040'.
641
 
      ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
642
 
      ;;
643
 
    beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
644
 
      # PIC is the default for these OSes.
645
 
      ;;
646
 
    cygwin* | mingw* | os2*)
647
 
      # This hack is so that the source file can tell whether it is being
648
 
      # built for inclusion in a dll (and should export symbols for example).
649
 
      ac_cv_prog_cc_pic='-DDLL_EXPORT'
650
 
      ;;
651
 
    darwin* | rhapsody*)
652
 
      # PIC is the default on this platform
653
 
      # Common symbols not allowed in MH_DYLIB files
654
 
      ac_cv_prog_cc_pic='-fno-common'
655
 
      ;;
656
 
    *djgpp*)
657
 
      # DJGPP does not support shared libraries at all
658
 
      ac_cv_prog_cc_pic=
659
 
      ;;
660
 
    sysv4*MP*)
661
 
      if test -d /usr/nec; then
662
 
         ac_cv_prog_cc_pic=-Kconform_pic
663
 
      fi
664
 
      ;;
665
 
    *)
666
 
      ac_cv_prog_cc_pic='-fPIC'
667
 
      ;;
668
 
    esac
669
 
  else
670
 
    # PORTME Check for PIC flags for the system compiler.
671
 
    case $host_os in
672
 
    aix*)
673
 
     # All AIX code is PIC.
674
 
      ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
675
 
      ;;
676
 
 
677
 
    hpux9* | hpux10* | hpux11*)
678
 
      # Is there a better ac_cv_prog_cc_static that works with the bundled CC?
679
 
      ac_cv_prog_cc_wl='-Wl,'
680
 
      ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
681
 
      ac_cv_prog_cc_pic='+Z'
682
 
      ;;
683
 
 
684
 
    irix5* | irix6*)
685
 
      ac_cv_prog_cc_wl='-Wl,'
686
 
      ac_cv_prog_cc_static='-non_shared'
687
 
      # PIC (with -KPIC) is the default.
688
 
      ;;
689
 
 
690
 
    cygwin* | mingw* | os2*)
691
 
      # This hack is so that the source file can tell whether it is being
692
 
      # built for inclusion in a dll (and should export symbols for example).
693
 
      ac_cv_prog_cc_pic='-DDLL_EXPORT'
694
 
      ;;
695
 
 
696
 
    newsos6)
697
 
      ac_cv_prog_cc_pic='-KPIC'
698
 
      ac_cv_prog_cc_static='-Bstatic'
699
 
      ;;
700
 
 
701
 
    osf3* | osf4* | osf5*)
702
 
      # All OSF/1 code is PIC.
703
 
      ac_cv_prog_cc_wl='-Wl,'
704
 
      ac_cv_prog_cc_static='-non_shared'
705
 
      ;;
706
 
 
707
 
    sco3.2v5*)
708
 
      ac_cv_prog_cc_pic='-Kpic'
709
 
      ac_cv_prog_cc_static='-dn'
710
 
      ac_cv_prog_cc_shlib='-belf'
711
 
      ;;
712
 
 
713
 
    solaris*)
714
 
      ac_cv_prog_cc_pic='-KPIC'
715
 
      ac_cv_prog_cc_static='-Bstatic'
716
 
      ac_cv_prog_cc_wl='-Wl,'
717
 
      ;;
718
 
 
719
 
    sunos4*)
720
 
      ac_cv_prog_cc_pic='-PIC'
721
 
      ac_cv_prog_cc_static='-Bstatic'
722
 
      ac_cv_prog_cc_wl='-Qoption ld '
723
 
      ;;
724
 
 
725
 
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
726
 
      ac_cv_prog_cc_pic='-KPIC'
727
 
      ac_cv_prog_cc_static='-Bstatic'
728
 
      ac_cv_prog_cc_wl='-Wl,'
729
 
      ;;
730
 
 
731
 
    uts4*)
732
 
      ac_cv_prog_cc_pic='-pic'
733
 
      ac_cv_prog_cc_static='-Bstatic'
734
 
      ;;
735
 
 
736
 
    sysv4*MP*)
737
 
      if test -d /usr/nec ;then
738
 
        ac_cv_prog_cc_pic='-Kconform_pic'
739
 
        ac_cv_prog_cc_static='-Bstatic'
740
 
      fi
741
 
      ;;
742
 
 
743
 
    *)
744
 
      ac_cv_prog_cc_can_build_shared=no
745
 
      ;;
746
 
    esac
747
 
  fi
748
 
  case "$host_os" in
749
 
      # Platforms which do not suport PIC and -DPIC is meaningless
750
 
      # on them:
751
 
      *djgpp*)
752
 
        ac_cv_prog_cc_pic=
753
 
        ;;
754
 
      *)
755
 
        ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
756
 
        ;;
757
 
  esac
758
 
fi
759
 
 
760
 
need_lc=yes
761
 
if test "$enable_shared" = yes && test "$with_gcc" = yes; then
762
 
  case $archive_cmds in
763
 
  *'~'*)
764
 
    # FIXME: we may have to deal with multi-command sequences.
765
 
    ;;
766
 
  '$CC '*)
767
 
    # Test whether the compiler implicitly links with -lc since on some
768
 
    # systems, -lgcc has to come before -lc. If gcc already passes -lc
769
 
    # to ld, don't add -lc before -lgcc.
770
 
    echo $ac_n "checking whether -lc should be explicitly linked in... $ac_c" 1>&6
771
 
    if eval "test \"`echo '$''{'ac_cv_archive_cmds_needs_lc'+set}'`\" = set"; then
772
 
      echo $ac_n "(cached) $ac_c" 1>&6
773
 
      need_lc=$ac_cv_archive_cmds_needs_lc
774
 
    else
775
 
      $rm conftest*
776
 
      echo "static int dummy;" > conftest.$ac_ext
777
 
      if { (eval echo ltcf-c.sh:need_lc: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
778
 
        # Append any warnings to the config.log.
779
 
        cat conftest.err 1>&5
780
 
        soname=conftest
781
 
        lib=conftest
782
 
        libobjs=conftest.$ac_objext
783
 
        deplibs=
784
 
        wl=$ac_cv_prog_cc_wl
785
 
        compiler_flags=-v
786
 
        linker_flags=-v
787
 
        verstring=
788
 
        output_objdir=.
789
 
        libname=conftest
790
 
        save_allow_undefined_flag=$allow_undefined_flag
791
 
        allow_undefined_flag=
792
 
        if { (eval echo ltcf-c.sh:need_lc: \"$archive_cmds\") 1>&5; (eval $archive_cmds) 2>&1 | grep " -lc " 1>&5 ; }; then
793
 
          need_lc=no
794
 
        fi
795
 
        allow_undefined_flag=$save_allow_undefined_flag
796
 
      else
797
 
        cat conftest.err 1>&5
798
 
      fi
799
 
    fi
800
 
    $rm conftest*
801
 
    echo "$ac_t$need_lc" 1>&6
802
 
    ;;
803
 
  esac
804
 
fi
805
 
ac_cv_archive_cmds_needs_lc=$need_lc